How to avoid crashes due to missing string entries?
android, localization
Solution
In eclipse menu `Window --> Properties --> Android --> Lint Error Checking` in the `Correctness:Messages` section set `MissingTranslation` to Error in the `Severity` box. When compile in your default values string.xml each untranslated string would be marked. Most of the time after build you have to click the `refresh icon` in the `Link Warnings` window (next to `Outline window`) to have these errors shown. If there is error after fixing them you have to clean your project, otherwise Eclipse won't built and still show these errors.
Problem
I have an app translated in 3 languages: English, German, Polish So I have these three folders for the languages in the project: ``` values strings.xml values-en strings.xml values-de strings.xml values-pl strings.xml ``` I have realized that If I put all strings into values folder and have some strings missing in the Polish version that the app crashes when accessing the missing strings in the Polish version. I would have expected that the system just gets the string from the default values folder if it does not find it in values-pl folder. Is there any way to catch these potential missing string crashes? EVen if I could get a warning in the compiler that the string in any language is missing would be OK? EDIT AND ADDITION In fact another string was missing in the default too.... so thanks for the answer/comments! But now I have also tested the case where there is a string simply missing in the default strings.xml file only BUT present in all the other files. I do not get any warning or anything else. So in this case if ALL the strings are present in de,en,pl but one is missing in default, then the app crashes in China for example (I understand of course because the default is missing). BUT what bothers me is that I do not find any way to check the completeness of all referenced strings in code. This is how I access the missing string: ``` context.getString(R.string.MYTRING_abc), ```