是否可以指定value-*个目录中的文件中的字符串故意不被翻译成其他语言?我有一堆对所有语言都通用的字符串,不需要翻译,所以我在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.

如何定义这unlocalized个字符串中的region个?

推荐答案

我不知道如何忽略所有文件,但您可以使用以下命令逐字符串地忽略:

<string name="hello" translatable="false">hello</string>

Android相关问答推荐

如何在安卓系统上使用Float16霓虹灯?

在不增加父行宽度的情况下添加延迟行或可滚动行

Android 14上的慢速意图广播交付

如何删除Jetpack Compose中的Textfield底线

Jetpack创作动画断断续续变化的观点

Jetpack Compose:带芯片的Textfield

Android写/读二进制文件到共享存储

用作输入参数的 Lambda 函数导致重组

如何让这个三角形指示器在 android jetpack compose 中旋转和移动?

Visual Studio 无法在 Android 上编译 .NET MAUI 项目

如何在 Jetpack Compose 中设置行宽等于 TextField 的宽度?

PayUCheckoutPro Android SDK 实现问题

如何在 Jetpack Compose 中设置行宽等于 TextField 的宽度?

如何在 Jetpack Compose 中的 VisualTransformation 之后将光标保持在文本字段的末尾

获取模板向导配方类 Intellij 中的应用程序包名称

有什么方法可以确定正在使用哪个 Android 手机的麦克风进行录音?

如何在jetpack compose中创建水印文字效果

在alert 对话框生成器中启动协程

无法使用 Gradle 托管设备对基线配置文件运行测试

可扩展性 Qt 5.15 Android