From f3ac405f9bd56b89be5f57c7748ff7221a96e447 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 14 Mar 2022 13:37:01 +0800 Subject: [PATCH] ctlIME // Add entry for editing UserSymbolLM data. --- Source/Modules/IMEModules/ctlInputMethod.swift | 7 ++++++- Source/Resources/Base.lproj/Localizable.strings | 2 +- Source/Resources/en.lproj/Localizable.strings | 3 ++- Source/Resources/ja.lproj/Localizable.strings | 3 ++- Source/Resources/zh-Hans.lproj/Localizable.strings | 3 ++- Source/Resources/zh-Hant.lproj/Localizable.strings | 3 ++- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index 5814d597..f38cd4f1 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -111,9 +111,10 @@ class ctlInputMethod: IMKInputController { menu.addItem(withTitle: NSLocalizedString("Edit User Phrases…", comment: ""), action: #selector(openUserPhrases(_:)), keyEquivalent: "") if optionKeyPressed { - menu.addItem(withTitle: NSLocalizedString("Edit Excluded Phrases", comment: ""), action: #selector(openExcludedPhrases(_:)), keyEquivalent: "") + menu.addItem(withTitle: NSLocalizedString("Edit Excluded Phrases…", comment: ""), action: #selector(openExcludedPhrases(_:)), keyEquivalent: "") menu.addItem(withTitle: NSLocalizedString("Edit Phrase Replacement Table…", comment: ""), action: #selector(openPhraseReplacement(_:)), keyEquivalent: "") menu.addItem(withTitle: NSLocalizedString("Edit Associated Phrases…", comment: ""), action: #selector(openAssociatedPhrases(_:)), keyEquivalent: "") + menu.addItem(withTitle: NSLocalizedString("Edit User Symbol & Emoji Data…", comment: ""), action: #selector(openUserSymbols(_:)), keyEquivalent: "") } if (optionKeyPressed || !Preferences.shouldAutoReloadUserDataFiles) { @@ -307,6 +308,10 @@ class ctlInputMethod: IMKInputController { open(userFileAt: mgrLangModel.excludedPhrasesDataPath(keyHandler.inputMode)) } + @objc func openUserSymbols(_ sender: Any?) { + open(userFileAt: mgrLangModel.userSymbolDataPath(keyHandler.inputMode)) + } + @objc func openPhraseReplacement(_ sender: Any?) { open(userFileAt: mgrLangModel.phraseReplacementDataPath(keyHandler.inputMode)) } diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 778638a9..71eaffe8 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "Reload User Phrases"; "Unable to create the user phrase file." = "Unable to create the user phrase file."; "Please check the permission at \"%@\"." = "Please check the permission at \"%@\"."; -"Edit Excluded Phrases" = "Edit Excluded Phrases…"; +"Edit Excluded Phrases…" = "Edit Excluded Phrases…"; "Half-Width Punctuation Mode" = "Half-Width Punctuation Mode"; "\"%@\" length must ≥ 2 for a user phrase." = "\"%@\" length must ≥ 2 for a user phrase."; "\"%@\" length should ≤ %d for a user phrase." = "\"%@\" length should ≤ %d for a user phrase."; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 778638a9..8ee2b1fd 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "Reload User Phrases"; "Unable to create the user phrase file." = "Unable to create the user phrase file."; "Please check the permission at \"%@\"." = "Please check the permission at \"%@\"."; -"Edit Excluded Phrases" = "Edit Excluded Phrases…"; +"Edit Excluded Phrases…" = "Edit Excluded Phrases…"; "Half-Width Punctuation Mode" = "Half-Width Punctuation Mode"; "\"%@\" length must ≥ 2 for a user phrase." = "\"%@\" length must ≥ 2 for a user phrase."; "\"%@\" length should ≤ %d for a user phrase." = "\"%@\" length should ≤ %d for a user phrase."; @@ -51,6 +51,7 @@ "Apple Zhuyin Bopomofo" = "Apple Zhuyin Bopomofo (Standard)"; "Apple Zhuyin Eten" = "Apple Zhuyin Eten"; "Symbol & Emoji Input" = "Symbol & Emoji Input"; +"Edit User Symbol & Emoji Data…" = "Edit User Symbol & Emoji Data…"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "CommonSymbols"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 4dea78fb..55613cb5 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "ユーザー辞書を再び読込む"; "Unable to create the user phrase file." = "ユーザー辞書ファイルの作成は失敗しました。"; "Please check the permission at \"%@\"." = "「%@」に書き出す権限は不足らしい。"; -"Edit Excluded Phrases" = "辞書条目排除表を編集…"; +"Edit Excluded Phrases…" = "辞書条目排除表を編集…"; "Half-Width Punctuation Mode" = "半角句読モード"; "\"%@\" length must ≥ 2 for a user phrase." = "「%@」もう1つ文字のお選びを。"; "\"%@\" length should ≤ %d for a user phrase." = "「%@」文字数過剰で登録不可、%d 文字以内にして下さい。"; @@ -51,6 +51,7 @@ "Apple Zhuyin Bopomofo" = "Apple 注音ボポモフォ配列(大千標準)"; "Apple Zhuyin Eten" = "Apple 注音ボポモフォ配列(倚天伝統)"; "Symbol & Emoji Input" = "符号&絵文字入力"; +"Edit User Symbol & Emoji Data…" = "ユーザー符号&絵文字辞書を編集…"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "常用"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 01ce1d54..fbc66ba3 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "重载自订语汇"; "Unable to create the user phrase file." = "无法创建自订语汇档案。"; "Please check the permission at \"%@\"." = "请检查此处的存取权限:\"%@\"."; -"Edit Excluded Phrases" = "编辑要滤除的语汇…"; +"Edit Excluded Phrases…" = "编辑要滤除的语汇…"; "Half-Width Punctuation Mode" = "半角标点模式"; "\"%@\" length must ≥ 2 for a user phrase." = "「%@」字数不足以自订语汇。"; "\"%@\" length should ≤ %d for a user phrase." = "「%@」字数超过 %d、无法自订。"; @@ -51,6 +51,7 @@ "Apple Zhuyin Bopomofo" = "Apple 标准注音键盘布局"; "Apple Zhuyin Eten" = "Apple 倚天注音键盘布局"; "Symbol & Emoji Input" = "符号&绘文字输入"; +"Edit User Symbol & Emoji Data…" = "编辑自订符号&绘文字资料…"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "常用"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index dd6aec31..a45ea0ce 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "重載自訂語彙"; "Unable to create the user phrase file." = "無法創建自訂語彙檔案。"; "Please check the permission at \"%@\"." = "請檢查此處的存取權限:\"%@\"."; -"Edit Excluded Phrases" = "編輯要濾除的語彙…"; +"Edit Excluded Phrases…" = "編輯要濾除的語彙…"; "Half-Width Punctuation Mode" = "半形標點模式"; "\"%@\" length must ≥ 2 for a user phrase." = "「%@」字數不足以自訂語彙。"; "\"%@\" length should ≤ %d for a user phrase." = "「%@」字數超過 %d、無法自訂。"; @@ -51,6 +51,7 @@ "Apple Zhuyin Bopomofo" = "Apple 標準注音鍵盤佈局"; "Apple Zhuyin Eten" = "Apple 倚天注音鍵盤佈局"; "Symbol & Emoji Input" = "符號&繪文字輸入"; +"Edit User Symbol & Emoji Data…" = "編輯自訂符號&繪文字資料…"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "常用";