Skip to content

15.3: Hotfix: Localization culture alias case-insensitive check#18849

Merged
iOvergaard merged 1 commit intorelease/15.3.1from
v15/hotfix/localization-culture-casing-check
Mar 27, 2025
Merged

15.3: Hotfix: Localization culture alias case-insensitive check#18849
iOvergaard merged 1 commit intorelease/15.3.1from
v15/hotfix/localization-culture-casing-check

Conversation

@leekelleher
Copy link
Copy Markdown
Member

Description

Fixes #18801.

The localization registry filters out the translations by matching the manifest's culture alias, but it was case-sensitive. This patch makes the check case-insensitive by making the culture alias to be lowercase.

@leekelleher leekelleher added status/regression A previously working feature that has broken or changed behavior unexpectedly area/frontend labels Mar 27, 2025
Copy link
Copy Markdown
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 implements a hotfix for ensuring that localization translations are filtered in a case-insensitive manner by converting manifest culture aliases to lowercase.

  • Converts the culture alias in the registry check to lowercase
  • Improves the robustness of translation filtering by matching case-insensitively
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/core/localization/registry/localization.registry.ts:71

  • [nitpick] Consider ensuring that t.$code is also in lowercase (or documenting that it is always lowercased) so that the comparison remains fully case-insensitive.
diff.some((ext) => ext.meta.culture.toLowerCase() === t.$code),

Copy link
Copy Markdown
Contributor

@iOvergaard iOvergaard left a comment

Choose a reason for hiding this comment

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

LGTM

@iOvergaard iOvergaard enabled auto-merge (squash) March 27, 2025 15:05
@iOvergaard iOvergaard merged commit 85176d1 into release/15.3.1 Mar 27, 2025
24 checks passed
@iOvergaard iOvergaard deleted the v15/hotfix/localization-culture-casing-check branch March 27, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/frontend status/regression A previously working feature that has broken or changed behavior unexpectedly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants