有没有办法指定在values
目录中的文件中的字符串不被翻译成其他语言?
我有一堆对所有语言都通用且不需要翻译的字符串。我在values
目录下创建了一个unlocalized-strings.xml
文件。当我运行Android Lint检查问题时,它一直提示某些翻译缺失。
我不想在整个项目上禁用此检查。我只想在某些XML文件中禁用它。这可行吗?
这是我遇到的错误:
"title_widget_updater_service" is not translated in de, en, en-rUS, it
Issue: Checks for incomplete translations where not all strings are translated
Id: MissingTranslation
If an application has more than one locale, then all the strings declared in one language
should also be translated in all other languages.
By default this detector allows regions of a language to just provide a subset of the
strings and fall back to the standard language strings. You can require all regions to
provide a full translation by setting the environment variable
ANDROID_LINT_COMPLETE_REGIONS.