apiUpdate // Move supportedLocales to IME module.
This commit is contained in:
parent
192bab579c
commit
81317dafb4
|
@ -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: - 開關判定當前應用究竟是?
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue