Skip to content

Use java.util.Locale in Workbench NL extensions handling#3991

Draft
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella:icu-workbench-ulocale
Draft

Use java.util.Locale in Workbench NL extensions handling#3991
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella:icu-workbench-ulocale

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented May 8, 2026

Replaces com.ibm.icu.util.ULocale usage in Workbench with java.util.Locale and drops the matching Import-Package: com.ibm.icu.util from the bundle manifest. The legacy ICU-style locale extension string from Platform.getNLExtensions() and the NL_EXTENSIONS preference (e.g. @calendar=hebrew;numbers=arab) is translated to a BCP 47 Unicode locale extension (-u-ca-hebrew-nu-arab) and applied via Locale.forLanguageTag, so existing preference values keep working for the common keyword names (calendar, collation, currency, numbers, timezone) as well as for two-letter BCP 47 keys. Underscores in values are normalized to hyphens so legacy compound values like islamic_civil are accepted. Unknown keys and ill-formed values are silently dropped, matching the previous best-effort ULocale behavior. Long IANA timezone IDs (America/New_York) are not translated since the JDK does not expose the IANA-to-CLDR short-ID mapping; short BCP 47 timezone IDs (@tz=usnyc) still work. This removes the last com.ibm.icu reference from org.eclipse.ui.workbench.

Planned for 4.41

Replaces com.ibm.icu.util.ULocale usage in Workbench with java.util.Locale
and drops the matching Import-Package: com.ibm.icu.util from the bundle
manifest. The legacy ICU-style locale extension string from
Platform.getNLExtensions() and the NL_EXTENSIONS preference (e.g.
"@Calendar=hebrew;numbers=arab") is translated to a BCP 47 Unicode
locale extension ("-u-ca-hebrew-nu-arab") and applied via
Locale.forLanguageTag, so existing preference values keep working for
the common keyword names (calendar, collation, currency, numbers,
timezone) as well as for two-letter BCP 47 keys.

Removes the last com.ibm.icu reference from org.eclipse.ui.workbench.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Test Results

   867 files  ±0     867 suites  ±0   56m 5s ⏱️ + 3m 20s
 7 988 tests ±0   7 745 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 466 runs  ±0  19 811 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit 9751d8a. ± Comparison against base commit 195df72.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant