Skip to content

V16: Localization refinements#19258

Merged
iOvergaard merged 16 commits intorelease/16.0from
v16/hotfix/user-ui-culture-options
May 7, 2025
Merged

V16: Localization refinements#19258
iOvergaard merged 16 commits intorelease/16.0from
v16/hotfix/user-ui-culture-options

Conversation

@leekelleher
Copy link
Member

Description

Fixes #19227, (points 2 and 3, see #19227 (comment)).

This PR contains additional fixes that we would like to be part of v16.0.

  • Fixes the UI Culture dropdown options on the User workspace, by making a distinct list of the localizations (by culture code)
  • Renamed/reduced the localizations as non-regional, e.g. "fr-FR" is now "fr" as generic French, when regional localizations are required (i.e. "fr-CH" French Switzerland), then that can be re-added later.
  • Removed the Swiss localization files (for French, German and Italian) as they were identical to their generic counterparts. These can be re-introduced if modifications are required.
  • Added the localized name for each culture to the generic English (UK) fallback file. These were previously hardcoded in the manifest's name (which wasn't meant to be used for the label in the backoffice).
  • Updated the localization manifest names, aliases and casing of culture codes.
  • De-duplicated localizations in English (US), so the generic English (UK) can be used as a fallback. This reduces the "en-us.ts" file size significantly.
  • Added any missing localizations from English (US) to English (UK) and Anglicised where appropriate.
  • Removed excessive whitespace characters from English (UK). Reducing the file-size even further.

How to test?

  • Go to the User workspace (for any user), see the UI Culture dropdown, do the localization options appear correct?

  • With the localization changes, it will be tricky to test the generic localizations, (unless if you add a custom localization file with overrides?)

  • With the English (UK) and English (US) differences, try switching between those cultures and noticing the differences with words such as color/colour, (try the "Color Picker Property Editor UI" data-type configuration), or anonymized/anonymised (in the "Telemetry Data" Settings dashboard).

Due to the low weighting of the built-in localizations,
they should appear at the bottom, so overwrite in the `Map()` keys.
So not to depend on the manifest name.
uses underscore (instead of hyphen) as a selectable word-boundary.
Regional localizations can be added to override the generic localizations.
Copied missing localizations over to English (UK),
for fallback purposes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refines localization by removing Swiss-specific language files since they duplicate existing generic localizations.

  • Removed Italian (Switzerland), French (Switzerland), and German (Switzerland) localization files.
  • Consolidated localization by relying on generic localization files (e.g., it-it, fr-fr, de-de).

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

File Description
src/Umbraco.Web.UI.Client/src/assets/lang/it-ch.ts File removed to de-duplicate Italian localization
src/Umbraco.Web.UI.Client/src/assets/lang/fr-ch.ts File removed to de-duplicate French localization
src/Umbraco.Web.UI.Client/src/assets/lang/de-ch.ts File removed to de-duplicate German localization
Comments suppressed due to low confidence (3)

src/Umbraco.Web.UI.Client/src/assets/lang/it-ch.ts:1

  • Ensure that all module references and imports to the removed Italian (Switzerland) localization file have been updated to use the generic 'it-it' localization.
File removed

src/Umbraco.Web.UI.Client/src/assets/lang/fr-ch.ts:1

  • Verify that no lingering references to the removed French (Switzerland) localization exist, and that the fallback to the generic 'fr-fr' localization is functioning as expected.
File removed

src/Umbraco.Web.UI.Client/src/assets/lang/de-ch.ts:1

  • Double-check that the removal of the German (Switzerland) localization file does not leave orphaned imports, and that the generic 'de-de' localization is correctly used in its place.
File removed

@leekelleher leekelleher requested a review from iOvergaard May 7, 2025 06:57
The idea is that we don't have a regional override without having a base culture.
@leekelleher
Copy link
Member Author

leekelleher commented May 7, 2025

Note

To resolve the failing acceptance test, a fix to the Playwright Test Helpers was required.
Once umbraco/Umbraco.Playwright.Testhelpers#244 has been merged and released, (and the acceptance tests updated), then this PR should pass and be merged in.

@umbraco/playwright-testhelpers 16.0.11 has been released: https://github.com/umbraco/Umbraco.Playwright.Testhelpers/releases/tag/release%2F16.0.11

@leekelleher leekelleher marked this pull request as ready for review May 7, 2025 09:23
@leekelleher leekelleher marked this pull request as draft May 7, 2025 09:24
@leekelleher leekelleher marked this pull request as ready for review May 7, 2025 11:03
Portuguese (generic) is left empty for now.
and uses `UMB_DEFAULT_LOCALIZATION_CULTURE` constant
@iOvergaard iOvergaard enabled auto-merge (squash) May 7, 2025 13:50
@iOvergaard iOvergaard merged commit 2c58c70 into release/16.0 May 7, 2025
22 of 23 checks passed
@iOvergaard iOvergaard deleted the v16/hotfix/user-ui-culture-options branch May 7, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants