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

language ignored when importing TBX #850

Open
danielnaber opened this issue Sep 14, 2015 · 2 comments
Open

language ignored when importing TBX #850

danielnaber opened this issue Sep 14, 2015 · 2 comments
Labels
enhancement Adding or requesting a new feature. translate-toolkit Issues which need to be fixed in the translate-toolkit

Comments

@danielnaber
Copy link

danielnaber commented Sep 14, 2015

I'm not very familiar with TBX, but according to a DTD validation, this should be valid TBX (TBX-Basic, actually):

    <body>
        <termEntry id="c5">
            <langSet xml:lang="en"><tig><term>English term</term></tig></langSet>
            <langSet xml:lang="de"><tig><term>German term</term></tig></langSet>
            <langSet xml:lang="es"><tig><term>S</term></tig></langSet>
        </termEntry>
    </body>

I can import this to the German translation and it works as expected, but when I import it to the Spanish translation, the German term gets imported as translation. It seems as if the xml:lang is ignored.

@nijel nijel added enhancement Adding or requesting a new feature. translate-toolkit Issues which need to be fixed in the translate-toolkit labels Sep 14, 2015
@nijel
Copy link
Member

nijel commented Sep 14, 2015

Indeed, translate-toolkit doesn't seem to look at the xml:lang attribute at all - it always picks the fist two langSet entries, taking first one as source and second one as target.

@nijel
Copy link
Member

nijel commented Sep 14, 2015

However Weblate could add support on top of that by using unit.getlanguageNode('de') internal API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. translate-toolkit Issues which need to be fixed in the translate-toolkit
Projects
None yet
Development

No branches or pull requests

2 participants