Skip to content

Commit a37d963

Browse files
u-naroclaude
andcommitted
feat: localize "Show Widget" and session/weekly window labels
- Add `show_widget` field to Strings struct and all 6 language files - Replace hardcoded "Show Widget" in window.rs with strings.show_widget - Translate session_window ("5시간") and weekly_window ("7일") for Korean Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 830f6f4 commit a37d963

8 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/localization/english.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub(super) const STRINGS: Strings = Strings {
2727
update_available: "Update available",
2828
update_prompt_now: "Version {version} is available. Do you want to update now?",
2929
exit: "Exit",
30+
show_widget: "Show Widget",
3031
session_window: "5h",
3132
weekly_window: "7d",
3233
now: "now",

src/localization/french.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub(super) const STRINGS: Strings = Strings {
2727
update_available: "Mise à jour disponible",
2828
update_prompt_now: "La version {version} est disponible. Voulez-vous mettre à jour maintenant ?",
2929
exit: "Quitter",
30+
show_widget: "Afficher le widget",
3031
session_window: "5h",
3132
weekly_window: "7d",
3233
now: "maintenant",

src/localization/german.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub(super) const STRINGS: Strings = Strings {
2727
update_available: "Update verfügbar",
2828
update_prompt_now: "Version {version} ist verfügbar. Möchten Sie jetzt aktualisieren?",
2929
exit: "Beenden",
30+
show_widget: "Widget anzeigen",
3031
session_window: "5h",
3132
weekly_window: "7d",
3233
now: "jetzt",

src/localization/japanese.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub(super) const STRINGS: Strings = Strings {
2727
update_available: "更新が利用可能です",
2828
update_prompt_now: "バージョン {version} が利用可能です。今すぐ更新しますか?",
2929
exit: "終了",
30+
show_widget: "ウィジェットを表示",
3031
session_window: "5h",
3132
weekly_window: "7d",
3233
now: "今",

src/localization/korean.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ pub(super) const STRINGS: Strings = Strings {
2727
update_available: "업데이트 사용 가능",
2828
update_prompt_now: "버전 {version}을 사용할 수 있습니다. 지금 업데이트하시겠습니까?",
2929
exit: "종료",
30-
session_window: "5h",
31-
weekly_window: "7d",
30+
show_widget: "위젯 표시",
31+
session_window: "5시간",
32+
weekly_window: "7일",
3233
now: "지금",
3334
day_suffix: "일",
3435
hour_suffix: "시간",

src/localization/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ pub struct Strings {
119119
pub update_available: &'static str,
120120
pub update_prompt_now: &'static str,
121121
pub exit: &'static str,
122+
pub show_widget: &'static str,
122123
pub session_window: &'static str,
123124
pub weekly_window: &'static str,
124125
pub now: &'static str,

src/localization/spanish.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub(super) const STRINGS: Strings = Strings {
2727
update_available: "Actualización disponible",
2828
update_prompt_now: "La versión {version} está disponible. ¿Quieres actualizar ahora?",
2929
exit: "Salir",
30+
show_widget: "Mostrar widget",
3031
session_window: "5h",
3132
weekly_window: "7d",
3233
now: "ahora",

src/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ fn show_context_menu(hwnd: HWND) {
20432043
PCWSTR::from_raw(settings_label.as_ptr()),
20442044
);
20452045

2046-
let widget_label = native_interop::wide_str("Show Widget");
2046+
let widget_label = native_interop::wide_str(strings.show_widget);
20472047
let widget_flags = if widget_visible { MF_CHECKED } else { MENU_ITEM_FLAGS(0) };
20482048
let _ = AppendMenuW(
20492049
menu,

0 commit comments

Comments
 (0)