Repository navigation
fix: a missing namespaced i18nKey falls back to English, not the bare key - #46
Merged
Merged
Conversation
… key i18next answers a missing "ns:key" with "key", without the namespace. describe() only treated the full "ns:key" as a miss, so an entry with i18nKey "errors:device.unsupported" showed "device.unsupported" on screen when the translation was missing. Found while wiring almamesh to 0.3.0. Regression test uses a real i18next instance; it was red before the fix (Received: "device.unsupported"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GRdR6TpVeKiz2Tr4hEGsEo
…e-key miss Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GRdR6TpVeKiz2Tr4hEGsEo
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.
Claim touched: "if that key is not translated yet, it falls back to the catalog's English, so a raw key never reaches the screen" (docs/API.md).
i18next answers a missing
ns:keywithkey, without the namespace.describe()only treated the fullns:keyas a miss, soi18nKey: "errors:device.unsupported"with no translation showeddevice.unsupportedto the user. The almamesh agent found it while wiring 0.3.0. aml-filter uses exactly this key shape, and it's only safe today because en has the key.errors:key)Received: "device.unsupported", 2 failedpnpm gateFix: also treat
keyminus itsns:prefix as a miss. A key without:behaves as before.🤖 Generated with Claude Code
https://claude.ai/code/session_01GRdR6TpVeKiz2Tr4hEGsEo