Closed Bug 1465711 Opened 7 years ago Closed 4 years ago

Determine Android BCP47 support in resource names

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: Pike, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

https://developer.android.com/guide/topics/resources/providing-resources states that resource names can now use BCP47 locale codes, but only gives limited examples. It's also not clearly stated on whether the Android 7 requirement is buildtime or runtime. It'd be helpful to have an experiment to find out the following: - Android platform support - BCP47 features -- Script tags -- Locale-matching details -- standard-conformant locale names (hebrew, indonesian) I'd like to see an testing app with two strings, one for language, one for region-script. It should have locale-dependent strings for the following codes: None (res/values/strings.xml) he id sr sr-Cyrl sr-Latn zh-Hans zh-Hant zh-Hant-TW The first string should be language name, the second string script name or region (for Taiwan), or "global". I'd like a test matrix of: Android versions 4.4-8, KitKat - Oreo. Simulators should suffice here. Language/Region settings: English - US Hebrew - X Indonesian - X Serbian - XXX needs investigation, there's google hits for Cyrl/Latn, but I don't know the UI to set prefs here Chinese - - CN - HK - US - TW I'd argue that the test app is test code, so public domain licensing preferred, aka CC0, per https://www.mozilla.org/en-US/MPL/license-policy/
(In reply to Axel Hecht [:Pike] from comment #0) > https://developer.android.com/guide/topics/resources/providing-resources > states that resource names can now use BCP47 locale codes, but only gives > limited examples. > > It's also not clearly stated on whether the Android 7 requirement is > buildtime or runtime. Just FYI -- I rather think this is a build-time thing. That is, you can now use `res/values-BCP47` instead of `res/values-old-style` and the Android toolchain will produce `res/values-old-style` in the APK. I have not confirmed this, but it's the only thing that could be backward compatible.
Priority: -- → P3
I used values-b+sr+Latn in my dummy test app, and unpacked that apk with the apktool, and it recreated values-b+sr+Latn. Maybe that's not a build-, but a run-time thing. I didn't actually test that in a simulator on an old Android version.
(In reply to Axel Hecht [:Pike] from comment #2) > I used values-b+sr+Latn in my dummy test app, and unpacked that apk with the > apktool, and it recreated values-b+sr+Latn. > > Maybe that's not a build-, but a run-time thing. > > I didn't actually test that in a simulator on an old Android version. What is the targetSdkVersion of your test app? Can you post the APK somewhere? I'm not confident that apktool is not "inverting the mapping", since it does many, many things to try to reproduce the inputs to the build.

Nick - is this bug still relevant?

Flags: needinfo?(nalexander)

(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #4)

Nick - is this bug still relevant?

GV does not ship Android resources, so no, it is not.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(nalexander)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.