diff --git a/README-CHS.md b/README-CHS.md new file mode 100644 index 00000000..434b9000 --- /dev/null +++ b/README-CHS.md @@ -0,0 +1,129 @@ +语言:*简体中文* | [繁體中文](./README.md) + +仅以此 README 纪念祁建华 (CHIEN-HUA CHI, 1921-2001)。 + +--- + +有关该仓库及该输入法的最新资讯,请洽产品主页:https://vchewing.github.io/ + +因不可控原因,该仓库只能保证在 Gitee 有最新的内容可用: + +- 下载:https://gitee.com/vchewing/vChewing-macOS/releases +- 源码仓库:https://gitee.com/vchewing/vChewing-macOS + +# vChewing 威注音输入法 + +威注音输入法基于小麦注音二次开发,是**原生简体中文、原生繁体中文注音输入法**: + +- 威注音是业界现阶段支持注音排列种类数量与输入用拼音种类数量最多的注音输入法。 + - 受威注音自家的铁恨注音并击引擎加持。 +- 威注音的原厂词库内不存在任何可以妨碍该输入法在世界上任何地方传播的内容。 +- 相比中州韵(鼠须管)而言,威注音能够做到真正的大千声韵并击。 +- 拥有拼音并击模式,不懂注音的人群也可以受益于该输入法所带来的稳定的平均输入速度。 + - 相比小鹤双拼等双拼方案而言,威注音双手声韵分工明确、且重码率只有双拼的五分之一。 +- 威注音对陆规审音完全相容:不熟悉台澎金马审音的大陆用户不会遇到与汉字读音有关的不便。 + - 反之亦然。 + +>威注音有很多特色功能。在此仅列举部分: +>- 支持 macOS 屏幕模拟键盘(仅传统大千与传统倚天布局)。 +>- 可以将自己打的繁体中文自动转成日本 JIS 新字体来输出(包括基础的字词转换)、也可以转成康熙繁体来输出。 +>- 简繁体中文语料库彼此分离,彻底杜绝任何繁简转换过程可能造成的失误。 +>- 支持近年的全字库汉字输入。 +>- 可以自动整理使用者语汇档案格式、自订联想词。 +>- …… + +威注音分支专案及威注音词库由孙志贵(Shiki Suen)维护,其内容属于可在 Gitee 公开展示的合法内容。小麦注音官方原始仓库内的词库的内容均与孙志贵无关。 + +P.S.: 威注音输入法的 Shift 按键监测功能仅借由对 NSEvent 讯号资料流的上下文关系的观测来实现,仅接触借由 macOS 系统内建的 InputMethodKit 当中的 IMKServer 传来的 NSEvent 讯号资料流、而无须监听系统全局键盘事件,也无须向使用者申请用以达成这类「可能会引发资安疑虑」的行为所需的辅助权限,更不会将您的电脑内的任何资料传出去(本来就是这样,且自威注音 2.3.0 版引入的 Sandbox 特性更杜绝了这种可能性)。请放心使用。Shift 中英模式切换功能要求至少 macOS 10.15 Catalina 才可以用。 + +## 系统需求 + +编译用系统需求: + +- 至少 macOS 12 Monterey & Xcode 13.4.1。 + - 原因:Swift 封包管理支援与 Swift 5.5 所需,且仓库内包含了需要 Xcode 13.4.1 才能正常编译的内容(App 型安装程式)。 + - 我们已经没有条件测试比 Xcode 13.4.1 更老的环境了。硬要在这个环境下编译的话,可能需要额外安装[新版 Swift](https://www.swift.org/download/) 才可以。 +- 请使用正式发行版 Xcode,且最小子版本号越高越好(因为 Bug 相对而言最少)。 + - 如果是某个大版本的 Xcode 的 Release Candidate 版本的话,我们可能会对此做相容性测试。 + +编译出的成品对应系统需求: + +- 至少 macOS El Capitan 10.11.5,否则无法处理 Unicode 8.0 的汉字。即便如此,仍需手动升级苹方至至少 macOS 10.12 开始随赠的版本、以支持 Unicode 8.0 的通用规范汉字表用字(全字库没有「𫫇」字)。 + - 保留该系统支持的原因:非 Unibody 机种的 MacBook Pro 支持的最后一版 macOS 就是 El Capitan。 + +- **推荐最低系统版本**:macOS 10.12 Sierra,对 Unicode 8.0 开始的《通用规范汉字表》汉字有原生的苹方支持。 + + - 同时建议**系统运存应至少 4GB**。威注音输入法占用运存约 115MB 左右(简繁双模式)、75MB左右(单模式),供参考。 + - 请务必使用 SSD 硬盘,否则可能会影响每次开机之后输入法首次载入的速度。从 10.10 Yosemite 开始,macOS 就已经是针对机械硬盘负优化的操作系统了。 + - 注:能装 macOS 10.13 High Sierra 就不要去碰 macOS 10.12 Sierra 这个半成品。 + +- 关于全字库支持,因下述事实而在理论上很难做到最完美: + + - 很可惜 GB18030-2005 并没有官方提供的逐字读音对照表,所以目前才用了全字库。然而全字库并不等于完美。 + - 有条件者可以安装全字库字型与花园明朝,否则全字库等高万国码码位汉字恐无法在输入法的选字窗内完整显示。 + - 全字库汉字显示支持会受到具体系统版本对万国码版本的支持的限制。 + - 有些全字库汉字一开始会依赖万国码的私人造字区,且在之后被新版本万国码所支持。 + +## 编译流程 + +安装 Xcode 之后,请先配置 Xcode 允许其直接构建在专案所在的资料夹下的 build 资料夹内。步骤: +``` +「Xcode」->「Preferences...」->「Locations」; +「File」->「Project/WorkspaceSettings...」->「Advanced」; +选「Custom」->「Relative to Workspace」即可。不选的话,make 的过程会出错。 +``` +在终端机内定位到威注音的克隆本地专案的本地仓库的目录之后,执行 `make update` 以获取最新词库。 + +接下来就是直接开 Xcode 专案,Product -> Scheme 选「vChewingInstaller」,编译即可。 + +> 之前说「在成功之后执行 `make` 即可编译、再执行 `make install` 可以触发威注音的安装程式」,这对新版威注音而言**当且仅当**使用纯 Swift 编译脚本工序时方可使用。目前的 libvchewing-data 模组已经针对 macOS 版威注音实装了纯 Swift 词库编译脚本。 + +第一次安装完,日后源码或词库有任何修改,只要重覆上述流程,再次安装威注音即可。 + +要注意的是 macOS 可能会限制同一次 login session 能终结同一个输入法的执行进程的次数(安装程式透过 kill input method process 来让新版的输入法生效)。如果安装若干次后,发现程式修改的结果并没有出现、或甚至输入法已无法再选用,只需要登出目前的 macOS 系统帐号、再重新登入即可。 + +补记: 该输入法是在 2021 年 11 月初「28ae7deb4092f067539cff600397292e66a5dd56」这一版小麦注音编译的基础上完成的。因为在清洗词库的时候清洗了全部的 git commit 历史,所以无法自动从小麦注音官方仓库上游继承任何改动,只能手动同步任何在此之后的程式修正。最近一次同步参照是上游主仓库的 2.2.2 版、以及 zonble 的分支「5cb6819e132a02bbcba77dbf083ada418750dab7」。 + +## 应用授权 + +威注音专案目前仅用到小麦注音的下述程式组件(MIT License): + +- 仅供研发人员调试方便而使用的 App 版安装程式 (by Zonble Yang),不对公众使用。 +- Voltaire MK2 选字窗、飘云通知视窗 (by Zonble Yang),有大幅度修改。 + +威注音专案目前还用到如下的来自 Lukhnos Liu 的算法: + +- 半衰记忆模组 MK2,被 Shiki Suen 用 Swift 重写。 +- 基于 Gramambular 2 组字引擎的算法、被 Shiki Suen 用 Swift 重写(详见 [Megrez 组字引擎](https://github.com/vChewing/Megrez))。 + +威注音输入法 macOS 版以 MIT-NTL License 授权释出 (与 MIT 相容):© 2021-2022 vChewing 专案。 + +- 威注音输入法 macOS 版程式维护:Shiki Suen。特别感谢 Isaac Xen 与 Hiraku Wong 等人的技术协力。 +- 铁恨注音并击处理引擎:Shiki Suen (MIT-NTL License)。 +- 天权星语汇处理引擎:Shiki Suen (MIT-NTL License)。 +- 威注音词库由 Shiki Suen 维护,以 3-Clause BSD License 授权释出。其中的词频数据[由 NAER 授权用于非商业用途](https://twitter.com/ShikiSuen/status/1479329302713831424)。 + +使用者可自由使用、散播本软件,惟散播时必须完整保留版权声明及软件授权、且「一旦经过修改便不可以再继续使用威注音的产品名称」。换言之,这条相对上游 MIT 而言新增的规定就是:你 Fork 可以,但 Fork 成单独发行的产品名称时就必须修改产品名称。这条新增规定对 OpenVanilla 与威注音双方都有益,免得各自的旗号被盗版下载贩子等挪用做意外用途。 + +## 资料来源 + +原厂词库主要词语资料来源: + +- 《重编国语辞典修订本 2015》的六字以内的词语资料 (CC BY-ND 3.0)。 +- 《CNS11643中文标准交换码全字库(简称全字库)》 (OGDv1 License)。 +- LibTaBE (by Pai-Hsiang Hsiao under 3-Clause BSD License)。 +- [《新加坡华语资料库》](https://www.languagecouncils.sg/mandarin/ch/learning-resources/singaporean-mandarin-database)。 +- 原始词频资料取自 NAER,有经过换算处理与按需调整。 + - 威注音并未使用由 LibTaBE 内建的来自 Sinica 语料库的词频资料。 +- 威注音语汇库作者自行维护新增的词语资料,包括: + - 尽可能所有字词的陆规审音与齐铁恨广播读音。 + - 中国大陆常用资讯电子术语等常用语,以确保简体中文母语者在使用输入法时不会受到审音差异的困扰。 +- 其他使用者建议收录的资料。 + +## 参与研发时的注意事项 + +欢迎参与威注音的研发。论及相关细则,请洽该仓库内的「[CONTRIBUTING.md](./CONTRIBUTING.md)」档案、以及《[常见问题解答](./FAQ.md)》。 + +敝专案采用了《[贡献者品行准则承约书 v2.1](./code-of-conduct.md)》。考虑到上游链接给出的中文版翻译与英文原文严重不符合的情况(会出现因执法与被执法双方的认知偏差导致的矛盾,非常容易变成敌我矛盾),敝专案使用了自行翻译的版本、且新增了一些能促进双方共识的注解。 + +$ EOF. diff --git a/README-CHT.md b/README-CHT.md deleted file mode 100644 index a1da4aed..00000000 --- a/README-CHT.md +++ /dev/null @@ -1,121 +0,0 @@ -語言:[简体中文](./README.md) | *繁體中文* - -僅以此 README 紀念祁建華 (CHIEN-HUA CHI, 1921-2001)。 - ---- - -因不可控原因,該倉庫只能保證在 Gitee 有最新的內容可用: - -- 下載:https://gitee.com/vchewing/vChewing-macOS/releases -- 程式碼倉庫:https://gitee.com/vchewing/vChewing-macOS - -# vChewing 威注音輸入法 - -威注音輸入法基於小麥注音二次開發,是**原生簡體中文、原生繁體中文注音輸入法**: - -- 威注音是業界現階段支援注音排列種類數量與輸入用拼音種類數量最多的注音輸入法。 - - 受威注音自家的鐵恨注音並擊引擎加持。 -- 威注音的原廠詞庫內不存在任何可以妨礙該輸入法在世界上任何地方傳播的內容。 -- 相比中州韻(鼠須管)而言,威注音能夠做到真正的大千聲韻並擊。 -- 擁有拼音並擊模式,不懂注音的人群也可以受益於該輸入法所帶來的穩定的平均輸入速度。 - - 相比小鶴雙拼等雙拼方案而言,威注音雙手聲韻分工明確、且重碼率只有雙拼的五分之一。 -- 威注音對陸規審音完全相容:不熟悉台澎金馬審音的大陸用戶不會遇到與漢字讀音有關的不便。 - - 反之亦然。 - ->威注音有很多特色功能。在此僅列舉部分: ->- 支援 macOS 螢幕模擬鍵盤(僅傳統大千與傳統倚天佈局)。 ->- 可以將自己打的繁體中文自動轉成日本 JIS 新字體來輸出(包括基礎的字詞轉換)、也可以轉成康熙繁體來輸出。 ->- 簡繁體中文語料庫彼此分離,徹底杜絕任何繁簡轉換過程可能造成的失誤。 ->- 支援近年的全字庫漢字輸入。 ->- 可以自動整理使用者語彙檔案格式、自訂聯想詞。 ->- …… - -威注音分支專案及威注音詞庫由孫志貴(Shiki Suen)維護,其內容屬於可在 Gitee 公開展示的合法內容。小麥注音官方原始倉庫內的詞庫的內容均與孫志貴無關。 - -## 系統需求 - -建置用系統需求: - -- 至少 macOS 12 Monterey & Xcode 13.4.1。 - - 原因:Swift 封包管理支援與 Swift 5.5 所需,且倉庫內包含了需要 Xcode 13.4.1 才能正常編譯的內容(App 型安裝程式)。 - - 我們已經沒有條件測試比 Xcode 13.4.1 更老的環境了。硬要在這個環境下編譯的話,可能需要額外安裝[新版 Swift](https://www.swift.org/download/) 才可以。 -- 請使用正式發行版 Xcode,且最小子版本號越高越好(因為 Bug 相對而言最少)。 - - 如果是某個大版本的 Xcode 的 Release Candidate 版本的話,我們可能會對此做相容性測試。 - -編譯出的成品對應系統需求: - -- 至少 macOS El Capitan 10.11.5,否則無法處理 Unicode 8.0 的漢字。即便如此,仍需手動升級蘋方至至少 macOS 10.12 開始隨贈的版本、以支援 Unicode 8.0 的通用規範漢字表用字(全字庫沒有「𫫇」字)。 - - 保留該系統支援的原因:非 Unibody 機種的 MacBook Pro 支援的最後一版 macOS 就是 El Capitan。 - -- **推薦最低系統版本**:macOS 10.12 Sierra,對 Unicode 8.0 開始的《通用規範漢字表》漢字有原生的蘋方支援。 - - - 同時建議**系統記憶體應至少 4GB**。威注音輸入法佔用記憶體約 115MB 左右(簡繁雙模式)、75MB左右(單模式),供參考。 - - 請務必使用 SSD 硬碟,否則可能會影響每次開機之後輸入法首次載入的速度。從 10.10 Yosemite 開始,macOS 就已經是針對機械硬碟負優化的作業系統了。 - - 注:能裝 macOS 10.13 High Sierra 就不要去碰 macOS 10.12 Sierra 這個半成品。 - -- 關於全字庫支援,因下述事實而在理論上很難做到最完美: - - - 很可惜 GB18030-2005 並沒有官方提供的逐字讀音對照表,所以目前才用了全字庫。然而全字庫並不等於完美。 - - 有條件者可以安裝全字庫字型與花園明朝,否則全字庫等高萬國碼碼位漢字恐無法在輸入法的選字窗內完整顯示。 - - 全字庫漢字顯示支援會受到具體系統版本對萬國碼版本的支援的限制。 - - 有些全字庫漢字一開始會依賴萬國碼的私人造字區,且在之後被新版本萬國碼所支援。 - -## 建置流程 - -安裝 Xcode 之後,請先配置 Xcode 允許其直接構建在專案所在的資料夾下的 build 資料夾內。步驟: -``` -「Xcode」->「Preferences...」->「Locations」; -「File」->「Project/WorkspaceSettings...」->「Advanced」; -選「Custom」->「Relative to Workspace」即可。不選的話,make 的過程會出錯。 -``` -在終端機內定位到威注音的克隆本地專案的本地倉庫的目錄之後,執行 `make update` 以獲取最新詞庫。 - -接下來就是直接開 Xcode 專案,Product -> Scheme 選「vChewingInstaller」,編譯即可。 - -> 之前說「在成功之後執行 `make` 即可組建、再執行 `make install` 可以觸發威注音的安裝程式」,這對新版威注音而言**當且僅當**使用純 Swift 編譯腳本工序時方可使用。目前的 libvchewing-data 模組已經針對 macOS 版威注音實裝了純 Swift 詞庫編譯腳本。 - -第一次安裝完,日後程式碼或詞庫有任何修改,只要重覆上述流程,再次安裝威注音即可。 - -要注意的是 macOS 可能會限制同一次 login session 能終結同一個輸入法的執行進程的次數(安裝程式透過 kill input method process 來讓新版的輸入法生效)。如果安裝若干次後,發現程式修改的結果並沒有出現、或甚至輸入法已無法再選用,只需要登出目前的 macOS 系統帳號、再重新登入即可。 - -補記: 該輸入法是在 2021 年 11 月初「28ae7deb4092f067539cff600397292e66a5dd56」這一版小麥注音建置的基礎上完成的。因為在清洗詞庫的時候清洗了全部的 git commit 歷史,所以無法自動從小麥注音官方倉庫上游繼承任何改動,只能手動同步任何在此之後的程式修正。最近一次同步參照是上游主倉庫的 2.2.2 版、以及 zonble 的分支「5cb6819e132a02bbcba77dbf083ada418750dab7」。 - -## 應用授權 - -威注音專案目前僅用到小麥注音的下述程式組件(MIT License): - -- 半衰記憶模組的 C++ 原版作者是 Mengjuei Hsieh,且由 Shiki Suen 用 Swift 與 C# 分別重寫、繼續開發。 -- 僅供研發人員調試方便而使用的 App 版安裝程式 (by Zonble Yang),不對公眾使用。 -- Voltaire MK2 選字窗、飄雲通知視窗 (by Zonble Yang),有大幅度修改。 - -威注音輸入法 macOS 版以 MIT-NTL License 授權釋出 (與 MIT 相容):© 2021-2022 vChewing 專案。 - -- 威注音輸入法 macOS 版程式維護:Shiki Suen。特別感謝 Isaac Xen 與 Hiraku Wong 等人的技術協力。 -- 鐵恨注音並擊處理引擎:Shiki Suen (MIT-NTL License)。 -- 天權星語彙處理引擎:Shiki Suen (MIT-NTL License)。 -- 威注音詞庫由 Shiki Suen 維護,以 3-Clause BSD License 授權釋出。其中的詞頻數據[由 NAER 授權用於非商業用途](https://twitter.com/ShikiSuen/status/1479329302713831424)。 - -使用者可自由使用、散播本軟體,惟散播時必須完整保留版權聲明及軟體授權、且「一旦經過修改便不可以再繼續使用威注音的產品名稱」。換言之,這條相對上游 MIT 而言新增的規定就是:你 Fork 可以,但 Fork 成單獨發行的產品名稱時就必須修改產品名稱。這條新增規定對 OpenVanilla 與威注音雙方都有益,免得各自的旗號被盜版下載販子等挪用做意外用途。 - -## 資料來源 - -原廠詞庫主要詞語資料來源: - -- 《重編國語辭典修訂本 2015》的六字以內的詞語資料 (CC BY-ND 3.0)。 -- 《CNS11643中文標準交換碼全字庫(簡稱全字庫)》 (OGDv1 License)。 -- LibTaBE (by Pai-Hsiang Hsiao under 3-Clause BSD License)。 -- [《新加坡華語資料庫》](https://www.languagecouncils.sg/mandarin/ch/learning-resources/singaporean-mandarin-database)。 -- 原始詞頻資料取自 NAER,有經過換算處理與按需調整。 - - 威注音並未使用由 LibTaBE 內建的來自 Sinica 語料庫的詞頻資料。 -- 威注音語彙庫作者自行維護新增的詞語資料,包括: - - 盡可能所有字詞的陸規審音與齊鐵恨廣播讀音。 - - 中國大陸常用資訊電子術語等常用語,以確保簡體中文母語者在使用輸入法時不會受到審音差異的困擾。 -- 其他使用者建議收錄的資料。 - -## 參與研發時的注意事項 - -歡迎參與威注音的研發。論及相關細則,請洽該倉庫內的「[CONTRIBUTING.md](./CONTRIBUTING.md)」檔案、以及《[常見問題解答](./FAQ.md)》。 - -敝專案採用了《[貢獻者品行準則承約書 v2.1](./code-of-conduct.md)》。考慮到上游鏈接給出的中文版翻譯與英文原文嚴重不符合的情況(會出現因執法與被執法雙方的認知偏差導致的矛盾,非常容易變成敵我矛盾),敝專案使用了自行翻譯的版本、且新增了一些能促進雙方共識的註解。 - -$ EOF. diff --git a/README.md b/README.md index 586d6053..f86fe9bf 100644 --- a/README.md +++ b/README.md @@ -1,121 +1,129 @@ -语言:*简体中文* | [繁體中文](./README-CHT.md) - -仅以此 README 纪念祁建华 (CHIEN-HUA CHI, 1921-2001)。 - ---- - -因不可控原因,该仓库只能保证在 Gitee 有最新的内容可用: - -- 下载:https://gitee.com/vchewing/vChewing-macOS/releases -- 源码仓库:https://gitee.com/vchewing/vChewing-macOS - -# vChewing 威注音输入法 - -威注音输入法基于小麦注音二次开发,是**原生简体中文、原生繁体中文注音输入法**: - -- 威注音是业界现阶段支持注音排列种类数量与输入用拼音种类数量最多的注音输入法。 - - 受威注音自家的铁恨注音并击引擎加持。 -- 威注音的原厂词库内不存在任何可以妨碍该输入法在世界上任何地方传播的内容。 -- 相比中州韵(鼠须管)而言,威注音能够做到真正的大千声韵并击。 -- 拥有拼音并击模式,不懂注音的人群也可以受益于该输入法所带来的稳定的平均输入速度。 - - 相比小鹤双拼等双拼方案而言,威注音双手声韵分工明确、且重码率只有双拼的五分之一。 -- 威注音对陆规审音完全相容:不熟悉台澎金马审音的大陆用户不会遇到与汉字读音有关的不便。 - - 反之亦然。 - ->威注音有很多特色功能。在此仅列举部分: ->- 支持 macOS 屏幕模拟键盘(仅传统大千与传统倚天布局)。 ->- 可以将自己打的繁体中文自动转成日本 JIS 新字体来输出(包括基础的字词转换)、也可以转成康熙繁体来输出。 ->- 简繁体中文语料库彼此分离,彻底杜绝任何繁简转换过程可能造成的失误。 ->- 支持近年的全字库汉字输入。 ->- 可以自动整理使用者语汇档案格式、自订联想词。 ->- …… - -威注音分支专案及威注音词库由孙志贵(Shiki Suen)维护,其内容属于可在 Gitee 公开展示的合法内容。小麦注音官方原始仓库内的词库的内容均与孙志贵无关。 - -## 系统需求 - -编译用系统需求: - -- 至少 macOS 12 Monterey & Xcode 13.4.1。 - - 原因:Swift 封包管理支援与 Swift 5.5 所需,且仓库内包含了需要 Xcode 13.4.1 才能正常编译的内容(App 型安装程式)。 - - 我们已经没有条件测试比 Xcode 13.4.1 更老的环境了。硬要在这个环境下编译的话,可能需要额外安装[新版 Swift](https://www.swift.org/download/) 才可以。 -- 请使用正式发行版 Xcode,且最小子版本号越高越好(因为 Bug 相对而言最少)。 - - 如果是某个大版本的 Xcode 的 Release Candidate 版本的话,我们可能会对此做相容性测试。 - -编译出的成品对应系统需求: - -- 至少 macOS El Capitan 10.11.5,否则无法处理 Unicode 8.0 的汉字。即便如此,仍需手动升级苹方至至少 macOS 10.12 开始随赠的版本、以支持 Unicode 8.0 的通用规范汉字表用字(全字库没有「𫫇」字)。 - - 保留该系统支持的原因:非 Unibody 机种的 MacBook Pro 支持的最后一版 macOS 就是 El Capitan。 - -- **推荐最低系统版本**:macOS 10.12 Sierra,对 Unicode 8.0 开始的《通用规范汉字表》汉字有原生的苹方支持。 - - - 同时建议**系统运存应至少 4GB**。威注音输入法占用运存约 115MB 左右(简繁双模式)、75MB左右(单模式),供参考。 - - 请务必使用 SSD 硬盘,否则可能会影响每次开机之后输入法首次载入的速度。从 10.10 Yosemite 开始,macOS 就已经是针对机械硬盘负优化的操作系统了。 - - 注:能装 macOS 10.13 High Sierra 就不要去碰 macOS 10.12 Sierra 这个半成品。 - -- 关于全字库支持,因下述事实而在理论上很难做到最完美: - - - 很可惜 GB18030-2005 并没有官方提供的逐字读音对照表,所以目前才用了全字库。然而全字库并不等于完美。 - - 有条件者可以安装全字库字型与花园明朝,否则全字库等高万国码码位汉字恐无法在输入法的选字窗内完整显示。 - - 全字库汉字显示支持会受到具体系统版本对万国码版本的支持的限制。 - - 有些全字库汉字一开始会依赖万国码的私人造字区,且在之后被新版本万国码所支持。 - -## 编译流程 - -安装 Xcode 之后,请先配置 Xcode 允许其直接构建在专案所在的资料夹下的 build 资料夹内。步骤: -``` -「Xcode」->「Preferences...」->「Locations」; -「File」->「Project/WorkspaceSettings...」->「Advanced」; -选「Custom」->「Relative to Workspace」即可。不选的话,make 的过程会出错。 -``` -在终端机内定位到威注音的克隆本地专案的本地仓库的目录之后,执行 `make update` 以获取最新词库。 - -接下来就是直接开 Xcode 专案,Product -> Scheme 选「vChewingInstaller」,编译即可。 - -> 之前说「在成功之后执行 `make` 即可编译、再执行 `make install` 可以触发威注音的安装程式」,这对新版威注音而言**当且仅当**使用纯 Swift 编译脚本工序时方可使用。目前的 libvchewing-data 模组已经针对 macOS 版威注音实装了纯 Swift 词库编译脚本。 - -第一次安装完,日后源码或词库有任何修改,只要重覆上述流程,再次安装威注音即可。 - -要注意的是 macOS 可能会限制同一次 login session 能终结同一个输入法的执行进程的次数(安装程式透过 kill input method process 来让新版的输入法生效)。如果安装若干次后,发现程式修改的结果并没有出现、或甚至输入法已无法再选用,只需要登出目前的 macOS 系统帐号、再重新登入即可。 - -补记: 该输入法是在 2021 年 11 月初「28ae7deb4092f067539cff600397292e66a5dd56」这一版小麦注音编译的基础上完成的。因为在清洗词库的时候清洗了全部的 git commit 历史,所以无法自动从小麦注音官方仓库上游继承任何改动,只能手动同步任何在此之后的程式修正。最近一次同步参照是上游主仓库的 2.2.2 版、以及 zonble 的分支「5cb6819e132a02bbcba77dbf083ada418750dab7」。 - -## 应用授权 - -威注音专案目前仅用到小麦注音的下述程式组件(MIT License): - -- 半衰记忆模组的 C++ 原版作者是 Mengjuei Hsieh,且由 Shiki Suen 用 Swift 与 C# 分别重写、继续开发。 -- 仅供研发人员调试方便而使用的 App 版安装程式 (by Zonble Yang),不对公众使用。 -- Voltaire MK2 选字窗、飘云通知视窗 (by Zonble Yang),有大幅度修改。 - -威注音输入法 macOS 版以 MIT-NTL License 授权释出 (与 MIT 相容):© 2021-2022 vChewing 专案。 - -- 威注音输入法 macOS 版程式维护:Shiki Suen。特别感谢 Isaac Xen 与 Hiraku Wong 等人的技术协力。 -- 铁恨注音并击处理引擎:Shiki Suen (MIT-NTL License)。 -- 天权星语汇处理引擎:Shiki Suen (MIT-NTL License)。 -- 威注音词库由 Shiki Suen 维护,以 3-Clause BSD License 授权释出。其中的词频数据[由 NAER 授权用于非商业用途](https://twitter.com/ShikiSuen/status/1479329302713831424)。 - -使用者可自由使用、散播本软件,惟散播时必须完整保留版权声明及软件授权、且「一旦经过修改便不可以再继续使用威注音的产品名称」。换言之,这条相对上游 MIT 而言新增的规定就是:你 Fork 可以,但 Fork 成单独发行的产品名称时就必须修改产品名称。这条新增规定对 OpenVanilla 与威注音双方都有益,免得各自的旗号被盗版下载贩子等挪用做意外用途。 - -## 资料来源 - -原厂词库主要词语资料来源: - -- 《重编国语辞典修订本 2015》的六字以内的词语资料 (CC BY-ND 3.0)。 -- 《CNS11643中文标准交换码全字库(简称全字库)》 (OGDv1 License)。 -- LibTaBE (by Pai-Hsiang Hsiao under 3-Clause BSD License)。 -- [《新加坡华语资料库》](https://www.languagecouncils.sg/mandarin/ch/learning-resources/singaporean-mandarin-database)。 -- 原始词频资料取自 NAER,有经过换算处理与按需调整。 - - 威注音并未使用由 LibTaBE 内建的来自 Sinica 语料库的词频资料。 -- 威注音语汇库作者自行维护新增的词语资料,包括: - - 尽可能所有字词的陆规审音与齐铁恨广播读音。 - - 中国大陆常用资讯电子术语等常用语,以确保简体中文母语者在使用输入法时不会受到审音差异的困扰。 -- 其他使用者建议收录的资料。 - -## 参与研发时的注意事项 - -欢迎参与威注音的研发。论及相关细则,请洽该仓库内的「[CONTRIBUTING.md](./CONTRIBUTING.md)」档案、以及《[常见问题解答](./FAQ.md)》。 - -敝专案采用了《[贡献者品行准则承约书 v2.1](./code-of-conduct.md)》。考虑到上游链接给出的中文版翻译与英文原文严重不符合的情况(会出现因执法与被执法双方的认知偏差导致的矛盾,非常容易变成敌我矛盾),敝专案使用了自行翻译的版本、且新增了一些能促进双方共识的注解。 - -$ EOF. +語言:[简体中文](./README-CHS.md) | *繁體中文* + +僅以此 README 紀念祁建華 (CHIEN-HUA CHI, 1921-2001)。 + +--- + +有關該倉庫及該輸入法的最新資訊,請洽產品主頁:https://vchewing.github.io/ + +因不可控原因,該倉庫只能保證在 Gitee 有最新的內容可用: + +- 下載:https://gitee.com/vchewing/vChewing-macOS/releases +- 程式碼倉庫:https://gitee.com/vchewing/vChewing-macOS + +# vChewing 威注音輸入法 + +威注音輸入法基於小麥注音二次開發,是**原生簡體中文、原生繁體中文注音輸入法**: + +- 威注音是業界現階段支援注音排列種類數量與輸入用拼音種類數量最多的注音輸入法。 + - 受威注音自家的鐵恨注音並擊引擎加持。 +- 威注音的原廠詞庫內不存在任何可以妨礙該輸入法在世界上任何地方傳播的內容。 +- 相比中州韻(鼠須管)而言,威注音能夠做到真正的大千聲韻並擊。 +- 擁有拼音並擊模式,不懂注音的人群也可以受益於該輸入法所帶來的穩定的平均輸入速度。 + - 相比小鶴雙拼等雙拼方案而言,威注音雙手聲韻分工明確、且重碼率只有雙拼的五分之一。 +- 威注音對陸規審音完全相容:不熟悉台澎金馬審音的大陸用戶不會遇到與漢字讀音有關的不便。 + - 反之亦然。 + +>威注音有很多特色功能。在此僅列舉部分: +>- 支援 macOS 螢幕模擬鍵盤(僅傳統大千與傳統倚天佈局)。 +>- 可以將自己打的繁體中文自動轉成日本 JIS 新字體來輸出(包括基礎的字詞轉換)、也可以轉成康熙繁體來輸出。 +>- 簡繁體中文語料庫彼此分離,徹底杜絕任何繁簡轉換過程可能造成的失誤。 +>- 支援近年的全字庫漢字輸入。 +>- 可以自動整理使用者語彙檔案格式、自訂聯想詞。 +>- …… + +威注音分支專案及威注音詞庫由孫志貴(Shiki Suen)維護,其內容屬於可在 Gitee 公開展示的合法內容。小麥注音官方原始倉庫內的詞庫的內容均與孫志貴無關。 + +P.S.: 威注音輸入法的 Shift 按鍵監測功能僅藉由對 NSEvent 訊號資料流的上下文關係的觀測來實現,僅接觸藉由 macOS 系統內建的 InputMethodKit 當中的 IMKServer 傳來的 NSEvent 訊號資料流、而無須監聽系統全局鍵盤事件,也無須向使用者申請用以達成這類「可能會引發資安疑慮」的行為所需的輔助權限,更不會將您的電腦內的任何資料傳出去(本來就是這樣,且自威注音 2.3.0 版引入的 Sandbox 特性更杜絕了這種可能性)。請放心使用。Shift 中英模式切換功能要求至少 macOS 10.15 Catalina 才可以用。 + +## 系統需求 + +建置用系統需求: + +- 至少 macOS 12 Monterey & Xcode 13.4.1。 + - 原因:Swift 封包管理支援與 Swift 5.5 所需,且倉庫內包含了需要 Xcode 13.4.1 才能正常編譯的內容(App 型安裝程式)。 + - 我們已經沒有條件測試比 Xcode 13.4.1 更老的環境了。硬要在這個環境下編譯的話,可能需要額外安裝[新版 Swift](https://www.swift.org/download/) 才可以。 +- 請使用正式發行版 Xcode,且最小子版本號越高越好(因為 Bug 相對而言最少)。 + - 如果是某個大版本的 Xcode 的 Release Candidate 版本的話,我們可能會對此做相容性測試。 + +編譯出的成品對應系統需求: + +- 至少 macOS El Capitan 10.11.5,否則無法處理 Unicode 8.0 的漢字。即便如此,仍需手動升級蘋方至至少 macOS 10.12 開始隨贈的版本、以支援 Unicode 8.0 的通用規範漢字表用字(全字庫沒有「𫫇」字)。 + - 保留該系統支援的原因:非 Unibody 機種的 MacBook Pro 支援的最後一版 macOS 就是 El Capitan。 + +- **推薦最低系統版本**:macOS 10.12 Sierra,對 Unicode 8.0 開始的《通用規範漢字表》漢字有原生的蘋方支援。 + + - 同時建議**系統記憶體應至少 4GB**。威注音輸入法佔用記憶體約 115MB 左右(簡繁雙模式)、75MB左右(單模式),供參考。 + - 請務必使用 SSD 硬碟,否則可能會影響每次開機之後輸入法首次載入的速度。從 10.10 Yosemite 開始,macOS 就已經是針對機械硬碟負優化的作業系統了。 + - 注:能裝 macOS 10.13 High Sierra 就不要去碰 macOS 10.12 Sierra 這個半成品。 + +- 關於全字庫支援,因下述事實而在理論上很難做到最完美: + + - 很可惜 GB18030-2005 並沒有官方提供的逐字讀音對照表,所以目前才用了全字庫。然而全字庫並不等於完美。 + - 有條件者可以安裝全字庫字型與花園明朝,否則全字庫等高萬國碼碼位漢字恐無法在輸入法的選字窗內完整顯示。 + - 全字庫漢字顯示支援會受到具體系統版本對萬國碼版本的支援的限制。 + - 有些全字庫漢字一開始會依賴萬國碼的私人造字區,且在之後被新版本萬國碼所支援。 + +## 建置流程 + +安裝 Xcode 之後,請先配置 Xcode 允許其直接構建在專案所在的資料夾下的 build 資料夾內。步驟: +``` +「Xcode」->「Preferences...」->「Locations」; +「File」->「Project/WorkspaceSettings...」->「Advanced」; +選「Custom」->「Relative to Workspace」即可。不選的話,make 的過程會出錯。 +``` +在終端機內定位到威注音的克隆本地專案的本地倉庫的目錄之後,執行 `make update` 以獲取最新詞庫。 + +接下來就是直接開 Xcode 專案,Product -> Scheme 選「vChewingInstaller」,編譯即可。 + +> 之前說「在成功之後執行 `make` 即可組建、再執行 `make install` 可以觸發威注音的安裝程式」,這對新版威注音而言**當且僅當**使用純 Swift 編譯腳本工序時方可使用。目前的 libvchewing-data 模組已經針對 macOS 版威注音實裝了純 Swift 詞庫編譯腳本。 + +第一次安裝完,日後程式碼或詞庫有任何修改,只要重覆上述流程,再次安裝威注音即可。 + +要注意的是 macOS 可能會限制同一次 login session 能終結同一個輸入法的執行進程的次數(安裝程式透過 kill input method process 來讓新版的輸入法生效)。如果安裝若干次後,發現程式修改的結果並沒有出現、或甚至輸入法已無法再選用,只需要登出目前的 macOS 系統帳號、再重新登入即可。 + +補記: 該輸入法是在 2021 年 11 月初「28ae7deb4092f067539cff600397292e66a5dd56」這一版小麥注音建置的基礎上完成的。因為在清洗詞庫的時候清洗了全部的 git commit 歷史,所以無法自動從小麥注音官方倉庫上游繼承任何改動,只能手動同步任何在此之後的程式修正。最近一次同步參照是上游主倉庫的 2.2.2 版、以及 zonble 的分支「5cb6819e132a02bbcba77dbf083ada418750dab7」。 + +## 應用授權 + +威注音專案目前僅用到小麥注音的下述程式組件(MIT License): + +- 僅供研發人員調試方便而使用的 App 版安裝程式 (by Zonble Yang),不對公眾使用。 +- Voltaire MK2 選字窗、飄雲通知視窗 (by Zonble Yang),有大幅度修改。 + +威注音專案目前還用到如下的來自 Lukhnos Liu 的算法: + +- 半衰記憶模組 MK2,被 Shiki Suen 用 Swift 重寫。 +- 基於 Gramambular 2 組字引擎的算法、被 Shiki Suen 用 Swift 重寫(詳見 [Megrez 組字引擎](https://github.com/vChewing/Megrez))。 + +威注音輸入法 macOS 版以 MIT-NTL License 授權釋出 (與 MIT 相容):© 2021-2022 vChewing 專案。 + +- 威注音輸入法 macOS 版程式維護:Shiki Suen。特別感謝 Isaac Xen 與 Hiraku Wong 等人的技術協力。 +- 鐵恨注音並擊處理引擎:Shiki Suen (MIT-NTL License)。 +- 天權星語彙處理引擎:Shiki Suen (MIT-NTL License)。 +- 威注音詞庫由 Shiki Suen 維護,以 3-Clause BSD License 授權釋出。其中的詞頻數據[由 NAER 授權用於非商業用途](https://twitter.com/ShikiSuen/status/1479329302713831424)。 + +使用者可自由使用、散播本軟體,惟散播時必須完整保留版權聲明及軟體授權、且「一旦經過修改便不可以再繼續使用威注音的產品名稱」。換言之,這條相對上游 MIT 而言新增的規定就是:你 Fork 可以,但 Fork 成單獨發行的產品名稱時就必須修改產品名稱。這條新增規定對 OpenVanilla 與威注音雙方都有益,免得各自的旗號被盜版下載販子等挪用做意外用途。 + +## 資料來源 + +原廠詞庫主要詞語資料來源: + +- 《重編國語辭典修訂本 2015》的六字以內的詞語資料 (CC BY-ND 3.0)。 +- 《CNS11643中文標準交換碼全字庫(簡稱全字庫)》 (OGDv1 License)。 +- LibTaBE (by Pai-Hsiang Hsiao under 3-Clause BSD License)。 +- [《新加坡華語資料庫》](https://www.languagecouncils.sg/mandarin/ch/learning-resources/singaporean-mandarin-database)。 +- 原始詞頻資料取自 NAER,有經過換算處理與按需調整。 + - 威注音並未使用由 LibTaBE 內建的來自 Sinica 語料庫的詞頻資料。 +- 威注音語彙庫作者自行維護新增的詞語資料,包括: + - 盡可能所有字詞的陸規審音與齊鐵恨廣播讀音。 + - 中國大陸常用資訊電子術語等常用語,以確保簡體中文母語者在使用輸入法時不會受到審音差異的困擾。 +- 其他使用者建議收錄的資料。 + +## 參與研發時的注意事項 + +歡迎參與威注音的研發。論及相關細則,請洽該倉庫內的「[CONTRIBUTING.md](./CONTRIBUTING.md)」檔案、以及《[常見問題解答](./FAQ.md)》。 + +敝專案採用了《[貢獻者品行準則承約書 v2.1](./code-of-conduct.md)》。考慮到上游鏈接給出的中文版翻譯與英文原文嚴重不符合的情況(會出現因執法與被執法雙方的認知偏差導致的矛盾,非常容易變成敵我矛盾),敝專案使用了自行翻譯的版本、且新增了一些能促進雙方共識的註解。 + +$ EOF. diff --git a/Source/Modules/ControllerModules/ctlInputMethod_Core.swift b/Source/Modules/ControllerModules/ctlInputMethod_Core.swift index 2c2f6bdd..231442c5 100644 --- a/Source/Modules/ControllerModules/ctlInputMethod_Core.swift +++ b/Source/Modules/ControllerModules/ctlInputMethod_Core.swift @@ -42,7 +42,7 @@ class ctlInputMethod: IMKInputController { /// 當前這個 ctlInputMethod 副本是否處於縱排選字窗模式(滯後項)。 static var isVerticalCandidateSituation: Bool = false /// 當前這個 ctlInputMethod 副本是否處於英數輸入模式。 - var isASCIIMode: Bool = false + var isASCIIMode: Bool = false { didSet { setKeyLayout() } } /// 按鍵調度模組的副本。 var keyHandler: KeyHandler = .init() /// 用以記錄當前輸入法狀態的變數。 @@ -66,9 +66,12 @@ class ctlInputMethod: IMKInputController { /// 指定鍵盤佈局。 func setKeyLayout() { - if let client = client() { - client.overrideKeyboard(withKeyboardNamed: mgrPrefs.basicKeyboardLayout) + guard let client = client() else { return } + if isASCIIMode, AppleKeyboardConverter.isDynamicBasicKeyboardLayoutEnabled { + client.overrideKeyboard(withKeyboardNamed: mgrPrefs.alphanumericalKeyboardLayout) + return } + client.overrideKeyboard(withKeyboardNamed: mgrPrefs.basicKeyboardLayout) } /// 重設按鍵調度模組,會將當前尚未遞交的內容遞交出去。 diff --git a/Source/Modules/ControllerModules/ctlInputMethod_Menu.swift b/Source/Modules/ControllerModules/ctlInputMethod_Menu.swift index 4865bdae..8a6aaf60 100644 --- a/Source/Modules/ControllerModules/ctlInputMethod_Menu.swift +++ b/Source/Modules/ControllerModules/ctlInputMethod_Menu.swift @@ -146,17 +146,10 @@ extension ctlInputMethod { menu.addItem(NSMenuItem.separator()) // --------------------- - if optionKeyPressed { - menu.addItem( - withTitle: NSLocalizedString("vChewing Preferences…", comment: ""), - action: #selector(showLegacyPreferences(_:)), keyEquivalent: "" - ) - } else { - menu.addItem( - withTitle: NSLocalizedString("vChewing Preferences…", comment: ""), - action: #selector(showPreferences(_:)), keyEquivalent: "" - ) - } + menu.addItem( + withTitle: NSLocalizedString("vChewing Preferences…", comment: ""), + action: #selector(showPreferences(_:)), keyEquivalent: "" + ) menu.addItem( withTitle: NSLocalizedString("Client Manager", comment: "") + "…", action: #selector(showClientListMgr(_:)), keyEquivalent: "" @@ -191,20 +184,24 @@ extension ctlInputMethod { return menu } +} - // MARK: - IME Menu Items +// MARK: - IME Menu Items +extension ctlInputMethod { @objc override func showPreferences(_: Any?) { - if #available(macOS 10.15, *) { + if #unavailable(macOS 10.15) { + showLegacyPreferences() + } else if NSEvent.modifierFlags.contains(.option) { + showLegacyPreferences() + } else { NSApp.setActivationPolicy(.accessory) ctlPrefUI.shared.controller.show(preferencePane: Preferences.PaneIdentifier(rawValue: "General")) ctlPrefUI.shared.controller.window?.level = .statusBar - } else { - showLegacyPreferences() } } - @objc func showLegacyPreferences(_: Any? = nil) { + func showLegacyPreferences() { (NSApp.delegate as? AppDelegate)?.showPreferences() NSApp.activate(ignoringOtherApps: true) } diff --git a/Source/Modules/IMEModules/IMKHelper.swift b/Source/Modules/IMEModules/IMKHelper.swift index 62873e88..2972be5d 100644 --- a/Source/Modules/IMEModules/IMKHelper.swift +++ b/Source/Modules/IMEModules/IMKHelper.swift @@ -41,6 +41,10 @@ enum IMKHelper { "org.unknown.keylayout.vChewingMiTAC", ] + static var allowedAlphanumericalTISInputSources: [TISInputSource] { + arrWhitelistedKeyLayoutsASCII.compactMap { TISInputSource.generate(from: $0) } + } + static var allowedBasicLayoutsAsTISInputSources: [TISInputSource?] { // 為了保證清單順序,先弄兩個容器。 var containerA: [TISInputSource?] = [] diff --git a/Source/Modules/IMEModules/mgrPrefs.swift b/Source/Modules/IMEModules/mgrPrefs.swift index b311d12e..72afc32b 100644 --- a/Source/Modules/IMEModules/mgrPrefs.swift +++ b/Source/Modules/IMEModules/mgrPrefs.swift @@ -19,6 +19,7 @@ public enum UserDef: String, CaseIterable { case kCheckUpdateAutomatically = "CheckUpdateAutomatically" case kMandarinParser = "MandarinParser" case kBasicKeyboardLayout = "BasicKeyboardLayout" + case kAlphanumericalKeyboardLayout = "AlphanumericalKeyboardLayout" case kShowPageButtonsInCandidateWindow = "ShowPageButtonsInCandidateWindow" case kCandidateListTextSize = "CandidateListTextSize" case kAppleLanguages = "AppleLanguages" @@ -86,6 +87,7 @@ private let kMaxCandidateListTextSize: CGFloat = 196 private let kDefaultKeys = "123456789" private let kDefaultBasicKeyboardLayout = "com.apple.keylayout.ZhuyinBopomofo" +private let kDefaultAlphanumericalKeyboardLayout = "com.apple.keylayout.ABC" // MARK: - UserDefaults extension. @@ -385,6 +387,11 @@ public enum mgrPrefs { ) static var basicKeyboardLayout: String + @UserDefault( + key: UserDef.kAlphanumericalKeyboardLayout.rawValue, defaultValue: kDefaultAlphanumericalKeyboardLayout + ) + static var alphanumericalKeyboardLayout: String + @UserDefault(key: UserDef.kShowPageButtonsInCandidateWindow.rawValue, defaultValue: true) static var showPageButtonsInCandidateWindow: Bool @@ -756,23 +763,12 @@ extension mgrPrefs { mandarinParser = 0 } // 基礎鍵盤排列選項糾錯。 - var inputSourceTIS: TISInputSource? { - var result: TISInputSource? - let list = TISCreateInputSourceList(nil, true).takeRetainedValue() as! [TISInputSource] - let matchedTISString = mgrPrefs.basicKeyboardLayout - for source in list { - guard let ptrCat = TISGetInputSourceProperty(source, kTISPropertyInputSourceCategory) else { continue } - let category = Unmanaged.fromOpaque(ptrCat).takeUnretainedValue() - guard category == kTISCategoryKeyboardInputSource else { continue } - guard let ptrSourceID = TISGetInputSourceProperty(source, kTISPropertyInputSourceID) else { continue } - let sourceID = String(Unmanaged.fromOpaque(ptrSourceID).takeUnretainedValue()) - if sourceID == matchedTISString { result = source } - } - return result - } - if inputSourceTIS == nil { + if TISInputSource.generate(from: mgrPrefs.basicKeyboardLayout) == nil { mgrPrefs.basicKeyboardLayout = kDefaultBasicKeyboardLayout } + if TISInputSource.generate(from: mgrPrefs.alphanumericalKeyboardLayout) == nil { + mgrPrefs.alphanumericalKeyboardLayout = kDefaultAlphanumericalKeyboardLayout + } // 其它多元選項參數自動糾錯。 if ![0, 1, 2].contains(specifyIntonationKeyBehavior) { specifyIntonationKeyBehavior = 0 diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift index 10e4b0c4..f547bf94 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift @@ -26,7 +26,7 @@ struct suiPrefPaneDevZone: View { if mgrPrefs.appleLanguages[0].contains("zh-Han") { return 480 } else { - return 550 + return 580 } } }() diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneDictionary.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneDictionary.swift index af7ef700..44c6927a 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneDictionary.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneDictionary.swift @@ -39,7 +39,7 @@ struct suiPrefPaneDictionary: View { if mgrPrefs.appleLanguages[0].contains("zh-Han") { return 480 } else { - return 550 + return 580 } } }() diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift index 430686e8..af90f67b 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift @@ -55,7 +55,7 @@ struct suiPrefPaneExperience: View { if mgrPrefs.appleLanguages[0].contains("zh-Han") { return 480 } else { - return 550 + return 580 } } }() diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift index 2724985c..2d9232c4 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift @@ -46,7 +46,7 @@ struct suiPrefPaneGeneral: View { if mgrPrefs.appleLanguages[0].contains("zh-Han") { return 480 } else { - return 550 + return 580 } } }() @@ -54,7 +54,7 @@ struct suiPrefPaneGeneral: View { var body: some View { ScrollView { Preferences.Container(contentWidth: contentWidth) { - Preferences.Section(bottomDivider: false, label: { Text(LocalizedStringKey("Candidate Size:")) }) { + Preferences.Section(label: { Text(LocalizedStringKey("Candidate Size:")) }) { Picker( "", selection: $selCandidateUIFontSize.onChange { @@ -82,7 +82,7 @@ struct suiPrefPaneGeneral: View { Text(LocalizedStringKey("Choose candidate font size for better visual clarity.")) .preferenceDescription() } - Preferences.Section(bottomDivider: false, label: { Text(LocalizedStringKey("UI Language:")) }) { + Preferences.Section(label: { Text(LocalizedStringKey("UI Language:")) }) { Picker( LocalizedStringKey("Follow OS settings"), selection: $selUILanguage.onChange { @@ -114,7 +114,7 @@ struct suiPrefPaneGeneral: View { Text(LocalizedStringKey("Change user interface language (will reboot the IME).")) .preferenceDescription() } - Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Candidate Layout:")) }) { + Preferences.Section(label: { Text(LocalizedStringKey("Candidate Layout:")) }) { Picker( "", selection: $selEnableHorizontalCandidateLayout.onChange { @@ -138,7 +138,7 @@ struct suiPrefPaneGeneral: View { .controlSize(.small) .disabled(mgrPrefs.useIMKCandidateWindow) } - Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Output Settings:")) }) { + Preferences.Section(label: { Text(LocalizedStringKey("Output Settings:")) }) { Toggle( LocalizedStringKey("Auto-convert traditional Chinese glyphs to KangXi characters"), isOn: $selEnableKanjiConvToKangXi.onChange { diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneKeyboard.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneKeyboard.swift index d75bea8b..cf18d853 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneKeyboard.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneKeyboard.swift @@ -16,6 +16,9 @@ struct suiPrefPaneKeyboard: View { @State private var selMandarinParser = UserDefaults.standard.integer(forKey: UserDef.kMandarinParser.rawValue) @State private var selBasicKeyboardLayout: String = UserDefaults.standard.string(forKey: UserDef.kBasicKeyboardLayout.rawValue) ?? mgrPrefs.basicKeyboardLayout + @State private var selAlphanumericalKeyboardLayout: String = + UserDefaults.standard.string(forKey: UserDef.kAlphanumericalKeyboardLayout.rawValue) + ?? mgrPrefs.alphanumericalKeyboardLayout @State private var selUsingHotKeySCPC = UserDefaults.standard.bool(forKey: UserDef.kUsingHotKeySCPC.rawValue) @State private var selUsingHotKeyAssociates = UserDefaults.standard.bool( @@ -37,7 +40,7 @@ struct suiPrefPaneKeyboard: View { if mgrPrefs.appleLanguages[0].contains("zh-Han") { return 480 } else { - return 550 + return 580 } } }() @@ -163,7 +166,7 @@ struct suiPrefPaneKeyboard: View { Spacer().frame(width: 30) } } - Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Basic Keyboard Layout:")) }) { + Preferences.Section(label: { Text(LocalizedStringKey("Basic Keyboard Layout:")) }) { HStack { Picker( "", @@ -191,61 +194,91 @@ struct suiPrefPaneKeyboard: View { HStack { Text( NSLocalizedString( - "Choose the macOS-level basic keyboard layout.", + "Choose the macOS-level basic keyboard layout. Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only.", comment: "" - ) + (mgrPrefs.appleLanguages[0].contains("en") ? " " : "") - + NSLocalizedString( - "Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only.", - comment: "" - ) + ) ) .preferenceDescription().fixedSize(horizontal: false, vertical: true) Spacer().frame(width: 30) } } - Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Keyboard Shortcuts:")) }) { - Toggle( - LocalizedStringKey("Per-Char Select Mode"), - isOn: $selUsingHotKeySCPC.onChange { - mgrPrefs.usingHotKeySCPC = selUsingHotKeySCPC + Preferences.Section(label: { Text(LocalizedStringKey("Alphanumerical Layout:")) }) { + HStack { + Picker( + "", + selection: $selAlphanumericalKeyboardLayout.onChange { + mgrPrefs.alphanumericalKeyboardLayout = selAlphanumericalKeyboardLayout + } + ) { + ForEach(0...(IMKHelper.allowedAlphanumericalTISInputSources.count - 1), id: \.self) { id in + if let theEntry = IMKHelper.allowedAlphanumericalTISInputSources[id] { + Text(theEntry.vChewingLocalizedName).tag(theEntry.identifier) + } + }.id(UUID()) } - ) - Toggle( - LocalizedStringKey("Per-Char Associated Phrases"), - isOn: $selUsingHotKeyAssociates.onChange { - mgrPrefs.usingHotKeyAssociates = selUsingHotKeyAssociates + .labelsHidden() + .frame(width: 240.0) + } + HStack { + Text( + NSLocalizedString( + "Choose the macOS-level alphanumerical keyboard layout. This setting is for the alphanumerical mode toggled by Shift key.", + comment: "" + ) + ) + .preferenceDescription().fixedSize(horizontal: false, vertical: true) + Spacer().frame(width: 30) + } + } + Preferences.Section(label: { Text(LocalizedStringKey("Keyboard Shortcuts:")) }) { + HStack(alignment: .top, spacing: NSFont.systemFontSize) { + VStack(alignment: .leading) { + Toggle( + LocalizedStringKey("Per-Char Select Mode"), + isOn: $selUsingHotKeySCPC.onChange { + mgrPrefs.usingHotKeySCPC = selUsingHotKeySCPC + } + ) + Toggle( + LocalizedStringKey("Per-Char Associated Phrases"), + isOn: $selUsingHotKeyAssociates.onChange { + mgrPrefs.usingHotKeyAssociates = selUsingHotKeyAssociates + } + ) + Toggle( + LocalizedStringKey("CNS11643 Mode"), + isOn: $selUsingHotKeyCNS.onChange { + mgrPrefs.usingHotKeyCNS = selUsingHotKeyCNS + } + ) + Toggle( + LocalizedStringKey("Force KangXi Writing"), + isOn: $selUsingHotKeyKangXi.onChange { + mgrPrefs.usingHotKeyKangXi = selUsingHotKeyKangXi + } + ) } - ) - Toggle( - LocalizedStringKey("CNS11643 Mode"), - isOn: $selUsingHotKeyCNS.onChange { - mgrPrefs.usingHotKeyCNS = selUsingHotKeyCNS + VStack(alignment: .leading) { + Toggle( + LocalizedStringKey("JIS Shinjitai Output"), + isOn: $selUsingHotKeyJIS.onChange { + mgrPrefs.usingHotKeyJIS = selUsingHotKeyJIS + } + ) + Toggle( + LocalizedStringKey("Half-Width Punctuation Mode"), + isOn: $selUsingHotKeyHalfWidthASCII.onChange { + mgrPrefs.usingHotKeyHalfWidthASCII = selUsingHotKeyHalfWidthASCII + } + ) + Toggle( + LocalizedStringKey("Currency Numeral Output"), + isOn: $selUsingHotKeyCurrencyNumerals.onChange { + mgrPrefs.usingHotKeyCurrencyNumerals = selUsingHotKeyCurrencyNumerals + } + ) } - ) - Toggle( - LocalizedStringKey("Force KangXi Writing"), - isOn: $selUsingHotKeyKangXi.onChange { - mgrPrefs.usingHotKeyKangXi = selUsingHotKeyKangXi - } - ) - Toggle( - LocalizedStringKey("JIS Shinjitai Output"), - isOn: $selUsingHotKeyJIS.onChange { - mgrPrefs.usingHotKeyJIS = selUsingHotKeyJIS - } - ) - Toggle( - LocalizedStringKey("Half-Width Punctuation Mode"), - isOn: $selUsingHotKeyHalfWidthASCII.onChange { - mgrPrefs.usingHotKeyHalfWidthASCII = selUsingHotKeyHalfWidthASCII - } - ) - Toggle( - LocalizedStringKey("Currency Numeral Output"), - isOn: $selUsingHotKeyCurrencyNumerals.onChange { - mgrPrefs.usingHotKeyCurrencyNumerals = selUsingHotKeyCurrencyNumerals - } - ) + } } } } diff --git a/Source/Modules/main.swift b/Source/Modules/main.swift index 8daae0ba..7d2b13fe 100644 --- a/Source/Modules/main.swift +++ b/Source/Modules/main.swift @@ -59,7 +59,7 @@ guard let mainBundleInfoDict = Bundle.main.infoDictionary, let strUpdateInfoSource = mainBundleInfoDict["UpdateInfoEndpoint"] as? String, let urlUpdateInfoSource = URL(string: strUpdateInfoSource) else { - NSLog("Fatal error: Info.plist wrecked It needs to have correct 'UpdateInfoEndpoint' value.") + NSLog("Fatal error: Info.plist wrecked. It needs to have correct 'UpdateInfoEndpoint' value.") exit(-1) } diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 39aea529..7fae8b95 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -115,6 +115,7 @@ "Allow backspace-editing miscomposed readings" = "Allow backspace-editing miscomposed readings"; "Allow boosting / excluding a candidate of single kanji" = "Allow boosting / excluding a candidate of single kanji"; "Allow using Enter key to confirm associated candidate selection" = "Allow using Enter key to confirm associated candidate selection"; +"Alphanumerical Layout:" = "Alphanumerical Layout:"; "Also toggle alphanumerical mode with Left-Shift" = "Also toggle alphanumerical mode with Left-Shift"; "Always drop the previous reading" = "Always drop the previous reading"; "Always show tooltip texts horizontally" = "Always show tooltip texts horizontally"; @@ -142,7 +143,8 @@ "Choose the behavior of (Shift+)Tab key in the candidate window." = "Choose the behavior of (Shift+)Tab key in the candidate window."; "Choose the behavior of Shift+Letter key with letter inputs." = "Choose the behavior of Shift+Letter key with letter inputs."; "Choose the cursor position where you want to list possible candidates." = "Choose the cursor position where you want to list possible candidates."; -"Choose the macOS-level basic keyboard layout." = "Choose the macOS-level basic keyboard layout."; +"Choose the macOS-level alphanumerical keyboard layout. This setting is for the alphanumerical mode toggled by Shift key." = "Choose the macOS-level alphanumerical keyboard layout. This setting is for the alphanumerical mode toggled by Shift key."; +"Choose the macOS-level basic keyboard layout. Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "Choose the macOS-level basic keyboard layout. Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only."; "Choose the phonetic layout for Mandarin parser." = "Choose the phonetic layout for Mandarin parser."; "Choose your desired user data folder path. Will be omitted if invalid." = "Choose your desired user data folder path. Will be omitted if invalid."; "Choose your preferred layout of the candidate window." = "Choose your preferred layout of the candidate window."; @@ -190,7 +192,6 @@ "Keyboard" = "Keyboard"; "Misc Settings:" = "Misc Settings:"; "MiTAC" = "MiTAC"; -"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only."; "Note: The “Delete ⌫” key on Mac keyboard is named as “BackSpace ⌫” here in order to distinguish the real “Delete ⌦” key from full-sized desktop keyboards. If you want to use the real “Delete ⌦” key on a Mac keyboard with no numpad equipped, you have to press “Fn+⌫” instead." = "Note: The “Delete ⌫” key on Mac keyboard is named as “BackSpace ⌫” here in order to distinguish the real “Delete ⌦” key from full-sized desktop keyboards. If you want to use the real “Delete ⌦” key on a Mac keyboard with no numpad equipped, you have to press “Fn+⌫” instead."; "Only override the intonation of the previous reading if different" = "Only override the intonation of the previous reading if different"; "Only use this with known Chromium-based browsers" = "Only use this with known Chromium-based browsers"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 39aea529..7fae8b95 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -115,6 +115,7 @@ "Allow backspace-editing miscomposed readings" = "Allow backspace-editing miscomposed readings"; "Allow boosting / excluding a candidate of single kanji" = "Allow boosting / excluding a candidate of single kanji"; "Allow using Enter key to confirm associated candidate selection" = "Allow using Enter key to confirm associated candidate selection"; +"Alphanumerical Layout:" = "Alphanumerical Layout:"; "Also toggle alphanumerical mode with Left-Shift" = "Also toggle alphanumerical mode with Left-Shift"; "Always drop the previous reading" = "Always drop the previous reading"; "Always show tooltip texts horizontally" = "Always show tooltip texts horizontally"; @@ -142,7 +143,8 @@ "Choose the behavior of (Shift+)Tab key in the candidate window." = "Choose the behavior of (Shift+)Tab key in the candidate window."; "Choose the behavior of Shift+Letter key with letter inputs." = "Choose the behavior of Shift+Letter key with letter inputs."; "Choose the cursor position where you want to list possible candidates." = "Choose the cursor position where you want to list possible candidates."; -"Choose the macOS-level basic keyboard layout." = "Choose the macOS-level basic keyboard layout."; +"Choose the macOS-level alphanumerical keyboard layout. This setting is for the alphanumerical mode toggled by Shift key." = "Choose the macOS-level alphanumerical keyboard layout. This setting is for the alphanumerical mode toggled by Shift key."; +"Choose the macOS-level basic keyboard layout. Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "Choose the macOS-level basic keyboard layout. Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only."; "Choose the phonetic layout for Mandarin parser." = "Choose the phonetic layout for Mandarin parser."; "Choose your desired user data folder path. Will be omitted if invalid." = "Choose your desired user data folder path. Will be omitted if invalid."; "Choose your preferred layout of the candidate window." = "Choose your preferred layout of the candidate window."; @@ -190,7 +192,6 @@ "Keyboard" = "Keyboard"; "Misc Settings:" = "Misc Settings:"; "MiTAC" = "MiTAC"; -"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only."; "Note: The “Delete ⌫” key on Mac keyboard is named as “BackSpace ⌫” here in order to distinguish the real “Delete ⌦” key from full-sized desktop keyboards. If you want to use the real “Delete ⌦” key on a Mac keyboard with no numpad equipped, you have to press “Fn+⌫” instead." = "Note: The “Delete ⌫” key on Mac keyboard is named as “BackSpace ⌫” here in order to distinguish the real “Delete ⌦” key from full-sized desktop keyboards. If you want to use the real “Delete ⌦” key on a Mac keyboard with no numpad equipped, you have to press “Fn+⌫” instead."; "Only override the intonation of the previous reading if different" = "Only override the intonation of the previous reading if different"; "Only use this with known Chromium-based browsers" = "Only use this with known Chromium-based browsers"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 0e969efb..fecd955d 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -115,6 +115,7 @@ "Allow backspace-editing miscomposed readings" = "効かぬ音読みを BackSpace で再編集"; "Allow boosting / excluding a candidate of single kanji" = "即排除/即最優先にできる候補の文字数の最低限は1字とする"; "Allow using Enter key to confirm associated candidate selection" = "Enter キーを連想語彙候補の確認のために使う"; +"Alphanumerical Layout:" = "英数キーボード:"; "Also toggle alphanumerical mode with Left-Shift" = "左側の Shift キーでも英数入力モードの切り替え"; "Always drop the previous reading" = "カーソルの後部の音読みを常に削除する"; "Always show tooltip texts horizontally" = "ヒントを常に横書きにする"; @@ -142,7 +143,8 @@ "Choose the behavior of (Shift+)Tab key in the candidate window." = "入力候補陳列での (Shift+)Tab キーの輪番切替対象をご指定ください。"; "Choose the behavior of Shift+Letter key with letter inputs." = "Shift+文字キーの行為をご指定ください。"; "Choose the cursor position where you want to list possible candidates." = "カーソルはどこで入力候補を呼び出すかとご指定ださい。"; -"Choose the macOS-level basic keyboard layout." = "macOS 基礎キーボード配置をご指定ください。"; +"Choose the macOS-level alphanumerical keyboard layout. This setting is for the alphanumerical mode toggled by Shift key." = "macOS 英数キーボード配置をご指定ください。「Shift キーで切り替える英数入力モード」に使われる配置である。"; +"Choose the macOS-level basic keyboard layout. Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "macOS 基礎キーボード配置をご指定ください。QWERTY 以外の英数キーボードは弁音以外の配列に不適用。"; "Choose the phonetic layout for Mandarin parser." = "共通語分析器の注音配列をご指定ください。"; "Choose your desired user data folder path. Will be omitted if invalid." = "欲しがるユーザー辞書保存先をご指定ください。無効なる保存先設定は省かれる。"; "Choose your preferred layout of the candidate window." = "入力候補陳列の仕様をご指定ください。"; @@ -190,7 +192,6 @@ "Keyboard" = "配列設定"; "Misc Settings:" = "他の設定:"; "MiTAC" = "神通配列"; -"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "QWERTY 以外の英数キーボードは弁音以外の配列に不適用。"; "Note: The “Delete ⌫” key on Mac keyboard is named as “BackSpace ⌫” here in order to distinguish the real “Delete ⌦” key from full-sized desktop keyboards. If you want to use the real “Delete ⌦” key on a Mac keyboard with no numpad equipped, you have to press “Fn+⌫” instead." = "ご注意:Mac キーボードの「Delete ⌫」キーはここで「BackSpace ⌫」と呼ばれ、それはパソコンの常識としての本物の「Delete ⌦」と区別するためである。もし、テンキーの付いていない Mac キーボードで本物の「Delete ⌦」を使いたければ、代わりに「Fn+⌫」をご使用ください。"; "Only override the intonation of the previous reading if different" = "カーソルの後部の音読みの異なる音調だけを上書きする"; "Only use this with known Chromium-based browsers" = "有名なる Chromium 系ブラウザーだけに、この装置を起用"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 487eec0a..52754d5c 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -115,6 +115,7 @@ "Allow backspace-editing miscomposed readings" = "允许对无效的读音使用 BackSpace 编辑"; "Allow boosting / excluding a candidate of single kanji" = "将可以就地升权/排除的候选字词的最短词长设为单个汉字"; "Allow using Enter key to confirm associated candidate selection" = "允许使用 Enter 确认当前选中的联想词"; +"Alphanumerical Layout:" = "英数键盘布局:"; "Also toggle alphanumerical mode with Left-Shift" = "也允许使用左侧的 Shift 键盘切换英数输入模式"; "Always drop the previous reading" = "始终剔除游标正后方的字音"; "Always show tooltip texts horizontally" = "始终使用横排来显示工具提示视窗"; @@ -142,7 +143,8 @@ "Choose the behavior of (Shift+)Tab key in the candidate window." = "指定 (Shift+)Tab 在选字窗内的轮替操作对象。"; "Choose the behavior of Shift+Letter key with letter inputs." = "指定 Shift+字母键 的行为。"; "Choose the cursor position where you want to list possible candidates." = "请选择用以触发选字的游标相对位置。"; -"Choose the macOS-level basic keyboard layout." = "请选择 macOS 基础键盘布局。"; +"Choose the macOS-level alphanumerical keyboard layout. This setting is for the alphanumerical mode toggled by Shift key." = "请选择 macOS 英数键盘布局。该布局用于以 Shift 切换至的英数输入模式。"; +"Choose the macOS-level basic keyboard layout. Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "请选择 macOS 基础键盘布局。QWERTY 以外的英数布局是为了拼音排列使用者而准备的。"; "Choose the phonetic layout for Mandarin parser." = "请指定普通话/国音分析器所使用的注音排列。"; "Choose your desired user data folder path. Will be omitted if invalid." = "请在此指定您想指定的使用者语汇档案目录。无效值会被忽略。"; "Choose your preferred layout of the candidate window." = "选择您所偏好的候选字窗布局。"; @@ -190,7 +192,6 @@ "Keyboard" = "键盘设定"; "Misc Settings:" = "杂项:"; "MiTAC" = "神通排列"; -"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "QWERTY 以外的英数布局是为了拼音排列使用者而准备的。"; "Note: The “Delete ⌫” key on Mac keyboard is named as “BackSpace ⌫” here in order to distinguish the real “Delete ⌦” key from full-sized desktop keyboards. If you want to use the real “Delete ⌦” key on a Mac keyboard with no numpad equipped, you have to press “Fn+⌫” instead." = "注意:Mac 键盘的「Delete ⌫」键在此被称作「BackSpace 退格键 ⌫」以与 PC 键盘的真正的「Delete ⌦」键彼此区分开。若您想在没有数字小键盘的 Mac 电脑上使用真正的「Delete ⌦」按键的话,请改用「Fn+⌫」。"; "Only override the intonation of the previous reading if different" = "仅在键入的声调与游标正后方的字音不同时,尝试覆写"; "Only use this with known Chromium-based browsers" = "仅针对知名的 Chromium 核心的浏览器启用该措施"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 1886dff6..e681e0d5 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -115,6 +115,7 @@ "Allow backspace-editing miscomposed readings" = "允許對無效的讀音使用 BackSpace 編輯"; "Allow boosting / excluding a candidate of single kanji" = "將可以就地升權/排除的候選字詞的最短詞長設為單個漢字"; "Allow using Enter key to confirm associated candidate selection" = "允許使用 Enter 確認當前選中的聯想詞"; +"Alphanumerical Layout:" = "英數鍵盤佈局:"; "Also toggle alphanumerical mode with Left-Shift" = "也允許使用左側的 Shift 鍵盤切換英數輸入模式"; "Always drop the previous reading" = "始終剔除游標正後方的字音"; "Always show tooltip texts horizontally" = "始終使用橫排來顯示工具提示視窗"; @@ -142,7 +143,8 @@ "Choose the behavior of (Shift+)Tab key in the candidate window." = "指定 (Shift+)Tab 在選字窗內的輪替操作對象。"; "Choose the behavior of Shift+Letter key with letter inputs." = "指定 Shift+字母鍵 的行為。"; "Choose the cursor position where you want to list possible candidates." = "請選擇用以觸發選字的游標相對位置。"; -"Choose the macOS-level basic keyboard layout." = "請選擇 macOS 基礎鍵盤佈局。"; +"Choose the macOS-level alphanumerical keyboard layout. This setting is for the alphanumerical mode toggled by Shift key." = "請選擇 macOS 英數鍵盤佈局。該佈局用於以 Shift 切換至的英數輸入模式。"; +"Choose the macOS-level basic keyboard layout. Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "請選擇 macOS 基礎鍵盤佈局。QWERTY 以外的英數佈局是為了拼音排列使用者而準備的。"; "Choose the phonetic layout for Mandarin parser." = "請指定普通話/國音分析器所使用的注音排列。"; "Choose your desired user data folder path. Will be omitted if invalid." = "請在此指定您想指定的使用者語彙檔案目錄。無效值會被忽略。"; "Choose your preferred layout of the candidate window." = "選擇您所偏好的候選字窗佈局。"; @@ -190,7 +192,6 @@ "Keyboard" = "鍵盤設定"; "Misc Settings:" = "雜項:"; "MiTAC" = "神通排列"; -"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "QWERTY 以外的英數佈局是為了拼音排列使用者而準備的。"; "Note: The “Delete ⌫” key on Mac keyboard is named as “BackSpace ⌫” here in order to distinguish the real “Delete ⌦” key from full-sized desktop keyboards. If you want to use the real “Delete ⌦” key on a Mac keyboard with no numpad equipped, you have to press “Fn+⌫” instead." = "注意:Mac 鍵盤的「Delete ⌫」鍵在此被稱作「BackSpace 退格鍵 ⌫」以與 PC 鍵盤的真正的「Delete ⌦」鍵彼此區分開。若您想在沒有數字小鍵盤的 Mac 電腦上使用真正的「Delete ⌦」按鍵的話,請改用「Fn+⌫」。"; "Only override the intonation of the previous reading if different" = "僅在鍵入的聲調與游標正後方的字音不同時,嘗試覆寫"; "Only use this with known Chromium-based browsers" = "僅針對知名的 Chromium 核心的瀏覽器啟用該措施"; diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 4a8d8a39..0976b613 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -1,8 +1,8 @@ - + - + diff --git a/Update-Info.plist b/Update-Info.plist index bbc8dcbb..38292138 100644 --- a/Update-Info.plist +++ b/Update-Info.plist @@ -5,7 +5,7 @@ CFBundleShortVersionString 2.6.0 CFBundleVersion - 2601 + 2602 UpdateInfoEndpoint https://gitee.com/vchewing/vChewing-macOS/raw/main/Update-Info.plist UpdateInfoSite diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index e1d8a804..419795f1 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -220,7 +220,7 @@ 5B175FFA28C5CDDC0078D1B4 /* IMKHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMKHelper.swift; sourceTree = ""; }; 5B18BA6F27C7BD8B0056EB19 /* LICENSE-CHS.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "LICENSE-CHS.txt"; sourceTree = ""; }; 5B18BA7027C7BD8B0056EB19 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - 5B18BA7127C7BD8B0056EB19 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 5B18BA7127C7BD8B0056EB19 /* README-CHS.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "README-CHS.md"; sourceTree = ""; }; 5B18BA7227C7BD8B0056EB19 /* LICENSE.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE.txt; sourceTree = ""; }; 5B18BA7327C7BD8C0056EB19 /* LICENSE-JPN.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "LICENSE-JPN.txt"; sourceTree = ""; }; 5B18BA7427C7BD8C0056EB19 /* LICENSE-CHT.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "LICENSE-CHT.txt"; sourceTree = ""; }; @@ -259,7 +259,7 @@ 5B62A34027AE7CD900A19448 /* ctlCandidate.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = ctlCandidate.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; 5B62A34527AE7CD900A19448 /* NotifierController.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = NotifierController.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; 5B630A3B28CC97020010D076 /* ctlPopupCompositionBuffer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ctlPopupCompositionBuffer.swift; sourceTree = ""; }; - 5B65B919284D0185007C558B /* README-CHT.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "README-CHT.md"; sourceTree = ""; }; + 5B65B919284D0185007C558B /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 5B6C141128A9D4B30098ADF8 /* ctlInputMethod_Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ctlInputMethod_Common.swift; sourceTree = ""; }; 5B73FB5427B2BD6900E9BF49 /* PhraseEditor-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "PhraseEditor-Info.plist"; path = "UserPhraseEditor/PhraseEditor-Info.plist"; sourceTree = SOURCE_ROOT; }; 5B73FB5F27B2BE1300E9BF49 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -439,8 +439,8 @@ 5B18BA7427C7BD8C0056EB19 /* LICENSE-CHT.txt */, 5B18BA7327C7BD8C0056EB19 /* LICENSE-JPN.txt */, 5B18BA7227C7BD8B0056EB19 /* LICENSE.txt */, - 5B18BA7127C7BD8B0056EB19 /* README.md */, - 5B65B919284D0185007C558B /* README-CHT.md */, + 5B18BA7127C7BD8B0056EB19 /* README-CHS.md */, + 5B65B919284D0185007C558B /* README.md */, ); name = MiscRootFiles; sourceTree = ""; @@ -1483,7 +1483,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2601; + CURRENT_PROJECT_VERSION = 2602; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -1522,7 +1522,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2601; + CURRENT_PROJECT_VERSION = 2602; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -1560,7 +1560,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2601; + CURRENT_PROJECT_VERSION = 2602; DEAD_CODE_STRIPPING = YES; ENABLE_HARDENED_RUNTIME = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1612,7 +1612,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2601; + CURRENT_PROJECT_VERSION = 2602; DEAD_CODE_STRIPPING = YES; ENABLE_HARDENED_RUNTIME = YES; ENABLE_NS_ASSERTIONS = NO; @@ -1746,7 +1746,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2601; + CURRENT_PROJECT_VERSION = 2602; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; @@ -1805,7 +1805,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2601; + CURRENT_PROJECT_VERSION = 2602; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; @@ -1852,7 +1852,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2601; + CURRENT_PROJECT_VERSION = 2602; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = YES; @@ -1896,7 +1896,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2601; + CURRENT_PROJECT_VERSION = 2602; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = YES;