避免机器人林特抱怨没有翻译的字符串 [英] Avoid Android Lint complains about not-translated string
问题描述
是可以指定在值在文件中的字符串 - *
目录故意没有翻译成其他语言?我有一大堆的是适用于所有的语言,不需要翻译的字符串,所以我在创建一个
目录..运行Android皮棉检查是否存在问题口口声声说,一些翻译丢失..我不想要禁用此检查整个项目,我想只有在禁用一些XML文件..这可能吗? 未本地化-的strings.xml
文件值
is it possible to specify that the strings in a file within the value-*
directories are purposely not translated into other languages? I have a bunch of strings that are common for all the languages and need no translation, so I've created an unlocalized-strings.xml
file within values
directory.. Running Android Lint to check for problems it keeps saying that some translations are missing.. I do not want to disable this check on the whole project, I'd like to disable it only in some XML files.. is it possible?
"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.
如何定义这个的区域的未本地化的字符串?
推荐答案
我不知道如何忽略所有的文件,但可以通过串用做字符串:
I don't know how to ignore all the file, but you can do it string by string using:
<string name="hello" translatable="false">hello</string>
好运气
这篇关于避免机器人林特抱怨没有翻译的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!