You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<string name="about_text2">This android app was developed by <a href="http://murrayc.com/">Murray Cumming<a></string>
Then the strings.pot file (and the strings-*.po files) contains this:
msgctxt "about_text2"
msgid ""
"This android app was developed by <a "
"href=http://murrayc.com/>Murray Cumming<a>"
msgstr ""
These lt, gt and quot entities are entirely specific to XML so I wouldn't expect to see them in the .po file for translators to see.
I think there are at least some cases (full HTML to show in an HTML view?) where people really need to correctly escape their markup in strings.xml.
This could get awkward because Android also accepts unescaped markup in strings.xml, in which case it seems to parse the resulting child nodes and pretend that nothing odd happened. And that's actually the only way to have an a link in your TextView's text when specifying the text via the layout XML, so I have to set these in code via Html.fromHtml(getString(R.string.something)).
I actually started using the correct XML escaping in my strings.xml because a2po adds quotes around the strings when importing them back into strings.xml. Android seemes to ignore them, but it seemed odd and I considered it a bug in my strings.xml ratherr than a problem with a2po.
The text was updated successfully, but these errors were encountered:
If my strings.xml has a string such as this:
Then the strings.pot file (and the strings-*.po files) contains this:
These lt, gt and quot entities are entirely specific to XML so I wouldn't expect to see them in the .po file for translators to see.
I think there are at least some cases (full HTML to show in an HTML view?) where people really need to correctly escape their markup in strings.xml.
This could get awkward because Android also accepts unescaped markup in strings.xml, in which case it seems to parse the resulting child nodes and pretend that nothing odd happened. And that's actually the only way to have an a link in your TextView's text when specifying the text via the layout XML, so I have to set these in code via Html.fromHtml(getString(R.string.something)).
I actually started using the correct XML escaping in my strings.xml because a2po adds quotes around the strings when importing them back into strings.xml. Android seemes to ignore them, but it seemed odd and I considered it a bug in my strings.xml ratherr than a problem with a2po.
The text was updated successfully, but these errors were encountered: