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

losing string attribute: formatted="false" #24

Open
g-reno opened this issue Nov 18, 2013 · 3 comments · May be fixed by #73
Open

losing string attribute: formatted="false" #24

g-reno opened this issue Nov 18, 2013 · 3 comments · May be fixed by #73

Comments

@g-reno
Copy link

g-reno commented Nov 18, 2013

Using 1.3 dev

When I add the formatted="false" attribute to my strings they get lost on the roundtrip and never show up in my specific language string files.

It would be nice if android2po could preserve this attribute.

@miracle2k
Copy link
Owner

Probably the same issue as #8.

@miracle2k
Copy link
Owner

Heads-Up: I won't have the time to add this anytime soon, but I'll be happy to accept patches.

@g-reno
Copy link
Author

g-reno commented Nov 19, 2013

Not exactly the same as #8 where he seemed to be wanting android2po to magically detect the % strings and then add the formatted="false" attribute.

The attributes are the coders responsibility to add/remove as necessary.

My issue is that android2po is losing what I put in there for attribute.

android2po should be preserving ALL attributes.

.

brentinrochester pushed a commit to brentinrochester/android2po that referenced this issue Feb 8, 2023
It is valid for Android XML files to have strings that disregard
the formatting characters (like percent) by setting the tag
formatted="false", such as:

   <string name="discount" formatted="false">50% off</string>

This tag was previously not being carried through an export/import
cycle. Now it is tracked properly. In the po file we will store
the flag "no-c-format" to mean formatted="false" in the XML.

Note: this is only implemented for <string> at this time, not
<plurals> and <string-array>.

Closes miracle2k#24
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

Successfully merging a pull request may close this issue.

2 participants