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
Android format: Strings with "xliff" tag not imported fine #628
Comments
Hello @ignaciogs, thanks for the report. Can you provide some details/docs about this tag? The Android format supports only strings in a format like https://github.com/wordpress-mobile/WordPress-Android/blob/develop/WordPress/src/main/res/values/strings.xml is. |
Hi, This is the android documentation |
This is caused by the simplexml parser parsing the xliff:g tag during import and we then do not look for it. I've created a PR that resolves it by encapsulating the tag inside of a CDATA structure and enabling simplexml's option to ignore CDATA tags. |
Confirming this issue: When will your fix be available? Thanks for this amazing work! Note: Some (humble) thoughts In the example I gave, please note that xliff:g xml node give translators a hint about the value of '%s'. This is useful to help translator to understand the context of the text to be translated. Displaying this info in UI (if not too difficult for you) would really be useful! So, when encountering this:
|
@pdalfarr doing a hover is very complex and probably needs some thought put behind it to handle all types of formats that might have this kind of requirement. However I have updated the PR to handle them better by using the comment area to let the translator know what should not be edited. |
Your solution with comment area is great ! Thanks |
Example in android format:
My name is "<xliff:g id="name" example="John">%s</xliff:g>".
is imported as:
My name is "".
The text was updated successfully, but these errors were encountered: