Skip to content

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

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:icu-workbench-ulocale
Open

Use java.util.Locale in Workbench NL extensions handling#3991
vogella wants to merge 1 commit into
eclipse-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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Test Results

   864 files     864 suites   53m 33s ⏱️
 7 988 tests  7 745 ✅ 243 💤 0 ❌
20 418 runs  19 763 ✅ 655 💤 0 ❌

Results for commit 4569ae1.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the icu-workbench-ulocale branch from 9751d8a to 02780a6 Compare May 30, 2026 08:24
@vogella vogella marked this pull request as ready for review May 31, 2026 11:57
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.
@vogella vogella force-pushed the icu-workbench-ulocale branch from 02780a6 to 4569ae1 Compare May 31, 2026 11:57
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