Status Update
Comments
uc...@google.com <uc...@google.com>
es...@google.com <es...@google.com>
rt...@e-djuster.ca <rt...@e-djuster.ca> #2
I had started to work on a CL that (maybe) fixed some of this, but never finished it. I'll take a look.
Description
AI-191.8026.42.35.6010548, JRE 1.8.0_202-release-1483-b03x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080, 2560x1440, 2560x1440
AS: 3.5.3; Android Gradle Plugin: 3.5.3; Gradle: 5.4.1; NDK: from local.properties: UNKNOWN, latest from SDK: 20.1.5948944; LLDB: LLDB 3.1 (revision: 3.1.4508709); CMake: from local.properties: (not specified), latest from SDK: 3.10.2, from PATH: (not found)
Steps to reproduce:
1) have the following resource folders:
values
values-en-rGB
values-fr
values-fr-rCA
2)
Have the following strings.xml file in the folders:
values/strings.xml:
<resources xmlns:tools="
tools:locale="en">
<string name="string1">Howdy</string>
<string name="string2">Howdy</string>
</resources>
values-en-rGB/strings.xml:
<resources xmlns:tools="
<string name="string1">Hello</string>
</resources>
values-fr/strings.xml:
<resources xmlns:tools="
<string name="string1">Bonjour</string>
<string name="string2">Bonjour</string>
</resources>
values-fr-rCA/strings.xml:
<resources xmlns:tools="
<string name="string2">Bonjour</string>
</resources>
Expected result:
There should be no warnings, both strings are translated to both English and French
Actual result:
Lint will warn about string2, saying it is not translated to English.
Note, I have included fr-rCA to show that it is not a regional thing. It is happy that as long as it is translated to the "unregioned" french, it does not also need to be translated to Canadian French. In this instance, it will not warn about string1, even though it's not been translated to French Canadian, because it's already been translated to French.