From 0c96fc7d367f8134a55e7ff215c44c6efb7d75ce Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 11 Feb 2022 13:31:56 +0800 Subject: [PATCH] i18n // Localizing the category names in the symbol menu. --- .../ControllerModules/InputState.swift | 46 +++++++++++++------ .../Resources/Base.lproj/Localizable.strings | 17 +++++++ Source/Resources/en.lproj/Localizable.strings | 17 +++++++ Source/Resources/ja.lproj/Localizable.strings | 17 +++++++ .../zh-Hans.lproj/Localizable.strings | 17 +++++++ .../zh-Hant.lproj/Localizable.strings | 17 +++++++ 6 files changed, 116 insertions(+), 15 deletions(-) diff --git a/Source/Modules/ControllerModules/InputState.swift b/Source/Modules/ControllerModules/InputState.swift index 6bafd8b3..94f37529 100644 --- a/Source/Modules/ControllerModules/InputState.swift +++ b/Source/Modules/ControllerModules/InputState.swift @@ -343,22 +343,38 @@ class InputState: NSObject { super.init() } + @objc static let catCommonSymbols = String(format: NSLocalizedString("catCommonSymbols", comment: "")) + @objc static let catHoriBrackets = String(format: NSLocalizedString("catHoriBrackets", comment: "")) + @objc static let catVertBrackets = String(format: NSLocalizedString("catVertBrackets", comment: "")) + @objc static let catGreekLetters = String(format: NSLocalizedString("catGreekLetters", comment: "")) + @objc static let catMathSymbols = String(format: NSLocalizedString("catMathSymbols", comment: "")) + @objc static let catCurrencyUnits = String(format: NSLocalizedString("catCurrencyUnits", comment: "")) + @objc static let catSpecialSymbols = String(format: NSLocalizedString("catSpecialSymbols", comment: "")) + @objc static let catUnicodeSymbols = String(format: NSLocalizedString("catUnicodeSymbols", comment: "")) + @objc static let catCircledKanjis = String(format: NSLocalizedString("catCircledKanjis", comment: "")) + @objc static let catCircledKataKana = String(format: NSLocalizedString("catCircledKataKana", comment: "")) + @objc static let catBracketKanjis = String(format: NSLocalizedString("catBracketKanjis", comment: "")) + @objc static let catSingleTableLines = String(format: NSLocalizedString("catSingleTableLines", comment: "")) + @objc static let catDoubleTableLines = String(format: NSLocalizedString("catDoubleTableLines", comment: "")) + @objc static let catFillingBlocks = String(format: NSLocalizedString("catFillingBlocks", comment: "")) + @objc static let catLineSegments = String(format: NSLocalizedString("catLineSegments", comment: "")) + @objc static let root: SymbolNode = SymbolNode("/", [ SymbolNode("`"), - SymbolNode("常用", symbols:",、。.?!;:‧‥﹐﹒˙·‘’“”〝〞‵′〃~$%@&#*"), - SymbolNode("橫括", symbols:"()「」〔〕{}〈〉『』《》【】﹙﹚﹝﹞﹛﹜"), - SymbolNode("縱括", symbols:"︵︶﹁﹂︹︺︷︸︿﹀﹃﹄︽︾︻︼"), - SymbolNode("希臘", symbols:"αβγδεζηθικλμνξοπρστυφχψωΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ"), - SymbolNode("數學", symbols:"+-×÷=≠≒∞±√<>﹤﹥≦≧∩∪ˇ⊥∠∟⊿㏒㏑∫∮∵∴╳﹢"), - SymbolNode("貨幣", symbols:"$€¥¢£₽₨₩฿₺₮₱₭₴₦৲৳૱௹﷼₹₲₪₡₫៛₵₢₸₤₳₥₠₣₰₧₯₶₷"), - SymbolNode("特殊", symbols:"↑↓←→↖↗↙↘↺⇧⇩⇦⇨⇄⇆⇅⇵↻◎○●⊕⊙※△▲☆★◇◆□■▽▼§¥〒¢£♀♂↯"), - SymbolNode("萬國", symbols:"♨☀☁☂☃♠♥♣♦♩♪♫♬☺☻"), - SymbolNode("圈字", symbols:"㊟㊞㊚㊛㊊㊋㊌㊍㊎㊏㊐㊑㊒㊓㊔㊕㊖㊗︎㊘㊙︎㊜㊝㊠㊡㊢㊣㊤㊥㊦㊧㊨㊩㊪㊫㊬㊭㊮㊯㊰🈚︎🈯︎"), - SymbolNode("圈假", symbols:"㋐㋑㋒㋓㋔㋕㋖㋗㋘㋙㋚㋛㋜㋝㋞㋟㋠㋡㋢㋣㋤㋥㋦㋧㋨㋩㋪㋫㋬㋭㋮㋯㋰㋱㋲㋳㋴㋵㋶㋷㋸㋹㋺㋻㋼㋾"), - SymbolNode("括字", symbols:"㈪㈫㈬㈭㈮㈯㈰㈱㈲㈳㈴㈵㈶㈷㈸㈹㈺㈻㈼㈽㈾㈿㉀㉁㉂㉃"), - SymbolNode("單線", symbols:"├─┼┴┬┤┌┐╞═╪╡│▕└┘╭╮╰╯"), - SymbolNode("雙線", symbols:"╔╦╗╠═╬╣╓╥╖╒╤╕║╚╩╝╟╫╢╙╨╜╞╪╡╘╧╛"), - SymbolNode("填色", symbols:"_ˍ▁▂▃▄▅▆▇█▏▎▍▌▋▊▉◢◣◥◤"), - SymbolNode("線段", symbols:"﹣﹦≡|∣∥–︱—︳╴¯ ̄﹉﹊﹍﹎﹋﹌﹏︴∕﹨╱╲/\"), + SymbolNode(catCommonSymbols, symbols:",、。.?!;:‧‥﹐﹒˙·‘’“”〝〞‵′〃~$%@&#*"), + SymbolNode(catHoriBrackets, symbols:"()「」〔〕{}〈〉『』《》【】﹙﹚﹝﹞﹛﹜"), + SymbolNode(catVertBrackets, symbols:"︵︶﹁﹂︹︺︷︸︿﹀﹃﹄︽︾︻︼"), + SymbolNode(catGreekLetters, symbols:"αβγδεζηθικλμνξοπρστυφχψωΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ"), + SymbolNode(catMathSymbols, symbols:"+-×÷=≠≒∞±√<>﹤﹥≦≧∩∪ˇ⊥∠∟⊿㏒㏑∫∮∵∴╳﹢"), + SymbolNode(catCurrencyUnits, symbols:"$€¥¢£₽₨₩฿₺₮₱₭₴₦৲৳૱௹﷼₹₲₪₡₫៛₵₢₸₤₳₥₠₣₰₧₯₶₷"), + SymbolNode(catSpecialSymbols, symbols:"↑↓←→↖↗↙↘↺⇧⇩⇦⇨⇄⇆⇅⇵↻◎○●⊕⊙※△▲☆★◇◆□■▽▼§¥〒¢£♀♂↯"), + SymbolNode(catUnicodeSymbols, symbols:"♨☀☁☂☃♠♥♣♦♩♪♫♬☺☻"), + SymbolNode(catCircledKanjis, symbols:"㊟㊞㊚㊛㊊㊋㊌㊍㊎㊏㊐㊑㊒㊓㊔㊕㊖㊗︎㊘㊙︎㊜㊝㊠㊡㊢㊣㊤㊥㊦㊧㊨㊩㊪㊫㊬㊭㊮㊯㊰🈚︎🈯︎"), + SymbolNode(catCircledKataKana, symbols:"㋐㋑㋒㋓㋔㋕㋖㋗㋘㋙㋚㋛㋜㋝㋞㋟㋠㋡㋢㋣㋤㋥㋦㋧㋨㋩㋪㋫㋬㋭㋮㋯㋰㋱㋲㋳㋴㋵㋶㋷㋸㋹㋺㋻㋼㋾"), + SymbolNode(catBracketKanjis, symbols:"㈪㈫㈬㈭㈮㈯㈰㈱㈲㈳㈴㈵㈶㈷㈸㈹㈺㈻㈼㈽㈾㈿㉀㉁㉂㉃"), + SymbolNode(catSingleTableLines, symbols:"├─┼┴┬┤┌┐╞═╪╡│▕└┘╭╮╰╯"), + SymbolNode(catDoubleTableLines, symbols:"╔╦╗╠═╬╣╓╥╖╒╤╕║╚╩╝╟╫╢╙╨╜╞╪╡╘╧╛"), + SymbolNode(catFillingBlocks, symbols:"_ˍ▁▂▃▄▅▆▇█▏▎▍▌▋▊▉◢◣◥◤"), + SymbolNode(catLineSegments, symbols:"﹣﹦≡|∣∥–︱—︳╴¯ ̄﹉﹊﹍﹎﹋﹌﹏︴∕﹨╱╲/\"), ]) } diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index c90c43f8..30b77319 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -47,3 +47,20 @@ "zh-Hant" = "Traditional Chinese"; "ja" = "Japanese"; "Apple Zhuyin Bopomofo" = "Apple Zhuyin Bopomofo"; + +// The followings are the category names used in the Symbol menu. +"catCommonSymbols" = "CommonSymbols"; +"catHoriBrackets" = "HorizontalBrackets"; +"catVertBrackets" = "VerticalBrackets"; +"catGreekLetters" = "GreekLetters"; +"catMathSymbols" = "MathSymbols"; +"catCurrencyUnits" = "CurrencyUnits"; +"catSpecialSymbols" = "SpecialSymbols"; +"catUnicodeSymbols" = "UnicodeSymbols"; +"catCircledKanjis" = "CircledKanjis"; +"catCircledKataKana" = "CircledKataKana"; +"catBracketKanjis" = "BracketKanjis"; +"catSingleTableLines" = "SingleTableLines"; +"catDoubleTableLines" = "DoubleTableLines"; +"catFillingBlocks" = "FillingBlocks"; +"catLineSegments" = "LineSegments"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index c90c43f8..cbdb3f0e 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -47,3 +47,20 @@ "zh-Hant" = "Traditional Chinese"; "ja" = "Japanese"; "Apple Zhuyin Bopomofo" = "Apple Zhuyin Bopomofo"; + +// The followings are the category names used in the Symbol menu. +"catCommonSymbols" = "CommonSymbols"; +"catHoriBrackets" = "HoriBrackets"; +"catVertBrackets" = "VertBrackets"; +"catGreekLetters" = "GreekLetters"; +"catMathSymbols" = "MathSymbols"; +"catCurrencyUnits" = "CurrencyUnits"; +"catSpecialSymbols" = "SpecialSymbols"; +"catUnicodeSymbols" = "UnicodeSymbols"; +"catCircledKanjis" = "CircledKanjis"; +"catCircledKataKana" = "CircledKataKana"; +"catBracketKanjis" = "BracketKanjis"; +"catSingleTableLines" = "SingleTableLines"; +"catDoubleTableLines" = "DoubleTableLines"; +"catFillingBlocks" = "FillingBlocks"; +"catLineSegments" = "LineSegments"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index a7726e5d..0737caca 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -47,3 +47,20 @@ "zh-Hant" = "繁體中国語"; "ja" = "和語"; "Apple Zhuyin Bopomofo" = "Apple 注音ボポモフォ配列"; + +// The followings are the category names used in the Symbol menu. +"catCommonSymbols" = "常用"; +"catHoriBrackets" = "横括"; +"catVertBrackets" = "縦括"; +"catGreekLetters" = "ギリシャ"; +"catMathSymbols" = "数学"; +"catCurrencyUnits" = "貨幣"; +"catSpecialSymbols" = "特殊"; +"catUnicodeSymbols" = "Unicode"; +"catCircledKanjis" = "丸付漢字"; +"catCircledKataKana" = "丸付仮名"; +"catBracketKanjis" = "括付漢字"; +"catSingleTableLines" = "単線"; +"catDoubleTableLines" = "双線"; +"catFillingBlocks" = "ブロック"; +"catLineSegments" = "線分"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index d913aa74..99908093 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -47,3 +47,20 @@ "zh-Hant" = "繁体中文"; "ja" = "和文"; "Apple Zhuyin Bopomofo" = "Apple 注音键盘布局"; + +// The followings are the category names used in the Symbol menu. +"catCommonSymbols" = "常用"; +"catHoriBrackets" = "横括"; +"catVertBrackets" = "纵括"; +"catGreekLetters" = "希腊"; +"catMathSymbols" = "数学"; +"catCurrencyUnits" = "货币"; +"catSpecialSymbols" = "特殊"; +"catUnicodeSymbols" = "万国"; +"catCircledKanjis" = "圈字"; +"catCircledKataKana" = "圈假"; +"catBracketKanjis" = "括字"; +"catSingleTableLines" = "单线"; +"catDoubleTableLines" = "双线"; +"catFillingBlocks" = "填色"; +"catLineSegments" = "线段"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 8041c5b7..de536115 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -47,3 +47,20 @@ "zh-Hant" = "繁體中文"; "ja" = "和文"; "Apple Zhuyin Bopomofo" = "Apple 注音鍵盤佈局"; + +// The followings are the category names used in the Symbol menu. +"catCommonSymbols" = "常用"; +"catHoriBrackets" = "橫括"; +"catVertBrackets" = "縱括"; +"catGreekLetters" = "希臘"; +"catMathSymbols" = "數學"; +"catCurrencyUnits" = "貨幣"; +"catSpecialSymbols" = "特殊"; +"catUnicodeSymbols" = "萬國"; +"catCircledKanjis" = "圈字"; +"catCircledKataKana" = "圈假"; +"catBracketKanjis" = "括字"; +"catSingleTableLines" = "單線"; +"catDoubleTableLines" = "雙線"; +"catFillingBlocks" = "填色"; +"catLineSegments" = "線段";