Skip to content

feat(l10n): complete Simplified Chinese localization - #233

Open
xyhlzs wants to merge 3 commits into
the-hideout:masterfrom
xyhlzs:feat/chinese-localization
Open

xyhlzs wants to merge 3 commits into
the-hideout:masterfrom
xyhlzs:feat/chinese-localization

Conversation

@xyhlzs

@xyhlzs xyhlzs commented Nov 18, 2026

Copy link
Copy Markdown

Resolves #232 (proposal). This PR completes the Simplified Chinese localization across the whole application, building on the existing zh resources (~96 of 103 keys).

What changed

zh resources grew from 99 to 509 keys. All new keys have EN (neutral) and ZH values; the other five locales are untouched and fall back to English.

  • Core UI (MainBlazorUI, MonitorMessage, MessageLog, TimersManager, Sound, UpdateCoordinator, UpdateApplier): message-board notifications (raid lifecycle, flea market, task tracking, Goons reports), exception-card text, confirmation dialogs, and the in-app update flow
  • Settings + all 7 TarkovTracker dialogs: every visible label, button, tooltip, and inline message, including the auto-assignment/verification state machine text
  • Remaining Blazor surfaces: window chrome, floating timer panel, Sounds page (incl. the seven file-picker titles), Timers, RawLogs dialogs, LogBoard/MessageBoard
  • Service layer: user-visible exception messages from TarkovTracker, TarkovTrackerOrgStore, and TokenStoreProtection (storage warnings, token validation/import/bind/unbind errors). Deep diagnostics that only appear in the copied diagnostics clipboard remain English on purpose
  • docs/translation-glossary.md: terminology decisions for future translators (e.g. Run-through → 匆匆撤离, air filter → 空气过滤器; PMC/Scav/Goons/brand names stay English)

Design notes

  • Added LocalizationService.GetString(key, params args) overload and a static LocalizationService.T() helper, because static classes (TarkovTracker, TarkovTrackerOrgStore, MessageLog) cannot take DI. Happy to change this if you prefer another pattern
  • Interpolated strings use numbered placeholders so zh can reorder; placeholder parity between EN and ZH is verified with a script
  • No new language-switch mechanism — relies on the existing restart-to-apply behavior; missing zh keys fall back to English
  • Rebased onto current master (4100619); the obsolete minimize-at-startup warning message removed upstream in 14de046 was dropped from both resources accordingly

Verification

  • Debug and Release builds clean; startup smoke test (15s alive)
  • EN/ZH key parity: 509 = 509, no duplicate keys
  • Placeholder-set parity per key: all match
  • Every key referenced in code exists in both resources

One small behavioral note: the Read Past Logs task messages now reuse the existing TaskStarted/TaskFailed/TaskCompleted resources instead of a separate "Failed task: X." string, which also consolidates the English wording with the live task notifications.

… settings to Chinese

- Add static LocalizationService.T() and GetString(key, args) overload for
  formatted resource lookup without DI
- Replace ~200 hardcoded user-facing strings in MainBlazorUI, MonitorMessage,
  MessageLog, TimersManager, Sound, UpdateCoordinator, and UpdateApplier with
  resource keys (new zh translations, 89 keys)
- Inject LocalizationService into the 7 TarkovTracker dialogs and localize
  Settings.razor tracker cards, dialog titles, and messages (118 keys)
- Fill 4 pre-existing zh gaps (Connect, LastProfileLoaded,
  NoActiveEftSessionRecognized, WebsiteAlreadyConnectedMsg)
- Adopt 匆匆撤离 as the translation for Run-through per glossary decision
- Add docs/translation-glossary.md documenting terminology and style rules
过滤吸收器 was a literal mistranslation; 中文攻略站通行叫法为空气过滤器
(the consumable for the hideout Vents station). Update the 3 affected keys
and record the decision in docs/translation-glossary.md.
…e messages

Phase 3 - remaining Blazor surfaces (48 keys): AppLayout window controls and
floating timer panel, Sounds media controls and file dialogs, Timers status
chip, RawLogs dialogs, CustomLogDialog, ForceReadDialog flow messages,
LogBoard/MessageBoard empty states and protected-value labels

Phase 4 - service layer user-visible messages (68 keys): TarkovTracker
storage warnings and token validation/import/bind/unbind exceptions,
TarkovTrackerOrgStore operation and corruption messages, TokenStoreProtection
decrypt failure. Static classes use LocalizationService.T()

Verified: EN/ZH key parity 510=510, placeholder sets match on every key,
all 484 code-referenced keys present, Release build clean, startup smoke test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: complete Simplified Chinese localization

1 participant