Comments (6)
Can you explain in more detail what the problem is? The string you posted seems to work fine for me on both import and export.
from android2po.
http://developer.android.com/guide/topics/resources/string-resource.html
Check the formatting and Styling section.
from android2po.
You're a bit cryptic, but I think you may be talking about this issue:
http://stackoverflow.com/questions/4414389/android-xml-percent-symbol
http://groups.google.com/group/android-developers/browse_thread/thread/017d92dd987a8682
To fix this on your end for now, rather than using formatted="false", you probably could also use "%%s: %%s" (see the accepted answer on StackOverflow).
As for android2po, I think what needs to be supported here is a way to persist attributes like "formatted=false" through the conversion to and from a gettext catalog, so that the resource in the generated language-specific XML files will also have the formatted="false" set if the string in the original did.
from android2po.
Sorry I was writting on my phone.
My idea with this is:
If the original holds two %s it would be nice that android2po took care of adding the formatted="false".
from android2po.
I might be willing to implement this as a temporary workaround, if it's needed.
Once android2po is able to correctly copy tag attributes from the original to the language-specific XML files, an auto-detection of "%s %s" wouldn't be needed anymore, since the developer is required to add formatted="false" to his original values/strings.xml file anyway.
from android2po.
You are right. The developer should have the original strings correctly formatted.
from android2po.
Related Issues (20)
- Babel-1.0dev isn't installable because "elsdoerfer.name" is down HOT 4
- crash on UTF-8 characters HOT 3
- Travis CI builds are not being built HOT 3
- a2po does not support ISO 639-2 language codes HOT 7
- KeyError: 'plural_form' HOT 1
- 'pip install android2po' is missing termcolor module
- [improvement] Add option to ignore strings that have the translatable="false" HOT 2
- android resource files with hyphens in filename
- line wrapping width system dependent HOT 3
- Locales: id, he, yi -> in, iw, ji HOT 4
- fy-NL is not a valid locale HOT 2
- Error on unicode character \u00A0 HOT 4
- Automate releases
- Don't mark formated strings as c-format HOT 7
- n/a
- Not emitting empty items in string-array HOT 1
- Cannot process <item>\?</item>
- [feature request] Support for iOS
- wrong issue
- Port to Python3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android2po.