codeburn icon indicating copy to clipboard operation
codeburn copied to clipboard

Windows tray: localization with Simplified Chinese, reusing the menubar glossary

Open iamtoruk opened this issue 2 months ago • 3 comments

Companion to the desktop issue. The Windows Tauri tray in windows/ is English only. #1330 landed the reviewed Simplified Chinese glossary for the macOS menubar in mac/Sources/CodeBurnMenubar/Resources/zh-Hans.lproj/Localizable.strings.

Scope:

  • One lookup helper for the tray's Rust and webview strings, keyed by the English sentence.
  • en and zh-Hans catalogs seeded from the menubar file so terms match across platforms.
  • Language choice (System / English / 中文) in the tray settings, persisted next to the existing tray config. System follows the Windows UI language.
  • Coverage test: every key present in both catalogs, interpolation placeholders match.
  • Tray menu widths: Chinese labels are shorter in characters but wider per glyph, check the width-weighted budget from MenubarSecondRow.swift before truncating.

Out of scope: the CLI and the web dash.

iamtoruk avatar Sep 12 '26 23:09 iamtoruk

Tray and capacity-dock titles are English literals passed into Tauri menu items, and the webview builds the usage line and tooltip in English. Tray settings have no language field, and nothing reads the Windows UI language list, so those strings never change.

Embedded en and zh-Hans catalogs, keyed by the English sentence, are resolved by one lookup used for the Rust menu and the webview.

mvanhorn avatar Oct 03 '26 07:10 mvanhorn

#1608 is merged: the Windows tray menu, tooltip, usage row, dock right-click menu and footer items now follow Simplified Chinese.

Still open here:

  • Popover and General settings window
  • Capacity Dock window
  • A language choice in the tray settings (today it follows the shared config or the Windows UI language)
  • Live switch when the desktop app changes language
  • zh-Hant
  • "Show today's cost in tray" is still English

iamtoruk avatar Oct 07 '26 18:10 iamtoruk

Done: the Windows tray reads its catalog from the Rust side since #1608, and the star notice added the second language set. Closing.

iamtoruk avatar Nov 05 '26 03:11 iamtoruk