Repository navigation
[fallback] Resolve language priority through references - #33
Merged
Merged
Conversation
Prefer a reference's translation in a requested language before falling back to another language's override. This keeps regional locales in their base language instead of selecting English labels. Cover language order, chained references, explicit overrides and empty translations in both maintained implementations. Signed-off-by: Alexander Borsuk <me@alex.bio>
Compare overrides with the translation selected by language and reference priority. Keep exact-language values needed by aliases and the developer language, and apply removals sequentially to preserve fallback availability. Cover inherited script and generic translations, alias consumers, and a regional developer language through optimization and file round trips. Signed-off-by: Alexander Borsuk <me@alex.bio>
This was referenced Oct 16, 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.
Resolve requested languages in priority order across references, so regional locales inherit their base translation before another language's local override. Preserve explicit empty translations and chained references in Ruby and Python.
Keep deduplication consistent with generation: remove an override only when its effective replacement is identical, retain exact-language values needed by aliases, and preserve the developer-language fallback. Cover inherited script/generic values, alias consumers and a regional developer language through optimization and write/read round trips.
Related: #8.
Validation:
Pre-existing issues are handled independently in #34 (Python) and #35 (Ruby). The three PRs merge cleanly together and pass 182 Python tests and 238 Ruby tests (one existing skip).
Implementation and validation assisted by Codex.