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

前端 未结 6 832
南方客
南方客 2020-12-24 11:34

Is it possible to translate some strings, but not all, in a separate resource file without Lint complaining about MissingTranslation?

For example: m

6条回答
  •  温柔的废话
    2020-12-24 11:53

    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.

提交回复
热议问题