Rudimental Support of KangXi Conversion Mode.
Converting zh-TW variants to KangXi variants.
This commit is contained in:
parent
76cb35826d
commit
2927e9e281
|
@ -232,8 +232,8 @@ public:
|
|||
}
|
||||
#endif //DEBUG
|
||||
|
||||
NSMenuItem *chineseConversionMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Chinese Conversion", @"") action:@selector(toggleChineseConverter:) keyEquivalent:@"G"];
|
||||
chineseConversionMenuItem.keyEquivalentModifierMask = NSEventModifierFlagCommand | NSEventModifierFlagControl;
|
||||
NSMenuItem *chineseConversionMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Chinese Conversion", @"") action:@selector(toggleChineseConverter:) keyEquivalent:@"K"];
|
||||
chineseConversionMenuItem.keyEquivalentModifierMask = NSEventModifierFlagCommand;
|
||||
chineseConversionMenuItem.state = _chineseConversionEnabled ? NSControlStateValueOn : NSControlStateValueOff;
|
||||
[menu addItem:chineseConversionMenuItem];
|
||||
|
||||
|
|
|
@ -5,18 +5,18 @@ import OpenCC
|
|||
// in Swift in order to bridge the Swift classes into our Objective-C++ project.
|
||||
class OpenCCBridge : NSObject {
|
||||
private static let shared = OpenCCBridge()
|
||||
private var conveter: ChineseConverter?
|
||||
private var converter: ChineseConverter?
|
||||
|
||||
override init() {
|
||||
try? conveter = ChineseConverter(options: .simplify)
|
||||
try? converter = ChineseConverter(options: .twStandardRev)
|
||||
super.init()
|
||||
}
|
||||
|
||||
@objc static func convert(_ string:String) -> String? {
|
||||
return shared.conveter?.convert(string)
|
||||
return shared.converter?.convert(string)
|
||||
}
|
||||
|
||||
private func convert(_ string:String) -> String? {
|
||||
return conveter?.convert(string)
|
||||
return converter?.convert(string)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,4 +49,4 @@
|
|||
/* No comment provided by engineer. */
|
||||
"You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@" = "You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@";
|
||||
|
||||
"Chinese Conversion" = "Convert to Simplified Chinese";
|
||||
"Chinese Conversion" = "Convert zh-TW Kanji to KangXi Variants";
|
||||
|
|
|
@ -49,4 +49,4 @@
|
|||
/* No comment provided by engineer. */
|
||||
"You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@" = "目前使用的威注音版本是 %1$@ (%2$@),网路上有更新版本 %3$@ (%4$@) 可供下载。是否要前往威注音网站下载新版来安装?%5$@";
|
||||
|
||||
"Chinese Conversion" = "强制简体字输出";
|
||||
"Chinese Conversion" = "优先使用康熙繁体字";
|
||||
|
|
|
@ -49,4 +49,4 @@
|
|||
/* No comment provided by engineer. */
|
||||
"You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@" = "目前使用的威注音版本是 %1$@ (%2$@),網路上有更新版本 %3$@ (%4$@) 可供下載。是否要前往威注音網站下載新版來安裝?%5$@";
|
||||
|
||||
"Chinese Conversion" = "輸出簡體中文";
|
||||
"Chinese Conversion" = "優先使用康熙繁體字";
|
||||
|
|
|
@ -1149,7 +1149,7 @@
|
|||
repositoryURL = "https://dev.azure.com/ShikiSuen/vChewing/_git/SwiftyLibreCC";
|
||||
requirement = {
|
||||
kind = revision;
|
||||
revision = 1d8105a0f7199c90af722bff62728050c858e777;
|
||||
revision = 5419c7a4f4d3ac0c5acbf67dcc90d45499c790ae;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
|
Loading…
Reference in New Issue