mirror of
https://github.com/CodeZeno/Claude-Code-Usage-Monitor.git
synced 2026-06-20 10:19:27 +08:00
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>
This commit is contained in:
parent
643cc0a8b6
commit
830f6f4c9b
37
src/localization/korean.rs
Normal file
37
src/localization/korean.rs
Normal file
@ -0,0 +1,37 @@
|
||||
use super::Strings;
|
||||
|
||||
pub(super) const UPDATE_VIA_WINGET_LABEL: &str = "WinGet으로 업데이트";
|
||||
|
||||
pub(super) const STRINGS: Strings = Strings {
|
||||
window_title: "Claude Code 사용량 모니터",
|
||||
refresh: "새로고침",
|
||||
update_frequency: "업데이트 주기",
|
||||
one_minute: "1분",
|
||||
five_minutes: "5분",
|
||||
fifteen_minutes: "15분",
|
||||
one_hour: "1시간",
|
||||
settings: "설정",
|
||||
start_with_windows: "Windows 시작 시 자동 실행",
|
||||
reset_position: "위치 초기화",
|
||||
language: "언어",
|
||||
system_default: "시스템 기본값",
|
||||
check_for_updates: "업데이트 확인",
|
||||
checking_for_updates: "업데이트 확인 중...",
|
||||
updates: "업데이트",
|
||||
update_in_progress: "이미 업데이트 확인이 진행 중입니다.",
|
||||
up_to_date: "이미 최신 버전입니다.",
|
||||
up_to_date_short: "최신",
|
||||
update_failed: "자동 업데이트를 완료할 수 없습니다",
|
||||
applying_update: "업데이트 적용 중...",
|
||||
update_to: "업데이트 대상",
|
||||
update_available: "업데이트 사용 가능",
|
||||
update_prompt_now: "버전 {version}을 사용할 수 있습니다. 지금 업데이트하시겠습니까?",
|
||||
exit: "종료",
|
||||
session_window: "5h",
|
||||
weekly_window: "7d",
|
||||
now: "지금",
|
||||
day_suffix: "일",
|
||||
hour_suffix: "시간",
|
||||
minute_suffix: "분",
|
||||
second_suffix: "초",
|
||||
};
|
||||
@ -2,6 +2,7 @@ mod english;
|
||||
mod french;
|
||||
mod german;
|
||||
mod japanese;
|
||||
mod korean;
|
||||
mod spanish;
|
||||
|
||||
use windows::core::PWSTR;
|
||||
@ -17,15 +18,17 @@ pub enum LanguageId {
|
||||
French,
|
||||
German,
|
||||
Japanese,
|
||||
Korean,
|
||||
}
|
||||
|
||||
impl LanguageId {
|
||||
pub const ALL: [LanguageId; 5] = [
|
||||
pub const ALL: [LanguageId; 6] = [
|
||||
LanguageId::English,
|
||||
LanguageId::Spanish,
|
||||
LanguageId::French,
|
||||
LanguageId::German,
|
||||
LanguageId::Japanese,
|
||||
LanguageId::Korean,
|
||||
];
|
||||
|
||||
pub fn code(self) -> &'static str {
|
||||
@ -35,6 +38,7 @@ impl LanguageId {
|
||||
Self::French => "fr",
|
||||
Self::German => "de",
|
||||
Self::Japanese => "ja",
|
||||
Self::Korean => "ko",
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,6 +49,7 @@ impl LanguageId {
|
||||
Self::French => "Français",
|
||||
Self::German => "Deutsch",
|
||||
Self::Japanese => "日本語",
|
||||
Self::Korean => "한국어",
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,6 +60,7 @@ impl LanguageId {
|
||||
Self::French => french::STRINGS,
|
||||
Self::German => german::STRINGS,
|
||||
Self::Japanese => japanese::STRINGS,
|
||||
Self::Korean => korean::STRINGS,
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,6 +71,7 @@ impl LanguageId {
|
||||
Self::French => french::UPDATE_VIA_WINGET_LABEL,
|
||||
Self::German => german::UPDATE_VIA_WINGET_LABEL,
|
||||
Self::Japanese => japanese::UPDATE_VIA_WINGET_LABEL,
|
||||
Self::Korean => korean::UPDATE_VIA_WINGET_LABEL,
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,6 +87,7 @@ impl LanguageId {
|
||||
"fr" => Some(Self::French),
|
||||
"de" => Some(Self::German),
|
||||
"ja" => Some(Self::Japanese),
|
||||
"ko" => Some(Self::Korean),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,6 +106,7 @@ const IDM_LANG_SPANISH: u16 = 42;
|
||||
const IDM_LANG_FRENCH: u16 = 43;
|
||||
const IDM_LANG_GERMAN: u16 = 44;
|
||||
const IDM_LANG_JAPANESE: u16 = 45;
|
||||
const IDM_LANG_KOREAN: u16 = 46;
|
||||
|
||||
const DIVIDER_HIT_ZONE: i32 = 13; // LEFT_DIVIDER_W + DIVIDER_RIGHT_MARGIN
|
||||
|
||||
@ -1817,7 +1818,7 @@ unsafe extern "system" fn wnd_proc(
|
||||
SetTimer(hwnd, TIMER_POLL, new_interval, None);
|
||||
}
|
||||
IDM_LANG_SYSTEM | IDM_LANG_ENGLISH | IDM_LANG_SPANISH | IDM_LANG_FRENCH
|
||||
| IDM_LANG_GERMAN | IDM_LANG_JAPANESE => {
|
||||
| IDM_LANG_GERMAN | IDM_LANG_JAPANESE | IDM_LANG_KOREAN => {
|
||||
let language_override = match id {
|
||||
IDM_LANG_SYSTEM => None,
|
||||
IDM_LANG_ENGLISH => Some(LanguageId::English),
|
||||
@ -1825,6 +1826,7 @@ unsafe extern "system" fn wnd_proc(
|
||||
IDM_LANG_FRENCH => Some(LanguageId::French),
|
||||
IDM_LANG_GERMAN => Some(LanguageId::German),
|
||||
IDM_LANG_JAPANESE => Some(LanguageId::Japanese),
|
||||
IDM_LANG_KOREAN => Some(LanguageId::Korean),
|
||||
_ => None,
|
||||
};
|
||||
{
|
||||
@ -1991,6 +1993,7 @@ fn show_context_menu(hwnd: HWND) {
|
||||
LanguageId::French => IDM_LANG_FRENCH,
|
||||
LanguageId::German => IDM_LANG_GERMAN,
|
||||
LanguageId::Japanese => IDM_LANG_JAPANESE,
|
||||
LanguageId::Korean => IDM_LANG_KOREAN,
|
||||
};
|
||||
let label_str = native_interop::wide_str(language.native_name());
|
||||
let flags = if language_override == Some(language) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user