Repository navigation
feat(mobile): localize shared components, pull requests and diff review - #35532
Conversation
Moves ~600 strings in the shared components (modals, drawers, host cards, dictation, accounts), the pull request sidebar and diff review to the translation API, with all ten translations. - Invalid account snapshots are detected by error type, not by matching English text - Credit expiry wording uses separate keys for one and several credits instead of plural rules, which would pick the wrong sentence in Japanese or Russian - The PR chip memo recomputes on a language change
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
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. Comment |
[Medium impact] The changes reach common mobile screens and two review workflows. The PR appears safe to merge, with two non-blocking display issues. FindingsSummaryThis PR moves mobile shared components, pull-request panels, and diff-review text into the translation API.
Reviews (1) · Last reviewed commit: "feat(mobile): localize shared components..." · Reviewed by Greptile |
| <MobileSourceCopyButton | ||
| text={node.value} | ||
| accessibilityLabel={translate('components.markdownBlocks.copyCode', 'Copy code')} | ||
| /> |
There was a problem hiding this comment.
Markdown keeps the old language
After a language switch, MobileSourceCopyButton updates its own text but keeps its old “Copy code” accessibility label. renderCode translates that prop in the parent, while the memoized MobileMarkdown does not subscribe to language changes. The “Open image” fallback has the same problem. Subscribe the Markdown renderer to language changes, or translate these labels inside subscribed child components.
| 'pullRequest.commentsSection.resolvedThread_other', | ||
| 'Resolved thread by {{author}} ({{count}})', | ||
| { author: root.author, count } |
There was a problem hiding this comment.
Russian threads lose their count
Resolved threads with 21 comments lose their count in Russian. Passing count makes translate strip the explicit _other suffix and choose the language’s plural form. Russian chooses _one for 21, whose translation omits the count. The same happens for 31 and similar totals. Use separate keys for hiding versus showing the count, rather than letting plural rules choose whether it appears.
Summary
Third of the mobile localization series (#35399, #35498). Moves ~590 strings to the translation API, with all ten translations:
Behavior fixes that came with it
countwould have let plural rules choose the sentence, which picks the wrong one in Japanese (alwaysother) and Russian (21 →one).TextInputModalnow localizes its Cancel/Save buttons (follow-up to a review note on feat(mobile): localize app screens, settings, pairing and host lists #35498).Validation
mobile typecheck, test typecheck, lint and tests;
verify:mobile-localization, both coverage audits (mobile baseline 1,450 → 1,034), changed-code quality gate, React Doctor; translations through the same glossary, translation-memory, dual-review and arbiter pipeline as #35498.