IBM-Cloud / gp-java-tools

CLI Tools for Globalization Pipeline
https://developer.ibm.com/open/ibm-bluemix-globalization-pipeline-service/node-js-sdk/
Apache License 2.0
9 stars 19 forks source link

XLIFF problems #5

Closed srl295 closed 7 years ago

srl295 commented 8 years ago

XLIFF produced seems to be XLIFF2.0 but doesn't validate in http://okapi-lynx.appspot.com/validation

Two problems and one caveat:

  1. the <xliff> element should have the attribute xmlns="urn:oasis:names:tc:xliff:document:2.0"
  2. the <file> element shouldn't have datatype="plaintext" (according to the validator) and perhaps not original="global" either. It did need to have the id element - <file id="bundlename">

Caveat: the files output are source only. I would expect <source>Englishtext<source><target>Translatedtext</target> or similar.

srl295 commented 8 years ago

Example output:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xliff srcLang="ja" version="2.0">
  <file datatype="plaintext" original="global">
    <body>
      <unit id="U_BUFFER_OVERFLOW_ERROR">
        <source>バッファ氾濫</source>
      </unit>
      <unit id="U_FILE_ACCESS_ERROR">
        <source>そのファイル/物にアクセスしている問題</source>
      </unit>
      <unit id="U_ILLEGAL_ARGUMENT_ERROR">
        <source>不法の議論</source>
      </unit>
      <unit id="U_ILLEGAL_CHAR_FOUND">
        <source>性質が見つけた不法入国者</source>
      </unit>
     </body>
   </file>
</xliff>
JCEmmons commented 7 years ago

Needs to be XLIFF 1.2, not 2.0. Your comments about source/target languages are still quite valid. I don't think it will take too much to get at least that much working properly.