如何停止Android Lint对未翻译的字符串进行投诉?

129

有没有办法指定在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.

错误:在af中未翻译“app_name”。 - LF00
11个回答

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接