Conversation
… order
The Two-Factor Authentication setup dialog assembled its description from
separate fragments (t('Step'), the step number, t('of 3:') and the label)
with no separators, rendering "Step1of 3:Scan QR Code" in English and
"步骤1共 3 个:扫描二维码" in Simplified Chinese. The fragments also
prevented translators from reordering the sentence.
Use a single interpolated key, 'Step {{current}} of {{total}}: {{label}}',
with the total derived from the number of steps, and add translations for
all supported locales. Add a regression test covering English and
Simplified Chinese.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cw48yk7n7dEgATrtzPtjPN
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe two-factor setup dialog now formats its step description with a translated template that includes the current step, total steps, and step label. Translation entries were added or updated in seven locales, and tests check the English and Simplified Chinese descriptions. ChangesLocalized 2FA setup step description
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The dialog now uses one interpolated description with locale-specific wording, and the French translation is confirmed. No material merge-blocking issue is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (7 skipped: 7 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. A rabbit reads the steps aloud, Comment |
Agent
Links
User request
Prompt
Out of scope — refuse
Open gate — do not open unless all are satisfied
go buildor tests passed: yesKind
Issue facts
Step1of 3:Scan QR Code(en),步骤1共 3 个:扫描二维码(zh)two-fa-setup-dialog.tsxrenders the fragments side by side/security, Chromium 141, light theme, no console errors. Relay, billing, deployment: not applicableChange
One key,
Step {{current}} of {{total}}: {{label}}, withtotal = stepLabels.length. Added to the seven locales with the i18n skill's script, theni18n:sync. Regression test added.Research
Duplicate / prior art
2FA,Step1,of 3,两步验证,two-fa-setupDocs and code
web/AGENTS.md,.agents/skills/i18n-translate/SKILL.md'of 3:'is used only in this dialogAlternatives considered
Trans. Not needed; no markup.Files
web/src/features/security/components/dialogs/two-fa-setup-dialog.tsxweb/src/i18n/locales/{en,zh,zh-TW,fr,ja,ru,vi}.jsonweb/src/features/security/components/__tests__/two-fa-setup-dialog.test.tsxBehavior
Step1of 3:Scan QR Code/步骤1共 3 个:扫描二维码Step 1 of 3: Scan QR Code/第 1 步,共 3 步:扫描二维码Stepandof 3:are now unused but left in the locales. I can remove them here if preferred.Verification
web/):Step1of 3:Scan QR Code,步骤1共 3 个:扫描二维码,Step2of 3:Save Backup Codes)bun run typecheck: exit 0bun run lint: same 182 errors as main; changed files cleanbun run test: 167 files, 2114 tests passedbun run build,bun run i18n:sync: exit 0, no changes/security, Enable 2FA: the dialog shows the After texttwo-fa-setup-dialog.test.tsx(en step 1, zh step 1, en step 2)Risks
Scope check
This change was AI-generated (Claude Code) and reviewed by the submitter.
Summary by CodeRabbit