Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

illegal XLIFF file format due to jms:reference-file elements #39

Closed
ChMat opened this issue May 11, 2012 · 2 comments
Closed

illegal XLIFF file format due to jms:reference-file elements #39

ChMat opened this issue May 11, 2012 · 2 comments

Comments

@ChMat
Copy link
Contributor

ChMat commented May 11, 2012

Hi,

I managed to setup JMSTranslationBundle version 1.0.0-DEV with symfony 2.0.12.

I tried extracting content for translation in XLIFF format. This content has to be translated with SDL Trados.

At the moment, JMS includes <jms:reference-file> elements at the very beginning of every <trans-unit> element. But the thing is that XLIFF 1.2 specs define that the elements inside a <trans-unit> should be in a specific order:

One <source> element, followed by
Zero or one <seg-source> element, followed by
Zero or one <target> element, followed by
Zero, one or more <context-group>, <count-group>, <prop-group>, <note>, <alt-trans> elements, in any order, followed by
Zero, one or more non-XLIFF elements.

All child elements of <trans-unit> pertain to their sibling <source> element.
While for backward compatibility reasons no order is enforced for the elements before the non-XLIFF elements, the recommended order is the one in which they are listed here.

In other words, placing <jms:reference-file> elements at the end of trans-units should make XLIFF files compatible with computer-aided translation tools like SDL Trados.

Another common issue is that CAT tools like Trados want that source-language and target-language file attributes bear the full language-country attribute rather than a single language attribute.

For more information on XLIFF spec, see http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#trans-unit

Thanks for your hard work :-)

@ChMat
Copy link
Contributor Author

ChMat commented May 11, 2012

I committed the needed change here : ChMat@c461410

@ChMat ChMat closed this as completed May 11, 2012
@schmittjoh
Copy link
Owner

Would you mind sending a PR? Could you also check whether the tests are still passing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants