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

translation ts files having messages with more than one location elements do not validate

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.5.0beta2
    • 4.5.0beta1
    • Misc
    • None

    Description

      Hi. Found the issue while working in ezscriptmonitor spanish translation.
      after running ezlupdate, some of the messages have two location elements, making the file not validate against ts.rng file.

      here's some sample of the file

      <message>
              <location filename="list.php" line="22"/>
              <location filename="view.php" line="27"/>
              <source>Script monitor</source>
              <translation>Monitor de scripts</translation>
      </message>
      

      According to qt linguist definition [1] following line indicates that this kind of message is possible

      <!ELEMENT message (location*, source?, oldsource?, comment?,
      oldcomment?, extracomment?, translatorcomment?, translation?,
      userdata?, extra-**) >
      

      so i think the problem is in the ts.rng file itself. file has this piece of code

      <element name="message">
                    <optional>
                      <element name="location">
                        <attribute name="filename"/>
                        <attribute name="line">
                          <data type="integer"/>
                        </attribute>
                      </element>
                    </optional>
      

      marking location as optional, but not as having more than one. so, i think we should use 'zeroOrMore' for that.

      [1] http://doc.qt.nokia.com/4.5/linguist-ts-file-format.html

      Attachments

        Activity

          People

            andre1 andre1
            desorden desorden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: