Skip to content

Remove trailing separator from language-only codes - #1383

Merged
asika32764 merged 2 commits into
masterfrom
copilot/fix-trailing-separator-normalizelangcode
Nov 7, 2026
Merged

asika32764 merged 2 commits into
masterfrom
copilot/fix-trailing-separator-normalizelangcode

Conversation

Copilot AI commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

normalizeLangCode('en') returned en- when no region was provided. It now omits the separator for language-only codes while preserving region formatting.

  • Normalization: Return the language alone when the region is empty.
  • Example: LanguageNormalizer::normalizeLangCode('EN') returns 'en'.

Co-authored-by: asika32764 <1639206+asika32764@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix LanguageNormalizer::normalizeLangCode to remove trailing separator Remove trailing separator from language-only codes Nov 7, 2026
Copilot AI requested a review from asika32764 November 7, 2026 17:45
@asika32764
asika32764 marked this pull request as ready for review November 7, 2026 17:47
@asika32764
asika32764 merged commit 4e3047c into master Nov 7, 2026
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.

Title: LanguageNormalizer::normalizeLangCode('en') returns en- (trailing separator)

2 participants