Skip to content

Fixed fallback_language issue#3242

Merged
Corepex merged 2 commits into1.xfrom
3161-localization-add-new-locale-xx-yyxx_yy-does-not-workmakes-system_settings-inaccessible-v2
Mar 31, 2026
Merged

Fixed fallback_language issue#3242
Corepex merged 2 commits into1.xfrom
3161-localization-add-new-locale-xx-yyxx_yy-does-not-workmakes-system_settings-inaccessible-v2

Conversation

@Corepex
Copy link
Copy Markdown
Contributor

@Corepex Corepex commented Mar 27, 2026

Changes in this pull request

Resolves #3161

Additional info

This pull request updates the language selection logic in the system settings localization form to ensure consistent handling of language codes by normalizing hyphens to underscores. This prevents duplicate entries and ensures fallback languages are correctly initialized.

Language code normalization:

  • In language-select.tsx, language codes are normalized by replacing hyphens with underscores when filtering out already selected languages, preventing duplicates due to differing formats.
  • In localization-collapse.tsx, selected language codes are normalized before adding to valid_languages, and corresponding entries in fallback_languages are initialized, ensuring consistency and proper initialization in the form state.

@Corepex Corepex self-assigned this Mar 27, 2026
@sonarqubecloud
Copy link
Copy Markdown

@Corepex Corepex requested a review from xIrusux March 31, 2026 07:57
Copy link
Copy Markdown
Contributor

@xIrusux xIrusux left a comment

Choose a reason for hiding this comment

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

LGTM :)

@Corepex Corepex merged commit 734be57 into 1.x Mar 31, 2026
1 check passed
@Corepex Corepex deleted the 3161-localization-add-new-locale-xx-yyxx_yy-does-not-workmakes-system_settings-inaccessible-v2 branch March 31, 2026 09:17
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Localization] Add new locale (xx-YY/xx_YY) does not work/makes system_settings inaccessible

2 participants