On Mon, 6 May 2024 17:53:56 GMT, Naoto Sato <na...@openjdk.org> wrote:

> This PR is to implement the `nonlikelyScript` feature that went into CLDR 
> version 45 for migration purposes. In its release note, it states 
> (https://cldr.unicode.org/index/downloads/cldr-45):
> 
> Migration
> Changes to parentLocales require upgrading implementations that use that 
> element. In particular, they need to support the new nonlikelyScript value, 
> and use the appropriate explicit inheritance for each type of inheritance. 
> The v44 list of locales that inherit directly from root is retained for this 
> release, but will disappear in the future. So implementations should move as 
> quickly as possible to support the new value
> 
> For example in `Russian` locales fallback, its likely script is `Cyrl` 
> (Cyrillic). Thus Russian locales with non-likely script, such as 'ru-Latn' 
> (Russian in Latin script) should fallback directly to `root`, bypassing `ru` 
> (Russian). CLDR has explicit parent locales for this nonlikely scripts, such 
> as `zh-Hant` -> `root` already, but the release note suggests this will go 
> away, and JDK needs to logically handle these non-likely script inheritance 
> cases.
> 
> To implement this behavior, CLDRConverter build tool now generates the 
> `LocaleDataMetaInfo` for java.base module with the new `likelyScriptMap`, 
> which maps the script to its likely languages. Since the map is big, it is 
> lazily initialized when needed. The map is used at runtime to determine the 
> parent locale fallback based on implicit/explicit nonlikely Script 
> inheritance.

Marked as reviewed by joehw (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/19108#pullrequestreview-2042157221

Reply via email to