Repository navigation
fix(i18n): translate conflict, viewed, Quick Open and usage copy as whole sentences - #35365
Conversation
…hole sentences
- Editor conflicts: localize conflict-kind labels and hints, and build the
banner, rename note and snapshot time as complete messages instead of
joining English state labels with a translated fragment.
- PR file viewed checkbox: separate Mark/Unmark sentences instead of
injecting raw English verbs into '{{value0}} {{value1}} as viewed'.
- Quick Open ripgrep hint: one sentence with an embedded <code> element and
an interpolated reason instead of three fragments.
- Usage breakdown: session/turn/event counts use CLDR plural keys, so Russian
reads «1 сессия • 21 ответ» instead of «1 ответов».
Refs #34783
Co-authored-by: Vyacheslav Scherbinin <[email protected]>
[Medium impact] The PR appears safe to merge; no actionable new issues were found. SummaryThe PR replaces translated fragments with complete messages across conflict views, viewed-file controls, Quick Open, and usage counts.
No actionable new issues were found. The full PR was reviewed because the current and previously reviewed commits have different merge bases with the target commit. Tests were not run during this review. Reviews (2) · Last reviewed commit: "Merge origin/main into OrcaWin/i18n-left..." · Reviewed by Greptile |
|
No actionable comments were generated in the recent review.
|
# Conflicts: # src/renderer/src/i18n/locales/de.json # src/renderer/src/i18n/locales/en.json # src/renderer/src/i18n/locales/es.json # src/renderer/src/i18n/locales/fr.json # src/renderer/src/i18n/locales/ja.json # src/renderer/src/i18n/locales/ko.json # src/renderer/src/i18n/locales/pt.json # src/renderer/src/i18n/locales/ru.json # src/renderer/src/i18n/locales/tr.json # src/renderer/src/i18n/locales/zh-Hant.json # src/renderer/src/i18n/locales/zh.json
ELI5
Some messages were glued together from separate pieces of English and translated text, so other languages got broken word order or wrong plural endings (Russian showed «1 ответов»). Each message is now one translatable sentence.
What Changed
ConflictComponents.tsx): conflict-kind labels ("Both modified", …) and their hints were English constants, and the banner was built as{English state} {translated "conflict ·"} {English kind}. They are now translated (createLocalizedCatalog), and the banner, "Renamed from {{path}}" and "Snapshot captured at {{time}}." are complete messages.PRViewedCheckbox.tsx):'{{value0}} {{value1}} as viewed'received raw English "Mark"/"Unmark"; now two full sentences.<code>ripgrep</code>+ "on the remote to enable…" were three fragments, and the reason was spliced between "(" and ")."; now oneTranssentence with an embedded<code>and one sentence with{{reason}}.UsageBreakdownSection.tsx):{n} sessions • {n} turns/eventsused plain words after numbers; now_one/_othercount keys, so CLDR picks the form (ru one/few/many).Why
Whole-sentence keys let each language choose word order and agreement; count keys are the only way to get Russian/Polish-style plural forms right.
Linked Issue
Refs #34783 (conflict banner, viewed checkbox), Refs #32207. The Quick Open and viewed-checkbox cases were also flagged in the German locale PR #34917.
Visual Proof
N/A: copy-only change; verified through locale catalogs and a rendered Russian test.
Testing
UsageBreakdownSection.test.tsxrenders in Russian and checks one/few/many forms («1 сессия • 21 ответ», «3 сессии • 5 ответов», «11 сессий • 2 ответа»).pnpm verify:localization-{catalogs,extraction,coverage,runtime-catalog},pnpm tc:web.Conflict banner and viewed-checkbox fixes adapted from @gentslava's #33370.