Android Lint: how to ignore missing translation warnings in a regional locale string file that purposely only overrides some default translations?

A nice way to disable MissingTranslations check is to add the option in module specific build.gradle file .

android {

    lintOptions{
        disable 'MissingTranslation'
    }

    //other build tags
}

If the strings are not present in locale specific Strings file, it will take the strings from the default file which generally is strings.xml.


I found a better solution according to this answer: https://stackoverflow.com/a/13797364/190309

Just add ignore="MissingTranslation" to your string.xml, for example:

<?xml version="1.0" encoding="utf-8"?>
<resources
  xmlns:tools="http://schemas.android.com/tools"
  tools:ignore="MissingTranslation" >

  <!-- your strings here; no need now for the translatable attribute -->

</resources>