apiUpdate // Move supportedLocales to IME module.

This commit is contained in:
ShikiSuen 2022-04-08 19:40:15 +08:00
parent 18fd4975ff
commit 6d37b137a6
2 changed files with 2 additions and 3 deletions

View File

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

View File

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