feat(keyboard): add clipboard AI skills, hint keywords, and voice session fixes
Idle chips show entities with category icons; a fresh copy surfaces Reply/Summarize/Translate; abort/cancel/empty-tap no longer leave the mic stuck.
This commit is contained in:
@@ -25,6 +25,45 @@ public struct TranslationLanguage: Identifiable, Hashable, Sendable {
|
||||
self.promptLanguageName = promptLanguageName
|
||||
self.nativeName = nativeName
|
||||
}
|
||||
|
||||
/// One-character Chinese token for compact chips such as「中译英」.
|
||||
public var chineseShort: String {
|
||||
switch id {
|
||||
case "en": return "英"
|
||||
case "zh-Hans": return "中"
|
||||
case "zh-Hant": return "繁"
|
||||
case "ja": return "日"
|
||||
case "ko": return "韩"
|
||||
case "fr": return "法"
|
||||
case "de": return "德"
|
||||
case "es": return "西"
|
||||
case "ru": return "俄"
|
||||
case "pt": return "葡"
|
||||
default: return nativeName
|
||||
}
|
||||
}
|
||||
|
||||
/// Country-style English code for compact chips such as「To JP」.
|
||||
public var englishShort: String {
|
||||
switch id {
|
||||
case "en": return "EN"
|
||||
case "zh-Hans": return "CN"
|
||||
case "zh-Hant": return "TW"
|
||||
case "ja": return "JP"
|
||||
case "ko": return "KR"
|
||||
case "fr": return "FR"
|
||||
case "de": return "DE"
|
||||
case "es": return "ES"
|
||||
case "ru": return "RU"
|
||||
case "pt": return "PT"
|
||||
default: return id.uppercased()
|
||||
}
|
||||
}
|
||||
|
||||
/// True when this target is a Chinese script (简体 or 繁體).
|
||||
public var isChineseScript: Bool {
|
||||
id == "zh-Hans" || id == "zh-Hant"
|
||||
}
|
||||
}
|
||||
|
||||
public enum TranslationLanguageCatalog {
|
||||
|
||||
Reference in New Issue
Block a user