fix: a deliberately enabled language code wins over a stray region tag - #392
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Kabyle was enabled as "kab" and served as "kab-DZ". merge_equivalent_langs
treated the more specific tag as canonical for any pair within tag distance
0, so one kab-DZ locale directory renamed the language for everyone: the
deployed merge map reads {"kab": "kab-DZ"}. Kabyle has no commonly-used
region, so every translation is filed under an invented tag, and merging
those pull requests spreads it across the ecosystem.
Codes listed in config/enabled_languages.txt were chosen deliberately and
now win regardless of region specificity. Outside that set the more specific
tag still wins, so da/da-DK is unchanged and sv-FI/sv-SE stay separate. This
also restores "an" and "ast", which are enabled bare and had been renamed to
an-ES and ast-ES the same way.
A language whose code normalizes to itself is no longer reported as a bad
lang code. Kabyle was listed as a repo defect offering to rename locale/kab
to locale/kab, which committed nothing.
JarbasAl
force-pushed
the
fix/canonical-lang-code-wins
branch
from
August 25, 2026 20:51
2fad744 to
c7eb894
Compare
JarbasAl
marked this pull request as ready for review
August 25, 2026 21:29
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kabyle was enabled as
kabin #209 and is being served askab-DZ. Kabyle has no commonly-used region subtag, sokab-DZis invented.merge_equivalent_langssorted region-tagged codes first and treated the first as canonical for anything within tag distance 0.kabandkab-DZare distance 0, so akab-DZlocale directory was enough to rename the language for everyone.The live deployed data confirms it:
The same thing already happened to two more languages.
anandastare also enabled bare and are served asan-ESandast-ES.What changed
A code listed in
config/enabled_languages.txtwas chosen deliberately and now wins regardless of region specificity. Outside that set the more specific tag still wins, soda/da-DKmerging is unchanged andsv-FI/sv-SEstill stay separate.A language whose code normalizes to itself is no longer reported as a bad lang code. The live
issues.jsoncurrently reportslocale/kab/ → locale/kab/againstovos-skill-date-timeandres/an/ → res/an/againstovos-solver-YesNo-plugin: defect reports whose fix button commits nothing. Without this, the platform would shipkabas canonical and simultaneously reportlocale/kabas a defect.Verification
Replaying the live deployed code list (63 raw pre-merge codes) through both versions:
No other pair flips. Checked explicitly:
pt-AOvspt-PT/pt-BR,es-419,ar-XA/ar-XX,nb-NO/nn-NO,sv-FI/sv-SE,nl-BE/nl-NL,zh-CN/cmn-CN,mwl/mwl-PT. Language count stays 58.Mutation-tested: deleting
canonical_codes=enabled_langsfrombuild_coverage_json— the only line that reaches production — now failstest_enabled_code_wins_through_build_coverage_json. Before this revision the entire suite stayed green through that deletion, so the fix was untested where it mattered.merge_equivalent_langsis order-independent: 200 shuffles of the live input give one distinct result, sosetiteration order inbuild_coverage_jsoncannot leak through.Corrections to an earlier revision of this description
an/astrenames are intended, but they were not disclosed.fix_lang_code.ymlas the way to rename existingkab-DZdirectories. That workflow cannot do it:ovos_localize/sync/github.py:182only ever flags hyphen-less directories, so a region-to-bare rename is inexpressible there. A separate mechanism is needed.kab-DZdirectory isovos-color-parsercommit02366bc(2026-07-16), whose message sayskabwhile creatingkab-DZ; the same repo seededan-ES,ast-ESandmwl-PT.ovos-localize[bot]then propagatedkab-DZto three more skill repos. This PR stops new submissions from using the invented tag but does not clean up the existing directories.Follow-up
ovos-skill-laugh,ovos-skill-application-launcher,ovos-skill-parrotandovos-color-parserhold populatedlocale/kab-DZdirectories, and 58 open bot pull requests carrykab-DZpaths. Those need a rename before merge, or Kabyle content splits across two directories.