Description
The ezlupdate command line program is maintained as a patched version of the Qt program lupdate. This is tedious on major Qt upgrades (currently ezlupdate is maintained for 3 different Qt releases), and compiling it is an extra unwanted concern for end users. We should port it to PHP.
The attached "create_translation_file.php" is by Philipp Kamps at Mugo ( http://www.mugo.ca/ ) and he has agreed to let us use it as a starting point. For this, it is pending a signed CLA licence. He says it has some issues:
- There are some encoding problems
- The script does not handle additional parameters - following translation won't work: {"Editing class - %1"|i18n("design/standard/class/edit",,array($class.name|wash))}
- It's using a php eval in order to handle single quotes in double quotes or double quotes in single quotes. We probably want to rewrite that with regular expression or other more clever method.
As a part of this port, we should use the eZ Publish template parser for parsing i18n tags in templates. This will help solve some other issues:
#15563: Generic approach is needed for text javascript files and 18n
http://issues.ez.no/15563
#14105: i18n operator in a comment in tpl will kill ezlupdate
http://issues.ez.no/14105
These should be fixed after the port:
#14634: Allow ezlupdate to generate translation file even when finding some errors
http://issues.ez.no/14634
#10555: ezlupdate should support location element
http://issues.ez.no/10555
Another useful feature enhancement:
#16854: ezlupdate ts file generation for an extension with a special ts context
http://issues.ez.no/16854
Attachments
Issue Links
- relates to
-
EZP-14105 i18n operator in a comment in tpl will kill ezlupdate
- Closed
-
EZP-15544 ezlupdate has problems with utf8 sources
- Closed
-
EZP-14634 Allow ezlupdate to generate translation file even when finding some errors
- Closed
-
EZP-15563 Generic approach is needed for text javascript files and 18n
- Closed
-
EZP-16854 ezlupdate: ts file generation for an extension with a special ts context
- Closed
-
EZP-10555 ezlupdate should support location element
- Closed