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

Android xml resource (strings.xml) containing tags aren't parsed correctly #3448

Open
spocky opened this issue Nov 18, 2024 · 4 comments
Open
Labels
P3 Default, possibly shipping in the following two quarters

Comments

@spocky
Copy link

spocky commented Nov 18, 2024

As described here Android resources can contain xliff tags. For example :

<string name="shortcuts_additional_settings">
  <xliff:g id="vendor" example="Xiaomi">%1$s</xliff:g> additional settings
</string>

Unfortunately, when they do, the synchronized resource is not parsed correctly. With the example above, the text (appearing in the left column) will contain the whole string tag, and not only its content.

Capture d'écran 2024-11-19 004407

A workaround for a correct parsing would be to include content in CDATA, but this would then lead to Android studio not replacing %1$s with example data, as it does with the initial syntax.

Is there any way to make the xml parser not fail and output the whole tag instead of only its content as it normally should ?

@github-project-automation github-project-automation bot moved this to 🆕 Needs triage in Pontoon Roadmap Nov 18, 2024
@mathjazz mathjazz added bug P3 Default, possibly shipping in the following two quarters labels Nov 20, 2024
@mathjazz mathjazz moved this from 🆕 Needs triage to 🔖 Ready in Pontoon Roadmap Nov 20, 2024
@mathjazz
Copy link
Collaborator

Thanks for the report! We're in the process of switching file parsers and serializers to our new moz.l10n library, which will allow Pontoon to support cases like this.

@spocky
Copy link
Author

spocky commented Feb 13, 2025

Is there any PR I could follow to check the progress regarding this migration and be alerted when this will be supported ?

@mathjazz
Copy link
Collaborator

Please see #3538.

@eemeli Would you like this issue to remain open?

@eemeli
Copy link
Member

eemeli commented Feb 14, 2025

Yeah, this should remain open as a bug we'll hopefully be able to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Default, possibly shipping in the following two quarters
Projects
Status: 🔖 Ready
Development

No branches or pull requests

3 participants