Skip to content

Commit 830f6f4

Browse files
u-naroclaude
andcommitted
feat: add Korean (한국어) localization
Add Korean language support with full UI translations including menu items, update messages, and time format suffixes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 643cc0a commit 830f6f4

3 files changed

Lines changed: 50 additions & 2 deletions

File tree

src/localization/korean.rs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
use super::Strings;
2+
3+
pub(super) const UPDATE_VIA_WINGET_LABEL: &str = "WinGet으로 업데이트";
4+
5+
pub(super) const STRINGS: Strings = Strings {
6+
window_title: "Claude Code 사용량 모니터",
7+
refresh: "새로고침",
8+
update_frequency: "업데이트 주기",
9+
one_minute: "1분",
10+
five_minutes: "5분",
11+
fifteen_minutes: "15분",
12+
one_hour: "1시간",
13+
settings: "설정",
14+
start_with_windows: "Windows 시작 시 자동 실행",
15+
reset_position: "위치 초기화",
16+
language: "언어",
17+
system_default: "시스템 기본값",
18+
check_for_updates: "업데이트 확인",
19+
checking_for_updates: "업데이트 확인 중...",
20+
updates: "업데이트",
21+
update_in_progress: "이미 업데이트 확인이 진행 중입니다.",
22+
up_to_date: "이미 최신 버전입니다.",
23+
up_to_date_short: "최신",
24+
update_failed: "자동 업데이트를 완료할 수 없습니다",
25+
applying_update: "업데이트 적용 중...",
26+
update_to: "업데이트 대상",
27+
update_available: "업데이트 사용 가능",
28+
update_prompt_now: "버전 {version}을 사용할 수 있습니다. 지금 업데이트하시겠습니까?",
29+
exit: "종료",
30+
session_window: "5h",
31+
weekly_window: "7d",
32+
now: "지금",
33+
day_suffix: "일",
34+
hour_suffix: "시간",
35+
minute_suffix: "분",
36+
second_suffix: "초",
37+
};

src/localization/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ mod english;
22
mod french;
33
mod german;
44
mod japanese;
5+
mod korean;
56
mod spanish;
67

78
use windows::core::PWSTR;
@@ -17,15 +18,17 @@ pub enum LanguageId {
1718
French,
1819
German,
1920
Japanese,
21+
Korean,
2022
}
2123

2224
impl LanguageId {
23-
pub const ALL: [LanguageId; 5] = [
25+
pub const ALL: [LanguageId; 6] = [
2426
LanguageId::English,
2527
LanguageId::Spanish,
2628
LanguageId::French,
2729
LanguageId::German,
2830
LanguageId::Japanese,
31+
LanguageId::Korean,
2932
];
3033

3134
pub fn code(self) -> &'static str {
@@ -35,6 +38,7 @@ impl LanguageId {
3538
Self::French => "fr",
3639
Self::German => "de",
3740
Self::Japanese => "ja",
41+
Self::Korean => "ko",
3842
}
3943
}
4044

@@ -45,6 +49,7 @@ impl LanguageId {
4549
Self::French => "Français",
4650
Self::German => "Deutsch",
4751
Self::Japanese => "日本語",
52+
Self::Korean => "한국어",
4853
}
4954
}
5055

@@ -55,6 +60,7 @@ impl LanguageId {
5560
Self::French => french::STRINGS,
5661
Self::German => german::STRINGS,
5762
Self::Japanese => japanese::STRINGS,
63+
Self::Korean => korean::STRINGS,
5864
}
5965
}
6066

@@ -65,6 +71,7 @@ impl LanguageId {
6571
Self::French => french::UPDATE_VIA_WINGET_LABEL,
6672
Self::German => german::UPDATE_VIA_WINGET_LABEL,
6773
Self::Japanese => japanese::UPDATE_VIA_WINGET_LABEL,
74+
Self::Korean => korean::UPDATE_VIA_WINGET_LABEL,
6875
}
6976
}
7077

@@ -80,6 +87,7 @@ impl LanguageId {
8087
"fr" => Some(Self::French),
8188
"de" => Some(Self::German),
8289
"ja" => Some(Self::Japanese),
90+
"ko" => Some(Self::Korean),
8391
_ => None,
8492
}
8593
}

src/window.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ const IDM_LANG_SPANISH: u16 = 42;
106106
const IDM_LANG_FRENCH: u16 = 43;
107107
const IDM_LANG_GERMAN: u16 = 44;
108108
const IDM_LANG_JAPANESE: u16 = 45;
109+
const IDM_LANG_KOREAN: u16 = 46;
109110

110111
const DIVIDER_HIT_ZONE: i32 = 13; // LEFT_DIVIDER_W + DIVIDER_RIGHT_MARGIN
111112

@@ -1817,14 +1818,15 @@ unsafe extern "system" fn wnd_proc(
18171818
SetTimer(hwnd, TIMER_POLL, new_interval, None);
18181819
}
18191820
IDM_LANG_SYSTEM | IDM_LANG_ENGLISH | IDM_LANG_SPANISH | IDM_LANG_FRENCH
1820-
| IDM_LANG_GERMAN | IDM_LANG_JAPANESE => {
1821+
| IDM_LANG_GERMAN | IDM_LANG_JAPANESE | IDM_LANG_KOREAN => {
18211822
let language_override = match id {
18221823
IDM_LANG_SYSTEM => None,
18231824
IDM_LANG_ENGLISH => Some(LanguageId::English),
18241825
IDM_LANG_SPANISH => Some(LanguageId::Spanish),
18251826
IDM_LANG_FRENCH => Some(LanguageId::French),
18261827
IDM_LANG_GERMAN => Some(LanguageId::German),
18271828
IDM_LANG_JAPANESE => Some(LanguageId::Japanese),
1829+
IDM_LANG_KOREAN => Some(LanguageId::Korean),
18281830
_ => None,
18291831
};
18301832
{
@@ -1991,6 +1993,7 @@ fn show_context_menu(hwnd: HWND) {
19911993
LanguageId::French => IDM_LANG_FRENCH,
19921994
LanguageId::German => IDM_LANG_GERMAN,
19931995
LanguageId::Japanese => IDM_LANG_JAPANESE,
1996+
LanguageId::Korean => IDM_LANG_KOREAN,
19941997
};
19951998
let label_str = native_interop::wide_str(language.native_name());
19961999
let flags = if language_override == Some(language) {

0 commit comments

Comments
 (0)