From 00cc0b1d836b8a8485c17f31ce9d525686cb0e35 Mon Sep 17 00:00:00 2001 From: DanielGevaZA Date: Fri, 30 Aug 2024 10:58:36 +0200 Subject: [PATCH 01/10] Added Temp File Added temp file to make edits to and rewrite the code. Want to keep the old one as a reference. --- .../Hebrew/HEInterfaceVariablesTemp.swift | 9 +++++++ Scribe.xcodeproj/project.pbxproj | 26 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift new file mode 100644 index 00000000..40e6bb24 --- /dev/null +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift @@ -0,0 +1,9 @@ +// +// HEInterfaceVariablesTemp.swift +// Scribe + + + +// Created by Daniel Geva on 2024/08/30. +// + diff --git a/Scribe.xcodeproj/project.pbxproj b/Scribe.xcodeproj/project.pbxproj index b35e7e1e..63ffff5b 100644 --- a/Scribe.xcodeproj/project.pbxproj +++ b/Scribe.xcodeproj/project.pbxproj @@ -198,6 +198,18 @@ D111E9BE27AFE7B200746F92 /* Annotate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E9B927AFE7B200746F92 /* Annotate.swift */; }; D111E9BF27AFE7B200746F92 /* Annotate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E9B927AFE7B200746F92 /* Annotate.swift */; }; D111E9C027AFE7B200746F92 /* Annotate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E9B927AFE7B200746F92 /* Annotate.swift */; }; + D12EB9BA2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9BB2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9BC2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9BD2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9BE2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9BF2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9C02C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9C12C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9C22C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9C32C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9C42C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9C52C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; D1362A39274C106A00C00E48 /* ColorVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D190B240274056D400705659 /* ColorVariables.swift */; }; D15E297F29E41B3B006B2C81 /* FRLanguageData.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = D15E297E29E41B3B006B2C81 /* FRLanguageData.sqlite */; }; D15E298229E41B56006B2C81 /* DELanguageData.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = D15E298129E41B56006B2C81 /* DELanguageData.sqlite */; }; @@ -931,6 +943,7 @@ D111E9A927AFE78600746F92 /* Plural.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Plural.swift; sourceTree = ""; }; D111E9B127AFE79500746F92 /* Translate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Translate.swift; sourceTree = ""; }; D111E9B927AFE7B200746F92 /* Annotate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Annotate.swift; sourceTree = ""; }; + D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HEInterfaceVariablesTemp.swift; sourceTree = ""; }; D1362A37274C040F00C00E48 /* PRIVACY.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = PRIVACY.txt; sourceTree = ""; }; D155AD282BDC6CC20075B18C /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; D15E297E29E41B3B006B2C81 /* FRLanguageData.sqlite */ = {isa = PBXFileReference; lastKnownFileType = file; name = FRLanguageData.sqlite; path = Keyboards/LanguageKeyboards/French/FRLanguageData.sqlite; sourceTree = SOURCE_ROOT; }; @@ -1482,6 +1495,7 @@ children = ( D1CDED7E2A85A05C00098546 /* HECommandVariables.swift */, D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */, + D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */, D1AFDFCA29CA6BF60033BF27 /* HEKeyboardViewController.swift */, D1AFDFCC29CA6BF60033BF27 /* Info.plist */, ); @@ -2126,6 +2140,7 @@ D17193E027AECAA60038660B /* RUInterfaceVariables.swift in Sources */, D1B81D5327BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, D17193D827AECA450038660B /* PTInterfaceVariables.swift in Sources */, + D12EB9C32C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, D17193C427AEAD7D0038660B /* AppStyling.swift in Sources */, D111E9AA27AFE78600746F92 /* Plural.swift in Sources */, D1F0367227AAE12200CD7921 /* InterfaceVariables.swift in Sources */, @@ -2160,6 +2175,7 @@ 38BD214F22D592CA00C6795D /* DEKeyboardViewController.swift in Sources */, D171943A27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378C628F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, + D12EB9BB2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, 30453972293B9E04003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395B293B911C003AE55B /* AppTextStyling.swift in Sources */, D1B81D5527BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, @@ -2222,6 +2238,7 @@ D171942127AECD170038660B /* SVCommandVariables.swift in Sources */, D171943927AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378C528F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, + D12EB9C42C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, 30453970293B9DFF003AE55B /* ToolTipViewTheme.swift in Sources */, 30453959293B911B003AE55B /* AppTextStyling.swift in Sources */, D1B81D5427BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, @@ -2284,6 +2301,7 @@ D171942327AECD170038660B /* SVCommandVariables.swift in Sources */, D171943B27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378C828F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, + D12EB9BA2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, 30453974293B9E05003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395D293B911D003AE55B /* AppTextStyling.swift in Sources */, D1B81D5727BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, @@ -2346,6 +2364,7 @@ D171942527AECD170038660B /* SVCommandVariables.swift in Sources */, D171943D27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378CA28F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, + D12EB9C52C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, 30453976293B9E06003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395F293B911E003AE55B /* AppTextStyling.swift in Sources */, D1B81D5927BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, @@ -2408,6 +2427,7 @@ D171942427AECD170038660B /* SVCommandVariables.swift in Sources */, D171943C27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378C928F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, + D12EB9C02C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, 30453975293B9E06003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395E293B911E003AE55B /* AppTextStyling.swift in Sources */, D1B81D5827BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, @@ -2470,6 +2490,7 @@ D171942627AECD170038660B /* SVCommandVariables.swift in Sources */, D171943E27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378CB28F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, + D12EB9C22C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, 30453977293B9E06003AE55B /* ToolTipViewTheme.swift in Sources */, 30453960293B911F003AE55B /* AppTextStyling.swift in Sources */, D1B81D5A27BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, @@ -2532,6 +2553,7 @@ D1AB5B2829C757A100CCB0C1 /* ESInterfaceVariables.swift in Sources */, D1AB5B2929C757A100CCB0C1 /* SVInterfaceVariables.swift in Sources */, D1AB5B2A29C757A100CCB0C1 /* ScribeColor.swift in Sources */, + D12EB9BC2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, D1AB5B2B29C757A100CCB0C1 /* ToolTipViewTheme.swift in Sources */, D1AB5B2C29C757A100CCB0C1 /* AppTextStyling.swift in Sources */, D1AB5B2D29C757A100CCB0C1 /* ITInterfaceVariables.swift in Sources */, @@ -2594,6 +2616,7 @@ D1AFDF0629CA66D00033BF27 /* ESInterfaceVariables.swift in Sources */, D1AFDF0729CA66D00033BF27 /* SVInterfaceVariables.swift in Sources */, D1AFDF0829CA66D00033BF27 /* ScribeColor.swift in Sources */, + D12EB9BD2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, D1AFDF0929CA66D00033BF27 /* ToolTipViewTheme.swift in Sources */, D1AFDF0A29CA66D00033BF27 /* AppTextStyling.swift in Sources */, D1AFDF0B29CA66D00033BF27 /* ITInterfaceVariables.swift in Sources */, @@ -2656,6 +2679,7 @@ D1AFDF8329CA66F40033BF27 /* ESInterfaceVariables.swift in Sources */, D1AFDF8429CA66F40033BF27 /* SVInterfaceVariables.swift in Sources */, D1AFDF8529CA66F40033BF27 /* ScribeColor.swift in Sources */, + D12EB9BF2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, D1AFDF8629CA66F40033BF27 /* ToolTipViewTheme.swift in Sources */, D1AFDF8729CA66F40033BF27 /* AppTextStyling.swift in Sources */, D1AFDF8829CA66F40033BF27 /* ITInterfaceVariables.swift in Sources */, @@ -2718,6 +2742,7 @@ D1AFDFD929CA6E900033BF27 /* ESInterfaceVariables.swift in Sources */, D1AFDFDA29CA6E900033BF27 /* SVInterfaceVariables.swift in Sources */, D1AFDFDB29CA6E900033BF27 /* ScribeColor.swift in Sources */, + D12EB9C12C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, D1AFDFDC29CA6E900033BF27 /* ToolTipViewTheme.swift in Sources */, D1AFDFDD29CA6E900033BF27 /* AppTextStyling.swift in Sources */, D1AFDFDE29CA6E900033BF27 /* ITInterfaceVariables.swift in Sources */, @@ -2780,6 +2805,7 @@ D1B81D3327BBB6AD0085FE5E /* ESInterfaceVariables.swift in Sources */, D1B81D3527BBB6B50085FE5E /* SVInterfaceVariables.swift in Sources */, CE1378C728F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, + D12EB9BE2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, 30453973293B9E05003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395C293B911D003AE55B /* AppTextStyling.swift in Sources */, D1B81D5627BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, From 215b2913936c389f30e7a9e4332db9c3442098cd Mon Sep 17 00:00:00 2001 From: DanielGevaZA Date: Fri, 30 Aug 2024 11:05:03 +0200 Subject: [PATCH 02/10] Update to Temp Started to add basic required variables and importing UIKit --- .../Hebrew/HEInterfaceVariablesTemp.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift index 40e6bb24..c84867b5 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift @@ -2,8 +2,19 @@ // HEInterfaceVariablesTemp.swift // Scribe +import UIKit + +public enum HEKeyboardConstants { + static let defaultCurrencyKey = "$" + static let currencyKeys = ["$", "€", "£", "¥"] + + // Alternate key vars. + static let keysWithAlternates = [""] + static let keysWithAlternatesLeft = [""] + static let keysWithAlternatesRight = [""] +} + // Created by Daniel Geva on 2024/08/30. // - From caa11fee04ce4726642e32fbcf30712308451db4 Mon Sep 17 00:00:00 2001 From: DanielGevaZA Date: Fri, 30 Aug 2024 11:24:29 +0200 Subject: [PATCH 03/10] Updated Temp Started to add alternate letters --- .../Hebrew/HEInterfaceVariablesTemp.swift | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift index c84867b5..e505bc4a 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift @@ -4,17 +4,42 @@ import UIKit -public enum HEKeyboardConstants { - static let defaultCurrencyKey = "$" - static let currencyKeys = ["$", "€", "£", "¥"] +public enum HebrewKeyboardConstants { + static let defaultCurrencyKey = "₪" + static let currencyKeys = ["₪", "€", "£", "$"] // Alternate key vars. - static let keysWithAlternates = [""] - static let keysWithAlternatesLeft = [""] - static let keysWithAlternatesRight = [""] + // Add "sofit" letters here + static let keysWithAlternates = ["ך","ח", "נ", "צ", "ק", "ת", "פ", "א"] + static let keysWithAlternatesLeft = ["ח", "נ", "פ"] + static let keysWithAlternatesRight = ["צ", "ק", "ת"] + + static let alephAlternateKeys = ["א׳"] + static let memAlternateKeys = ["ם"] + static let nunAlternateKeys = ["ן"] + static let tzadiAlternateKeys = ["ץ"] + static let kafAlternateKeys = ["ק"] + static let kafSofitAlternateKeys = ["ך"] + static let tavAlternateKeys = ["ת"] + static let peySofitAlternateKeys = ["פ׳"] + } - +struct HebrewKeyboardProvider: KeyboardProviderProtocol { + // iPhone keyboard layouts. + + static func genPhoneLetterKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "delete"]) + .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) + .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז"]) + .addRow(["123", "selectKeyboard", "space", "return"]) // "undo", "accent" + .build() + } + + // add rest of iphone keyboards here + +} // Created by Daniel Geva on 2024/08/30. // From a4dff68d0d1309b054624f07af0d47ac596cf677 Mon Sep 17 00:00:00 2001 From: DanielGevaZA Date: Fri, 30 Aug 2024 14:58:41 +0200 Subject: [PATCH 04/10] Edit to Temp Added all the phone keyboards to temp. Including all the correct signs and words. --- .../Hebrew/HEInterfaceVariables.swift | 18 +++++----- .../Hebrew/HEInterfaceVariablesTemp.swift | 34 +++++++++++++++++-- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift index c4dc9ce0..8d7ee20a 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift @@ -19,15 +19,15 @@ import UIKit -public enum HebrewKeyboardConstants { - static let defaultCurrencyKey = "$" - static let currencyKeys = ["$", "€", "£", "¥"] - - // Alternate key vars. - static let keysWithAlternates = [""] - static let keysWithAlternatesLeft = [""] - static let keysWithAlternatesRight = [""] -} +//public enum HebrewKeyboardConstants { +// static let defaultCurrencyKey = "$" +// static let currencyKeys = ["$", "€", "£", "¥"] +// +// // Alternate key vars. +// static let keysWithAlternates = [""] +// static let keysWithAlternatesLeft = [""] +// static let keysWithAlternatesRight = [""] +//} struct HebrewKeyboardProvider: KeyboardProviderProtocol { // iPhone keyboard layouts. diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift index e505bc4a..cfccd20e 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift @@ -27,15 +27,43 @@ public enum HebrewKeyboardConstants { struct HebrewKeyboardProvider: KeyboardProviderProtocol { // iPhone keyboard layouts. - static func genPhoneLetterKeys() -> [[String]] { return KeyboardBuilder() - .addRow(["פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "delete"]) + .addRow(["פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "❌"]) .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז"]) - .addRow(["123", "selectKeyboard", "space", "return"]) // "undo", "accent" + .addRow(["123", "selectKeyboard", "רווח", "הכנס"]) + .build() + } + + static func genPhoneNumberKeys(currencyKey: String) -> [[String]] { + return KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]) + .addRow(["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""]) + .addRow(["#+=", ".", ",", "?", "!", "'", "❌"]) + .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) + .replaceKey(row: 1, column: 6, to: currencyKey) .build() } + + static func genPhoneSymbolKeys(currencyKeys: [String]) -> [[String]] { + let keyboardBuilder = KeyboardBuilder() + .addRow(["[", "]", "{", "}", "#", "%", "^", "*", "+", "="]) + .addRow(["_", "\\", "|", "~", "<", ">", "€", "£", "¥", "·"]) + .addRow(["123", ".", ",", "?", "!", "'", "❌"]) + .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) + + if currencyKeys.count < 3 { + return keyboardBuilder.build() + } else { + return keyboardBuilder + .replaceKey(row: 1, column: 6, to: currencyKeys[0]) + .replaceKey(row: 1, column: 7, to: currencyKeys[1]) + .replaceKey(row: 1, column: 8, to: currencyKeys[2]) + .build() + } + } + // add rest of iphone keyboards here From 5f6243aaf91f41205191df449298a048011c9311 Mon Sep 17 00:00:00 2001 From: DanielGevaZA Date: Fri, 30 Aug 2024 15:01:33 +0200 Subject: [PATCH 05/10] Update to HEInterfaceVariablesTemp Added all the iPad and Larger iPad keyboards with correct signs and button labels --- .../Hebrew/HEInterfaceVariablesTemp.swift | 63 ++++++++++++++++++- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift index cfccd20e..b240cdc8 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift @@ -64,10 +64,67 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { } } + // iPad keyboard layouts. + static func genPadLetterKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"]) + .addRow([",", ".", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "❌"]) + .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) + .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", "הכנס"]) + .addRow(["selectKeyboard", ".?123", "רווח", ".?123", "hideKeyboard"]) + .build() + } + + static func genPadNumberKeys(currencyKey: String) -> [[String]] { + return KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "❌"]) + .addRow(["!", "@", "#", "&", "_", "-", "'", "\"", "(", ")", "הכנס"]) + .addRow(["#+=", "%", "...", "&", ";", ":", "=", "+", "/", "?", "#+="]) + .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) + // .replaceKey(row: 1, column: 4, to: currencyKey) + .build() + } + + static func genPadSymbolKeys(currencyKeys: [String]) -> [[String]] { + let keyboardBuilder = KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "❌"]) + .addRow(["^", "€", "$", "£", "[", "]", "'", "\"", "<", ">", "הכנס"]) + .addRow(["123", "§", "|", "~", "*", "·", "{", "}", "\\", "~", "123"]) + .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) + + if currencyKeys.count < 3 { + return keyboardBuilder.build() + } else { + return keyboardBuilder + .replaceKey(row: 1, column: 1, to: currencyKeys[0]) + .replaceKey(row: 1, column: 2, to: currencyKeys[1]) + .replaceKey(row: 1, column: 3, to: currencyKeys[2]) + .build() + } + } - // add rest of iphone keyboards here - -} + // Expanded iPad keyboard layouts for wider devices. + static func genPadExpandedLetterKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "❌"]) + .addRow([SpecialKeys.indent, "/", "'", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "[", "]", "+"]) + .addRow([SpecialKeys.capsLock, "ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש", ",", "\"", "הכנס"]) + .addRow(["⇧", ";", "ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", ".", "⇧"]) + .addRow(["selectKeyboard", ".?123", "רווח", ".?123", "hideKeyboard"]) + .build() + } + + static func genPadExpandedSymbolKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "❌"]) + .addRow([SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "—"]) + .addRow([SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "€", "הכנס"]) + .addRow(["⇧", "…", "?", "!", "~", "≠", "'", "\"", "_", ",", ".", "-", "⇧"]) + .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) + .build() + } + } + // Created by Daniel Geva on 2024/08/30. // From cbd5f4c710caf9db64d2ed98b97a3cefc20046fb Mon Sep 17 00:00:00 2001 From: DanielGevaZA Date: Fri, 30 Aug 2024 15:24:53 +0200 Subject: [PATCH 06/10] Update HEInterfaceVariablesTemp added the two bottom functions and removed the alternate keys, upon further thought hebrew doesn't require the alternate letters for functioning and can be used without them. We can add them later if needed but as far as i'm aware they arent mandatory --- .../Hebrew/HEInterfaceVariablesTemp.swift | 106 +++++++++++++++--- 1 file changed, 91 insertions(+), 15 deletions(-) diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift index b240cdc8..581f89b4 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift @@ -8,20 +8,6 @@ public enum HebrewKeyboardConstants { static let defaultCurrencyKey = "₪" static let currencyKeys = ["₪", "€", "£", "$"] - // Alternate key vars. - // Add "sofit" letters here - static let keysWithAlternates = ["ך","ח", "נ", "צ", "ק", "ת", "פ", "א"] - static let keysWithAlternatesLeft = ["ח", "נ", "פ"] - static let keysWithAlternatesRight = ["צ", "ק", "ת"] - - static let alephAlternateKeys = ["א׳"] - static let memAlternateKeys = ["ם"] - static let nunAlternateKeys = ["ן"] - static let tzadiAlternateKeys = ["ץ"] - static let kafAlternateKeys = ["ק"] - static let kafSofitAlternateKeys = ["ך"] - static let tavAlternateKeys = ["ת"] - static let peySofitAlternateKeys = ["פ׳"] } @@ -125,6 +111,96 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { } } +/// Gets the keys for the Hebrew keyboard. + + +func getHEKeys() { + guard let userDefaults = UserDefaults(suiteName: "group.be.scri.userDefaultsContainer") else { + fatalError() + } + + var currencyKey = HebrewKeyboardConstants.defaultCurrencyKey + var currencyKeys = HebrewKeyboardConstants.currencyKeys + let dictionaryKey = controllerLanguage + "defaultCurrencySymbol" + + if let currencyValue = userDefaults.string(forKey: dictionaryKey) { + currencyKey = currencyValue + } else { + userDefaults.setValue(currencyKey, forKey: dictionaryKey) + } + if let index = currencyKeys.firstIndex(of: currencyKey) { + currencyKeys.remove(at: index) + } + + if DeviceType.isPhone { + letterKeys = HebrewKeyboardProvider.genPhoneLetterKeys() + numberKeys = HebrewKeyboardProvider.genPhoneNumberKeys(currencyKey: currencyKey) + symbolKeys = HebrewKeyboardProvider.genPhoneSymbolKeys(currencyKeys: currencyKeys) + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) + + leftKeyChars = ["ק", "1", "-", "[", "_"] + rightKeyChars = ["פ", "0", "\"", "=", "·"] + centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } + } else { + // Use the expanded keys layout if the iPad is wide enough and has no home button. + if usingExpandedKeyboard { + letterKeys = HebrewKeyboardProvider.genPadExpandedLetterKeys() + symbolKeys = HebrewKeyboardProvider.genPadExpandedSymbolKeys() + + allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined()) + } else { + letterKeys = HebrewKeyboardProvider.genPadLetterKeys() + numberKeys = HebrewKeyboardProvider.genPadNumberKeys(currencyKey: currencyKey) + symbolKeys = HebrewKeyboardProvider.genPadSymbolKeys(currencyKeys: currencyKeys) + + letterKeys.removeFirst(1) + + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) + } + + leftKeyChars = ["1", "ק"] + rightKeyChars = ["הכנס", "hideKeyboard"] + centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } + } +} + + +func setHEKeyboardLayout() { + getRUKeys() + + currencySymbol = "" + currencySymbolAlternates = roubleAlternateKeys + spaceBar = "" + language = "" + invalidCommandMsg = "" + baseAutosuggestions = ["я", "а", "в"] + numericAutosuggestions = ["в", "и", "я"] + + translateKeyLbl = "" + translatePlaceholder = "" + translatePrompt = commandPromptSpacing + "he -› \(getControllerLanguageAbbr()): " + translatePromptAndCursor = translatePrompt + commandCursor + translatePromptAndPlaceholder = translatePromptAndCursor + " " + translatePlaceholder + translatePromptAndColorPlaceholder = NSMutableAttributedString(string: translatePromptAndPlaceholder) + translatePromptAndColorPlaceholder.setColorForText(textForAttribute: translatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) + + conjugateKeyLbl = "" + conjugatePlaceholder = "" + conjugatePrompt = commandPromptSpacing + "" + conjugatePromptAndCursor = conjugatePrompt + commandCursor + conjugatePromptAndPlaceholder = conjugatePromptAndCursor + " " + conjugatePlaceholder + conjugatePromptAndColorPlaceholder = NSMutableAttributedString(string: conjugatePromptAndPlaceholder) + conjugatePromptAndColorPlaceholder.setColorForText(textForAttribute: conjugatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) + + pluralKeyLbl = "" + pluralPlaceholder = "" + pluralPrompt = commandPromptSpacing + "" + pluralPromptAndCursor = pluralPrompt + commandCursor + pluralPromptAndPlaceholder = pluralPromptAndCursor + " " + pluralPlaceholder + pluralPromptAndColorPlaceholder = NSMutableAttributedString(string: pluralPromptAndPlaceholder) + pluralPromptAndColorPlaceholder.setColorForText(textForAttribute: pluralPlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) + alreadyPluralMsg = "" +} + // Created by Daniel Geva on 2024/08/30. -// From e18c0ab9f81f57fc10a184cf021baa8614538af8 Mon Sep 17 00:00:00 2001 From: DanielGevaZA Date: Fri, 30 Aug 2024 15:49:26 +0200 Subject: [PATCH 07/10] Update HEInterfaceVariablesTemp Added in conjugation, plural and translate. Based off of the Russian and english --- .../Hebrew/HEInterfaceVariablesTemp.swift | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift index 581f89b4..dd6fd44b 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift @@ -1,4 +1,3 @@ -// // HEInterfaceVariablesTemp.swift // Scribe @@ -166,40 +165,40 @@ func getHEKeys() { func setHEKeyboardLayout() { - getRUKeys() + getHEKeys() currencySymbol = "" currencySymbolAlternates = roubleAlternateKeys - spaceBar = "" - language = "" - invalidCommandMsg = "" - baseAutosuggestions = ["я", "а", "в"] - numericAutosuggestions = ["в", "и", "я"] - - translateKeyLbl = "" - translatePlaceholder = "" + spaceBar = "רווח" + language = "עברית" + invalidCommandMsg = "אין מידע" + baseAutosuggestions = ["אתמ", "אני", "היי"] + numericAutosuggestions = ["", "", ""] + + translateKeyLbl = "Translate" + translatePlaceholder = "Translate" translatePrompt = commandPromptSpacing + "he -› \(getControllerLanguageAbbr()): " translatePromptAndCursor = translatePrompt + commandCursor translatePromptAndPlaceholder = translatePromptAndCursor + " " + translatePlaceholder translatePromptAndColorPlaceholder = NSMutableAttributedString(string: translatePromptAndPlaceholder) translatePromptAndColorPlaceholder.setColorForText(textForAttribute: translatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) - conjugateKeyLbl = "" - conjugatePlaceholder = "" - conjugatePrompt = commandPromptSpacing + "" + conjugateKeyLbl = "Conjugate" + conjugatePlaceholder = "Conjugate" + conjugatePrompt = commandPromptSpacing + "Conjucation: " conjugatePromptAndCursor = conjugatePrompt + commandCursor conjugatePromptAndPlaceholder = conjugatePromptAndCursor + " " + conjugatePlaceholder conjugatePromptAndColorPlaceholder = NSMutableAttributedString(string: conjugatePromptAndPlaceholder) conjugatePromptAndColorPlaceholder.setColorForText(textForAttribute: conjugatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) - pluralKeyLbl = "" - pluralPlaceholder = "" - pluralPrompt = commandPromptSpacing + "" + pluralKeyLbl = "Plural" + pluralPlaceholder = "Plural" + pluralPrompt = commandPromptSpacing + "Plural: " pluralPromptAndCursor = pluralPrompt + commandCursor pluralPromptAndPlaceholder = pluralPromptAndCursor + " " + pluralPlaceholder pluralPromptAndColorPlaceholder = NSMutableAttributedString(string: pluralPromptAndPlaceholder) pluralPromptAndColorPlaceholder.setColorForText(textForAttribute: pluralPlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) - alreadyPluralMsg = "" + alreadyPluralMsg = "Already in plural form" } From b1fa593ca075d75c75c2c8c575cd4a69604612ca Mon Sep 17 00:00:00 2001 From: DanielGevaZA Date: Fri, 30 Aug 2024 15:54:30 +0200 Subject: [PATCH 08/10] Removed the old InterfaceVariables Removed the old interface variables file and renamed the new one to the appropriate name. --- .../Hebrew/HEInterfaceVariables.swift | 243 +++++++++++------- .../Hebrew/HEInterfaceVariablesTemp.swift | 205 --------------- Scribe.xcodeproj/project.pbxproj | 78 ++---- 3 files changed, 182 insertions(+), 344 deletions(-) delete mode 100644 Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift index 8d7ee20a..dd6fd44b 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift @@ -1,42 +1,23 @@ -/** - * Constants and functions to load the Hebrew Scribe keyboard. - * - * Copyright (C) 2024 Scribe - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// HEInterfaceVariablesTemp.swift +// Scribe import UIKit -//public enum HebrewKeyboardConstants { -// static let defaultCurrencyKey = "$" -// static let currencyKeys = ["$", "€", "£", "¥"] -// -// // Alternate key vars. -// static let keysWithAlternates = [""] -// static let keysWithAlternatesLeft = [""] -// static let keysWithAlternatesRight = [""] -//} +public enum HebrewKeyboardConstants { + static let defaultCurrencyKey = "₪" + static let currencyKeys = ["₪", "€", "£", "$"] + + +} struct HebrewKeyboardProvider: KeyboardProviderProtocol { // iPhone keyboard layouts. static func genPhoneLetterKeys() -> [[String]] { return KeyboardBuilder() - .addRow(["פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "delete"]) + .addRow(["פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "❌"]) .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז"]) - .addRow(["123", "selectKeyboard", "space", "return"]) // "undo", "accent" + .addRow(["123", "selectKeyboard", "רווח", "הכנס"]) .build() } @@ -44,8 +25,8 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { return KeyboardBuilder() .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]) .addRow(["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""]) - .addRow(["#+=", ".", ",", "?", "!", "'", "delete"]) - .addRow(["ABC", "selectKeyboard", "space", "return"]) // "undo", "accent" + .addRow(["#+=", ".", ",", "?", "!", "'", "❌"]) + .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) .replaceKey(row: 1, column: 6, to: currencyKey) .build() } @@ -54,8 +35,8 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { let keyboardBuilder = KeyboardBuilder() .addRow(["[", "]", "{", "}", "#", "%", "^", "*", "+", "="]) .addRow(["_", "\\", "|", "~", "<", ">", "€", "£", "¥", "·"]) - .addRow(["123", ".", ",", "?", "!", "'", "delete"]) - .addRow(["ABC", "selectKeyboard", "space", "return"]) // "undo", "accent" + .addRow(["123", ".", ",", "?", "!", "'", "❌"]) + .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) if currencyKeys.count < 3 { return keyboardBuilder.build() @@ -67,70 +48,158 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { .build() } } - + // iPad keyboard layouts. - static func genPadLetterKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"]) - .addRow([",", ".", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "delete"]) - .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) - .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", "return"]) - .addRow(["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"]) // "undo" - .build() - } + static func genPadLetterKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"]) + .addRow([",", ".", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "❌"]) + .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) + .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", "הכנס"]) + .addRow(["selectKeyboard", ".?123", "רווח", ".?123", "hideKeyboard"]) + .build() + } - static func genPadNumberKeys(currencyKey: String) -> [[String]] { - return KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "delete"]) - .addRow(["!", "@", "#", "&", "_", "-", "'", "\"", "(", ")", "return"]) - .addRow(["#+=", "%", "...", "&", ";", ":", "=", "+", "/", "?", "#+="]) - .addRow(["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"]) // "undo" - // .replaceKey(row: 1, column: 4, to: currencyKey) - .build() - } + static func genPadNumberKeys(currencyKey: String) -> [[String]] { + return KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "❌"]) + .addRow(["!", "@", "#", "&", "_", "-", "'", "\"", "(", ")", "הכנס"]) + .addRow(["#+=", "%", "...", "&", ";", ":", "=", "+", "/", "?", "#+="]) + .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) + // .replaceKey(row: 1, column: 4, to: currencyKey) + .build() + } - static func genPadSymbolKeys(currencyKeys: [String]) -> [[String]] { - let keyboardBuilder = KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "delete"]) - .addRow(["^", "€", "$", "£", "[", "]", "'", "\"", "<", ">", "return"]) - .addRow(["123", "§", "|", "~", "*", "·", "{", "}", "\\", "~", "123"]) - .addRow(["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"]) // "undo" + static func genPadSymbolKeys(currencyKeys: [String]) -> [[String]] { + let keyboardBuilder = KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "❌"]) + .addRow(["^", "€", "$", "£", "[", "]", "'", "\"", "<", ">", "הכנס"]) + .addRow(["123", "§", "|", "~", "*", "·", "{", "}", "\\", "~", "123"]) + .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) - if currencyKeys.count < 3 { - return keyboardBuilder.build() - } else { - return keyboardBuilder - .replaceKey(row: 1, column: 1, to: currencyKeys[0]) - .replaceKey(row: 1, column: 2, to: currencyKeys[1]) - .replaceKey(row: 1, column: 3, to: currencyKeys[2]) + if currencyKeys.count < 3 { + return keyboardBuilder.build() + } else { + return keyboardBuilder + .replaceKey(row: 1, column: 1, to: currencyKeys[0]) + .replaceKey(row: 1, column: 2, to: currencyKeys[1]) + .replaceKey(row: 1, column: 3, to: currencyKeys[2]) + .build() + } + } + + // Expanded iPad keyboard layouts for wider devices. + static func genPadExpandedLetterKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "❌"]) + .addRow([SpecialKeys.indent, "/", "'", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "[", "]", "+"]) + .addRow([SpecialKeys.capsLock, "ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש", ",", "\"", "הכנס"]) + .addRow(["⇧", ";", "ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", ".", "⇧"]) + .addRow(["selectKeyboard", ".?123", "רווח", ".?123", "hideKeyboard"]) .build() } - } - // Expanded iPad keyboard layouts for wider devices. - static func genPadExpandedLetterKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"]) - .addRow([SpecialKeys.indent, "/", "'", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "[", "]", "+"]) - .addRow([SpecialKeys.capsLock, "ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש", ",", "\"", "return"]) - .addRow(["shift", ";", "ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", ".", "shift"]) - .addRow(["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"]) // "microphone", "scribble" - .build() + static func genPadExpandedSymbolKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "❌"]) + .addRow([SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "—"]) + .addRow([SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "€", "הכנס"]) + .addRow(["⇧", "…", "?", "!", "~", "≠", "'", "\"", "_", ",", ".", "-", "⇧"]) + .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) + .build() + } } - static func genPadExpandedSymbolKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"]) - .addRow([SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "—"]) - .addRow([SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "€", "return"]) // "undo" - .addRow(["shift", "…", "?", "!", "~", "≠", "'", "\"", "_", ",", ".", "-", "shift"]) // "redo" - .addRow(["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"]) // "microphone", "scribble" - .build() +/// Gets the keys for the Hebrew keyboard. + + +func getHEKeys() { + guard let userDefaults = UserDefaults(suiteName: "group.be.scri.userDefaultsContainer") else { + fatalError() + } + + var currencyKey = HebrewKeyboardConstants.defaultCurrencyKey + var currencyKeys = HebrewKeyboardConstants.currencyKeys + let dictionaryKey = controllerLanguage + "defaultCurrencySymbol" + + if let currencyValue = userDefaults.string(forKey: dictionaryKey) { + currencyKey = currencyValue + } else { + userDefaults.setValue(currencyKey, forKey: dictionaryKey) + } + if let index = currencyKeys.firstIndex(of: currencyKey) { + currencyKeys.remove(at: index) + } + + if DeviceType.isPhone { + letterKeys = HebrewKeyboardProvider.genPhoneLetterKeys() + numberKeys = HebrewKeyboardProvider.genPhoneNumberKeys(currencyKey: currencyKey) + symbolKeys = HebrewKeyboardProvider.genPhoneSymbolKeys(currencyKeys: currencyKeys) + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) + + leftKeyChars = ["ק", "1", "-", "[", "_"] + rightKeyChars = ["פ", "0", "\"", "=", "·"] + centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } + } else { + // Use the expanded keys layout if the iPad is wide enough and has no home button. + if usingExpandedKeyboard { + letterKeys = HebrewKeyboardProvider.genPadExpandedLetterKeys() + symbolKeys = HebrewKeyboardProvider.genPadExpandedSymbolKeys() + + allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined()) + } else { + letterKeys = HebrewKeyboardProvider.genPadLetterKeys() + numberKeys = HebrewKeyboardProvider.genPadNumberKeys(currencyKey: currencyKey) + symbolKeys = HebrewKeyboardProvider.genPadSymbolKeys(currencyKeys: currencyKeys) + + letterKeys.removeFirst(1) + + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) + } + + leftKeyChars = ["1", "ק"] + rightKeyChars = ["הכנס", "hideKeyboard"] + centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } } -/// Gets the keys for the Hebrew keyboard. -func getHEKeys() {} -/// Provides the Hebrew keyboard layout. -func setHEKeyboardLayout() {} +func setHEKeyboardLayout() { + getHEKeys() + + currencySymbol = "" + currencySymbolAlternates = roubleAlternateKeys + spaceBar = "רווח" + language = "עברית" + invalidCommandMsg = "אין מידע" + baseAutosuggestions = ["אתמ", "אני", "היי"] + numericAutosuggestions = ["", "", ""] + + translateKeyLbl = "Translate" + translatePlaceholder = "Translate" + translatePrompt = commandPromptSpacing + "he -› \(getControllerLanguageAbbr()): " + translatePromptAndCursor = translatePrompt + commandCursor + translatePromptAndPlaceholder = translatePromptAndCursor + " " + translatePlaceholder + translatePromptAndColorPlaceholder = NSMutableAttributedString(string: translatePromptAndPlaceholder) + translatePromptAndColorPlaceholder.setColorForText(textForAttribute: translatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) + + conjugateKeyLbl = "Conjugate" + conjugatePlaceholder = "Conjugate" + conjugatePrompt = commandPromptSpacing + "Conjucation: " + conjugatePromptAndCursor = conjugatePrompt + commandCursor + conjugatePromptAndPlaceholder = conjugatePromptAndCursor + " " + conjugatePlaceholder + conjugatePromptAndColorPlaceholder = NSMutableAttributedString(string: conjugatePromptAndPlaceholder) + conjugatePromptAndColorPlaceholder.setColorForText(textForAttribute: conjugatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) + + pluralKeyLbl = "Plural" + pluralPlaceholder = "Plural" + pluralPrompt = commandPromptSpacing + "Plural: " + pluralPromptAndCursor = pluralPrompt + commandCursor + pluralPromptAndPlaceholder = pluralPromptAndCursor + " " + pluralPlaceholder + pluralPromptAndColorPlaceholder = NSMutableAttributedString(string: pluralPromptAndPlaceholder) + pluralPromptAndColorPlaceholder.setColorForText(textForAttribute: pluralPlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) + alreadyPluralMsg = "Already in plural form" +} + + +// Created by Daniel Geva on 2024/08/30. diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift deleted file mode 100644 index dd6fd44b..00000000 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariablesTemp.swift +++ /dev/null @@ -1,205 +0,0 @@ -// HEInterfaceVariablesTemp.swift -// Scribe - -import UIKit - -public enum HebrewKeyboardConstants { - static let defaultCurrencyKey = "₪" - static let currencyKeys = ["₪", "€", "£", "$"] - - -} - -struct HebrewKeyboardProvider: KeyboardProviderProtocol { - // iPhone keyboard layouts. - static func genPhoneLetterKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "❌"]) - .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) - .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז"]) - .addRow(["123", "selectKeyboard", "רווח", "הכנס"]) - .build() - } - - static func genPhoneNumberKeys(currencyKey: String) -> [[String]] { - return KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]) - .addRow(["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""]) - .addRow(["#+=", ".", ",", "?", "!", "'", "❌"]) - .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) - .replaceKey(row: 1, column: 6, to: currencyKey) - .build() - } - - static func genPhoneSymbolKeys(currencyKeys: [String]) -> [[String]] { - let keyboardBuilder = KeyboardBuilder() - .addRow(["[", "]", "{", "}", "#", "%", "^", "*", "+", "="]) - .addRow(["_", "\\", "|", "~", "<", ">", "€", "£", "¥", "·"]) - .addRow(["123", ".", ",", "?", "!", "'", "❌"]) - .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) - - if currencyKeys.count < 3 { - return keyboardBuilder.build() - } else { - return keyboardBuilder - .replaceKey(row: 1, column: 6, to: currencyKeys[0]) - .replaceKey(row: 1, column: 7, to: currencyKeys[1]) - .replaceKey(row: 1, column: 8, to: currencyKeys[2]) - .build() - } - } - - // iPad keyboard layouts. - static func genPadLetterKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"]) - .addRow([",", ".", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "❌"]) - .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) - .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", "הכנס"]) - .addRow(["selectKeyboard", ".?123", "רווח", ".?123", "hideKeyboard"]) - .build() - } - - static func genPadNumberKeys(currencyKey: String) -> [[String]] { - return KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "❌"]) - .addRow(["!", "@", "#", "&", "_", "-", "'", "\"", "(", ")", "הכנס"]) - .addRow(["#+=", "%", "...", "&", ";", ":", "=", "+", "/", "?", "#+="]) - .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) - // .replaceKey(row: 1, column: 4, to: currencyKey) - .build() - } - - static func genPadSymbolKeys(currencyKeys: [String]) -> [[String]] { - let keyboardBuilder = KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "❌"]) - .addRow(["^", "€", "$", "£", "[", "]", "'", "\"", "<", ">", "הכנס"]) - .addRow(["123", "§", "|", "~", "*", "·", "{", "}", "\\", "~", "123"]) - .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) - - if currencyKeys.count < 3 { - return keyboardBuilder.build() - } else { - return keyboardBuilder - .replaceKey(row: 1, column: 1, to: currencyKeys[0]) - .replaceKey(row: 1, column: 2, to: currencyKeys[1]) - .replaceKey(row: 1, column: 3, to: currencyKeys[2]) - .build() - } - } - - // Expanded iPad keyboard layouts for wider devices. - static func genPadExpandedLetterKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "❌"]) - .addRow([SpecialKeys.indent, "/", "'", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "[", "]", "+"]) - .addRow([SpecialKeys.capsLock, "ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש", ",", "\"", "הכנס"]) - .addRow(["⇧", ";", "ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", ".", "⇧"]) - .addRow(["selectKeyboard", ".?123", "רווח", ".?123", "hideKeyboard"]) - .build() - } - - static func genPadExpandedSymbolKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "❌"]) - .addRow([SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "—"]) - .addRow([SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "€", "הכנס"]) - .addRow(["⇧", "…", "?", "!", "~", "≠", "'", "\"", "_", ",", ".", "-", "⇧"]) - .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) - .build() - } - } - -/// Gets the keys for the Hebrew keyboard. - - -func getHEKeys() { - guard let userDefaults = UserDefaults(suiteName: "group.be.scri.userDefaultsContainer") else { - fatalError() - } - - var currencyKey = HebrewKeyboardConstants.defaultCurrencyKey - var currencyKeys = HebrewKeyboardConstants.currencyKeys - let dictionaryKey = controllerLanguage + "defaultCurrencySymbol" - - if let currencyValue = userDefaults.string(forKey: dictionaryKey) { - currencyKey = currencyValue - } else { - userDefaults.setValue(currencyKey, forKey: dictionaryKey) - } - if let index = currencyKeys.firstIndex(of: currencyKey) { - currencyKeys.remove(at: index) - } - - if DeviceType.isPhone { - letterKeys = HebrewKeyboardProvider.genPhoneLetterKeys() - numberKeys = HebrewKeyboardProvider.genPhoneNumberKeys(currencyKey: currencyKey) - symbolKeys = HebrewKeyboardProvider.genPhoneSymbolKeys(currencyKeys: currencyKeys) - allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) - - leftKeyChars = ["ק", "1", "-", "[", "_"] - rightKeyChars = ["פ", "0", "\"", "=", "·"] - centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } - } else { - // Use the expanded keys layout if the iPad is wide enough and has no home button. - if usingExpandedKeyboard { - letterKeys = HebrewKeyboardProvider.genPadExpandedLetterKeys() - symbolKeys = HebrewKeyboardProvider.genPadExpandedSymbolKeys() - - allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined()) - } else { - letterKeys = HebrewKeyboardProvider.genPadLetterKeys() - numberKeys = HebrewKeyboardProvider.genPadNumberKeys(currencyKey: currencyKey) - symbolKeys = HebrewKeyboardProvider.genPadSymbolKeys(currencyKeys: currencyKeys) - - letterKeys.removeFirst(1) - - allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) - } - - leftKeyChars = ["1", "ק"] - rightKeyChars = ["הכנס", "hideKeyboard"] - centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } - } -} - - -func setHEKeyboardLayout() { - getHEKeys() - - currencySymbol = "" - currencySymbolAlternates = roubleAlternateKeys - spaceBar = "רווח" - language = "עברית" - invalidCommandMsg = "אין מידע" - baseAutosuggestions = ["אתמ", "אני", "היי"] - numericAutosuggestions = ["", "", ""] - - translateKeyLbl = "Translate" - translatePlaceholder = "Translate" - translatePrompt = commandPromptSpacing + "he -› \(getControllerLanguageAbbr()): " - translatePromptAndCursor = translatePrompt + commandCursor - translatePromptAndPlaceholder = translatePromptAndCursor + " " + translatePlaceholder - translatePromptAndColorPlaceholder = NSMutableAttributedString(string: translatePromptAndPlaceholder) - translatePromptAndColorPlaceholder.setColorForText(textForAttribute: translatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) - - conjugateKeyLbl = "Conjugate" - conjugatePlaceholder = "Conjugate" - conjugatePrompt = commandPromptSpacing + "Conjucation: " - conjugatePromptAndCursor = conjugatePrompt + commandCursor - conjugatePromptAndPlaceholder = conjugatePromptAndCursor + " " + conjugatePlaceholder - conjugatePromptAndColorPlaceholder = NSMutableAttributedString(string: conjugatePromptAndPlaceholder) - conjugatePromptAndColorPlaceholder.setColorForText(textForAttribute: conjugatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) - - pluralKeyLbl = "Plural" - pluralPlaceholder = "Plural" - pluralPrompt = commandPromptSpacing + "Plural: " - pluralPromptAndCursor = pluralPrompt + commandCursor - pluralPromptAndPlaceholder = pluralPromptAndCursor + " " + pluralPlaceholder - pluralPromptAndColorPlaceholder = NSMutableAttributedString(string: pluralPromptAndPlaceholder) - pluralPromptAndColorPlaceholder.setColorForText(textForAttribute: pluralPlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) - alreadyPluralMsg = "Already in plural form" -} - - -// Created by Daniel Geva on 2024/08/30. diff --git a/Scribe.xcodeproj/project.pbxproj b/Scribe.xcodeproj/project.pbxproj index 63ffff5b..5bdf4186 100644 --- a/Scribe.xcodeproj/project.pbxproj +++ b/Scribe.xcodeproj/project.pbxproj @@ -198,18 +198,18 @@ D111E9BE27AFE7B200746F92 /* Annotate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E9B927AFE7B200746F92 /* Annotate.swift */; }; D111E9BF27AFE7B200746F92 /* Annotate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E9B927AFE7B200746F92 /* Annotate.swift */; }; D111E9C027AFE7B200746F92 /* Annotate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D111E9B927AFE7B200746F92 /* Annotate.swift */; }; - D12EB9BA2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9BB2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9BC2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9BD2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9BE2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9BF2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9C02C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9C12C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9C22C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9C32C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9C42C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; - D12EB9C52C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */; }; + D12EB9BA2C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9BB2C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9BC2C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9BD2C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9BE2C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9BF2C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9C02C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9C12C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9C22C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9C32C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9C42C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; + D12EB9C52C81C10900181765 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */; }; D1362A39274C106A00C00E48 /* ColorVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D190B240274056D400705659 /* ColorVariables.swift */; }; D15E297F29E41B3B006B2C81 /* FRLanguageData.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = D15E297E29E41B3B006B2C81 /* FRLanguageData.sqlite */; }; D15E298229E41B56006B2C81 /* DELanguageData.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = D15E298129E41B56006B2C81 /* DELanguageData.sqlite */; }; @@ -671,7 +671,6 @@ D1CDED772A859E4800098546 /* DACommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED762A859E4800098546 /* DACommandVariables.swift */; }; D1CDED792A859FB600098546 /* ENCommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED782A859FB600098546 /* ENCommandVariables.swift */; }; D1CDED7B2A859FBF00098546 /* ENInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7A2A859FBF00098546 /* ENInterfaceVariables.swift */; }; - D1CDED7D2A85A05100098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; D1CDED7F2A85A05C00098546 /* HECommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7E2A85A05C00098546 /* HECommandVariables.swift */; }; D1CDED812A85A12400098546 /* NBInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED802A85A12400098546 /* NBInterfaceVariables.swift */; }; D1CDED832A85A12C00098546 /* NBCommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED822A85A12C00098546 /* NBCommandVariables.swift */; }; @@ -730,17 +729,6 @@ D1CDEDB92A85AE8300098546 /* HECommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7E2A85A05C00098546 /* HECommandVariables.swift */; }; D1CDEDBA2A85AE8400098546 /* HECommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7E2A85A05C00098546 /* HECommandVariables.swift */; }; D1CDEDBB2A85AE8500098546 /* HECommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7E2A85A05C00098546 /* HECommandVariables.swift */; }; - D1CDEDBC2A85AE8800098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDBD2A85AE8800098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDBE2A85AE8900098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDBF2A85AE8A00098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDC02A85AE8A00098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDC12A85AE8B00098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDC22A85AE8B00098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDC32A85AE8C00098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDC42A85AE8D00098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDC52A85AE8D00098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; - D1CDEDC62A85AE8D00098546 /* HEInterfaceVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */; }; D1CDEDC72A85AE9100098546 /* NBCommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED822A85A12C00098546 /* NBCommandVariables.swift */; }; D1CDEDC82A85AE9100098546 /* NBCommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED822A85A12C00098546 /* NBCommandVariables.swift */; }; D1CDEDC92A85AE9100098546 /* NBCommandVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CDED822A85A12C00098546 /* NBCommandVariables.swift */; }; @@ -943,7 +931,7 @@ D111E9A927AFE78600746F92 /* Plural.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Plural.swift; sourceTree = ""; }; D111E9B127AFE79500746F92 /* Translate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Translate.swift; sourceTree = ""; }; D111E9B927AFE7B200746F92 /* Annotate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Annotate.swift; sourceTree = ""; }; - D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HEInterfaceVariablesTemp.swift; sourceTree = ""; }; + D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HEInterfaceVariables.swift; sourceTree = ""; }; D1362A37274C040F00C00E48 /* PRIVACY.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = PRIVACY.txt; sourceTree = ""; }; D155AD282BDC6CC20075B18C /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; D15E297E29E41B3B006B2C81 /* FRLanguageData.sqlite */ = {isa = PBXFileReference; lastKnownFileType = file; name = FRLanguageData.sqlite; path = Keyboards/LanguageKeyboards/French/FRLanguageData.sqlite; sourceTree = SOURCE_ROOT; }; @@ -1017,7 +1005,6 @@ D1CDED762A859E4800098546 /* DACommandVariables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DACommandVariables.swift; sourceTree = ""; }; D1CDED782A859FB600098546 /* ENCommandVariables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ENCommandVariables.swift; sourceTree = ""; }; D1CDED7A2A859FBF00098546 /* ENInterfaceVariables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ENInterfaceVariables.swift; sourceTree = ""; }; - D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HEInterfaceVariables.swift; sourceTree = ""; }; D1CDED7E2A85A05C00098546 /* HECommandVariables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HECommandVariables.swift; sourceTree = ""; }; D1CDED802A85A12400098546 /* NBInterfaceVariables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NBInterfaceVariables.swift; sourceTree = ""; }; D1CDED822A85A12C00098546 /* NBCommandVariables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NBCommandVariables.swift; sourceTree = ""; }; @@ -1494,8 +1481,7 @@ isa = PBXGroup; children = ( D1CDED7E2A85A05C00098546 /* HECommandVariables.swift */, - D1CDED7C2A85A05100098546 /* HEInterfaceVariables.swift */, - D12EB9B92C81C0E700181765 /* HEInterfaceVariablesTemp.swift */, + D12EB9B92C81C0E700181765 /* HEInterfaceVariables.swift */, D1AFDFCA29CA6BF60033BF27 /* HEKeyboardViewController.swift */, D1AFDFCC29CA6BF60033BF27 /* Info.plist */, ); @@ -2136,11 +2122,10 @@ 69B81EBC2BFB8C77008CAB85 /* TipCardView.swift in Sources */, 30453964293B9D18003AE55B /* InformationToolTipData.swift in Sources */, 30453969293B9DB4003AE55B /* ToolTipViewUpdatable.swift in Sources */, - D1CDED7D2A85A05100098546 /* HEInterfaceVariables.swift in Sources */, D17193E027AECAA60038660B /* RUInterfaceVariables.swift in Sources */, D1B81D5327BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, D17193D827AECA450038660B /* PTInterfaceVariables.swift in Sources */, - D12EB9C32C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9C32C81C10900181765 /* HEInterfaceVariables.swift in Sources */, D17193C427AEAD7D0038660B /* AppStyling.swift in Sources */, D111E9AA27AFE78600746F92 /* Plural.swift in Sources */, D1F0367227AAE12200CD7921 /* InterfaceVariables.swift in Sources */, @@ -2175,14 +2160,13 @@ 38BD214F22D592CA00C6795D /* DEKeyboardViewController.swift in Sources */, D171943A27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378C628F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, - D12EB9BB2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9BB2C81C10900181765 /* HEInterfaceVariables.swift in Sources */, 30453972293B9E04003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395B293B911C003AE55B /* AppTextStyling.swift in Sources */, D1B81D5527BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, D171943127AEDE110038660B /* KeyboardKeys.swift in Sources */, 30489C212936DAFF00B59393 /* ToolTipView.swift in Sources */, D1CDED872A85AE5A00098546 /* DACommandVariables.swift in Sources */, - D1CDEDBF2A85AE8A00098546 /* HEInterfaceVariables.swift in Sources */, D1CDED912A85AE6200098546 /* DAInterfaceVariables.swift in Sources */, D171941A27AECD070038660B /* ESCommandVariables.swift in Sources */, D1B071A227C6A1AA00FD7DBD /* KeyAltChars.swift in Sources */, @@ -2238,14 +2222,13 @@ D171942127AECD170038660B /* SVCommandVariables.swift in Sources */, D171943927AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378C528F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, - D12EB9C42C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9C42C81C10900181765 /* HEInterfaceVariables.swift in Sources */, 30453970293B9DFF003AE55B /* ToolTipViewTheme.swift in Sources */, 30453959293B911B003AE55B /* AppTextStyling.swift in Sources */, D1B81D5427BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, D171943027AEDE110038660B /* KeyboardKeys.swift in Sources */, 30489C1F2936DAFE00B59393 /* ToolTipView.swift in Sources */, D1CDED862A85AE5A00098546 /* DACommandVariables.swift in Sources */, - D1CDEDBE2A85AE8900098546 /* HEInterfaceVariables.swift in Sources */, D1CDED922A85AE6300098546 /* DAInterfaceVariables.swift in Sources */, D17193F927AECC930038660B /* FRCommandVariables.swift in Sources */, D1B071A127C6A1AA00FD7DBD /* KeyAltChars.swift in Sources */, @@ -2301,14 +2284,13 @@ D171942327AECD170038660B /* SVCommandVariables.swift in Sources */, D171943B27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378C828F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, - D12EB9BA2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9BA2C81C10900181765 /* HEInterfaceVariables.swift in Sources */, 30453974293B9E05003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395D293B911D003AE55B /* AppTextStyling.swift in Sources */, D1B81D5727BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, D171943227AEDE110038660B /* KeyboardKeys.swift in Sources */, 30489C232936DB0100B59393 /* ToolTipView.swift in Sources */, D1CDED8B2A85AE5C00098546 /* DACommandVariables.swift in Sources */, - D1CDEDC22A85AE8B00098546 /* HEInterfaceVariables.swift in Sources */, D1CDED962A85AE6400098546 /* DAInterfaceVariables.swift in Sources */, D17193FB27AECC930038660B /* FRCommandVariables.swift in Sources */, D1B071A427C6A1AA00FD7DBD /* KeyAltChars.swift in Sources */, @@ -2364,14 +2346,13 @@ D171942527AECD170038660B /* SVCommandVariables.swift in Sources */, D171943D27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378CA28F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, - D12EB9C52C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9C52C81C10900181765 /* HEInterfaceVariables.swift in Sources */, 30453976293B9E06003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395F293B911E003AE55B /* AppTextStyling.swift in Sources */, D1B81D5927BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, D171943427AEDE110038660B /* KeyboardKeys.swift in Sources */, 30489C252936DB0100B59393 /* ToolTipView.swift in Sources */, D1CDED8D2A85AE5E00098546 /* DACommandVariables.swift in Sources */, - D1CDEDC52A85AE8D00098546 /* HEInterfaceVariables.swift in Sources */, D1CDED992A85AE6600098546 /* DAInterfaceVariables.swift in Sources */, D17193FD27AECC930038660B /* FRCommandVariables.swift in Sources */, D1B071A627C6A1AA00FD7DBD /* KeyAltChars.swift in Sources */, @@ -2427,14 +2408,13 @@ D171942427AECD170038660B /* SVCommandVariables.swift in Sources */, D171943C27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378C928F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, - D12EB9C02C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9C02C81C10900181765 /* HEInterfaceVariables.swift in Sources */, 30453975293B9E06003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395E293B911E003AE55B /* AppTextStyling.swift in Sources */, D1B81D5827BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, D171943327AEDE110038660B /* KeyboardKeys.swift in Sources */, 30489C242936DB0100B59393 /* ToolTipView.swift in Sources */, D1CDED8C2A85AE5D00098546 /* DACommandVariables.swift in Sources */, - D1CDEDC42A85AE8D00098546 /* HEInterfaceVariables.swift in Sources */, D1CDED972A85AE6500098546 /* DAInterfaceVariables.swift in Sources */, D17193FC27AECC930038660B /* FRCommandVariables.swift in Sources */, D1B071A527C6A1AA00FD7DBD /* KeyAltChars.swift in Sources */, @@ -2490,14 +2470,13 @@ D171942627AECD170038660B /* SVCommandVariables.swift in Sources */, D171943E27AEF0560038660B /* KeyboardStyling.swift in Sources */, CE1378CB28F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, - D12EB9C22C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9C22C81C10900181765 /* HEInterfaceVariables.swift in Sources */, 30453977293B9E06003AE55B /* ToolTipViewTheme.swift in Sources */, 30453960293B911F003AE55B /* AppTextStyling.swift in Sources */, D1B81D5A27BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, D171943527AEDE110038660B /* KeyboardKeys.swift in Sources */, 30489C262936DB0200B59393 /* ToolTipView.swift in Sources */, D1CDED8E2A85AE5E00098546 /* DACommandVariables.swift in Sources */, - D1CDEDC62A85AE8D00098546 /* HEInterfaceVariables.swift in Sources */, D1CDED982A85AE6500098546 /* DAInterfaceVariables.swift in Sources */, D17193FE27AECC930038660B /* FRCommandVariables.swift in Sources */, D1B071A727C6A1AA00FD7DBD /* KeyAltChars.swift in Sources */, @@ -2553,14 +2532,13 @@ D1AB5B2829C757A100CCB0C1 /* ESInterfaceVariables.swift in Sources */, D1AB5B2929C757A100CCB0C1 /* SVInterfaceVariables.swift in Sources */, D1AB5B2A29C757A100CCB0C1 /* ScribeColor.swift in Sources */, - D12EB9BC2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9BC2C81C10900181765 /* HEInterfaceVariables.swift in Sources */, D1AB5B2B29C757A100CCB0C1 /* ToolTipViewTheme.swift in Sources */, D1AB5B2C29C757A100CCB0C1 /* AppTextStyling.swift in Sources */, D1AB5B2D29C757A100CCB0C1 /* ITInterfaceVariables.swift in Sources */, D1AB5B2E29C757A100CCB0C1 /* PTInterfaceVariables.swift in Sources */, D1AB5B2F29C757A100CCB0C1 /* ToolTipView.swift in Sources */, D1CDED8A2A85AE5C00098546 /* DACommandVariables.swift in Sources */, - D1CDEDC32A85AE8C00098546 /* HEInterfaceVariables.swift in Sources */, D1CDED952A85AE6400098546 /* DAInterfaceVariables.swift in Sources */, D1AB5B3029C757A100CCB0C1 /* DECommandVariables.swift in Sources */, D1AB5B3129C757A100CCB0C1 /* KeyAltChars.swift in Sources */, @@ -2616,14 +2594,13 @@ D1AFDF0629CA66D00033BF27 /* ESInterfaceVariables.swift in Sources */, D1AFDF0729CA66D00033BF27 /* SVInterfaceVariables.swift in Sources */, D1AFDF0829CA66D00033BF27 /* ScribeColor.swift in Sources */, - D12EB9BD2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9BD2C81C10900181765 /* HEInterfaceVariables.swift in Sources */, D1AFDF0929CA66D00033BF27 /* ToolTipViewTheme.swift in Sources */, D1AFDF0A29CA66D00033BF27 /* AppTextStyling.swift in Sources */, D1AFDF0B29CA66D00033BF27 /* ITInterfaceVariables.swift in Sources */, D1AFDF0C29CA66D00033BF27 /* PTInterfaceVariables.swift in Sources */, D1AFDF0D29CA66D00033BF27 /* ToolTipView.swift in Sources */, D1CDED852A85AE5900098546 /* DACommandVariables.swift in Sources */, - D1CDEDBD2A85AE8800098546 /* HEInterfaceVariables.swift in Sources */, D1CDED902A85AE6100098546 /* DAInterfaceVariables.swift in Sources */, D1AFDF0E29CA66D00033BF27 /* DECommandVariables.swift in Sources */, D1AFDF0F29CA66D00033BF27 /* KeyAltChars.swift in Sources */, @@ -2679,14 +2656,13 @@ D1AFDF8329CA66F40033BF27 /* ESInterfaceVariables.swift in Sources */, D1AFDF8429CA66F40033BF27 /* SVInterfaceVariables.swift in Sources */, D1AFDF8529CA66F40033BF27 /* ScribeColor.swift in Sources */, - D12EB9BF2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9BF2C81C10900181765 /* HEInterfaceVariables.swift in Sources */, D1AFDF8629CA66F40033BF27 /* ToolTipViewTheme.swift in Sources */, D1AFDF8729CA66F40033BF27 /* AppTextStyling.swift in Sources */, D1AFDF8829CA66F40033BF27 /* ITInterfaceVariables.swift in Sources */, D1AFDF8929CA66F40033BF27 /* PTInterfaceVariables.swift in Sources */, D1AFDF8A29CA66F40033BF27 /* ToolTipView.swift in Sources */, D1CDED842A85AE5800098546 /* DACommandVariables.swift in Sources */, - D1CDEDBC2A85AE8800098546 /* HEInterfaceVariables.swift in Sources */, D1CDED8F2A85AE6100098546 /* DAInterfaceVariables.swift in Sources */, D1AFDF8B29CA66F40033BF27 /* DECommandVariables.swift in Sources */, D1AFDF8C29CA66F40033BF27 /* KeyAltChars.swift in Sources */, @@ -2742,14 +2718,13 @@ D1AFDFD929CA6E900033BF27 /* ESInterfaceVariables.swift in Sources */, D1AFDFDA29CA6E900033BF27 /* SVInterfaceVariables.swift in Sources */, D1AFDFDB29CA6E900033BF27 /* ScribeColor.swift in Sources */, - D12EB9C12C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9C12C81C10900181765 /* HEInterfaceVariables.swift in Sources */, D1AFDFDC29CA6E900033BF27 /* ToolTipViewTheme.swift in Sources */, D1AFDFDD29CA6E900033BF27 /* AppTextStyling.swift in Sources */, D1AFDFDE29CA6E900033BF27 /* ITInterfaceVariables.swift in Sources */, D1AFDFDF29CA6E900033BF27 /* PTInterfaceVariables.swift in Sources */, D1AFDFE029CA6E900033BF27 /* ToolTipView.swift in Sources */, D1CDED892A85AE5B00098546 /* DACommandVariables.swift in Sources */, - D1CDEDC02A85AE8A00098546 /* HEInterfaceVariables.swift in Sources */, D1CDED932A85AE6300098546 /* DAInterfaceVariables.swift in Sources */, D1AFDFE129CA6E900033BF27 /* DECommandVariables.swift in Sources */, D1AFDFE229CA6E900033BF27 /* KeyAltChars.swift in Sources */, @@ -2805,14 +2780,13 @@ D1B81D3327BBB6AD0085FE5E /* ESInterfaceVariables.swift in Sources */, D1B81D3527BBB6B50085FE5E /* SVInterfaceVariables.swift in Sources */, CE1378C728F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */, - D12EB9BE2C81C10900181765 /* HEInterfaceVariablesTemp.swift in Sources */, + D12EB9BE2C81C10900181765 /* HEInterfaceVariables.swift in Sources */, 30453973293B9E05003AE55B /* ToolTipViewTheme.swift in Sources */, 3045395C293B911D003AE55B /* AppTextStyling.swift in Sources */, D1B81D5627BBBA360085FE5E /* ITInterfaceVariables.swift in Sources */, D1B81D2F27BBB69E0085FE5E /* PTInterfaceVariables.swift in Sources */, 30489C222936DB0000B59393 /* ToolTipView.swift in Sources */, D1CDED882A85AE5B00098546 /* DACommandVariables.swift in Sources */, - D1CDEDC12A85AE8B00098546 /* HEInterfaceVariables.swift in Sources */, D1CDED942A85AE6300098546 /* DAInterfaceVariables.swift in Sources */, D1B81D2A27BBB6780085FE5E /* DECommandVariables.swift in Sources */, D1B071A327C6A1AA00FD7DBD /* KeyAltChars.swift in Sources */, From 61e8bfc817488e84965ba1df9bb9f34b89779a6d Mon Sep 17 00:00:00 2001 From: DanielGevaZA Date: Fri, 30 Aug 2024 22:10:40 +0200 Subject: [PATCH 09/10] Resolved a few issues Fixed some of the issues mentioned in the PR --- .../Hebrew/HEInterfaceVariables.swift | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift index dd6fd44b..2766750e 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift @@ -1,3 +1,22 @@ +/** + * Constants and functions to load the Hebrew Scribe keyboard. + * + * Copyright (C) 2024 Scribe + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + // HEInterfaceVariablesTemp.swift // Scribe @@ -14,7 +33,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { // iPhone keyboard layouts. static func genPhoneLetterKeys() -> [[String]] { return KeyboardBuilder() - .addRow(["פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "❌"]) + .addRow(["פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "delete"]) .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז"]) .addRow(["123", "selectKeyboard", "רווח", "הכנס"]) @@ -25,7 +44,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { return KeyboardBuilder() .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]) .addRow(["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""]) - .addRow(["#+=", ".", ",", "?", "!", "'", "❌"]) + .addRow(["#+=", ".", ",", "?", "!", "'", "delete"]) .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) .replaceKey(row: 1, column: 6, to: currencyKey) .build() @@ -35,7 +54,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { let keyboardBuilder = KeyboardBuilder() .addRow(["[", "]", "{", "}", "#", "%", "^", "*", "+", "="]) .addRow(["_", "\\", "|", "~", "<", ">", "€", "£", "¥", "·"]) - .addRow(["123", ".", ",", "?", "!", "'", "❌"]) + .addRow(["123", ".", ",", "?", "!", "'", "delete"]) .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) if currencyKeys.count < 3 { @@ -53,7 +72,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { static func genPadLetterKeys() -> [[String]] { return KeyboardBuilder() .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"]) - .addRow([",", ".", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "❌"]) + .addRow([",", ".", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "delete"]) .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", "הכנס"]) .addRow(["selectKeyboard", ".?123", "רווח", ".?123", "hideKeyboard"]) @@ -62,7 +81,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { static func genPadNumberKeys(currencyKey: String) -> [[String]] { return KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "❌"]) + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "delete"]) .addRow(["!", "@", "#", "&", "_", "-", "'", "\"", "(", ")", "הכנס"]) .addRow(["#+=", "%", "...", "&", ";", ":", "=", "+", "/", "?", "#+="]) .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) @@ -72,7 +91,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { static func genPadSymbolKeys(currencyKeys: [String]) -> [[String]] { let keyboardBuilder = KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "❌"]) + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "delete"]) .addRow(["^", "€", "$", "£", "[", "]", "'", "\"", "<", ">", "הכנס"]) .addRow(["123", "§", "|", "~", "*", "·", "{", "}", "\\", "~", "123"]) .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) @@ -91,7 +110,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { // Expanded iPad keyboard layouts for wider devices. static func genPadExpandedLetterKeys() -> [[String]] { return KeyboardBuilder() - .addRow(["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "❌"]) + .addRow(["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"]) .addRow([SpecialKeys.indent, "/", "'", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "[", "]", "+"]) .addRow([SpecialKeys.capsLock, "ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש", ",", "\"", "הכנס"]) .addRow(["⇧", ";", "ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", ".", "⇧"]) @@ -101,7 +120,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { static func genPadExpandedSymbolKeys() -> [[String]] { return KeyboardBuilder() - .addRow(["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "❌"]) + .addRow(["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"]) .addRow([SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "—"]) .addRow([SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "€", "הכנס"]) .addRow(["⇧", "…", "?", "!", "~", "≠", "'", "\"", "_", ",", ".", "-", "⇧"]) From 65f2f2e9a79455a96eddc10f19df320027c5f61f Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Sat, 31 Aug 2024 16:54:58 +0200 Subject: [PATCH 10/10] Formatting and translations of command words --- .../Hebrew/HEInterfaceVariables.swift | 163 ++++++++---------- 1 file changed, 76 insertions(+), 87 deletions(-) diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift index 2766750e..2dd74d02 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift @@ -17,16 +17,11 @@ * along with this program. If not, see . */ -// HEInterfaceVariablesTemp.swift -// Scribe - import UIKit public enum HebrewKeyboardConstants { static let defaultCurrencyKey = "₪" static let currencyKeys = ["₪", "€", "£", "$"] - - } struct HebrewKeyboardProvider: KeyboardProviderProtocol { @@ -36,7 +31,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { .addRow(["פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "delete"]) .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז"]) - .addRow(["123", "selectKeyboard", "רווח", "הכנס"]) + .addRow(["123", "selectKeyboard", "space", "return"]) .build() } @@ -45,7 +40,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]) .addRow(["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""]) .addRow(["#+=", ".", ",", "?", "!", "'", "delete"]) - .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) + .addRow(["אבג", "selectKeyboard", "space", "return"]) .replaceKey(row: 1, column: 6, to: currencyKey) .build() } @@ -55,7 +50,7 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { .addRow(["[", "]", "{", "}", "#", "%", "^", "*", "+", "="]) .addRow(["_", "\\", "|", "~", "<", ">", "€", "£", "¥", "·"]) .addRow(["123", ".", ",", "?", "!", "'", "delete"]) - .addRow(["אבג", "selectKeyboard", "רווח", "הכנס"]) + .addRow(["אבג", "selectKeyboard", "space", "return"]) if currencyKeys.count < 3 { return keyboardBuilder.build() @@ -67,80 +62,78 @@ struct HebrewKeyboardProvider: KeyboardProviderProtocol { .build() } } - + // iPad keyboard layouts. - static func genPadLetterKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"]) - .addRow([",", ".", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "delete"]) - .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) - .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", "הכנס"]) - .addRow(["selectKeyboard", ".?123", "רווח", ".?123", "hideKeyboard"]) - .build() - } - - static func genPadNumberKeys(currencyKey: String) -> [[String]] { - return KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "delete"]) - .addRow(["!", "@", "#", "&", "_", "-", "'", "\"", "(", ")", "הכנס"]) - .addRow(["#+=", "%", "...", "&", ";", ":", "=", "+", "/", "?", "#+="]) - .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) - // .replaceKey(row: 1, column: 4, to: currencyKey) - .build() - } - - static func genPadSymbolKeys(currencyKeys: [String]) -> [[String]] { - let keyboardBuilder = KeyboardBuilder() - .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "delete"]) - .addRow(["^", "€", "$", "£", "[", "]", "'", "\"", "<", ">", "הכנס"]) - .addRow(["123", "§", "|", "~", "*", "·", "{", "}", "\\", "~", "123"]) - .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) - - if currencyKeys.count < 3 { - return keyboardBuilder.build() - } else { - return keyboardBuilder - .replaceKey(row: 1, column: 1, to: currencyKeys[0]) - .replaceKey(row: 1, column: 2, to: currencyKeys[1]) - .replaceKey(row: 1, column: 3, to: currencyKeys[2]) - .build() - } - } - - // Expanded iPad keyboard layouts for wider devices. - static func genPadExpandedLetterKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"]) - .addRow([SpecialKeys.indent, "/", "'", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "[", "]", "+"]) - .addRow([SpecialKeys.capsLock, "ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש", ",", "\"", "הכנס"]) - .addRow(["⇧", ";", "ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", ".", "⇧"]) - .addRow(["selectKeyboard", ".?123", "רווח", ".?123", "hideKeyboard"]) - .build() - } + static func genPadLetterKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"]) + .addRow([",", ".", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "delete"]) + .addRow(["ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש"]) + .addRow(["ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", "return"]) + .addRow(["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"]) + .build() + } - static func genPadExpandedSymbolKeys() -> [[String]] { - return KeyboardBuilder() - .addRow(["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"]) - .addRow([SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "—"]) - .addRow([SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "€", "הכנס"]) - .addRow(["⇧", "…", "?", "!", "~", "≠", "'", "\"", "_", ",", ".", "-", "⇧"]) - .addRow(["selectKeyboard", "אבג", "רווח", "אבג", "hideKeyboard"]) + static func genPadNumberKeys(currencyKey: String) -> [[String]] { + return KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "delete"]) + .addRow(["!", "@", "#", "&", "_", "-", "'", "\"", "(", ")", "return"]) + .addRow(["#+=", "%", "...", "&", ";", ":", "=", "+", "/", "?", "#+="]) + .addRow(["selectKeyboard", "אבג", "space", "אבג", "hideKeyboard"]) + // .replaceKey(row: 1, column: 4, to: currencyKey) + .build() + } + + static func genPadSymbolKeys(currencyKeys: [String]) -> [[String]] { + let keyboardBuilder = KeyboardBuilder() + .addRow(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "delete"]) + .addRow(["^", "€", "$", "£", "[", "]", "'", "\"", "<", ">", "return"]) + .addRow(["123", "§", "|", "~", "*", "·", "{", "}", "\\", "~", "123"]) + .addRow(["selectKeyboard", "אבג", "space", "אבג", "hideKeyboard"]) + + if currencyKeys.count < 3 { + return keyboardBuilder.build() + } else { + return keyboardBuilder + .replaceKey(row: 1, column: 1, to: currencyKeys[0]) + .replaceKey(row: 1, column: 2, to: currencyKeys[1]) + .replaceKey(row: 1, column: 3, to: currencyKeys[2]) .build() } } -/// Gets the keys for the Hebrew keyboard. + // Expanded iPad keyboard layouts for wider devices. + static func genPadExpandedLetterKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"]) + .addRow([SpecialKeys.indent, "/", "'", "פ", "ם", "ן", "ו", "ט", "א", "ר", "ק", "[", "]", "+"]) + .addRow([SpecialKeys.capsLock, "ף", "ך", "ל", "ח", "י", "ע", "כ", "ג", "ד", "ש", ",", "\"", "return"]) + .addRow(["⇧", ";", "ץ", "ת", "צ", "מ", "נ", "ה", "ב", "ס", "ז", ".", "⇧"]) + .addRow(["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"]) + .build() + } + static func genPadExpandedSymbolKeys() -> [[String]] { + return KeyboardBuilder() + .addRow(["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"]) + .addRow([SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "—"]) + .addRow([SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "€", "return"]) + .addRow(["⇧", "…", "?", "!", "~", "≠", "'", "\"", "_", ",", ".", "-", "⇧"]) + .addRow(["selectKeyboard", "אבג", "space", "אבג", "hideKeyboard"]) + .build() + } +} +/// Gets the keys for the Hebrew keyboard. func getHEKeys() { guard let userDefaults = UserDefaults(suiteName: "group.be.scri.userDefaultsContainer") else { fatalError() } - + var currencyKey = HebrewKeyboardConstants.defaultCurrencyKey var currencyKeys = HebrewKeyboardConstants.currencyKeys let dictionaryKey = controllerLanguage + "defaultCurrencySymbol" - + if let currencyValue = userDefaults.string(forKey: dictionaryKey) { currencyKey = currencyValue } else { @@ -149,13 +142,13 @@ func getHEKeys() { if let index = currencyKeys.firstIndex(of: currencyKey) { currencyKeys.remove(at: index) } - + if DeviceType.isPhone { letterKeys = HebrewKeyboardProvider.genPhoneLetterKeys() numberKeys = HebrewKeyboardProvider.genPhoneNumberKeys(currencyKey: currencyKey) symbolKeys = HebrewKeyboardProvider.genPhoneSymbolKeys(currencyKeys: currencyKeys) allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) - + leftKeyChars = ["ק", "1", "-", "[", "_"] rightKeyChars = ["פ", "0", "\"", "=", "·"] centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } @@ -164,25 +157,24 @@ func getHEKeys() { if usingExpandedKeyboard { letterKeys = HebrewKeyboardProvider.genPadExpandedLetterKeys() symbolKeys = HebrewKeyboardProvider.genPadExpandedSymbolKeys() - + allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined()) } else { letterKeys = HebrewKeyboardProvider.genPadLetterKeys() numberKeys = HebrewKeyboardProvider.genPadNumberKeys(currencyKey: currencyKey) symbolKeys = HebrewKeyboardProvider.genPadSymbolKeys(currencyKeys: currencyKeys) - + letterKeys.removeFirst(1) - + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) } - + leftKeyChars = ["1", "ק"] - rightKeyChars = ["הכנס", "hideKeyboard"] + rightKeyChars = [] centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } } - func setHEKeyboardLayout() { getHEKeys() @@ -194,31 +186,28 @@ func setHEKeyboardLayout() { baseAutosuggestions = ["אתמ", "אני", "היי"] numericAutosuggestions = ["", "", ""] - translateKeyLbl = "Translate" - translatePlaceholder = "Translate" + translateKeyLbl = "לְתַרְגֵם" + translatePlaceholder = "לְתַרְגֵם" translatePrompt = commandPromptSpacing + "he -› \(getControllerLanguageAbbr()): " translatePromptAndCursor = translatePrompt + commandCursor translatePromptAndPlaceholder = translatePromptAndCursor + " " + translatePlaceholder translatePromptAndColorPlaceholder = NSMutableAttributedString(string: translatePromptAndPlaceholder) translatePromptAndColorPlaceholder.setColorForText(textForAttribute: translatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) - conjugateKeyLbl = "Conjugate" - conjugatePlaceholder = "Conjugate" - conjugatePrompt = commandPromptSpacing + "Conjucation: " + conjugateKeyLbl = "לְהַטוֹת" + conjugatePlaceholder = "לְהַטוֹת" + conjugatePrompt = commandPromptSpacing + " :נְטִיָה" conjugatePromptAndCursor = conjugatePrompt + commandCursor conjugatePromptAndPlaceholder = conjugatePromptAndCursor + " " + conjugatePlaceholder conjugatePromptAndColorPlaceholder = NSMutableAttributedString(string: conjugatePromptAndPlaceholder) conjugatePromptAndColorPlaceholder.setColorForText(textForAttribute: conjugatePlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) - pluralKeyLbl = "Plural" - pluralPlaceholder = "Plural" - pluralPrompt = commandPromptSpacing + "Plural: " + pluralKeyLbl = "רַבִּים" + pluralPlaceholder = "רַבִּים" + pluralPrompt = commandPromptSpacing + " :רַבִּים" pluralPromptAndCursor = pluralPrompt + commandCursor pluralPromptAndPlaceholder = pluralPromptAndCursor + " " + pluralPlaceholder pluralPromptAndColorPlaceholder = NSMutableAttributedString(string: pluralPromptAndPlaceholder) pluralPromptAndColorPlaceholder.setColorForText(textForAttribute: pluralPlaceholder, withColor: UIColor(cgColor: commandBarPlaceholderColorCG)) - alreadyPluralMsg = "Already in plural form" + alreadyPluralMsg = "כבר בצורת רבים" } - - -// Created by Daniel Geva on 2024/08/30.