fix: default language mapping name + projection key for translations#169
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
… key When the default language is changed locally, the ResourceMapping name was stale because it came from file_structure_info cached at pull time. Now re-reads the name from disk for DefaultLanguage kept resources. Also fixes the projection key from defaultLanguage to defaultLanguageCode in SyncClientHandler._read_languages_from_projection. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e52bba5 to
d84b669
Compare
This comment has been minimized.
This comment has been minimized.
Contributor
Coverage Report
Changed file coverage
|
alanacevedo
approved these changes
Jun 3, 2026
bplevin36
added a commit
to polyai/adk-rs
that referenced
this pull request
Jun 3, 2026
## Summary - add DefaultLanguage, AdditionalLanguage, and Translation resource discovery/materialization/status support - generate language and translation push commands, including defaultLanguageCode projection handling - validate translation coverage against locally configured languages and update the parity audit doc ## Ported from - polyai/adk#152 - polyai/adk#169 ## Tests - cargo test - cargo clippy --workspace --all-targets -- -D warnings
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.
Summary
Fixes two bugs that broke translation validation when the default language is changed locally.
Motivation
Translation validation cross-references configured languages via ResourceMappings. When the default language was changed locally, the ResourceMapping still had the old language code (cached from pull), so translations appeared to be missing entries for the new language. Separately, the projection reader used the wrong key to extract the default language code from the API response.
Changes
defaultLanguage→defaultLanguageCodeinSyncClientHandler._read_languages_from_projectionTest strategy
ruff check .andruff format --check .passpytestpasses (662 tests)poly <command>)Checklist
ruff check .andruff format --check .passpytestpassespolyCLI interface (or migration path documented)🤖 Generated with Claude Code