apiUpdate // Move supportedLocales to IME module.

This commit is contained in:
ShikiSuen 2022-04-08 19:40:15 +08:00
parent 192bab579c
commit 81317dafb4
2 changed files with 2 additions and 3 deletions

View File

@ -26,7 +26,7 @@ import Carbon
import Cocoa
@objc public class IME: NSObject {
static let arrSupportedLocales = ["en", "zh-Hant", "zh-Hans", "ja"]
static let dlgOpenPath = NSOpenPanel()
// MARK: -

View File

@ -143,8 +143,7 @@ struct VersionUpdateApi {
let versionDescriptions = plist[kVersionDescription] as? [AnyHashable: Any]
if let versionDescriptions = versionDescriptions {
var locale = "en"
let supportedLocales = ["en", "zh-Hant", "zh-Hans", "ja"]
let preferredTags = Bundle.preferredLocalizations(from: supportedLocales)
let preferredTags = Bundle.preferredLocalizations(from: IME.arrSupportedLocales)
if let first = preferredTags.first {
locale = first
}