2

Basically I have a few %s type of parameters inside my strings. The translators will often translate that incorrectly, either by not putting it at all or putting % s or s% or just something totally different. Is there an easy way for me to find these errors? I know Android Studio knows they are wrong because it marks that when I look at the code using that string.

Thanks.

casolorz
  • 8,486
  • 19
  • 93
  • 200
  • have you searched into the inspection profile that you use? – njzk2 May 08 '17 at 17:28
  • I've looked around and couldn't find anything that sounded like what I wanted but I'm not sure if I searched what you are suggesting. Where do I find that? – casolorz May 08 '17 at 18:15
  • In "Settings -> Editor -> Inspection", there is a setting called "Android > Lint > Correctness > Messages | String.format string doesn't match the XML format string" that says "If there are multiple translations of the format string, then all translations use the same type for the same numbered arguments". If that doesn't do what you look for, search for "format" in the inspection settings, and see if something else would work. – njzk2 May 08 '17 at 18:20
  • Seems to be triggered by `formatting argument types incomplete or inconsistent`, but I have only gotten it to work by running it manually, I can't get it to trigger during compile time as an error. – casolorz May 08 '17 at 23:16
  • see this question http://stackoverflow.com/questions/22850333/run-lint-when-building-android-studio-projects about triggering the code check at compile time – njzk2 May 09 '17 at 13:59
  • Thanks. I think that will do it. – casolorz May 09 '17 at 16:46

0 Answers0