feat(i18n): add internationalization support for tray menu

- Implement TrayTexts struct to manage multilingual tray menu text
- Auto-refresh tray menu when language settings change
- Add missing notification message translations
- Format code for consistency
This commit is contained in:
Jason
2025-10-30 17:14:59 +08:00
parent b3e14b3985
commit def4095e4e
6 changed files with 75 additions and 20 deletions

View File

@@ -6,7 +6,10 @@ use cc_switch_lib::AppType;
fn parse_known_apps_case_insensitive_and_trim() {
assert!(matches!(AppType::from_str("claude"), Ok(AppType::Claude)));
assert!(matches!(AppType::from_str("codex"), Ok(AppType::Codex)));
assert!(matches!(AppType::from_str(" ClAuDe \n"), Ok(AppType::Claude)));
assert!(matches!(
AppType::from_str(" ClAuDe \n"),
Ok(AppType::Claude)
));
assert!(matches!(AppType::from_str("\tcoDeX\t"), Ok(AppType::Codex)));
}