diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 94b4415c..6d616b4b 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -6,7 +6,8 @@ jobs: name: Build runs-on: macOS-latest env: - DEVELOPER_DIR: /Applications/Xcode_13.2.app/Contents/Developer + GIT_SSL_NO_VERIFY: true + DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer steps: - uses: actions/checkout@v1 - name: Clean diff --git a/.gitignore b/.gitignore index 3160b584..5bebbc3c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ Credits.rtf # that can be built by make -C Source/Data/bin/C_Version # C_count.occ.exe .idea +Source/Data/* \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..33c1907d --- /dev/null +++ b/LICENSE @@ -0,0 +1,12 @@ +MIT License + +Copyright (c) 2021 Mengjuei Hsieh et al. + +Shiki Suen, the maintainer of the vChewing project, does not own any rights of the programming parts of it. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/LICENSE-CHS.txt b/LICENSE-CHS.txt new file mode 100644 index 00000000..0644f391 --- /dev/null +++ b/LICENSE-CHS.txt @@ -0,0 +1,12 @@ +MIT License +麻理许可协议 + +著作权利所有 © 2011-2021 Mengjuei Hsieh 等。 + +威注音输入法维护人孙志贵对该产品的程序部分不享有任何所有权。 + +软件的著作权利人依此麻理授权条款,将其对于软件的著作权利授权释出,只要使用者践履以下二项麻理授权条款叙明的义务性规定,其即享有对此软件程式及其相关说明文档自由不受限制地进行利用的权利,范围包括「使用、重制、修改、合并、出版、散布、再授权、及贩售程式重制作品」等诸多方面的应用,而散布程式之人、更可将上述权利传递予其后收受程式的后手,倘若其后收受程式之人亦服膺以下二项麻理授权条款的义务性规定,则其对程式亦享有与前手运用范围相同的同一权利。 + +散布此一软件程序者,须将本条款其上的「著作权声明」及以下的「免责声明」,内嵌于软件程序及其重制作品的实体之中。 + +因麻理软件程序的授权模式乃是无偿提供,是以在现行法律的架构下可以主张合理的免除担保责任。麻理软件的著作权人或任何的后续散布者,对于其所散布的麻理软件程序皆不负任何形式上实质上的担保责任,明示亦或隐喻、商业利用性亦或特定目的使用性,这些均不在保障之列。利用麻理软件程序的所有风险均由使用者自行担负。假如所使用的麻理程序发生缺陷性问题,使用者需自行担负修正、改正及必要的服务支出。麻理软件程序的著作权人不负任何形式上实质上的担保责任,无论任何一般的、特殊的、偶发的、因果关系式的损害,或是麻理软件程序的不适用性,均须由使用者自行负担。 diff --git a/LICENSE-CHT.txt b/LICENSE-CHT.txt new file mode 100644 index 00000000..1c648da3 --- /dev/null +++ b/LICENSE-CHT.txt @@ -0,0 +1,12 @@ +MIT License +麻理授權條款 + +著作權利所有 © 2011-2021 Mengjuei Hsieh 等。 + +威注音輸入法維護人孫志貴對該產品的程式部分不享有任何所有權。 + +軟體的著作權利人依此麻理授權條款,將其對於軟體的著作權利授權釋出,只要使用者踐履以下二項麻理授權條款敘明的義務性規定,其即享有對此軟體程式及其相關說明文檔自由不受限制地進行利用的權利,範圍包括「使用、重製、修改、合併、出版、散布、再授權、及販售程式重製作品」等諸多方面的應用,而散布程式之人、更可將上述權利傳遞予其後收受程式的後手,倘若其後收受程式之人亦服膺以下二項麻理授權條款的義務性規定,則其對程式亦享有與前手運用範圍相同的同一權利。 + +散布此一軟體程式者,須將本條款其上的「著作權聲明」及以下的「免責聲明」,內嵌於軟體程式及其重製作品的實體之中。 + +因麻理軟體程式的授權模式乃是無償提供,是以在現行法律的架構下可以主張合理的免除擔保責任。麻理軟體的著作權人或任何的後續散布者,對於其所散布的麻理軟體程式皆不負任何形式上實質上的擔保責任,明示亦或隱喻、商業利用性亦或特定目的使用性,這些均不在保障之列。利用麻理軟體程式的所有風險均由使用者自行擔負。假如所使用的麻理程式發生缺陷性問題,使用者需自行擔負修正、改正及必要的服務支出。麻理軟體程式的著作權人不負任何形式上實質上的擔保責任,無論任何一般的、特殊的、偶發的、因果關係式的損害,或是麻理軟體程式的不適用性,均須由使用者自行負擔。 diff --git a/LICENSE.txt b/LICENSE.txt index 44849223..375cec4e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -2,20 +2,10 @@ MIT License Copyright (c) 2011-2021 Mengjuei Hsieh et al. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Shiki Suen, the maintainer of the vChewing project, does not own any rights of the programming parts of it. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Makefile b/Makefile index 0e889293..319c6441 100644 --- a/Makefile +++ b/Makefile @@ -12,13 +12,13 @@ BUILD_SETTINGS += ONLY_ACTIVE_ARCH=NO endif release: - xcodebuild -project McBopomofo.xcodeproj -scheme McBopomofoInstaller -configuration Release $(BUILD_SETTINGS) build + xcodebuild -project vChewing.xcodeproj -scheme vChewingInstaller -configuration Release $(BUILD_SETTINGS) build debug: - xcodebuild -project McBopomofo.xcodeproj -scheme McBopomofoInstaller -configuration Debug $(BUILD_SETTINGS) build + xcodebuild -project vChewing.xcodeproj -scheme vChewingInstaller -configuration Debug $(BUILD_SETTINGS) build DSTROOT = /Library/Input Methods -VC_APP_ROOT = $(DSTROOT)/McBopomofo.app +VC_APP_ROOT = $(DSTROOT)/vChewing.app .PHONY: permission-check install-debug install-release @@ -27,15 +27,15 @@ permission-check: install-debug: permission-check rm -rf "$(VC_APP_ROOT)" - open Build/Products/Debug/McBopomofoInstaller.app + open Build/Products/Debug/vChewingInstaller.app install-release: permission-check rm -rf "$(VC_APP_ROOT)" - open Build/Products/Release/McBopomofoInstaller.app + open Build/Products/Release/vChewingInstaller.app .PHONY: clean clean: - xcodebuild -scheme McBopomofoInstaller -configuration Debug $(BUILD_SETTINGS) clean - xcodebuild -scheme McBopomofoInstaller -configuration Release $(BUILD_SETTINGS) clean + xcodebuild -scheme vChewingInstaller -configuration Debug $(BUILD_SETTINGS) clean + xcodebuild -scheme vChewingInstaller -configuration Release $(BUILD_SETTINGS) clean make clean --file=./Source/Data/Makefile || true diff --git a/README.markdown b/README.markdown deleted file mode 100644 index 359a8385..00000000 --- a/README.markdown +++ /dev/null @@ -1,14 +0,0 @@ -# OpenVanilla McBopomofo 小麥注音輸入法 - -## 開發流程 - -用 Xcode 開啟 `McBopomofo.xcodeproj`,選 "McBopomofo Installer" target,build 完之後直接執行該安裝程式,就可以安裝小麥注音。 - -第一次安裝完,日後程式碼或詞庫有任何修改,只要重複上述流程,再次安裝小麥注音即可。 - -要注意的是 macOS 可能會限制同一次 login session 能 kill 同一個輸入法 process 的次數(安裝程式透過 kill input method process 來讓新版的輸入法生效)。如果安裝若干次後,發現程式修改的結果並沒有出現,或甚至輸入法已無法再選用,只要登出目前帳號再重新登入即可。 - -## 軟體授權 - -本專案採用 MIT License 釋出,使用者可自由使用、散播本軟體,惟散播時必須完整保留版權聲明及軟體授權([詳全文](https://github.com/openvanilla/McBopomofo/blob/master/LICENSE.txt))。 - diff --git a/README.md b/README.md index 359a8385..54434bc9 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,31 @@ -# OpenVanilla McBopomofo 小麥注音輸入法 +# vChewing 威注音输入法 -## 開發流程 +威注音输入法由小麦注音分支而来(且词库内已经移除任何可以妨碍该输入法在世界上任何地方传播的内容),是原生简体中文注音输入法:相比中州韵(鼠须管)而言,威注音能够做到真正的大千声韵并击。 -用 Xcode 開啟 `McBopomofo.xcodeproj`,選 "McBopomofo Installer" target,build 完之後直接執行該安裝程式,就可以安裝小麥注音。 +威注音分支专案及威注音词库由孙志贵(Shiki Suen)维护。小麦注音官方原始仓库內的词库的内容均与孙志贵无关。 -第一次安裝完,日後程式碼或詞庫有任何修改,只要重複上述流程,再次安裝小麥注音即可。 +## 建置流程 -要注意的是 macOS 可能會限制同一次 login session 能 kill 同一個輸入法 process 的次數(安裝程式透過 kill input method process 來讓新版的輸入法生效)。如果安裝若干次後,發現程式修改的結果並沒有出現,或甚至輸入法已無法再選用,只要登出目前帳號再重新登入即可。 +系统需求:至少 macOS 10.12 Sierra。 -## 軟體授權 +安装 Xcode 之后,请先配置 Xcode 允许其直接构建在专案所在的资料夹下的 build 资料夹内。步骤: +``` +「Xcode」->「Preferences...」->「Locations」; +「File」->「Project/WorkspaceSettings...」->「Advanced」; +选「Custom」->「Relative to Workspace」即可。不选的话,make 的过程会出错。 +``` +在终端机内定位到威注音的克隆本地专案的本地仓库的目录之后,执行 `make update` 以获取最新词库,在成功之后执行 `make` 即可组建。再执行 `make install` 可以触发威注音的安装程式。 -本專案採用 MIT License 釋出,使用者可自由使用、散播本軟體,惟散播時必須完整保留版權聲明及軟體授權([詳全文](https://github.com/openvanilla/McBopomofo/blob/master/LICENSE.txt))。 +第一次安装完,日后程式码或词库有任何修改,只要重复上述流程,再次安装威注音即可。 +要注意的是 macOS 可能会限制同一次 login session 能终结同一个输入法的执行进程的次数(安装程式透过 kill input method process 来让新版的输入法生效)。如果安装若干次后,发现程式修改的结果并没有出现、或甚至输入法已无法再选用,只需要登出目前的 macOS 系统帐号、再重新登入即可。 + +补记: 该输入法是在 2021 年 11 月初「28ae7deb4092f067539cff600397292e66a5dd56」这一版小麦注音建置的基础上完成的。因为在清洗词库的时候清洗了全部的 git commit 历史,所以无法自动从小麦注音官方仓库上游继承任何改动,只能手动同步任何在此之后的程式修正。最近一次同步參照是「f7a24862c4e1733a2264b56e434d1a449325d769」。除此以外,还引入了 MJHsieh 制作(却尚未正式给小麦注音实装)的「临时记忆最近的部分选字词」的功能(该记忆有自己的忘却衰减曲线,且记忆的词汇会在每次重新开机时自动忘却。)。 + +## 应用授权 + +小麦注音引擎程式版权:© 2011-2021 OpenVanilla 专案团队(Mengjuei Hsieh 等人)。 + +威注音词库由孙志贵维护,亦以 MIT 授权释出。 + +本专案采用 MIT License 释出,使用者可自由使用、散播本软体,惟散播时必须完整保留版权声明及软体授权([详全文 LICENSE.txt](https://github.com/openvanilla/McBopomofo/blob/master/LICENSE.txt))。 diff --git a/Source/AppDelegate.h b/Source/AppDelegate.h index 96ee6e0c..66d758bf 100644 --- a/Source/AppDelegate.h +++ b/Source/AppDelegate.h @@ -1,7 +1,7 @@ // // AppDelegate.h // -// Copyright (c) 2011 The McBopomofo Project. +// Copyright (c) 2021 The vChewing Project. // // Contributors: // Mengjuei Hsieh (@mjhsieh) diff --git a/Source/AppDelegate.m b/Source/AppDelegate.m index cc6b896c..eb7dc496 100644 --- a/Source/AppDelegate.m +++ b/Source/AppDelegate.m @@ -1,7 +1,7 @@ // // AppDelegate.m // -// Copyright (c) 2011 The McBopomofo Project. +// Copyright (c) 2021 The vChewing Project. // // Contributors: // Mengjuei Hsieh (@mjhsieh) @@ -156,7 +156,7 @@ static const NSTimeInterval kTimeoutInterval = 60.0; - (void)showNoUpdateAvailableAlert { - [[OVNonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"Check for Update Completed", nil) content:NSLocalizedString(@"You are already using the latest version of McBopomofo.", nil) confirmButtonTitle:NSLocalizedString(@"OK", nil) cancelButtonTitle:nil cancelAsDefault:NO delegate:nil]; + [[OVNonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"Check for Update Completed", nil) content:NSLocalizedString(@"You are already using the latest version of vChewing.", nil) confirmButtonTitle:NSLocalizedString(@"OK", nil) cancelButtonTitle:nil cancelAsDefault:NO delegate:nil]; } - (void)connectionDidFinishLoading:(NSURLConnection *)connection @@ -244,7 +244,7 @@ static const NSTimeInterval kTimeoutInterval = 60.0; } } - NSString *content = [NSString stringWithFormat:NSLocalizedString(@"You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo's website to download the version?%@", nil), [infoDict objectForKey:@"CFBundleShortVersionString"], currentVersion, [plist objectForKey:@"CFBundleShortVersionString"], remoteVersion, versionDescription]; + NSString *content = [NSString stringWithFormat:NSLocalizedString(@"You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@", nil), [infoDict objectForKey:@"CFBundleShortVersionString"], currentVersion, [plist objectForKey:@"CFBundleShortVersionString"], remoteVersion, versionDescription]; [[OVNonModalAlertWindowController sharedInstance] showWithTitle:NSLocalizedString(@"New Version Available", nil) content:content confirmButtonTitle:NSLocalizedString(@"Visit Website", nil) cancelButtonTitle:NSLocalizedString(@"Not Now", nil) cancelAsDefault:NO delegate:self]; } diff --git a/Source/Base.lproj/MainMenu.xib b/Source/Base.lproj/MainMenu.xib index 5f7bcf12..4c79f2b9 100644 --- a/Source/Base.lproj/MainMenu.xib +++ b/Source/Base.lproj/MainMenu.xib @@ -14,10 +14,10 @@ - - + + - + @@ -32,7 +32,7 @@ - + diff --git a/Source/CandidateUI/VTHorizontalCandidateController.m b/Source/CandidateUI/VTHorizontalCandidateController.m index 4cc8795b..d3246dbe 100644 --- a/Source/CandidateUI/VTHorizontalCandidateController.m +++ b/Source/CandidateUI/VTHorizontalCandidateController.m @@ -57,7 +57,7 @@ self = [self initWithWindow:panel]; if (self) { contentRect.origin = NSMakePoint(0.0, 0.0); - _candidateView = [[VTHorizontalCandidateView alloc] initWithFrame:contentRect]; + _candidateView = [[VTHorizontalCandidateView alloc] initWithFrame:contentRect]; _candidateView.target = self; _candidateView.action = @selector(candidateViewMouseDidClick:); [[panel contentView] addSubview:_candidateView]; @@ -151,7 +151,7 @@ - (void)setSelectedCandidateIndex:(NSUInteger)newIndex { - NSUInteger keyLabelCount = [_keyLabels count]; + NSUInteger keyLabelCount = [_keyLabels count]; if (newIndex < [_delegate candidateCountForController:self]) { _currentPage = newIndex / keyLabelCount; _candidateView.highlightedIndex = newIndex % keyLabelCount; @@ -175,7 +175,7 @@ NSMutableArray *candidates = [NSMutableArray array]; NSUInteger count = [_delegate candidateCountForController:self]; - NSUInteger keyLabelCount = [_keyLabels count]; + NSUInteger keyLabelCount = [_keyLabels count]; for (NSUInteger index = _currentPage * keyLabelCount, j = 0; index < count && j < keyLabelCount; index++, j++) { [candidates addObject:[_delegate candidateController:self candidateAtIndex:index]]; } diff --git a/Source/CandidateUI/VTHorizontalCandidateView.m b/Source/CandidateUI/VTHorizontalCandidateView.m index d24122f5..765d0fc1 100644 --- a/Source/CandidateUI/VTHorizontalCandidateView.m +++ b/Source/CandidateUI/VTHorizontalCandidateView.m @@ -96,7 +96,7 @@ NS_INLINE CGFloat max(CGFloat a, CGFloat b) { return a > b ? a : b; } - (NSSize)sizeForView { NSSize result = NSMakeSize(0.0, 0.0); - if ([_elementWidths count]) { + if ([_elementWidths count]) { for (NSNumber *w in _elementWidths) { result.width += [w doubleValue]; } @@ -128,7 +128,7 @@ NS_INLINE CGFloat max(CGFloat a, CGFloat b) { return a > b ? a : b; } [NSBezierPath strokeLineFromPoint:NSMakePoint(bounds.size.width, 0.0) toPoint:NSMakePoint(bounds.size.width, bounds.size.height)]; NSUInteger count = [_elementWidths count]; - CGFloat accuWidth = 0.0; + CGFloat accuWidth = 0.0; for (NSUInteger index = 0; index < count; index++) { NSDictionary *activeCandidateAttr = _candidateAttrDict; @@ -154,7 +154,7 @@ NS_INLINE CGFloat max(CGFloat a, CGFloat b) { return a > b ? a : b; } } else { [backgroundColor setFill]; - } + } [NSBezierPath fillRect:candidateRect]; [[_displayedCandidates objectAtIndex:index] drawInRect:candidateRect withAttributes:activeCandidateAttr]; @@ -172,7 +172,7 @@ NS_INLINE CGFloat max(CGFloat a, CGFloat b) { return a > b ? a : b; } return result; } - NSUInteger count = [_elementWidths count]; + NSUInteger count = [_elementWidths count]; CGFloat accuWidth = 0.0; for (NSUInteger index = 0; index < count; index++) { CGFloat currentWidth = [[_elementWidths objectAtIndex:index] doubleValue]; @@ -182,7 +182,7 @@ NS_INLINE CGFloat max(CGFloat a, CGFloat b) { return a > b ? a : b; } break; } - accuWidth += currentWidth + 1.0; + accuWidth += currentWidth + 1.0; } return result; @@ -217,7 +217,7 @@ NS_INLINE CGFloat max(CGFloat a, CGFloat b) { return a > b ? a : b; } # pragma clang diagnostic push # pragma clang diagnostic ignored "-Warc-performSelector-leaks" if (triggerAction && _target && _action) { - [_target performSelector:_action withObject:self]; + [_target performSelector:_action withObject:self]; } # pragma clang diagnostic pop } diff --git a/Source/CandidateUI/VTVerticalCandidateController.m b/Source/CandidateUI/VTVerticalCandidateController.m index 7150d45b..68c340b5 100644 --- a/Source/CandidateUI/VTVerticalCandidateController.m +++ b/Source/CandidateUI/VTVerticalCandidateController.m @@ -81,7 +81,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; scrollViewRect.origin.x = stripRect.size.width; scrollViewRect.size.width -= stripRect.size.width; - _scrollView = [[NSScrollView alloc] initWithFrame:scrollViewRect]; + _scrollView = [[NSScrollView alloc] initWithFrame:scrollViewRect]; // >=10.7 only, elastic scroll causes some drawing issues with visible scroller, so we disable it if ([_scrollView respondsToSelector:@selector(setVerticalScrollElasticity:)]) { @@ -155,7 +155,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; - (BOOL)highlightPreviousCandidate { - return [self moveSelectionByOne:NO]; + return [self moveSelectionByOne:NO]; } - (NSUInteger)candidateIndexAtKeyLabelIndex:(NSUInteger)index @@ -224,13 +224,13 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; { NSString *candidate = @""; - // rendering can occur when the delegate is already gone or data goes stale; in that case we ignore it + // rendering can occur when the delegate is already gone or data goes stale; in that case we ignore it if (row < [_delegate candidateCountForController:self]) { candidate = [_delegate candidateController:self candidateAtIndex:row]; } - NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:candidate attributes:[NSDictionary dictionaryWithObjectsAndKeys:_candidateFont, NSFontAttributeName, _candidateTextParagraphStyle, NSParagraphStyleAttributeName, nil]]; + NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:candidate attributes:[NSDictionary dictionaryWithObjectsAndKeys:_candidateFont, NSFontAttributeName, _candidateTextParagraphStyle, NSParagraphStyleAttributeName, nil]]; // we do more work than what this method is expected to; normally not a good practice, but for the amount of data (9 to 10 rows max), we can afford the overhead @@ -244,7 +244,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; // keep track of the highlighted index in the key label strip NSUInteger count = [_keyLabels count]; - NSInteger selectedRow = [_tableView selectedRow]; + NSInteger selectedRow = [_tableView selectedRow]; if (selectedRow != -1) { // cast this into signed integer to make our life easier NSInteger newHilightIndex; @@ -255,7 +255,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; else { NSInteger firstVisibleRow = [_tableView rowAtPoint:[_scrollView documentVisibleRect].origin]; - newHilightIndex = selectedRow - firstVisibleRow; + newHilightIndex = selectedRow - firstVisibleRow; if (newHilightIndex < -1) { newHilightIndex = -1; } @@ -263,7 +263,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; if (newHilightIndex != _keyLabelStripView.highlightedIndex && newHilightIndex >= 0) { _keyLabelStripView.highlightedIndex = newHilightIndex; - [_keyLabelStripView setNeedsDisplay:YES]; + [_keyLabelStripView setNeedsDisplay:YES]; } } @@ -273,8 +273,8 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; - (void)tableViewSelectionDidChange:(NSNotification *)aNotification { NSInteger selectedRow = [_tableView selectedRow]; - if (selectedRow != -1) { - // keep track of the highlighted index in the key label strip + if (selectedRow != -1) { + // keep track of the highlighted index in the key label strip NSInteger firstVisibleRow = [_tableView rowAtPoint:[_scrollView documentVisibleRect].origin]; _keyLabelStripView.highlightedIndex = selectedRow - firstVisibleRow; [_keyLabelStripView setNeedsDisplay:YES]; @@ -285,7 +285,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; if ([_scrollView hasVerticalScroller]) { [[_scrollView verticalScroller] setNeedsDisplay]; } - } + } } - (void)rowDoubleClicked:(id)sender @@ -331,8 +331,8 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; } } - self.selectedCandidateIndex = newIndex; - return YES; + self.selectedCandidateIndex = newIndex; + return YES; } - (BOOL)moveSelectionByOne:(BOOL)forward @@ -360,7 +360,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; newIndex--; } - self.selectedCandidateIndex = newIndex; + self.selectedCandidateIndex = newIndex; return YES; } @@ -393,7 +393,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; [_scrollView setHasVerticalScroller:YES]; NSScroller *verticalScroller = [_scrollView verticalScroller]; - [verticalScroller setControlSize:controlSize]; + [verticalScroller setControlSize:controlSize]; [verticalScroller setScrollerStyle:NSScrollerStyleLegacy]; scrollerWidth = [NSScroller scrollerWidthForControlSize:controlSize scrollerStyle:NSScrollerStyleLegacy]; } @@ -415,7 +415,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; maxKeyLabelWidth = max(rect.size.width, maxKeyLabelWidth); } - CGFloat rowSpacing = [_tableView intercellSpacing].height; + CGFloat rowSpacing = [_tableView intercellSpacing].height; CGFloat stripWidth = ceil(maxKeyLabelWidth * 1.20); CGFloat tableViewStartWidth = ceil(_maxCandidateAttrStringWidth + scrollerWidth);; CGFloat windowWidth = stripWidth + 1.0 + tableViewStartWidth; @@ -425,7 +425,7 @@ static const CGFloat kCandidateTextLeftMarginWithMandatedTableViewPadding = 0.0; NSPoint topLeftPoint = NSMakePoint(frameRect.origin.x, frameRect.origin.y + frameRect.size.height); frameRect.size = NSMakeSize(windowWidth, windowHeight); - frameRect.origin = NSMakePoint(topLeftPoint.x, topLeftPoint.y - frameRect.size.height); + frameRect.origin = NSMakePoint(topLeftPoint.x, topLeftPoint.y - frameRect.size.height); [_keyLabelStripView setFrame:NSMakeRect(0.0, 0.0, stripWidth, windowHeight)]; [_scrollView setFrame:NSMakeRect(stripWidth + 1.0, 0.0, tableViewStartWidth, windowHeight)]; diff --git a/Source/CandidateUI/VTVerticalCandidateTableView.m b/Source/CandidateUI/VTVerticalCandidateTableView.m index bf326ac5..990f134d 100644 --- a/Source/CandidateUI/VTVerticalCandidateTableView.m +++ b/Source/CandidateUI/VTVerticalCandidateTableView.m @@ -30,7 +30,7 @@ @implementation VTVerticalCandidateTableView - (NSRect)adjustScroll:(NSRect)newVisible { - NSRect scrollRect = newVisible; + NSRect scrollRect = newVisible; CGFloat rowHeightPlusSpacing = [self rowHeight] + [self intercellSpacing].height; scrollRect.origin.y = (NSInteger)(scrollRect.origin.y / rowHeightPlusSpacing) * rowHeightPlusSpacing; return scrollRect; diff --git a/Source/CandidateUI/VTVerticalKeyLabelStripView.m b/Source/CandidateUI/VTVerticalKeyLabelStripView.m index 1a7d2a19..1770d9f8 100644 --- a/Source/CandidateUI/VTVerticalKeyLabelStripView.m +++ b/Source/CandidateUI/VTVerticalKeyLabelStripView.m @@ -58,14 +58,14 @@ { NSRect bounds = [self bounds]; [[NSColor whiteColor] setFill]; - [NSBezierPath fillRect:bounds]; + [NSBezierPath fillRect:bounds]; - NSUInteger count = [_keyLabels count]; + NSUInteger count = [_keyLabels count]; if (!count) { return; } - CGFloat cellHeight = bounds.size.height / count; + CGFloat cellHeight = bounds.size.height / count; NSColor *black = [NSColor blackColor]; NSColor *darkGray = [NSColor colorWithDeviceWhite:0.7 alpha:1.0]; NSColor *lightGray = [NSColor colorWithDeviceWhite:0.8 alpha:1.0]; @@ -99,6 +99,6 @@ NSString *text = [_keyLabels objectAtIndex:index]; [text drawInRect:textRect withAttributes:textAttr]; - } + } } @end diff --git a/Source/Images/Bopomofo.tiff b/Source/Images/Bopomofo.tiff index a1c29ed1..b802c702 100644 Binary files a/Source/Images/Bopomofo.tiff and b/Source/Images/Bopomofo.tiff differ diff --git a/Source/Images/Bopomofo@2x.tiff b/Source/Images/Bopomofo@2x.tiff index 61adceeb..ba012070 100644 Binary files a/Source/Images/Bopomofo@2x.tiff and b/Source/Images/Bopomofo@2x.tiff differ diff --git a/Source/Images/Images.xcassets/AlertIcon.imageset/128X128.png b/Source/Images/Images.xcassets/AlertIcon.imageset/128X128.png index 1a599df9..217bbbc2 100644 Binary files a/Source/Images/Images.xcassets/AlertIcon.imageset/128X128.png and b/Source/Images/Images.xcassets/AlertIcon.imageset/128X128.png differ diff --git a/Source/Images/Images.xcassets/AlertIcon.imageset/192x192.png b/Source/Images/Images.xcassets/AlertIcon.imageset/192x192.png index 33fa764a..d42323f8 100644 Binary files a/Source/Images/Images.xcassets/AlertIcon.imageset/192x192.png and b/Source/Images/Images.xcassets/AlertIcon.imageset/192x192.png differ diff --git a/Source/Images/Images.xcassets/AlertIcon.imageset/64X64.png b/Source/Images/Images.xcassets/AlertIcon.imageset/64X64.png index 2b3d950b..e302ef22 100644 Binary files a/Source/Images/Images.xcassets/AlertIcon.imageset/64X64.png and b/Source/Images/Images.xcassets/AlertIcon.imageset/64X64.png differ diff --git a/Source/Images/Images.xcassets/AppIcon.appiconset/1024X1024.png b/Source/Images/Images.xcassets/AppIcon.appiconset/1024X1024.png index cffcacb2..4e703cf3 100644 Binary files a/Source/Images/Images.xcassets/AppIcon.appiconset/1024X1024.png and b/Source/Images/Images.xcassets/AppIcon.appiconset/1024X1024.png differ diff --git a/Source/Images/Images.xcassets/AppIcon.appiconset/128X128.png b/Source/Images/Images.xcassets/AppIcon.appiconset/128X128.png index 1a599df9..217bbbc2 100644 Binary files a/Source/Images/Images.xcassets/AppIcon.appiconset/128X128.png and b/Source/Images/Images.xcassets/AppIcon.appiconset/128X128.png differ diff --git a/Source/Images/Images.xcassets/AppIcon.appiconset/16X16.png b/Source/Images/Images.xcassets/AppIcon.appiconset/16X16.png index 58e99c3b..186f7132 100644 Binary files a/Source/Images/Images.xcassets/AppIcon.appiconset/16X16.png and b/Source/Images/Images.xcassets/AppIcon.appiconset/16X16.png differ diff --git a/Source/Images/Images.xcassets/AppIcon.appiconset/256X256.png b/Source/Images/Images.xcassets/AppIcon.appiconset/256X256.png index 77503fcd..310a5b1d 100644 Binary files a/Source/Images/Images.xcassets/AppIcon.appiconset/256X256.png and b/Source/Images/Images.xcassets/AppIcon.appiconset/256X256.png differ diff --git a/Source/Images/Images.xcassets/AppIcon.appiconset/32X32.png b/Source/Images/Images.xcassets/AppIcon.appiconset/32X32.png index 157177af..006eede0 100644 Binary files a/Source/Images/Images.xcassets/AppIcon.appiconset/32X32.png and b/Source/Images/Images.xcassets/AppIcon.appiconset/32X32.png differ diff --git a/Source/Images/Images.xcassets/AppIcon.appiconset/512X512.png b/Source/Images/Images.xcassets/AppIcon.appiconset/512X512.png index 350731f8..d6900d03 100644 Binary files a/Source/Images/Images.xcassets/AppIcon.appiconset/512X512.png and b/Source/Images/Images.xcassets/AppIcon.appiconset/512X512.png differ diff --git a/Source/Images/Images.xcassets/AppIcon.appiconset/64X64.png b/Source/Images/Images.xcassets/AppIcon.appiconset/64X64.png index 2b3d950b..e302ef22 100644 Binary files a/Source/Images/Images.xcassets/AppIcon.appiconset/64X64.png and b/Source/Images/Images.xcassets/AppIcon.appiconset/64X64.png differ diff --git a/Source/Images/PlainBopomofo.tiff b/Source/Images/PlainBopomofo.tiff index 2aee9334..c16a981d 100644 Binary files a/Source/Images/PlainBopomofo.tiff and b/Source/Images/PlainBopomofo.tiff differ diff --git a/Source/Images/PlainBopomofo@2x.tiff b/Source/Images/PlainBopomofo@2x.tiff index af559d63..e450fee8 100644 Binary files a/Source/Images/PlainBopomofo@2x.tiff and b/Source/Images/PlainBopomofo@2x.tiff differ diff --git a/Source/InputMethodController.h b/Source/InputMethodController.h index 71437a00..9ba86602 100644 --- a/Source/InputMethodController.h +++ b/Source/InputMethodController.h @@ -1,7 +1,7 @@ // // InputMethodController.h // -// Copyright (c) 2011 The McBopomofo Project. +// Copyright (c) 2021 The vChewing Project. // // Contributors: // Mengjuei Hsieh (@mjhsieh) @@ -39,7 +39,7 @@ #import "FastLM.h" #import "UserOverrideModel.h" -@interface McBopomofoInputMethodController : IMKInputController +@interface vChewingInputMethodController : IMKInputController { @private // the reading buffer that takes user input @@ -55,7 +55,7 @@ std::vector _walkedNodes; // user override model - McBopomofo::UserOverrideModel *_uom; + vChewing::UserOverrideModel *_uom; // the latest composing buffer that is updated to the foreground app NSMutableString *_composingBuffer; diff --git a/Source/InputMethodController.mm b/Source/InputMethodController.mm index b599fdf0..5d9b3f1b 100644 --- a/Source/InputMethodController.mm +++ b/Source/InputMethodController.mm @@ -1,7 +1,7 @@ // // InputMethodController.m // -// Copyright (c) 2011 The McBopomofo Project. +// Copyright (c) 2021 The vChewing Project. // // Contributors: // Mengjuei Hsieh (@mjhsieh) @@ -41,7 +41,7 @@ #import "AppDelegate.h" #import "VTHorizontalCandidateController.h" #import "VTVerticalCandidateController.h" -#import "McBopomofo-Swift.h" +#import "vChewing-Swift.h" //@import SwiftUI; @@ -76,9 +76,9 @@ static NSString *const kCandidateListTextSizeKey = @"CandidateListTextSize"; static NSString *const kSelectPhraseAfterCursorAsCandidatePreferenceKey = @"SelectPhraseAfterCursorAsCandidate"; static NSString *const kUseHorizontalCandidateListPreferenceKey = @"UseHorizontalCandidateList"; static NSString *const kComposingBufferSizePreferenceKey = @"ComposingBufferSize"; +static NSString *const kDisableUserCandidateSelectionLearning = @"DisableUserCandidateSelectionLearning"; static NSString *const kChooseCandidateUsingSpaceKey = @"ChooseCandidateUsingSpaceKey"; static NSString *const kChineseConversionEnabledKey = @"ChineseConversionEnabledKey"; -static NSString *const kDisableUserCandidateSelectionLearning = @"DisableUserCandidateSelectionLearning"; // advanced (usually optional) settings static NSString *const kCandidateTextFontName = @"CandidateTextFontName"; @@ -86,8 +86,8 @@ static NSString *const kCandidateKeyLabelFontName = @"CandidateKeyLabelFontName" static NSString *const kCandidateKeys = @"CandidateKeys"; // input modes -static NSString *const kBopomofoModeIdentifier = @"org.openvanilla.inputmethod.McBopomofo.Bopomofo"; -static NSString *const kPlainBopomofoModeIdentifier = @"org.openvanilla.inputmethod.McBopomofo.PlainBopomofo"; +static NSString *const kBopomofoModeIdentifier = @"org.openvanilla.inputmethod.vChewing.Bopomofo"; +static NSString *const kPlainBopomofoModeIdentifier = @"org.openvanilla.inputmethod.vChewing.PlainBopomofo"; // key code enums enum { @@ -111,17 +111,13 @@ VTCandidateController *gCurrentCandidateController = nil; // if DEBUG is defined, a DOT file (GraphViz format) will be written to the // specified path everytime the grid is walked #if DEBUG -static NSString *const kGraphVizOutputfile = @"/tmp/McBopomofo-visualization.dot"; +static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; #endif // shared language model object that stores our phrase-term probability database FastLM gLanguageModel; FastLM gLanguageModelPlainBopomofo; -static const int kUserOverrideModelCapacity = 500; -static const double kObservedOverrideHalflife = 5400.0; // 1.5 hr. -McBopomofo::UserOverrideModel gUserOverrideModel(kUserOverrideModelCapacity, kObservedOverrideHalflife); - // https://clang-analyzer.llvm.org/faq.html __attribute__((annotate("returns_localized_nsstring"))) static inline NSString *LocalizationNotNeeded(NSString *s) { @@ -129,14 +125,17 @@ static inline NSString *LocalizationNotNeeded(NSString *s) { } // private methods -@interface McBopomofoInputMethodController () +@interface vChewingInputMethodController () + (VTHorizontalCandidateController *)horizontalCandidateController; + (VTVerticalCandidateController *)verticalCandidateController; - (void)collectCandidates; - (size_t)actualCandidateCursorIndex; +- (NSString *)neighborTrigramString; +- (void)_performDeferredSaveUserCandidatesDictionary; +- (void)saveUserCandidatesDictionary; - (void)_showCandidateWindowUsingVerticalMode:(BOOL)useVerticalMode client:(id)client; - (void)beep; @@ -153,37 +152,7 @@ public: } }; -static const double kEpsilon = 0.000001; - -static double FindHighestScore(const vector& nodes, double epsilon) { - double highestScore = 0.0; - for (auto ni = nodes.begin(), ne = nodes.end(); ni != ne; ++ni) { - double score = ni->node->highestUnigramScore(); - if (score > highestScore) { - highestScore = score; - } - } - return highestScore + epsilon; -} - -static void OverrideCandidate(const vector& nodes, const string& candidateValue, bool fixed, double floatingNodeOverrideScore) { - for (auto ni = nodes.begin(), ne = nodes.end(); ni != ne; ++ni) { - const vector& candidates = (*ni).node->candidates(); - for (size_t i = 0, c = candidates.size(); i < c; ++i) { - if (candidates[i].value == candidateValue) { - // found our node - if (fixed) { - const_cast((*ni).node)->selectCandidateAtIndex(i); - } else { - const_cast((*ni).node)->selectFloatingCandidateAtIndex(i, floatingNodeOverrideScore); - } - return; - } - } - } -} - -@implementation McBopomofoInputMethodController +@implementation vChewingInputMethodController - (void)dealloc { // clean up everything @@ -213,7 +182,6 @@ static void OverrideCandidate(const vector& nodes, const string& can // create the lattice builder _languageModel = &gLanguageModel; _builder = new BlockReadingBuilder(_languageModel); - _uom = &gUserOverrideModel; // each Mandarin syllable is separated by a hyphen _builder->setJoinSeparator("-"); @@ -221,6 +189,11 @@ static void OverrideCandidate(const vector& nodes, const string& can // create the composing buffer _composingBuffer = [[NSMutableString alloc] init]; + // populate the settings, by default, DISABLE user candidate learning + if (![[NSUserDefaults standardUserDefaults] objectForKey:kDisableUserCandidateSelectionLearning]) { + [[NSUserDefaults standardUserDefaults] setObject:(id)kCFBooleanTrue forKey:kDisableUserCandidateSelectionLearning]; + } + _inputMode = kBopomofoModeIdentifier; _chineseConversionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:kChineseConversionEnabledKey]; } @@ -232,7 +205,7 @@ static void OverrideCandidate(const vector& nodes, const string& can { // a menu instance (autoreleased) is requested every time the user click on the input menu NSMenu *menu = [[NSMenu alloc] initWithTitle:LocalizationNotNeeded(@"Input Method Menu")]; - NSMenuItem *preferenceMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"McBopomofo Preferences", @"") action:@selector(showPreferences:) keyEquivalent:@""]; + NSMenuItem *preferenceMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"vChewing Preferences", @"") action:@selector(showPreferences:) keyEquivalent:@""]; [menu addItem:preferenceMenuItem]; // If Option key is pressed, show the learning-related menu @@ -267,7 +240,7 @@ static void OverrideCandidate(const vector& nodes, const string& can NSMenuItem *updateCheckItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Check for Updates…", @"") action:@selector(checkForUpdate:) keyEquivalent:@""]; [menu addItem:updateCheckItem]; - NSMenuItem *aboutMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"About McBopomofo…", @"") action:@selector(showAbout:) keyEquivalent:@""]; + NSMenuItem *aboutMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"About vChewing…", @"") action:@selector(showAbout:) keyEquivalent:@""]; [menu addItem:aboutMenuItem]; return menu; @@ -720,15 +693,15 @@ static void OverrideCandidate(const vector& nodes, const string& can // then walk the lattice [self popOverflowComposingTextAndWalk:client]; - // get user override model suggestion - string overrideValue = - (_inputMode == kPlainBopomofoModeIdentifier) ? "" : - _uom->suggest(_walkedNodes, _builder->cursorIndex(), [[NSDate date] timeIntervalSince1970]); - if (!overrideValue.empty()) { - size_t cursorIndex = [self actualCandidateCursorIndex]; - vector nodes = _builder->grid().nodesCrossingOrEndingAt(cursorIndex); - double highestScore = FindHighestScore(nodes, kEpsilon); - OverrideCandidate(nodes, overrideValue, false, highestScore); + // see if we need to override the selection if a learned one exists + if (![[NSUserDefaults standardUserDefaults] boolForKey:kDisableUserCandidateSelectionLearning]) { + NSString *trigram = [self neighborTrigramString]; + + // Lookup from the user dict to see if the trigram fit or not + NSString *overrideCandidateString = [gCandidateLearningDictionary objectForKey:trigram]; + if (overrideCandidateString) { + [self candidateSelected:(NSAttributedString *)overrideCandidateString]; + } } // then update the text @@ -1307,6 +1280,61 @@ static void OverrideCandidate(const vector& nodes, const string& can return cursorIndex; } +- (NSString *)neighborTrigramString +{ + // gather the "trigram" for user candidate selection learning + + NSMutableArray *termArray = [NSMutableArray array]; + + size_t cursorIndex = [self actualCandidateCursorIndex]; + vector nodes = _builder->grid().nodesCrossingOrEndingAt(cursorIndex); + + const Node* prev = 0; + const Node* current = 0; + const Node* next = 0; + + size_t wni = 0; + size_t wnc = _walkedNodes.size(); + size_t accuSpanningLength = 0; + for (wni = 0; wni < wnc; wni++) { + NodeAnchor& anchor = _walkedNodes[wni]; + if (!anchor.node) { + continue; + } + + accuSpanningLength += anchor.spanningLength; + if (accuSpanningLength >= cursorIndex) { + prev = current; + current = anchor.node; + break; + } + + current = anchor.node; + } + + if (wni + 1 < wnc) { + next = _walkedNodes[wni + 1].node; + } + + string term; + if (prev) { + term = prev->currentKeyValue().key; + [termArray addObject:[NSString stringWithUTF8String:term.c_str()]]; + } + + if (current) { + term = current->currentKeyValue().key; + [termArray addObject:[NSString stringWithUTF8String:term.c_str()]]; + } + + if (next) { + term = next->currentKeyValue().key; + [termArray addObject:[NSString stringWithUTF8String:term.c_str()]]; + } + + return [termArray componentsJoinedByString:@"-"]; +} + - (void)_performDeferredSaveUserCandidatesDictionary { BOOL __unused success = [gCandidateLearningDictionary writeToFile:gUserCandidatesDictionaryPath atomically:YES]; @@ -1330,13 +1358,13 @@ static void OverrideCandidate(const vector& nodes, const string& can BOOL useHorizontalCandidateList = [[NSUserDefaults standardUserDefaults] boolForKey:kUseHorizontalCandidateListPreferenceKey]; if (useVerticalMode) { - gCurrentCandidateController = [McBopomofoInputMethodController verticalCandidateController]; + gCurrentCandidateController = [vChewingInputMethodController verticalCandidateController]; } else if (useHorizontalCandidateList) { - gCurrentCandidateController = [McBopomofoInputMethodController horizontalCandidateController]; + gCurrentCandidateController = [vChewingInputMethodController horizontalCandidateController]; } else { - gCurrentCandidateController = [McBopomofoInputMethodController verticalCandidateController]; + gCurrentCandidateController = [vChewingInputMethodController verticalCandidateController]; } // set the attributes for the candidate panel (which uses NSAttributedString) @@ -1467,15 +1495,17 @@ static void OverrideCandidate(const vector& nodes, const string& can // candidate selected, override the node with selection string selectedValue = [[_candidates objectAtIndex:index] UTF8String]; - size_t cursorIndex = [self actualCandidateCursorIndex]; - if (_inputMode != kPlainBopomofoModeIdentifier) { - _uom->observe(_walkedNodes, cursorIndex, selectedValue, [[NSDate date] timeIntervalSince1970]); + if (![[NSUserDefaults standardUserDefaults] boolForKey:kDisableUserCandidateSelectionLearning]) { + NSString *trigram = [self neighborTrigramString]; + NSString *selectedNSString = [NSString stringWithUTF8String:selectedValue.c_str()]; + [gCandidateLearningDictionary setObject:selectedNSString forKey:trigram]; + [self saveUserCandidatesDictionary]; } + + size_t cursorIndex = [self actualCandidateCursorIndex]; _builder->grid().fixNodeSelectedCandidate(cursorIndex, selectedValue); - vector nodes = _builder->grid().nodesCrossingOrEndingAt(cursorIndex); - OverrideCandidate(nodes, selectedValue, true, 0.0); [_candidates removeAllObjects]; [self walk]; @@ -1491,7 +1521,7 @@ static void OverrideCandidate(const vector& nodes, const string& can static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, FastLM &lm) { - NSString *dataPath = [[NSBundle bundleForClass:[McBopomofoInputMethodController class]] pathForResource:filenameWithoutExtension ofType:@"txt"]; + NSString *dataPath = [[NSBundle bundleForClass:[vChewingInputMethodController class]] pathForResource:filenameWithoutExtension ofType:@"txt"]; bool result = lm.open([dataPath UTF8String]); if (!result) { NSLog(@"Failed opening language model: %@", dataPath); @@ -1518,7 +1548,7 @@ void LTLoadLanguageModel() } NSString *appSupportPath = [paths objectAtIndex:0]; - NSString *userDictPath = [appSupportPath stringByAppendingPathComponent:@"McBopomofo"]; + NSString *userDictPath = [appSupportPath stringByAppendingPathComponent:@"vChewing"]; BOOL isDir = NO; BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:userDictPath isDirectory:&isDir]; diff --git a/Source/Installer/AppDelegate.h b/Source/Installer/AppDelegate.h index 32b4936f..20a06331 100644 --- a/Source/Installer/AppDelegate.h +++ b/Source/Installer/AppDelegate.h @@ -1,7 +1,7 @@ // // AppDelegate.h // -// Copyright (c) 2011-2012 The McBopomofo Project. +// Copyright (c) 2011-2012 The vChewing Project. // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation diff --git a/Source/Installer/AppDelegate.m b/Source/Installer/AppDelegate.m index 17485951..428e9fcf 100644 --- a/Source/Installer/AppDelegate.m +++ b/Source/Installer/AppDelegate.m @@ -1,7 +1,7 @@ // // AppDelegate.m // -// Copyright (c) 2011-2012 The McBopomofo Project. +// Copyright (c) 2011-2012 The vChewing Project. // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation @@ -29,12 +29,12 @@ #import #import "OVInputSourceHelper.h" -static NSString *const kTargetBin = @"McBopomofo"; +static NSString *const kTargetBin = @"vChewing"; static NSString *const kTargetType = @"app"; -static NSString *const kTargetBundle = @"McBopomofo.app"; +static NSString *const kTargetBundle = @"vChewing.app"; static NSString *const kDestinationPartial = @"~/Library/Input Methods/"; -static NSString *const kTargetPartialPath = @"~/Library/Input Methods/McBopomofo.app"; -static NSString *const kTargetFullBinPartialPath = @"~/Library/Input Methods/McBopomofo.app/Contents/MacOS/McBopomofo"; +static NSString *const kTargetPartialPath = @"~/Library/Input Methods/vChewing.app"; +static NSString *const kTargetFullBinPartialPath = @"~/Library/Input Methods/vChewing.app/Contents/MacOS/vChewing"; static const NSTimeInterval kTranslocationRemovalTickInterval = 0.5; static const NSTimeInterval kTranslocationRemovalDeadline = 60.0; @@ -231,13 +231,13 @@ void RunAlertPanel(NSString *title, NSString *message, NSString *buttonTitle) { } if (warning) { - RunAlertPanel(NSLocalizedString(@"Attention", nil), NSLocalizedString(@"McBopomofo is upgraded, but please log out or reboot for the new version to be fully functional.", nil), NSLocalizedString(@"OK", nil)); + RunAlertPanel(NSLocalizedString(@"Attention", nil), NSLocalizedString(@"vChewing is upgraded, but please log out or reboot for the new version to be fully functional.", nil), NSLocalizedString(@"OK", nil)); } else { // Only prompt a warning if pre-macOS 12. The flag is not indicative of anything meaningful due to the need of user intervention in Prefernces.app on macOS 12. if (!mainInputSourceEnabled && !isMacOS12OrAbove) { RunAlertPanel(NSLocalizedString(@"Warning", nil), NSLocalizedString(@"Input method may not be fully enabled. Please enable it through System Preferences > Keyboard > Input Sources.", nil), NSLocalizedString(@"Continue", nil)); } else { - RunAlertPanel(NSLocalizedString(@"Installation Successful", nil), NSLocalizedString(@"McBopomofo is ready to use.", nil), NSLocalizedString(@"OK", nil)); + RunAlertPanel(NSLocalizedString(@"Installation Successful", nil), NSLocalizedString(@"vChewing is ready to use.", nil), NSLocalizedString(@"OK", nil)); } } diff --git a/Source/Installer/ArchiveUtil.h b/Source/Installer/ArchiveUtil.h index aab19c61..e6c38bc7 100644 --- a/Source/Installer/ArchiveUtil.h +++ b/Source/Installer/ArchiveUtil.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2019 The McBopomofo Project. +// Copyright (c) 2011-2019 The vChewing Project. // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation diff --git a/Source/Installer/ArchiveUtil.m b/Source/Installer/ArchiveUtil.m index 90d47e35..27838732 100644 --- a/Source/Installer/ArchiveUtil.m +++ b/Source/Installer/ArchiveUtil.m @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2019 The McBopomofo Project. +// Copyright (c) 2011-2019 The vChewing Project. // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation diff --git a/Source/Installer/Base.lproj/MainMenu.xib b/Source/Installer/Base.lproj/MainMenu.xib index 000f018d..072ea56f 100644 --- a/Source/Installer/Base.lproj/MainMenu.xib +++ b/Source/Installer/Base.lproj/MainMenu.xib @@ -15,10 +15,10 @@ - - + + - + @@ -33,7 +33,7 @@ - + @@ -52,7 +52,7 @@ - + @@ -82,7 +82,7 @@ - + @@ -146,7 +146,7 @@ Gw - + diff --git a/Source/Installer/en.lproj/InfoPlist.strings b/Source/Installer/en.lproj/InfoPlist.strings index 6472f62d..080e9bd0 100644 --- a/Source/Installer/en.lproj/InfoPlist.strings +++ b/Source/Installer/en.lproj/InfoPlist.strings @@ -1,4 +1,4 @@ /* Localized versions of Info.plist keys */ -CFBundleName = "Install McBopomofo"; +CFBundleName = "Install vChewing"; NSHumanReadableCopyright = "Copyright © 2011-2021 Mengjuei Hsieh et al.\nAll Rights Reserved."; diff --git a/Source/Installer/en.lproj/License.rtf b/Source/Installer/en.lproj/License.rtf index 72e32461..7c5a2ee4 100644 --- a/Source/Installer/en.lproj/License.rtf +++ b/Source/Installer/en.lproj/License.rtf @@ -5,7 +5,7 @@ \margl1440\margr1440\vieww16860\viewh12620\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\f0\b\fs36 \cf0 McBopomofo License Agreement +\f0\b\fs36 \cf0 vChewing License Agreement \f1\b0\fs24 \ \ Copyright \'a9 2011-2021 Mengjuei Hsieh et al.\ diff --git a/Source/Installer/en.lproj/Localizable.strings b/Source/Installer/en.lproj/Localizable.strings index b3f28f52..d7db1566 100644 --- a/Source/Installer/en.lproj/Localizable.strings +++ b/Source/Installer/en.lproj/Localizable.strings @@ -23,11 +23,11 @@ "OK" = "OK"; /* No comment provided by engineer. */ -"McBopomofo is ready to use." = "McBopomofo is ready to use."; +"vChewing is ready to use." = "vChewing is ready to use."; "Stopping the old version. This may take up to one minute…" = "Stopping the old version. This may take up to one minute…"; "Attention" = "Attention"; -"McBopomofo is upgraded, but please log out or reboot for the new version to be fully functional." = "McBopomofo is upgraded, but please log out or reboot for the new version to be fully functional."; +"vChewing is upgraded, but please log out or reboot for the new version to be fully functional." = "vChewing is upgraded, but please log out or reboot for the new version to be fully functional."; "Fatal Error" = "Fatal Error"; "Abort" = "Abort"; diff --git a/Source/Installer/main.m b/Source/Installer/main.m index 103bf28f..f7f3a466 100644 --- a/Source/Installer/main.m +++ b/Source/Installer/main.m @@ -1,7 +1,7 @@ // // main.m // -// Copyright (c) 2011-2012 The McBopomofo Project. +// Copyright (c) 2011-2012 The vChewing Project. // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation diff --git a/Source/Installer/zh-Hans.lproj/InfoPlist.strings b/Source/Installer/zh-Hans.lproj/InfoPlist.strings new file mode 100644 index 00000000..7f7803f6 --- /dev/null +++ b/Source/Installer/zh-Hans.lproj/InfoPlist.strings @@ -0,0 +1,5 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "安装威注音"; +NSHumanReadableCopyright = "Copyright © 2011-2021 Mengjuei Hsieh et al.\nAll Rights Reserved."; + diff --git a/Source/Installer/zh-Hans.lproj/License.rtf b/Source/Installer/zh-Hans.lproj/License.rtf new file mode 100644 index 00000000..423fb250 --- /dev/null +++ b/Source/Installer/zh-Hans.lproj/License.rtf @@ -0,0 +1,42 @@ +{\rtf1\ansi\ansicpg950\cocoartf2636 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 HelveticaNeue-Bold;\f1\fnil\fcharset0 HelveticaNeue;\f2\fnil\fcharset136 PingFangTC-Regular; +} +{\colortbl;\red255\green255\blue255;} +{\*\expandedcolortbl;;} +\margl1440\margr1440\vieww16860\viewh12620\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 + +\f0\b\fs36 \cf0 vChewing License Agreement +\f1\b0\fs24 \ +\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 + +\f2 \cf0 \'b5\'db\'a7\'40\uc0\u26435 \'a7\'51\'a9\'d2\'a6\'b3 +\f1 \'a9 2011-2021 Mengjuei Hsieh +\f2 \'b5\'a5\'a4\'48 +\f1 \ +\ + +\f2 \'ab\'c2\'aa\'60\'ad\'b5\uc0\u36755 \'a4\'4a\'aa\'6b\u32500 \u25252 \'a4\'48\u23385 \'a7\'d3\u36149 \u23545 \u35813 \u20135 \'ab\'7e\'aa\'ba\'b5\'7b\'a7\'c7\'b3\'a1\'a4\'c0\'a4\'a3\'a8\'c9\'a6\'b3\'a5\'f4\'a6\'f3\'a9\'d2\'a6\'b3\u26435 \'a1\'43 +\f1 \ +\ + +\f2 \uc0\u36719 \'a5\'f3\'aa\'ba\'b5\'db\'a7\'40\u26435 \'a7\'51\'a4\'48\'a8\'cc\'a6\'b9\'b3\'c2\'b2\'7a\'b1\'c2\u26435 \u26465 \'b4\'da\'a1\'41\u23558 \'a8\'e4\u23545 \'a4\'5f\u36719 \'a5\'f3\'aa\'ba\'b5\'db\'a7\'40\u26435 \'a7\'51\'b1\'c2\u26435 \u37322 \'a5\'58\'a1\'41\'a5\'75\'ad\'6e\'a8\'cf\'a5\'ce\'aa\'cc\u36341 \'bc\'69\'a5\'48\'a4\'55\'a4\'47\u39033 \'b3\'c2\'b2\'7a\'b1\'c2\u26435 \u26465 \'b4\'da\u21465 \'a9\'fa\'aa\'ba\u20041 \u21153 \'a9\'ca\u35268 \'a9\'77\'a1\'41\'a8\'e4\'a7\'59\'a8\'c9\'a6\'b3\u23545 \'a6\'b9\u36719 \'a5\'f3\'b5\'7b\'a6\'a1\'a4\'ce\'a8\'e4\'ac\'db\u20851 \u35828 \'a9\'fa\'a4\'e5\u26723 \'a6\'db\'a5\'d1\'a4\'a3\'a8\'fc\'ad\'ad\'a8\'ee\'a6\'61\u36827 \'a6\'e6\'a7\'51\'a5\'ce\'aa\'ba\u26435 \'a7\'51\'a1\'41\'ad\'53\u22260 \'a5\'5d\'ac\'41\'a1\'75\'a8\'cf\'a5\'ce\'a1\'42\'ad\'ab\'a8\'ee\'a1\'42\'ad\'d7\'a7\'ef\'a1\'42\'a6\'58\'a6\'7d\'a1\'42\'a5\'58\'aa\'a9\'a1\'42\'b4\'b2\'a5\'ac\'a1\'42\'a6\'41\'b1\'c2\u26435 \'a1\'42\'a4\'ce\u36137 \'b0\'e2\'b5\'7b\'a6\'a1\'ad\'ab\'a8\'ee\'a7\'40\'ab\'7e\'a1\'76\'b5\'a5\u35832 \'a6\'68\'a4\'e8\'ad\'b1\'aa\'ba\u24212 \'a5\'ce\'a1\'41\'a6\'d3\'b4\'b2\'a5\'ac\'b5\'7b\'a6\'a1\'a4\'a7\'a4\'48\'a1\'42\'a7\'f3\'a5\'69\u23558 \'a4\'57\'ad\'7a\u26435 \'a7\'51\u20256 \u36882 \'a4\'a9\'a8\'e4\'a6\'5a\'a6\'ac\'a8\'fc\'b5\'7b\'a6\'a1\'aa\'ba\'a6\'5a\'a4\'e2\'a1\'41\'ad\'d5\'ad\'59\'a8\'e4\'a6\'5a\'a6\'ac\'a8\'fc\'b5\'7b\'a6\'a1\'a4\'a7\'a4\'48\'a5\'e7\'aa\'41\'c1\'74\'a5\'48\'a4\'55\'a4\'47\u39033 \'b3\'c2\'b2\'7a\'b1\'c2\u26435 \u26465 \'b4\'da\'aa\'ba\u20041 \u21153 \'a9\'ca\u35268 \'a9\'77\'a1\'41\u21017 \'a8\'e4\u23545 \'b5\'7b\'a6\'a1\'a5\'e7\'a8\'c9\'a6\'b3\'c9\'4f\'ab\'65\'a4\'e2\u36816 \'a5\'ce\'ad\'53\u22260 \'ac\'db\'a6\'50\'aa\'ba\'a6\'50\'a4\'40\u26435 \'a7\'51\'a1\'43 +\f1 \ +\ + +\f2 \'b4\'b2\'a5\'ac\'a6\'b9\'a4\'40\uc0\u36719 \'a5\'f3\'b5\'7b\'a7\'c7\'aa\'cc\'a1\'41\u39035 \u23558 \'a5\'bb\u26465 \'b4\'da\'a8\'e4\'a4\'57\'aa\'ba\'a1\'75\'b5\'db\'a7\'40\u26435 \u22768 \'a9\'fa\'a1\'76\'a4\'ce\'a5\'48\'a4\'55\'aa\'ba\'a1\'75\'a7\'4b\u36131 \u22768 \'a9\'fa\'a1\'76\'a1\'41\u20869 \'b4\'4f\'a4\'5f\u36719 \'a5\'f3\'b5\'7b\'a7\'c7\'a4\'ce\'a8\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'b3\'c2\'b2\'7a\u36719 \'a5\'f3\'b5\'7b\'a7\'c7\'aa\'ba\'a9\'d2\'a6\'b3\u39118 \u38505 \'a7\'a1\'a5\'d1\'a8\'cf\'a5\'ce\'aa\'cc\'a6\'db\'a6\'e6\u25285 \u36127 \'a1\'43\'b0\'b2\'a6\'70\'a9\'d2\'a8\'cf\'a5\'ce\'aa\'ba\'b3\'c2\'b2\'7a\'b5\'7b\'a7\'c7\u21457 \'a5\'cd\'af\'ca\'b3\'b4\'a9\'ca\u38382 \u39064 \'a1\'41\'a8\'cf\'a5\'ce\'aa\'cc\'bb\'dd\'a6\'db\'a6\'e6\u25285 \u36127 \'ad\'d7\'a5\'bf\'a1\'42\'a7\'ef\'a5\'bf\'a4\'ce\'a5\'b2\'ad\'6e\'aa\'ba\'aa\'41\u21153 \'a4\'e4\'a5\'58\'a1\'43\'b3\'c2\'b2\'7a\u36719 \'a5\'f3\'b5\'7b\'a7\'c7\'aa\'ba\'b5\'db\'a7\'40\u26435 \'a4\'48\'a4\'a3\u36127 \'a5\'f4\'a6\'f3\'a7\'ce\'a6\'a1\'a4\'57\u23454 \u36136 \'a4\'57\'aa\'ba\u25285 \'ab\'4f\u36131 \'a5\'f4\'a1\'41\u26080 \u35770 \'a5\'f4\'a6\'f3\'a4\'40\'af\'eb\'aa\'ba\'a1\'42\'af\'53\'ae\'ed\'aa\'ba\'a1\'42\'b0\'b8\u21457 \'aa\'ba\'a1\'42\'a6\'5d\'aa\'47\u20851 \'a8\'74\'a6\'a1\'aa\'ba\u25439 \'ae\'60\'a1\'41\'a9\'ce\'ac\'4f\'b3\'c2\'b2\'7a\u36719 \'a5\'f3\'b5\'7b\'a7\'c7\'aa\'ba\'a4\'a3\'d3\'ec\'a5\'ce\'a9\'ca\'a1\'41\'a7\'a1\u39035 \'a5\'d1\'a8\'cf\'a5\'ce\'aa\'cc\'a6\'db\'a6\'e6\u36127 \u25285 \'a1\'43 +\f1 \ +\ +Copyright \'a9 2011-2021 Mengjuei Hsieh et al.\ +\ +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \'93Software\'94), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\ +\ +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\ +\ +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\ +} \ No newline at end of file diff --git a/Source/Installer/zh-Hans.lproj/Localizable.strings b/Source/Installer/zh-Hans.lproj/Localizable.strings new file mode 100644 index 00000000..e1e27182 --- /dev/null +++ b/Source/Installer/zh-Hans.lproj/Localizable.strings @@ -0,0 +1,39 @@ +/* No comment provided by engineer. */ +"%@ (for version %@)" = "%1$@ (%2$@ 版)"; + +/* No comment provided by engineer. */ +"Agree and Upgrade" = "同意并升级"; + +/* No comment provided by engineer. */ +"Cancel" = "取消"; + +/* No comment provided by engineer. */ +"Cannot activate the input method." = "无法启用输入法。"; + +/* No comment provided by engineer. */ +"Cannot copy the file to the destination." = "无法将输入法拷贝至目的地。"; + +/* No comment provided by engineer. */ +"Install Failed" = "安装失败"; + +/* No comment provided by engineer. */ +"Installation Successful" = "安装成功"; + +/* No comment provided by engineer. */ +"OK" = "好"; + +/* No comment provided by engineer. */ +"vChewing is ready to use." = "威注音输入法安装成功"; + +"Finish" = "结束"; +"Attention" = "请注意"; +"vChewing is upgraded, but please log out or reboot for the new version to be fully functional." = "vChewing 安装完成,但建议您登出或重新开机,以便顺利使用新版。"; + +"Fatal Error" = "安装错误"; +"Abort" = "放弃安装"; +"Cannot register input source %@ at %@." = "无法从档案位置 %2$@ 安装输入法 \"%1$@\"。"; +"Cannot find input source %@ after registration." = "在注册完输入法 \"%@\" 仍然无法找到输入法。"; + +"Warning" = "安装不完整"; +"Input method may not be fully enabled. Please enable it through System Preferences > Keyboard > Input Sources." = "输入法已经安装好,但可能没有完全启用。请从“系统偏好设定” > “键盘” > “输入方式”分页加入输入法。"; +"Continue" = "继续"; diff --git a/Source/Installer/zh-Hans.lproj/MainMenu.xib b/Source/Installer/zh-Hans.lproj/MainMenu.xib new file mode 100644 index 00000000..d90801fd --- /dev/null +++ b/Source/Installer/zh-Hans.lproj/MainMenu.xib @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Installer/zh-Hant.lproj/InfoPlist.strings b/Source/Installer/zh-Hant.lproj/InfoPlist.strings index 929742bd..f034b1a5 100644 --- a/Source/Installer/zh-Hant.lproj/InfoPlist.strings +++ b/Source/Installer/zh-Hant.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ -CFBundleName = "安裝小麥注音"; +CFBundleName = "安裝威注音"; NSHumanReadableCopyright = "Copyright © 2011-2021 Mengjuei Hsieh et al.\nAll Rights Reserved."; diff --git a/Source/Installer/zh-Hant.lproj/License.rtf b/Source/Installer/zh-Hant.lproj/License.rtf index 24d7d652..a0ff200a 100644 --- a/Source/Installer/zh-Hant.lproj/License.rtf +++ b/Source/Installer/zh-Hant.lproj/License.rtf @@ -1,15 +1,15 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf820 -{\fonttbl\f0\fnil\fcharset0 LucidaGrande-Bold;\f1\fnil\fcharset0 LucidaGrande;\f2\fnil\fcharset136 PingFangTC-Regular; +{\rtf1\ansi\ansicpg950\cocoartf2636 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 HelveticaNeue-Bold;\f1\fnil\fcharset0 HelveticaNeue;\f2\fnil\fcharset136 PingFangTC-Regular; } {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \margl1440\margr1440\vieww16860\viewh12620\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\f0\b\fs36 \cf0 McBopomofo License Agreement +\f0\b\fs36 \cf0 vChewing License Agreement \f1\b0\fs24 \ \ -Copyright \'a9 2011-2021 Mengjuei Hsieh et al.\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \f2 \cf0 \'b5\'db\'a7\'40\'c5\'76\'a7\'51\'a9\'d2\'a6\'b3 \f1 \'a9 2011-2021 Mengjuei Hsieh @@ -17,9 +17,11 @@ Copyright \'a9 2011-2021 Mengjuei Hsieh et al.\ \f1 \ \ -\f2 \'b3\'6e\'c5\'e9\'aa\'ba\'b5\'db\'a7\'40\'c5\'76\'a7\'51\'a4\'48\'a8\'cc\'a6\'b9 -\f1 MIT -\f2 \'b1\'c2\'c5\'76\'b1\'f8\'b4\'da\'a1\'41\'b1\'4e\'a8\'e4\'b9\'ef\'a9\'f3\'b3\'6e\'c5\'e9\'aa\'ba\'b5\'db\'a7\'40\'c5\'76\'a7\'51\'b1\'c2\'c5\'76\'c4\'c0\'a5\'58\'a1\'41\'a5\'75\'ad\'6e\'a8\'cf\'a5\'ce\'aa\'cc\'bd\'ee\'bc\'69\'a5\'48\'a4\'55\'a4\'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41\'a9\'ce\'ac\'4f\'b3\'c2\'b2\'7a\'b3\'6e\'c5\'e9\'b5\'7b\'a6\'a1\'aa\'ba\'a4\'a3\'be\'41\'a5\'ce\'a9\'ca\'a1\'41\'a7\'a1\'b6\'b7\'a5\'d1\'a8\'cf\'a5\'ce\'aa\'cc\'a6\'db\'a6\'e6\'ad\'74\'be\'e1\'a1\'43 \f1 \ \ +Copyright \'a9 2011-2021 Mengjuei Hsieh et al.\ +\ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \'93Software\'94), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\ \ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\ \ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\ -} +} \ No newline at end of file diff --git a/Source/Installer/zh-Hant.lproj/Localizable.strings b/Source/Installer/zh-Hant.lproj/Localizable.strings index 5a492caa..3fd65cbb 100644 --- a/Source/Installer/zh-Hant.lproj/Localizable.strings +++ b/Source/Installer/zh-Hant.lproj/Localizable.strings @@ -23,11 +23,11 @@ "OK" = "好"; /* No comment provided by engineer. */ -"McBopomofo is ready to use." = "小麥注音輸入法安裝成功"; +"vChewing is ready to use." = "威注音輸入法安裝成功"; "Finish" = "結束"; "Attention" = "請注意"; -"McBopomofo is upgraded, but please log out or reboot for the new version to be fully functional." = "McBopomofo 安裝完成,但建議您登出或重新開機,以便順利使用新版。"; +"vChewing is upgraded, but please log out or reboot for the new version to be fully functional." = "vChewing 安裝完成,但建議您登出或重新開機,以便順利使用新版。"; "Fatal Error" = "安裝錯誤"; "Abort" = "放棄安裝"; diff --git a/Source/Installer/zh-Hant.lproj/MainMenu.xib b/Source/Installer/zh-Hant.lproj/MainMenu.xib index c9bcd182..bb333e83 100644 --- a/Source/Installer/zh-Hant.lproj/MainMenu.xib +++ b/Source/Installer/zh-Hant.lproj/MainMenu.xib @@ -1,8 +1,8 @@ - + - + @@ -15,10 +15,10 @@ - - + + - + @@ -33,7 +33,7 @@ - + @@ -52,7 +52,7 @@ - + @@ -81,22 +81,23 @@ + - + - + - + - - + + @@ -109,16 +110,16 @@ - - - - + - + - + @@ -166,6 +167,7 @@ Gw + @@ -181,20 +183,20 @@ Gw - + - + - + - + diff --git a/Source/McBopomofo-Prefix.pch b/Source/McBopomofo-Prefix.pch deleted file mode 100644 index ca6fec95..00000000 --- a/Source/McBopomofo-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'McBopomofo' target in the 'McBopomofo' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/Source/OpenCCBridge.swift b/Source/OpenCCBridge.swift index a9c63989..72a25740 100644 --- a/Source/OpenCCBridge.swift +++ b/Source/OpenCCBridge.swift @@ -1,7 +1,7 @@ import Foundation import OpenCC -// Since SwiftyOpenCC only provide Swift classes, we create an NSObject subclass +// Since SwiftyLibreCC only provide Swift classes, we create an NSObject subclass // in Swift in order to bridge the Swift classes into our Objective-C++ project. class OpenCCBridge : NSObject { private static let shared = OpenCCBridge() diff --git a/Source/PreferencesWindowController.h b/Source/PreferencesWindowController.h index 538ddd5b..4d04222f 100644 --- a/Source/PreferencesWindowController.h +++ b/Source/PreferencesWindowController.h @@ -1,7 +1,7 @@ // // PreferencesWindowController.h // -// Copyright (c) 2011 The McBopomofo Project. +// Copyright (c) 2021 The vChewing Project. // // Contributors: // Mengjuei Hsieh (@mjhsieh) diff --git a/Source/PreferencesWindowController.m b/Source/PreferencesWindowController.m index 29253196..0dd1feb9 100644 --- a/Source/PreferencesWindowController.m +++ b/Source/PreferencesWindowController.m @@ -1,7 +1,7 @@ // // PreferencesWindowController.m // -// Copyright (c) 2011 The McBopomofo Project. +// Copyright (c) 2021 The vChewing Project. // // Contributors: // Mengjuei Hsieh (@mjhsieh) diff --git a/Source/README b/Source/README index 82384134..9476b1d9 100644 --- a/Source/README +++ b/Source/README @@ -140,7 +140,7 @@ │   ├── Bopomofo@2x.tiff │   ├── BopomofoTextMenu.tiff │   ├── BopomofoTextMenu@2x.tiff -│   ├── McBopomofo.iconset +│   ├── vChewing.iconset │   │   ├── icon_128x128.png │   │   ├── icon_128x128@2x.png │   │   ├── icon_16x16.png @@ -169,13 +169,18 @@ │   │   ├── Localizable.strings │   │   └── MainMenu.xib │   ├── main.m +│   ├── zh-Hans.lproj +│   │   ├── InfoPlist.strings +│   │   ├── License.rtf +│   │   ├── Localizable.strings +│   │   └── MainMenu.xib │   └── zh-Hant.lproj │   ├── InfoPlist.strings │   ├── License.rtf │   ├── Localizable.strings │   └── MainMenu.xib -├── McBopomofo-Info.plist -├── McBopomofo-Prefix.pch +├── vChewing-Info.plist +├── vChewing-Prefix.pch ├── OVInputSourceHelper.h ├── OVInputSourceHelper.m ├── PreferencesWindowController.h @@ -192,6 +197,12 @@ │   ├── MainMenu.xib │   ├── UpdateNotificationController.xib │   └── preferences.xib +├── zh-Hans.lproj +│   ├── InfoPlist.strings +│   ├── Localizable.strings +│   ├── MainMenu.xib +│   ├── UpdateNotificationController.xib +│   └── preferences.xib ├── main.m └── zh-Hant.lproj ├── InfoPlist.strings diff --git a/Source/UpdateNotificationController.h b/Source/UpdateNotificationController.h index 4392bee8..1ad29610 100644 --- a/Source/UpdateNotificationController.h +++ b/Source/UpdateNotificationController.h @@ -1,7 +1,7 @@ // // UpdateNotificationController.h // -// Copyright (c) 2011 The McBopomofo Project. +// Copyright (c) 2021 The vChewing Project. // // Contributors: // Mengjuei Hsieh (@mjhsieh) diff --git a/Source/UpdateNotificationController.m b/Source/UpdateNotificationController.m index 76636592..e69ee317 100644 --- a/Source/UpdateNotificationController.m +++ b/Source/UpdateNotificationController.m @@ -1,7 +1,7 @@ // // UpdateNotificationController.m // -// Copyright (c) 2011 The McBopomofo Project. +// Copyright (c) 2021 The vChewing Project. // // Contributors: // Mengjuei Hsieh (@mjhsieh) diff --git a/Source/UserOverrideModel.cpp b/Source/UserOverrideModel.cpp index 8b2df522..aa0a0b4d 100644 --- a/Source/UserOverrideModel.cpp +++ b/Source/UserOverrideModel.cpp @@ -1,7 +1,7 @@ // // UserOverrideModel.cpp // -// Copyright (c) 2017 The McBopomofo Project. +// Copyright (c) 2017 The vChewing Project. // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation @@ -31,7 +31,7 @@ #include #include -using namespace McBopomofo; +using namespace vChewing; // About 20 generations. static const double DecayThreshould = 1.0 / 1048576.0; diff --git a/Source/UserOverrideModel.h b/Source/UserOverrideModel.h index 0b981923..c0f700b4 100644 --- a/Source/UserOverrideModel.h +++ b/Source/UserOverrideModel.h @@ -1,7 +1,7 @@ // // UserOverrideModel.h // -// Copyright (c) 2017 The McBopomofo Project. +// Copyright (c) 2017 The vChewing Project. // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation @@ -34,7 +34,7 @@ #include "Gramambular.h" -namespace McBopomofo { +namespace vChewing { using namespace Formosa::Gramambular; @@ -75,7 +75,7 @@ private: std::map::iterator> m_lruMap; }; -}; // namespace McBopomofo +}; // namespace vChewing #endif diff --git a/Source/en.lproj/InfoPlist.strings b/Source/en.lproj/InfoPlist.strings index 889f7749..dddeda74 100644 --- a/Source/en.lproj/InfoPlist.strings +++ b/Source/en.lproj/InfoPlist.strings @@ -1,6 +1,6 @@ -CFBundleName = "McBopomofo"; -CFBundleDisplayName = "McBopomofo"; +CFBundleName = "vChewing"; +CFBundleDisplayName = "vChewing"; NSHumanReadableCopyright = "Copyright © 2011-2021 Mengjuei Hsieh et al.\nAll Rights Reserved."; -"org.openvanilla.inputmethod.McBopomofo.Bopomofo" = "Bopomofo"; -"org.openvanilla.inputmethod.McBopomofo.PlainBopomofo" = "Plain Bopomofo"; +"org.openvanilla.inputmethod.vChewing.Bopomofo" = "vChewing"; +"org.openvanilla.inputmethod.vChewing.PlainBopomofo" = "Plain vChewing"; diff --git a/Source/en.lproj/Localizable.strings b/Source/en.lproj/Localizable.strings index 4fdc110c..48445416 100644 --- a/Source/en.lproj/Localizable.strings +++ b/Source/en.lproj/Localizable.strings @@ -1,5 +1,5 @@ /* No comment provided by engineer. */ -"About McBopomofo…" = "About McBopomofo…"; +"About vChewing…" = "About vChewing…"; /* No comment provided by engineer. */ "Clear Learning Dictionary (%ju Items)" = "Clear Learning Dictionary (%ju Items)"; @@ -11,7 +11,7 @@ "Enable Selection Learning" = "Enable Selection Learning"; /* No comment provided by engineer. */ -"McBopomofo Preferences" = "McBopomofo Preferences"; +"vChewing Preferences" = "vChewing Preferences"; /* No comment provided by engineer. */ "Check Later" = "Check Later"; @@ -23,7 +23,7 @@ "Check for Update Completed" = "Check for Update Completed"; /* No comment provided by engineer. */ -"You are already using the latest version of McBopomofo." = "You are already using the latest version of McBopomofo."; +"You are already using the latest version of vChewing." = "You are already using the latest version of vChewing."; /* No comment provided by engineer. */ "Update Check Failed" = "Update Check Failed"; @@ -47,6 +47,6 @@ "Visit Website" = "Visit Website"; /* No comment provided by engineer. */ -"You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo's website to download the version?%@" = "You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo'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?%@" = "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"; diff --git a/Source/main.m b/Source/main.m index bca49bd0..1dd9cdff 100644 --- a/Source/main.m +++ b/Source/main.m @@ -1,7 +1,7 @@ // // main.m // -// Copyright (c) 2011 The McBopomofo Project. +// Copyright (c) 2021 The vChewing Project. // // Contributors: // Mengjuei Hsieh (@mjhsieh) @@ -35,7 +35,7 @@ #import #import "OVInputSourceHelper.h" -static NSString *const kConnectionName = @"McBopomofo_1_Connection"; +static NSString *const kConnectionName = @"vChewing_1_Connection"; int main(int argc, char *argv[]) { diff --git a/Source/McBopomofo-Bridging-Header.h b/Source/vChewing-Bridging-Header.h similarity index 100% rename from Source/McBopomofo-Bridging-Header.h rename to Source/vChewing-Bridging-Header.h diff --git a/Source/McBopomofo-Info.plist b/Source/vChewing-Info.plist similarity index 84% rename from Source/McBopomofo-Info.plist rename to Source/vChewing-Info.plist index 199cc007..28d16f61 100644 --- a/Source/McBopomofo-Info.plist +++ b/Source/vChewing-Info.plist @@ -24,7 +24,7 @@ tsInputModeListKey - org.openvanilla.inputmethod.McBopomofo.Bopomofo + org.openvanilla.inputmethod.vChewing.Bopomofo TISDoubleSpaceSubstitution @@ -32,6 +32,7 @@ Bopomofo.tiff tsInputModeCharacterRepertoireKey + Hans Hant Han @@ -50,7 +51,7 @@ tsInputModeScriptKey smTradChinese TISIntendedLanguage - zh-Hant + zh-Hans tsInputModeCharacterRepertoireKey Hant @@ -59,7 +60,7 @@ tsInputModeKeyEquivalentModifiersKey 4608 - org.openvanilla.inputmethod.McBopomofo.PlainBopomofo + org.openvanilla.inputmethod.vChewing.PlainBopomofo TISDoubleSpaceSubstitution @@ -67,6 +68,7 @@ PlainBopomofo.tiff tsInputModeCharacterRepertoireKey + Hans Hant Han @@ -85,7 +87,7 @@ tsInputModeScriptKey smTradChinese TISIntendedLanguage - zh-Hant + zh-Hans tsInputModeCharacterRepertoireKey Hant @@ -97,16 +99,16 @@ tsVisibleInputModeOrderedArrayKey - org.openvanilla.inputmethod.McBopomofo.Bopomofo - org.openvanilla.inputmethod.McBopomofo.PlainBopomofo + org.openvanilla.inputmethod.vChewing.Bopomofo + org.openvanilla.inputmethod.vChewing.PlainBopomofo InputMethodConnectionName - McBopomofo_1_Connection + vChewing_1_Connection InputMethodServerControllerClass - McBopomofoInputMethodController + vChewingInputMethodController InputMethodServerDelegateClass - McBopomofoInputMethodController + vChewingInputMethodController InputMethodServerPreferencesWindowControllerClass PreferencesWindowController LSApplicationCategoryType @@ -126,19 +128,20 @@ TICapsLockLanguageSwitchCapable TISInputSourceID - org.openvanilla.inputmethod.McBopomofo + org.openvanilla.inputmethod.vChewing TISIntendedLanguage - zh-Hant + zh-Hans TISParticipatesInTouchBar UpdateInfoEndpoint - https://mcbopomofo.openvanilla.org/updates/Info.plist + https://vchewing.openvanilla.org/updates/Info.plist UpdateInfoSite - https://mcbopomofo.openvanilla.org/ + https://vchewing.openvanilla.org/ tsInputMethodCharacterRepertoireKey - Hant Hans + Hant + Han tsInputMethodIconFileKey Bopomofo.tiff diff --git a/Source/vChewing-Prefix.pch b/Source/vChewing-Prefix.pch new file mode 100644 index 00000000..fe236fd9 --- /dev/null +++ b/Source/vChewing-Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'vChewing' target in the 'vChewing' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/Source/zh-Hans.lproj/InfoPlist.strings b/Source/zh-Hans.lproj/InfoPlist.strings new file mode 100644 index 00000000..83b9178f --- /dev/null +++ b/Source/zh-Hans.lproj/InfoPlist.strings @@ -0,0 +1,5 @@ +CFBundleName = "威注音"; +CFBundleDisplayName = "威注音"; +NSHumanReadableCopyright = "Copyright © 2011-2021 Mengjuei Hsieh et al.\nAll Rights Reserved."; +"org.openvanilla.inputmethod.vChewing.Bopomofo" = "威注音"; +"org.openvanilla.inputmethod.vChewing.PlainBopomofo" = "ㄅ半全注"; diff --git a/Source/zh-Hans.lproj/Localizable.strings b/Source/zh-Hans.lproj/Localizable.strings new file mode 100644 index 00000000..2855d232 --- /dev/null +++ b/Source/zh-Hans.lproj/Localizable.strings @@ -0,0 +1,52 @@ +/* No comment provided by engineer. */ +"About vChewing…" = "关于威注音…"; + +/* No comment provided by engineer. */ +"Clear Learning Dictionary (%ju Items)" = "清除学习辞典 (%ju 个项目)"; + +/* No comment provided by engineer. */ +"Dump Learning Data to Console" = "将学习辞典内容输出到 Console 上"; + +/* No comment provided by engineer. */ +"Enable Selection Learning" = "使用自动学习功能"; + +/* No comment provided by engineer. */ +"vChewing Preferences" = "威注音偏好设定"; + +/* No comment provided by engineer. */ +"Check Later" = "晚点再通知我"; + +/* No comment provided by engineer. */ +"Check for Updates…" = "检查是否有新版…"; + +/* No comment provided by engineer. */ +"Check for Update Completed" = "新版检查完毕"; + +/* No comment provided by engineer. */ +"You are already using the latest version of vChewing." = "目前使用的已经是最新版本。"; + +/* No comment provided by engineer. */ +"Update Check Failed" = "无法检查新版"; + +/* No comment provided by engineer. */ +"There may be no internet connection or the server failed to respond.\n\nError message: %@" = "网路连线失败,或是伺服器没有回应。\n\n错误说明:%@"; + +/* No comment provided by engineer. */ +"OK" = "好"; + +/* No comment provided by engineer. */ +"Dismiss" = "关闭本视窗"; + +/* No comment provided by engineer. */ +"New Version Available" = "有新版可下载"; + +/* No comment provided by engineer. */ +"Not Now" = "以后再说"; + +/* No comment provided by engineer. */ +"Visit Website" = "前往网站"; + +/* 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" = "强制简体字输出"; diff --git a/Source/zh-Hans.lproj/MainMenu.xib b/Source/zh-Hans.lproj/MainMenu.xib new file mode 100644 index 00000000..4c79f2b9 --- /dev/null +++ b/Source/zh-Hans.lproj/MainMenu.xib @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/zh-Hans.lproj/preferences.xib b/Source/zh-Hans.lproj/preferences.xib new file mode 100644 index 00000000..b6c6b13e --- /dev/null +++ b/Source/zh-Hans.lproj/preferences.xib @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Item 1 + Item 2 + Item 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/zh-Hant.lproj/InfoPlist.strings b/Source/zh-Hant.lproj/InfoPlist.strings index a3286784..83b9178f 100644 --- a/Source/zh-Hant.lproj/InfoPlist.strings +++ b/Source/zh-Hant.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ -CFBundleName = "小麥注音"; -CFBundleDisplayName = "小麥注音"; +CFBundleName = "威注音"; +CFBundleDisplayName = "威注音"; NSHumanReadableCopyright = "Copyright © 2011-2021 Mengjuei Hsieh et al.\nAll Rights Reserved."; -"org.openvanilla.inputmethod.McBopomofo.Bopomofo" = "小麥注音"; -"org.openvanilla.inputmethod.McBopomofo.PlainBopomofo" = "傳統注音"; +"org.openvanilla.inputmethod.vChewing.Bopomofo" = "威注音"; +"org.openvanilla.inputmethod.vChewing.PlainBopomofo" = "ㄅ半全注"; diff --git a/Source/zh-Hant.lproj/Localizable.strings b/Source/zh-Hant.lproj/Localizable.strings index e49af527..ebfa32d0 100644 --- a/Source/zh-Hant.lproj/Localizable.strings +++ b/Source/zh-Hant.lproj/Localizable.strings @@ -1,5 +1,5 @@ /* No comment provided by engineer. */ -"About McBopomofo…" = "關於小麥注音…"; +"About vChewing…" = "關於威注音…"; /* No comment provided by engineer. */ "Clear Learning Dictionary (%ju Items)" = "清除學習辭典 (%ju 個項目)"; @@ -11,7 +11,7 @@ "Enable Selection Learning" = "使用自動學習功能"; /* No comment provided by engineer. */ -"McBopomofo Preferences" = "小麥注音偏好設定"; +"vChewing Preferences" = "威注音偏好設定"; /* No comment provided by engineer. */ "Check Later" = "晚點再通知我"; @@ -23,7 +23,7 @@ "Check for Update Completed" = "新版檢查完畢"; /* No comment provided by engineer. */ -"You are already using the latest version of McBopomofo." = "目前使用的已經是最新版本。"; +"You are already using the latest version of vChewing." = "目前使用的已經是最新版本。"; /* No comment provided by engineer. */ "Update Check Failed" = "無法檢查新版"; @@ -47,6 +47,6 @@ "Visit Website" = "前往網站"; /* No comment provided by engineer. */ -"You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo's website to download the version?%@" = "目前使用的小麥注音版本是 %1$@ (%2$@),網路上有更新版本 %3$@ (%4$@) 可供下載。是否要前往小麥注音網站下載新版來安裝?%5$@"; +"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" = "輸出簡體中文"; diff --git a/Source/zh-Hant.lproj/MainMenu.xib b/Source/zh-Hant.lproj/MainMenu.xib index 5f7bcf12..4c79f2b9 100644 --- a/Source/zh-Hant.lproj/MainMenu.xib +++ b/Source/zh-Hant.lproj/MainMenu.xib @@ -14,10 +14,10 @@ - - + + - + @@ -32,7 +32,7 @@ - + diff --git a/Source/zh-Hant.lproj/preferences.xib b/Source/zh-Hant.lproj/preferences.xib index 17e6e2c9..37397ed0 100644 --- a/Source/zh-Hant.lproj/preferences.xib +++ b/Source/zh-Hant.lproj/preferences.xib @@ -20,7 +20,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -70,7 +70,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -88,7 +88,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -106,10 +106,10 @@ - + - + @@ -181,7 +181,7 @@