Skip to content

Commit

Permalink
#339 changelog edits and minor code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Oct 17, 2023
1 parent 759face commit f56b4df
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 26 deletions.
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ Emojis for the following are chosen based on [gitmoji](https://gitmoji.dev/).
- German imperfect verb conjugations now insert both the auxiliary verb and the past participle with the cursor between them.
- Adds a new menu to the Scribe app allowing users to set their preferences for their respective language keyboards!
- Users now have easy access to the Scribe GitHub, the Matrix community, rating the app, sending bug reports and emailing the team.
- A menu option has been added that allows the user to add a command and period to the baseline letter keys.
- A menu option has been added that allows the user to disable emoji autosuggestions and autocompletions.
- Settings options include:
- Allowing the user to add a command and period to the letter keys.
- Allowing the user to disable emoji autosuggestions and autocompletions.
- Allowing the user to disable accented characters on the letter keys.
- Mneu screens can be swiped between via an implementation using SwipeableTabBarController.

<!-- ### 🎨 Design Changes
### 🎨 Design Changes

- iPad keyboards are now more reflective of their system keyboard counterparts for devices above a certain width.

<!-- ### 🐞 Bug Fixes
- iPad keyboards are now more reflective of their system keyboard counterparts for devices above a certain width. -->
- Bugs were fixed that were causing the autocompletions to trigger to regularly. -->

# Scribe-iOS 2.3.0

Expand Down
9 changes: 5 additions & 4 deletions Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public enum GermanKeyboardConstants {
["shift", "y", "x", "c", "v", "b", "n", "m", "delete"],
["123", "selectKeyboard", "space", "return"], // "undo"
]

static let letterKeysPhoneDisableAccents = [
["q", "w", "e", "r", "t", "z", "u", "i", "o", "p"],
["a", "s", "d", "f", "g", "h", "j", "k", "l"],
Expand Down Expand Up @@ -44,7 +44,7 @@ public enum GermanKeyboardConstants {
["shift", "y", "x", "c", "v", "b", "n", "m", ",", ".", "ß", "shift"],
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undo"
]

static let letterKeysPadDisableAccents = [
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"],
["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "delete"],
Expand Down Expand Up @@ -75,7 +75,7 @@ public enum GermanKeyboardConstants {
["shift", "<", "y", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"],
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble"
]

static let letterKeysPadExpandedDisableAccents = [
["^", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ß", "´", "delete"],
["indent", "q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "+", "*"],
Expand Down Expand Up @@ -116,7 +116,7 @@ public enum GermanKeyboardConstants {
/// Gets the keys for the German keyboard.
func getDEKeys() {
let userDefaults = UserDefaults(suiteName: "group.scribe.userDefaultsContainer")!

if DeviceType.isPhone {
if userDefaults.bool(forKey: "deAccentCharacters") {
letterKeys = GermanKeyboardConstants.letterKeysPhoneDisableAccents
Expand Down Expand Up @@ -176,6 +176,7 @@ func getDEKeys() {
zAlternateKeys = GermanKeyboardConstants.zAlternateKeys
cAlternateKeys = GermanKeyboardConstants.cAlternateKeys
nAlternateKeys = GermanKeyboardConstants.nAlternateKeys

if userDefaults.bool(forKey: "deAccentCharacters") {
aAlternateKeys = GermanKeyboardConstants.aAlternateKeysDisableAccents
oAlternateKeys = GermanKeyboardConstants.oAlternateKeysDisableAccents
Expand Down
11 changes: 6 additions & 5 deletions Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public enum SpanishKeyboardConstants {
["shift", "z", "x", "c", "v", "b", "n", "m", "delete"],
["123", "selectKeyboard", "space", "return"], // "undo"
]

static let letterKeysPhoneDisableAccents = [
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p"],
["a", "s", "d", "f", "g", "h", "j", "k", "l"],
Expand Down Expand Up @@ -44,7 +44,7 @@ public enum SpanishKeyboardConstants {
["shift", "z", "x", "c", "v", "b", "n", "m", ",", ".", "shift"],
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undo"
]

static let letterKeysPadDisableAccents = [
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"],
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "delete"],
Expand Down Expand Up @@ -75,7 +75,7 @@ public enum SpanishKeyboardConstants {
["shift", "|", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"],
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble"
]

static let letterKeysPadExpandedDisableAccents = [
["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "'", "¿", "delete"],
["indent", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "'", "+", "*"],
Expand Down Expand Up @@ -105,14 +105,14 @@ public enum SpanishKeyboardConstants {
static let cAlternateKeys = ["ç", "ć", "č"]
static let dAlternateKeys = ["đ"]
static let nAlternateKeys = ["ń"]
static let nAlternateKeysDisableAccents = ["ń","ñ"]
static let nAlternateKeysDisableAccents = ["ń", "ñ"]
static let sAlternateKeys = ["š"]
}

/// Gets the keys for the Spanish keyboard.
func getESKeys() {
let userDefaults = UserDefaults(suiteName: "group.scribe.userDefaultsContainer")!

if DeviceType.isPhone {
if userDefaults.bool(forKey: "esAccentCharacters") {
letterKeys = SpanishKeyboardConstants.letterKeysPhoneDisableAccents
Expand Down Expand Up @@ -172,6 +172,7 @@ func getESKeys() {
sAlternateKeys = SpanishKeyboardConstants.sAlternateKeys
dAlternateKeys = SpanishKeyboardConstants.dAlternateKeys
cAlternateKeys = SpanishKeyboardConstants.cAlternateKeys

if userDefaults.bool(forKey: "esAccentCharacters") {
nAlternateKeys = SpanishKeyboardConstants.nAlternateKeysDisableAccents
} else {
Expand Down
27 changes: 14 additions & 13 deletions Keyboards/LanguageKeyboards/Swedish/SVInterfaceVariables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public enum SwedishKeyboardConstants {
["shift", "y", "x", "c", "v", "b", "n", "m", "delete"],
["123", "selectKeyboard", "space", "return"], // "undo"
]

static let letterKeysPhoneDisableAccents = [
["q", "w", "e", "r", "t", "z", "u", "i", "o", "p"],
["a", "s", "d", "f", "g", "h", "j", "k", "l"],
Expand Down Expand Up @@ -44,7 +44,7 @@ public enum SwedishKeyboardConstants {
["shift", "y", "x", "c", "v", "b", "n", "m", ",", ".", "?", "shift"],
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undo"
]

static let letterKeysPadDisableAccents = [
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "+"],
["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "delete"],
Expand Down Expand Up @@ -75,7 +75,7 @@ public enum SwedishKeyboardConstants {
["shift", "<", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"],
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble"
]

static let letterKeysPadExpandedDisableAccents = [
["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "+", "'", "delete"],
["indent", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "^", "*"],
Expand Down Expand Up @@ -104,7 +104,7 @@ public enum SwedishKeyboardConstants {
static let eAlternateKeys = ["é", "ë", "è", "ê", "", "ē", "ę"]
static let iAlternateKeys = ["ī", "î", "í", "ï", "ì", "ĩ"]
static let oAlternateKeys = ["ō", "õ", "ô", "ò", "ó", "œ"]
static let oAlternateKeysDisableAccents = ["ō", "õ", "ô", "ò", "ó", "œ","ö","ø"]
static let oAlternateKeysDisableAccents = ["ō", "õ", "ô", "ò", "ó", "œ", "ö", "ø"]
static let uAlternateKeys = ["û", "ú", "ü", "ù", "ũ", "ū"]
static let äAlternateKeys = ["æ"]
static let öAlternateKeys = ["ø"]
Expand All @@ -116,7 +116,7 @@ public enum SwedishKeyboardConstants {
/// Gets the keys for the Swedish keyboard.
func getSVKeys() {
let userDefaults = UserDefaults(suiteName: "group.scribe.userDefaultsContainer")!

if DeviceType.isPhone {
if userDefaults.bool(forKey: "svAccentCharacters") {
letterKeys = SwedishKeyboardConstants.letterKeysPhoneDisableAccents
Expand Down Expand Up @@ -158,13 +158,21 @@ func getSVKeys() {

allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined())
}

leftKeyChars = ["q", "a", "1", "@", ""]
// TODO: add "å" to rightKeyChar if the keyboard has 4 rows.
rightKeyChars = []
centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) }
}

keysWithAlternatesLeft = SwedishKeyboardConstants.keysWithAlternatesLeft
eAlternateKeys = SwedishKeyboardConstants.eAlternateKeys
iAlternateKeys = SwedishKeyboardConstants.iAlternateKeys
uAlternateKeys = SwedishKeyboardConstants.uAlternateKeys
sAlternateKeys = SwedishKeyboardConstants.sAlternateKeys
cAlternateKeys = SwedishKeyboardConstants.cAlternateKeys
nAlternateKeys = SwedishKeyboardConstants.nAlternateKeys

if userDefaults.bool(forKey: "svAccentCharacters") {
keysWithAlternates = SwedishKeyboardConstants.keysWithAlernatesDisableAccents
keysWithAlternatesRight = SwedishKeyboardConstants.keysWithAlternatesRightDisableAccents
Expand All @@ -178,13 +186,6 @@ func getSVKeys() {
äAlternateKeys = SwedishKeyboardConstants.äAlternateKeys
öAlternateKeys = SwedishKeyboardConstants.öAlternateKeys
}
keysWithAlternatesLeft = SwedishKeyboardConstants.keysWithAlternatesLeft
eAlternateKeys = SwedishKeyboardConstants.eAlternateKeys
iAlternateKeys = SwedishKeyboardConstants.iAlternateKeys
uAlternateKeys = SwedishKeyboardConstants.uAlternateKeys
sAlternateKeys = SwedishKeyboardConstants.sAlternateKeys
cAlternateKeys = SwedishKeyboardConstants.cAlternateKeys
nAlternateKeys = SwedishKeyboardConstants.nAlternateKeys
}

/// Provides the Swedish keyboard layout.
Expand Down

0 comments on commit f56b4df

Please sign in to comment.