1

I have an app that usually translates into 3 different languages. Thai, indonesia and english (default). but on occasion i have a feature that is only applicable to thailand and english and indonesia does not need translations so i have left indonesia local string file empty.

Lets take a look at an example using android studios strings translations editor:

enter image description here

as you can see these a1,a2,a3,a4 are only required in thailand and english (default). so i left indonesia empty. Now lint gives off warnings that i am missing translations for indonesia. Is there any flag i can use to stop the lint check or is the best practice to still copy the string into indonesia even though its not used ?

j2emanue
  • 60,549
  • 65
  • 286
  • 456

1 Answers1

0

There's no way to specify what you want exactly since your use case is I guess not widely used and it didn't make it into lint.

You can however use the tools:ignore="MissingTranslation"

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
  <string name="foo" tools:ignore="MissingTranslation">1</string>
</resources>
Niklas
  • 23,674
  • 33
  • 131
  • 170