Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-9488

Context IDs replaced in .PO file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.1
    • 4.6.0, 4.6.2
    • Tools: Linguist
    • None
    • Mac OS 10.6, WIndows 7.
    • d1a588512cec7d5fea8ee53b9c0f102d27d1e687

    Description

      The Context ID variable of strings in .PO files are messed up if they contain multiple column characters. This results in a corrupt .PO file.

      Example:

      #: block:2:title
      msgid "Welcome!"
      msgstr ""

      ...will be saved as:

      #: block:2:0
      msgid "Welcome!"
      msgstr "Bienvenue!"

      Notice the `block:2:title` becoming `block:2:0`

      What steps will reproduce the problem?

      1. Open a .PO file like those created by Drupal's i18n module.
      2. Click on any of the strings inside. Edit, or not, some of the translations.
      3. Save.

      What is the expected output? What do you see instead?
      Edited strings with the same IDs as the original.

      What version of the product are you using? On what operating system?
      4.6 on Mac OS 10.6.

      Alternatively, I tried regex-ing out the column characters from the file before editing in Linguist, but the results were worse.

      #: block•2•title
      msgid "Welcome!"
      msgstr ""

      ...would become:

      msgid "Welcome!"
      msgstr "Bienvenue!"

      The entire context line is removed!

      Attachments

        1. Blocks_fr-new-bug.po
          0.1 kB
          Gabriel Radic
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            buddenha Oswald Buddenhagen
            gr Gabriel Radic
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes