Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-15846

Port ezlupdate to PHP

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Obsolete
    • Icon: Medium Medium
    • Future
    • 4.0.7, 4.1.4, 4.2.0
    • Language
    • None

    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.

      See also:
      http://www.mugo.ca/Blog/Translating-eZ-Publish-websites-a-simple-tool-for-template-script-translations

      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

        1. create_translation_file.php
          6 kB
        2. ezlupdate.php
          28 kB
        3. ezlupdate.php
          28 kB
        4. ezlupdate.php
          27 kB
        5. ezlupdate.php
          12 kB
        6. ezlupdate.php
          8 kB
        7. ezlupdate.php
          7 kB

        Activity

          People

            gl gl
            gl gl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: