Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
407 views
in Technique[技术] by (71.8m points)

localization - Android: Get missing translations for strings-resources

In Android, you can specify the texts in the default locale in res/values/strings.xml. Additional translations can be added for new languages in res/values-it/strings.xml (for Italian for example). If a string is not translated, the fallback-default locale is used.

Currently I can not tell which strings I still need to translate (so are in values/strings.xml, but not in values-$/strings.xml for all $ in languages) and which are translated, although the are obsolte (so are in values-$/strings.xml, but not in values/strings.xml exists $ in languages)

I'm searching for a tool which gives me the translations which are missing and the one which are obsolete.

To be honest, it is not that difficult to write such a tool for the command-line, I can only hardly believe nobody has already done this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This isn't automated, but it's very fast. In Eclipse, to go Window->Show View->Other->Android->Resource Explorer.

Now, under the Resource Explorer tab at the bottom (or wherever you've moved it to) look under String. Each string should have the same number of versions if you have a complete translation, so you can scan down the list in just a few seconds.

Do this for each project that has strings.

I didn't know about this until after I localized, but it's still useful (such as when I add a new string).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...