diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 6d616b4b..06c200e0 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -1,10 +1,14 @@ -name: Build -on: [push] +name: Build-with-macOS-12 +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] jobs: build: - name: Build - runs-on: macOS-latest + name: Build (macOS 12) + runs-on: macOS-12 env: GIT_SSL_NO_VERIFY: true DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 42543345..63d2c134 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +15,12 @@ - 如果台澎金馬用戶無法註冊 Gitee 的話,請使用 GitLab China 的工單區。 - 還可以使用電郵(理論上最快):shikisuen◎yeah●net +### 我想在小麥注音的基礎上開發新功能,該怎麼開始? + +首先,您得有 Swift 基礎、對設計模式(策略模式與狀態模式)與演算法都有一定的了解。無論是比較上層的使用體驗,還是比較底層的演算法,威注音都僅使用 Swift。 + +威注音倉庫內可能會在未來不久新增與程式架構有關的百科說明文章,但對鐵恨注拼引擎與天權星語彙引擎的架構說明則會擇日放入對應的倉庫的百科內。然而,書寫這些百科,需要花費時間精力。威注音相信專案內已有的針對函式的中文註解應該已經足夠了。 + ## 參與說明: 為了不讓參與者們浪費各自的熱情,特設此文以說明該專案目前最需要協助的地方。 @@ -29,7 +35,7 @@ ## 格式規範: -該專案對源碼格式有規範,且 Swift 與其他 (Obj)C(++) 系語言持不同規範: +該專案對源碼格式有規範: - Swift: 採 [Apple 官方 Swift-Format](https://github.com/apple/swift-format),且施加如下例外修改項目: - `"indentSwitchCaseLabels" : true,` @@ -38,9 +44,6 @@ - `"OnlyOneTrailingClosureArgument" : false,` // SwiftUI 相容 - `"UseTripleSlashForDocumentationComments" : false,` - `"DontRepeatTypeInStaticProperties" : false,` -- (Obj)C(++) 系語言:使用 clang-format 命令、且採 Microsoft 行文規範。 - - 該規範以四個西文半形空格為行縮進單位。 - - 由於今後不會再用這類語言給該倉庫新增內容,所以相關規範就不改動了。 之前,為了節省檔案體積,曾經對 Swift 檔案改採 1-Tab 縮進。然而,這會導致 Gitee 等線上 git 專案管理網站內的顯示變成 8-Space 縮進。於是,該專案對 Swift 檔案又改回了 2-Spaces 縮進。 diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 00000000..5844813b --- /dev/null +++ b/FAQ.md @@ -0,0 +1,78 @@ +# 常見問題解答 + +## 問題回報後的處理 + +### 我提的問題或需求或者 PR,怎麼一直都沒有人處理? + +1. 不是所有的問題或需求都活該得到積極響應。與上游不同,敝專案會在某些問題/需求因自身特性而無法響應之的情況下做出對應的說明、以節約雙方的時間與感情。 + +2. 雖然威注音專案的研發時間投入比上游高出幾個數量級,但也只是偶然。請勿將這種日常視為理所當然,誰都會有因為私事而突然變忙的時候。 + +3. 有時,自己的痛苦,就是源於自己的無能。自己覺得對方不去做的話,「自己學、自己做」可能還真的就是最快的方式,因為反正對方可能到死都不會去做、就是要跟你鬧情緒。「軟體與程式碼是開源的,但專案是私人的」。早一點做出最壞的預期的話,就早一點意識到:自己的情緒管理控制權應該在自己的手中、且管理的方法就是讓自己變得比對方更強。你不需要獲得對方的承認,因為你的勝利在於你比對方創造了更多被公認的有利於社會的價值。 + +## 使用相關 + +### 1. 輸入法選單內的輸入法是灰色的,無法選中。 + +1. macOS 系統終端機內的「加密的鍵盤輸入」選項被啟用了。請點選「終端機」選單,關閉「加密的鍵盤輸入」選項,威注音就會正常出現在輸入法選單上。英文語系的使用者可以從「Terminal -> Secure Keyboard Entry」選單關閉該選項。包括 iTerms 在內的某些副廠終端機模擬軟體也會有類似的功能,請自行排查。 + +2. 你可能需要重新登入,特別是你在對威注音輸入法進行升級或者降級安裝的情況下。 + +### 2. 輸入法選單內出現多個相同的威注音輸入法副本。 + +請立刻重新登入。如果問題仍舊持續存在的話,請用終端機執行: + +```bash +sudo "/Library/Input Methods/vChewing.app/Contents/MacOS/vChewing" uninstall +``` + +這道命令可以將任何安裝到錯誤位置的威注音輸入法移除掉。在這道命令之後,請再次執行最新的威注音的安裝程式。 + +威注音輸入法僅該被安裝到使用者目錄內的「~/Library/Input Methods/」目錄下,這也有助於將威注音輸入法安裝到受公司資安策略管控的電腦上。 + +### 3. 怎樣用非常規手段安裝部署威注音? + +本次以 pkg 的形式發行安裝程式,方便資安管理業者們藉由終端機進行部署。 + + 終端部署可以用這道指令: +```bash +installer -pkg ~/Downloads/vChewing-macOS-?.?.?-unsigned.pkg -target CurrentUserHomeDirectory +``` + +由於只會安裝至使用者目錄內,所以同一台電腦不同使用者需要分別安裝一遍。 + +下述終端命令亦可使下載來的程式從 macOS 門衛檢查隔離區內取出來: +```bash +xattr -dr com.apple.quarantine ~/Downloads/vChewing-macOS-?.?.?-unsigned.pkg +xattr -dr com.apple.quarantine ~/Downloads/vChewingInstaller.app +``` +另請注意 macOS 10 & 11 的所有系統版本均有一處行為故障:pkg 安裝包指定僅裝在使用者目錄下的話,**在 macOS 10 & 11 + 內執行時,仍舊會往總根目錄下安裝,除非您手動點「更改安裝位置」再將那唯一的「安裝只供我使用」再點一遍才可以**。 + +### 4. 有打算支援 Homebrew 等安裝途徑嗎? + +這樣會增大維護成本,所以不會再考慮。 + +### 5. 選字窗位置不對欸。 + +這往往是您在打字時使用的應用程式,並沒有正確地將正確的游標位置告知 IMK、導致輸入法無法得知相關的資訊使然。您在某個應用程式中打字,輸入游標的位置到底在哪裡,一開始只有那個應用程式知道,然後,那個應用程式必須把正確的位置告知輸入法,輸入法才知道應該在什麼位置,顯示像是選字窗這樣的使用者介面元件。某些應用完全沒有認真處理與 macOS 的 IMK 框架有關的內容,所以就通知了輸入法一個奇怪的位置資訊,有時候座標根本就在螢幕大小之外。威注音在使用的 Voltaire MK3 與上游使用的 Voltaire MK2 的判斷方法相同:如果某個應用程式將奇怪的位置(不在任何一個螢幕的範圍內)告知給 IMK,那麼輸入法就會想辦法把選字窗擺在螢幕範圍內最接近的位置。比方說:如果是 y 軸超過了螢幕尺寸,就會改在螢幕的最上方顯示。 + +### 6. 自訂使用者語彙資料該怎麼管理? + +輸入法選單內有相關的選項、允許您開啟使用者語彙資料目錄來自行備份。您也可以藉由輸入法偏好設定來修改這個目錄的位置。修改該目錄的位置的行為並不會自動遷移這些資料。 + +出於研發負擔與使用者體驗管理方面的疑慮,威注音輸入法不打算內建基於 git 的使用者語彙資料版本管理備份功能。如果您有相關的產品需求的話,完全可以自己寫 bash 腳本搭配系統內建的 cron 功能來使用。 + +## 技術相關: + +### 威注音會使用多少系統資源? + +此部分以威注音 v1.7.4 版來說明。 + +在 2018 Intel Mac Mini 以及 2020 年的末代 Intel MacBook Pro 13-inch 機種內使用 Xcode 對威注音做側寫的過程中,我們得到的測試結果是:大約會佔用 110-120 MB 左右的記憶體,平時也大概是這個數。值得注意的是,如果使用者語彙內容體積有所增長的話,對應的記憶體開銷也會有相應的上漲。 + +為什麼會比上游多出幾乎接近 10 倍呢?因為 Swift 對 string 資料的處理就是這樣不經濟。這還是在經過優化處理之後的結果。(威注音在 1.5.4 版內部測試的時候,語言模組體系剛剛 Swift 化,記憶體開銷是 700MB。)我們能得出的對 Swift 而言的最佳處理方案就是使用 plist 格式的原廠語彙資料,這樣能夠兼顧十年前的舊機種的 CPU 算力。假如只照顧最近三年以來的機種的話,還可以換用另一種算法、來將記憶體開銷縮減至 80MB 以內。 + +得益於威注音的純 Swift 化,平常處理每個按鍵事件都可以在毫秒級別的時間完成。 + +$ EOF. diff --git a/Installer/AppDelegate.swift b/Installer/AppDelegate.swift index efcae665..a564c7c6 100644 --- a/Installer/AppDelegate.swift +++ b/Installer/AppDelegate.swift @@ -144,7 +144,7 @@ class AppDelegate: NSWindowController, NSApplicationDelegate { if elapsed >= kTranslocationRemovalDeadline { timer.invalidate() window?.endSheet(progressSheet, returnCode: .cancel) - } else if readonlyAccessCheckGPR(kTargetPartialPath) == false { + } else if isAppBundleTranslocated(atPath: kTargetPartialPath) == false { progressIndicator.doubleValue = 1.0 timer.invalidate() window?.endSheet(progressSheet, returnCode: .continue) @@ -163,7 +163,7 @@ class AppDelegate: NSWindowController, NSApplicationDelegate { } let shouldWaitForTranslocationRemoval = - readonlyAccessCheckGPR(kTargetPartialPath) + isAppBundleTranslocated(atPath: kTargetPartialPath) && (window?.responds(to: #selector(NSWindow.beginSheet(_:completionHandler:))) ?? false) // 將既存輸入法扔到垃圾桶內 @@ -359,10 +359,25 @@ class AppDelegate: NSWindowController, NSApplicationDelegate { NSApp.terminate(self) } - // Determines if an app is translocated by Gatekeeper to a randomized path + // Determines if an app is translocated by Gatekeeper to a randomized path. // See https://weblog.rogueamoeba.com/2016/06/29/sierra-and-gatekeeper-path-randomization/ - // Theoretically, if the path is a randomized path then it cannot be writable to FileManager. - func readonlyAccessCheckGPR(_ bundle: String) -> Bool { - !FileManager.default.isWritableFile(atPath: (bundle as NSString).expandingTildeInPath) + // Originally written by Zonble Yang in Objective-C (MIT License). + // Swiftified by: Rob Mayoff. Ref: https://forums.swift.org/t/58719/5 + func isAppBundleTranslocated(atPath bundlePath: String) -> Bool { + var entryCount = getfsstat(nil, 0, 0) + var entries: [statfs] = .init(repeating: .init(), count: Int(entryCount)) + let absPath = (bundlePath as NSString).expandingTildeInPath.cString(using: .utf8) + entryCount = getfsstat(&entries, entryCount * Int32(MemoryLayout.stride), MNT_NOWAIT) + for entry in entries.prefix(Int(entryCount)) { + let isMatch = withUnsafeBytes(of: entry.f_mntfromname) { mntFromName in + strcmp(absPath, mntFromName.baseAddress) == 0 + } + if isMatch { + var stat = statfs() + let rc = statfs(absPath, &stat) + return rc == 0 + } + } + return false } } diff --git a/README-CHT.md b/README-CHT.md index 8621a64e..0c36a3b7 100644 --- a/README-CHT.md +++ b/README-CHT.md @@ -34,9 +34,9 @@ 建置用系統需求: -- 至少 macOS 11 Big Sur & Xcode 13。 - - 原因:Swift 封包管理支援與 Swift 5.5 所需。 - - 我們已經沒有條件測試 macOS 10.15 Catalina & Xcode 12 環境了。硬要在這個環境下編譯的話,可能需要額外安裝[新版 Swift](https://www.swift.org/download/) 才可以。 +- 至少 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 版本的話,我們可能會對此做相容性測試。 @@ -112,16 +112,10 @@ - 中國大陸常用資訊電子術語等常用語,以確保簡體中文母語者在使用輸入法時不會受到審音差異的困擾。 - 其他使用者建議收錄的資料。 -## 格式規範等與參與研發時需要注意的事項 +## 參與研發時的注意事項 -該專案對源碼格式有規範,且 Swift 與其他 (Obj)C(++) 系語言持不同規範。請洽該倉庫內的「[CONTRIBUTING.md](./CONTRIBUTING.md)」檔案。 +歡迎參與威注音的研發。論及相關細則,請洽請洽該倉庫內的「[CONTRIBUTING.md](./CONTRIBUTING.md)」檔案、以及《[常見問題解答](./FAQ.md)》。 -## 其他 - -2022 年六月被公審過的對象是某熊大、而非自稱被情勒的工程師幹話熊二。這就像我這邊打了熊大,但熊二在一旁喊疼喊得最響。超莫名其妙。但熊二分享且親自翻譯的文章不錯,要是早半年就好了。拿出那種文章曬出來給對方看,總比一聲不吭要高效得多。 - -潑到熊大身上的水,熊二嫌髒。熊二不明白,因為熊二不想明白。 - -無論如何,都請不要再提報 bug 給熊大那邊了。你只要期待他們能夠解決你提報的 bug,你就成了他們所遵循的標準當中的罪人。他們會把你提報的客觀存在的 bug 強行用他們的人際交往標準來定性為你的私人需求(哪怕你已經自行解決了相關問題),那麼熊大那邊的案子就事實上已經死透了、不值得被寄以任何希望。至於熊二怎麼想,那都是他自己想出來的。 +敝專案採用了《[貢獻者品行準則承約書 v2.1](./code-of-conduct.md)》。考慮到上游鏈接給出的中文版翻譯與英文原文嚴重不符合的情況(會出現因執法與被執法雙方的認知偏差導致的矛盾,非常容易變成敵我矛盾),敝專案使用了自行翻譯的版本、且新增了一些能促進雙方共識的註解。 $ EOF. diff --git a/README.md b/README.md index bce26d3c..9682c00a 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ 编译用系统需求: -- 至少 macOS 11 Big Sur & Xcode 13。 - - 原因:Swift 封包管理支持与 Swift 5.5 所需。 - - 我们已经没有条件测试 macOS 10.15 Catalina & Xcode 12 环境了。硬要在这个环境下编译的话,可能需要额外安装[新版 Swift](https://www.swift.org/download/) 才可以。 +- 至少 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 版本的话,我们可能会对此做相容性测试。 @@ -112,16 +112,10 @@ - 中国大陆常用资讯电子术语等常用语,以确保简体中文母语者在使用输入法时不会受到审音差异的困扰。 - 其他使用者建议收录的资料。 -## 格式规范等与参与研发时需要注意的事项 +## 参与研发时的注意事项 -该专案对源码格式有规范,且 Swift 与其他 (Obj)C(++) 系语言持不同规范。请洽该仓库内的「[CONTRIBUTING.md](./CONTRIBUTING.md)」档案。 +欢迎参与威注音的研发。论及相关细则,请洽请洽该仓库内的「[CONTRIBUTING.md](./CONTRIBUTING.md)」档案、以及《[常见问题解答](./FAQ.md)》。 -## 其他 - -2022 年六月被公审过的对象是某熊大、而非自称被情勒的工程师幹话熊二。这就像我这边打了熊大,但熊二在一旁喊疼喊得最响。超莫名其妙。但熊二分享且亲自翻译的文章不错,要是早半年就好了。拿出那种文章晒出来给对方看,总比一声不吭要高效得多。 - -泼到熊大身上的水,熊二嫌脏。熊二不明白,因为熊二不想明白。 - -无论如何,都请不要再提报 bug 给熊大那边了。你只要期待他们能够解决你提报的 bug,你就成了他们所遵循的标准当中的罪人。他们会把你提报的客观存在的 bug 强行用他们的人际交往标准来定性为你的私人需求(哪怕你已经自行解决了相关问题),那么熊大那边的案子就事实上已经死透了、不值得被寄以任何希望。至于熊二怎么想,那都是他自己想出来的。 +敝专案采用了《[贡献者品行准则承约书 v2.1](./code-of-conduct.md)》。考虑到上游链接给出的中文版翻译与英文原文严重不符合的情况(会出现因执法与被执法双方的认知偏差导致的矛盾,非常容易变成敌我矛盾),敝专案使用了自行翻译的版本、且新增了一些能促进双方共识的注解。 $ EOF. diff --git a/code-of-conduct.md b/code-of-conduct.md new file mode 100644 index 00000000..bb3fa9aa --- /dev/null +++ b/code-of-conduct.md @@ -0,0 +1,223 @@ +# 貢獻者品行準則承約書 v2.1 + +## 承約內容 + +以成員或貢獻者或領導者之身分,我等承諾致力於將我等之社群環境「去騷擾化」,無論年齡、體型、殘障有無、民族出生、性向、性別生理特徵、性別身分表達、(專業)經驗水準、所受教育水準、社會經濟狀況、所在籍貫、個人外在、種族、宗教信仰、自我性別認同、自我性別修正觀。 + +我等承諾(在舉止與互動方面)致力於一個開放的、溫迎的、有包容性的、健康的社群。 + +## 衡量標準 + +對構建積極之社群環境有利的品行包括但不限於下述: + +* 對他人持共情與親切之態度。 +* 當觀點、意見、Experience(經驗、體驗、感受)相左時,能夠做到尊重。 +* 給出建設性的反饋意見&得體地接受有建設性的反饋意見。 +* 能夠對自己的過錯承擔責任且致歉,吸取教訓。 +* 相比有利於個人的事情而言,更專注於有利於整個社群的事情。 + +無法允許的行為包括但不限於下述: + +* 濫用與人類生殖行為有關的語言或影像表達、以及任何與異性關係行為有關的無效殷勤與調逗引誘。 +* 涉嫌挑釁、辱罵、貶低、人身攻擊、政治攻擊的言行。 +* 公開或私下騷擾(譯者按:包括但不限於連續多次持續的無效主動溝通、或可能會導致對方生活節奏失調的問倒行為)。 +* 在未經許可的情況下曬出他人的個人資訊,包括但不限於電郵地址以及實際住址。 +* 其它的可以被有理有據地充分認定為不符合職人操守的言行。 + +## 執法權責 + +社群領導者們有責任對上述衡量標準在社群內澄釋、實施,且會對任何被他們認定為「不恰當」「涉嫌威脅」「涉嫌冒犯」「有害」的行為做出恰當的、公正的懲戒措施(Corrective Action)。 + +社群領導者們有權且有義務對不符合弊承約書所定之標準的「留言」「源程式碼」「百科編輯內容」「工單」以及其它形式的貢獻內容予以「移除」「編輯」「拒絕」處理,且會在時機恰當的情況下給出與相關版務操作有關的理由。 + +## 執法範圍 + +弊承約書適用於該社群內的任何場合,且也適用於在其它場所內的任何「代表了該社群的」公開言行(比如說用了該社群的官方的電郵地址、官方社群媒體帳號、或者任何在線上或線下舉行的指定授權代表活動)。 + +## 執法 + +符合上述「無法允許的行為」標準的行為可被檢舉至有執法責任的社群領導者(shikisuen◉yeah●net)。所有投訴均會被及時地、公正地審閱、調查。 + +社群領導者全員有義務在任何情況下尊重投訴者的個人私隱與安全。 + +## 執法方針 + +社群領導者們將依照下述「社群影響處置方針」來決定對有違者採取何種懲戒措施: + +### 1. 矯正 + +**社群影響**:使用言行不當或不符合職人操守之言行、抑或是其它在該社群內被排斥(unwelcomed)的言行。 + +**對應懲戒**:由社群領導者私下以書面形式澄釋相關言行不恰當之性質及緣由。或要求公開致歉。 + +**譯者按**:對某些參與者的首次處分可能是警告處分或永久停權(比如對廣告機器人的處分)、而非矯正處分。 + +### 2. 警告處分 + +**社群影響**:一連串的不當行為、或者一次重大違反事件。 + +**對應懲戒**:以警告的形式闡明「如若繼續相關言行的話,會招致怎樣的懲戒後果」。在規定的時間內,被處分者自己不得與被捲入該事件的人士(包括本次施行該懲戒的執法者,但被執法者主動聯絡的情況除外)有任何形式的互動。互動禁止範圍包括該社群之外的任何互動途徑(包括但不限於社群網路)。違反該項規約者可能會招致有期停權或永久停權處分。 + +**譯者按**:此規定可能會激怒被處分的人士。為防止引火燒身,可以在出具此警告處分的同時推薦或責令其閱讀[由 Lee Dohm 撰寫的有關社群管理方法的文章](https://github.com/lee-dohm/community-manager)。管理團隊內的相關的執法者有權在這個時限內拒絕來自被處分者的溝通請求,但必須得讓對方知道自己團隊內部的辦事準則。 + +### 3. 有期停權處分 + +**社群影響**:對社群行為準則有嚴重違反。這也包括了對不當言行的持續。 + +**對應懲戒**:對當事人暫時停權,使得當事人無法在該社群內進行任何形式的互動與交流。在停權期間內,被處分者自己不得與被捲入該事件的人士(包括本次施行該懲戒的執法者,但被執法者主動聯絡的情況除外)有任何形式的(公開或私下的)互動。互動禁止範圍包括該社群之外的任何互動途徑(包括但不限於社群網路)。違反該項規約者可能會招致永久停權處分。 + +### 4. 永久停權處分 + +**社群影響**:表現出有違社群行為準則之行為模式。該特徵包括持續性的「不當言行」「對具體成員的騷擾」「對特定族群有言行暴力傾向或歧視表現」。 + +**對應懲戒**:永久禁止其與該社群的任何公開互動。 + +## 著作權歸屬 + +該品行準則翻譯自《[貢獻者品行準則承約書 (Contributor Covenant Code of Conduct)][homepage]》第 [v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html) 版。 + +「社群影響處置方針」受《[Mozilla’s code of conduct enforcement ladder][Mozilla CoC]》所啟發。 + +有關弊承約書的常見問題的答案,請洽《[常見問題解答](https://www.contributor-covenant.org/faq)》。 + +其它語言翻譯版本可洽:[https://www.contributor-covenant.org/translations][translations]。 + +[v2.1]: (https://www.contributor-covenant.org/version/2/1/code_of_conduct.html) +[homepage]: https://www.contributor-covenant.org +[Mozilla CoC]: https://github.com/mozilla/diversity +[translations]: https://www.contributor-covenant.org/translations + + +--- + +# Contributor Covenant Code of Conduct (v2.1) + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at shikisuen◉yeah●net. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index b25b2717..d1a812e9 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -207,6 +207,7 @@ 5B2DB17127AF8771006D874E /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = Data/Makefile; sourceTree = ""; }; 5B2F2BB3286216A500B8557B /* vChewingTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = vChewingTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 5B30F11227BA568800484E24 /* vChewingKeyLayout.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = vChewingKeyLayout.bundle; sourceTree = ""; }; + 5B312684287800DE001AA720 /* FAQ.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = FAQ.md; sourceTree = ""; }; 5B3133BE280B229700A4A505 /* KeyHandler_States.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = KeyHandler_States.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; 5B3A87BB28597CDB0090E163 /* LMSymbolNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LMSymbolNode.swift; sourceTree = ""; }; 5B407309281672610023DFFF /* lmAssociates.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lineEnding = 0; path = lmAssociates.swift; sourceTree = ""; usesTabs = 0; }; @@ -385,6 +386,7 @@ 5BC2652127E04B7B00700291 /* uninstall.sh */, 5BC447AB2865BEF500EDC323 /* AUTHORS */, 5BE8A8C4281EE65300197741 /* CONTRIBUTING.md */, + 5B312684287800DE001AA720 /* FAQ.md */, 5B18BA6F27C7BD8B0056EB19 /* LICENSE-CHS.txt */, 5B18BA7427C7BD8C0056EB19 /* LICENSE-CHT.txt */, 5B18BA7327C7BD8C0056EB19 /* LICENSE-JPN.txt */,