Skip to content

Add Traditional Chinese localization and Quiet Hours feature#13

Open
owovouo wants to merge 9 commits intoCodeZeno:mainfrom
owovouo:feat/traditional-chinese-and-quiet-hours
Open

Add Traditional Chinese localization and Quiet Hours feature#13
owovouo wants to merge 9 commits intoCodeZeno:mainfrom
owovouo:feat/traditional-chinese-and-quiet-hours

Conversation

@owovouo
Copy link
Copy Markdown

@owovouo owovouo commented Apr 15, 2026

Summary

Two independent improvements bundled in one PR:

  1. Traditional Chinese (zh-TW) localization — adds full UI string translations following the same pattern as the existing Japanese and Korean localizations
  2. Quiet Hours — suppresses Windows toast notifications during a user-configured time window, without affecting the widget display

Changes

Traditional Chinese

  • src/localization/traditional_chinese.rs — new file with all UI strings translated into Traditional Chinese
  • src/localization/mod.rs — added TraditionalChinese variant to LanguageId, wired up strings(), code() ("zh-TW"), native_name() ("繁體中文"), and update_via_winget_label(); locale detection maps zh-TW, zh-HK, and zh-Hant to Traditional Chinese (Simplified Chinese falls back to system default)

Quiet Hours

  • src/window.rs — added quiet_hours_enabled, quiet_hours_start, quiet_hours_end fields to AppState and SettingsFile (persisted to JSON); default window is 22:00–08:00; overnight ranges (start > end) are handled correctly; Quiet Hours submenu added to system tray for toggle + hour selection; widget label shows localized "Quiet Hours" string when active
  • All localization files updated with three new strings: quiet_hours, quiet_start, quiet_end

Behavior (Quiet Hours)

Condition Result
Quiet Hours disabled No change from current behavior
Inside quiet window Toast notifications suppressed; widget label shows "Quiet Hours"
Outside quiet window Normal behavior

Notes

  • Both features are independent and can be reviewed or reverted separately if needed
  • Tested on Windows 11 with locale set to zh-TW

@aa333
Copy link
Copy Markdown

aa333 commented Apr 16, 2026

Hah, I've completely missed that =) feel free to close #14 then.
I'll still keep it in my fork since I need a visual indicator aside from the text

owovouo added 2 commits April 17, 2026 11:55
Replace preset quiet hours selection with a custom HH:MM input dialog,
allowing users to set any start/end time for quiet hours.
Fix non-reentrant mutex deadlock where MoveWindow dispatches WM_PAINT
synchronously, causing wnd_proc to re-enter lock_state() on the same thread.

Credit: aa333 (PR CodeZeno#14)
CodeZeno added a commit that referenced this pull request Apr 19, 2026
fix: resolve taskbar positioning deadlock

- Thanks to @owovouo and @aa333 for surfacing and working on this in PR #13 and PR #14
CodeZeno added a commit that referenced this pull request Apr 19, 2026
feat: add Traditional Chinese localisation

- Thanks to @owovouo for the translation work in PR #13
owovouo and others added 5 commits April 20, 2026 13:40
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shows a green zone between actual usage and expected usage based on
elapsed time within the 5h/7d rolling windows. Updated at each poll
interval so the indicator grows in discrete steps matching the chosen
update frequency. Toggle via Settings > Show Pacing Indicator.

Also add Win32_System_SystemInformation feature (required for GetLocalTime)
and TIMER_QUIET_BOUNDARY constant to native_interop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Green pacing zone is now suppressed in both render paths when quiet
hours are active, consistent with the quiet-hours design intent of
pausing all live activity indicators.
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.

2 participants