From e3a775dfa56c18b2202587dc907278274b440665 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 6 Feb 2024 21:30:04 +0800 Subject: [PATCH] PEUI // Fix i18n. --- .../Sources/PhraseEditorUI/PhraseEditorUI.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/vChewing_PhraseEditorUI/Sources/PhraseEditorUI/PhraseEditorUI.swift b/Packages/vChewing_PhraseEditorUI/Sources/PhraseEditorUI/PhraseEditorUI.swift index 92e4f2a4..bbe256f1 100644 --- a/Packages/vChewing_PhraseEditorUI/Sources/PhraseEditorUI/PhraseEditorUI.swift +++ b/Packages/vChewing_PhraseEditorUI/Sources/PhraseEditorUI/PhraseEditorUI.swift @@ -330,7 +330,7 @@ public enum PETerms { public var localized: (String, String) { if self == .locAdd { - return loc.contains("zh") ? ("添入", "") : loc.contains("ja") ? ("記入", "") : ("Add", "") + return loc.prefix(2) == "zh" ? ("添入", "") : loc.prefix(2) == "ja" ? ("記入", "") : ("Add", "") } let rawArray = NSLocalizedString(self.rawValue, comment: "").components(separatedBy: " ") if rawArray.isEmpty { return ("N/A", "N/A") }