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

XLIFF 1.2 attributes (state, approved and others) are not respected #478

Open
mcorteel opened this issue Feb 7, 2018 · 0 comments
Open

Comments

@mcorteel
Copy link

mcorteel commented Feb 7, 2018

Q A
Bundle version 1.3.2
Symfony version 3.4.3
PHP version 7.2.1

Let's say that I have the string "Hello wold" in my project.
Extracting it with php bin/console translation:extract will output the following <trans-unit>:

<trans-unit id="[some_id]" resname="Hello world">
         <source>Hello world</source>
         <target>Hello world</target>
         <jms:reference-file line="[some_line]">[some_file]</jms:reference-file>
</trans-unit>

Now, I translate it with lokalize and get:

<trans-unit approved="yes" resname="Hello world" id="[some_id]">
         <source>Hello world</source>
         <target phase-name="approval-1" state="signed-off">Bonjour le monde</target>
         <jms:reference-file line="[some_line]">[some_file]</jms:reference-file>
</trans-unit>

Now, I want to extract my translation again, and...

Expected behavior

<trans-unit approved="yes" resname="Hello world" id="[some_id]">
         <source>Hello world</source>
         <target phase-name="approval-1" state="signed-off">Bonjour le monde</target>
         <jms:reference-file line="[some_line]">[some_file]</jms:reference-file>
</trans-unit>

Actual behavior

<trans-unit resname="Hello world" id="[some_id]">
         <source>Hello world</source>
         <target>Bonjour le monde</target>
         <jms:reference-file line="[some_line]">[some_file]</jms:reference-file>
</trans-unit>

Conclusion

I would like the extractor to keep the approved, phase-name and state attributes which are essential to a good i18n workflow.
Is that at all possible? I have no idea how the extractor works with the pre-existing state of translations but that would really make the translation files more usable.
Any thoughts on this issue?

Anyway, thanks for a great bundle!

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

1 participant