Shared // Add localized descriptions to InputMode.

This commit is contained in:
ShikiSuen 2022-12-04 10:47:13 +08:00
parent a6c50ac937
commit d705114dc4
1 changed files with 12 additions and 0 deletions

View File

@ -306,5 +306,17 @@ public enum Shared {
return .imeModeNULL
}
}
public var localizedDescription: String { NSLocalizedString(description, comment: "") }
public var description: String {
switch self {
case .imeModeCHS:
return "Simplified Chinese"
case .imeModeCHT:
return "Traditional Chinese"
case .imeModeNULL:
return "Please select…"
}
}
}
}