Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ workflow.cmd

# Local WinGet manifest generation output
/manifests/

# Local Claude Code development files (not relevant to upstream)
CLAUDE.md
ARCHITECTURE.md
.claude/
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ features = [
"Win32_Security",
"Win32_UI_Input_KeyboardAndMouse",
"Win32_UI_HiDpi",
"Win32_System_SystemInformation",
]

[build-dependencies]
Expand Down
10 changes: 10 additions & 0 deletions src/localization/english.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ pub(super) const STRINGS: Strings = Strings {
minute_suffix: "m",
token_expired_title: "Claude Code Auth Error",
token_expired_body: "Run 'claude' in a terminal, then use '/login' and follow the prompts. After that, refresh or restart this app.",
show_pacing: "Show Pacing Indicator",
second_suffix: "s",
quiet_hours: "Quiet Hours",
quiet_start: "Start",
quiet_end: "End",
quiet_set_time: "Set time...",
quiet_clear: "Clear",
ok: "OK",
cancel: "Cancel",
quiet_time_hint: "Format: HH:MM (clear both to disable)",
quiet_time_error: "Fill in both fields, or leave both empty",
};
10 changes: 10 additions & 0 deletions src/localization/french.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ pub(super) const STRINGS: Strings = Strings {
minute_suffix: "m",
token_expired_title: "Erreur d'authentification",
token_expired_body: "Exécutez 'claude' dans un terminal, puis utilisez '/login' et suivez les instructions. Ensuite, actualisez ou redémarrez cette application.",
show_pacing: "Afficher la progression",
second_suffix: "s",
quiet_hours: "Quiet Hours",
quiet_start: "Start",
quiet_end: "End",
quiet_set_time: "Définir l'heure...",
quiet_clear: "Effacer",
ok: "OK",
cancel: "Annuler",
quiet_time_hint: "Format : HH:MM (effacer les deux pour désactiver)",
quiet_time_error: "Remplissez les deux champs ou laissez-les vides",
};
10 changes: 10 additions & 0 deletions src/localization/german.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ pub(super) const STRINGS: Strings = Strings {
minute_suffix: "m",
token_expired_title: "Authentifizierungsfehler",
token_expired_body: "Führen Sie 'claude' in einem Terminal aus, verwenden Sie dann '/login' und folgen Sie den Anweisungen. Aktualisieren oder starten Sie diese App anschließend neu.",
show_pacing: "Fortschrittsanzeige",
second_suffix: "s",
quiet_hours: "Quiet Hours",
quiet_start: "Start",
quiet_end: "End",
quiet_set_time: "Uhrzeit festlegen...",
quiet_clear: "Löschen",
ok: "OK",
cancel: "Abbrechen",
quiet_time_hint: "Format: HH:MM (beide leeren zum Deaktivieren)",
quiet_time_error: "Beide Felder ausfüllen oder beide leer lassen",
};
10 changes: 10 additions & 0 deletions src/localization/japanese.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ pub(super) const STRINGS: Strings = Strings {
minute_suffix: "分",
token_expired_title: "認証エラー",
token_expired_body: "ターミナルで 'claude' を実行し、'/login' を使って案内に従ってください。その後、このアプリを更新するか再起動してください。",
show_pacing: "ペース表示",
second_suffix: "秒",
quiet_hours: "サイレント時間",
quiet_start: "開始",
quiet_end: "終了",
quiet_set_time: "時刻を設定...",
quiet_clear: "クリア",
ok: "OK",
cancel: "キャンセル",
quiet_time_hint: "形式:HH:MM(両方を空にすると無効)",
quiet_time_error: "両方入力するか、両方空にしてください",
};
10 changes: 10 additions & 0 deletions src/localization/korean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ pub(super) const STRINGS: Strings = Strings {
minute_suffix: "분",
token_expired_title: "인증 오류",
token_expired_body: "터미널에서 'claude'를 실행한 다음 '/login'을 사용하고 안내에 따라 진행하세요. 그런 다음 이 앱을 새로 고치거나 다시 시작하세요.",
show_pacing: "페이스 표시",
second_suffix: "초",
quiet_hours: "조용한 시간",
quiet_start: "시작",
quiet_end: "종료",
quiet_set_time: "시간 설정...",
quiet_clear: "지우기",
ok: "확인",
cancel: "취소",
quiet_time_hint: "형식: HH:MM (둘 다 비우면 비활성화)",
quiet_time_error: "두 필드를 모두 채우거나 모두 비워두세요",
};
12 changes: 12 additions & 0 deletions src/localization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ impl LanguageId {
"ja" => Some(Self::Japanese),
"ko" => Some(Self::Korean),
"zh" => {
// Distinguish Traditional Chinese (zh-TW, zh-HK, zh-Hant) from Simplified
if normalized.contains("tw")
|| normalized.contains("hk")
|| normalized.contains("hant")
{
Some(Self::TraditionalChinese)
} else {
// Simplified Chinese is not supported; fall back to system language
None
}
}
Expand Down Expand Up @@ -147,6 +149,16 @@ pub struct Strings {
pub second_suffix: &'static str,
pub token_expired_title: &'static str,
pub token_expired_body: &'static str,
pub show_pacing: &'static str,
pub quiet_hours: &'static str,
pub quiet_start: &'static str,
pub quiet_end: &'static str,
pub quiet_set_time: &'static str,
pub quiet_clear: &'static str,
pub ok: &'static str,
pub cancel: &'static str,
pub quiet_time_hint: &'static str,
pub quiet_time_error: &'static str,
}

pub fn resolve_language(language_override: Option<LanguageId>) -> LanguageId {
Expand Down
10 changes: 10 additions & 0 deletions src/localization/spanish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ pub(super) const STRINGS: Strings = Strings {
minute_suffix: "m",
token_expired_title: "Error de autenticación",
token_expired_body: "Ejecuta 'claude' en una terminal, luego usa '/login' y sigue las indicaciones. Después, actualiza o reinicia esta aplicación.",
show_pacing: "Mostrar ritmo",
second_suffix: "s",
quiet_hours: "Quiet Hours",
quiet_start: "Start",
quiet_end: "End",
quiet_set_time: "Set time...",
quiet_clear: "Clear",
ok: "OK",
cancel: "Cancel",
quiet_time_hint: "Format: HH:MM (clear both to disable)",
quiet_time_error: "Fill in both fields, or leave both empty",
};
10 changes: 10 additions & 0 deletions src/localization/traditional_chinese.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ pub(super) const STRINGS: Strings = Strings {
minute_suffix: "分",
token_expired_title: "驗證錯誤",
token_expired_body: "請在終端機中執行 'claude',然後使用 '/login' 並依照提示操作。完成後,請重新整理或重新啟動此應用程式。",
show_pacing: "顯示配額進度",
second_suffix: "秒",
quiet_hours: "安靜時刻",
quiet_start: "開始時間",
quiet_end: "結束時間",
quiet_set_time: "設定時間...",
quiet_clear: "清除",
ok: "確定",
cancel: "取消",
quiet_time_hint: "格式:HH:MM(清空兩欄以停用)",
quiet_time_error: "請兩欄都填寫,或兩欄都清空",
};
1 change: 1 addition & 0 deletions src/native_interop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub const TIMER_POLL: usize = 1;
pub const TIMER_COUNTDOWN: usize = 2;
pub const TIMER_RESET_POLL: usize = 3;
pub const TIMER_UPDATE_CHECK: usize = 4;
pub const TIMER_QUIET_BOUNDARY: usize = 5;

// Custom messages
pub const WM_APP: u32 = 0x8000;
Expand Down
Loading