feat(i18n): extract redux notice messages (batch 2)#1153
Open
JamieRuderman wants to merge 2 commits into
Open
Conversation
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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
Batch 2 of Phase 4 extraction: the redux model notice messages — the success/error/notice toasts dispatched from
dispatch.ui.set({ successMessage / errorMessage / noticeMessage })across 16 model files. 60 messages → 65 keys in thenoticesnamespace, fully translated to ja/de/es.Since these run in non-React model code, they call the shared
i18ninstance directly:i18n.t('notices:key', { ...vars, defaultValue }).Stacked on
i18n/extract-shell(#1152) because it depends on that branch's parser fix. Once #1152 merges tofeature/i18n, I'll retarget this PR — the diff here is notices-only.Highlights — the pitfalls the plan called out, handled
device${n>1?'s were':' was'}) with i18nextcountplurals (_one/_other). This also fixes an English bug: the old code rendered "1 devices were…"; it now correctly says "1 device was…". Verified at runtime across locales (German inflects the verb too: "wurde" vs "wurden"; Japanese uses its single form).${name}/${email}/${error}became a{{placeholder}}; string-built messages ('Update phone error: ' + error.message) collapsed into one keyed call.${who} ${plan} subscription updated(wherewhowas'Your'or`${email}'s`) was split into two keys (subscriptionUpdatedYours/subscriptionUpdatedOther) so each language renders possession naturally rather than forcing English's.that ${isService ? 'service' : 'device'}split into two keys.error.message) stay as runtime interpolation values.Tooling fix (separate commit)
Made
i18n:checkplural-aware. Plural keys expand per-locale via CLDR (Japanese:_otheronly; English/German:_one+_other; Spanish also_many), so strict key-equality would wrongly flag Japanese as "missing"_one. The check now compares plural bases against each locale's ownIntl.PluralRulescategories.Verification
i18n:checkpasses (plural-aware) — 4 locales × 3 namespaces, no missing/dead keys, no empty English.tscclean; production build passes.🤖 Generated with Claude Code