Skip to content

Commit

Permalink
scribe-org#421 ran swiftlint --fix to solve 'trailing_comma' errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mostazomarc committed May 5, 2024
1 parent 49adfd0 commit 3374f9e
Show file tree
Hide file tree
Showing 29 changed files with 154 additions and 154 deletions.
6 changes: 3 additions & 3 deletions Keyboards/KeyboardsBase/InterfaceVariables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var keyboard = [[String]]()
var usingExpandedKeyboard = false
var allKeys = [String]()
let specialKeys = [
SpecialKeys.indent, SpecialKeys.capsLock, "shift", "delete", "ABC", "АБВ", "123", "#+=", "selectKeyboard", "space", "return", ".?123", "hideKeyboard",
SpecialKeys.indent, SpecialKeys.capsLock, "shift", "delete", "ABC", "АБВ", "123", "#+=", "selectKeyboard", "space", "return", ".?123", "hideKeyboard"
]
var allNonSpecialKeys = [String]()
var keyboardHeight: CGFloat!
Expand Down Expand Up @@ -169,7 +169,7 @@ let languagesAbbrDict = [
"Portuguese": "pt",
"Russian": "ru",
"Spanish": "es",
"Swedish": "sv",
"Swedish": "sv"
]

/// Returns the abbreviation of the language for use in commands.
Expand All @@ -189,7 +189,7 @@ let keyboardLayoutDict: [String: () -> Void] = [
"Portuguese": setPTKeyboardLayout,
"Russian": setRUKeyboardLayout,
"Spanish": setESKeyboardLayout,
"Swedish": setSVKeyboardLayout,
"Swedish": setSVKeyboardLayout
]

/// Sets the keyboard layout and its alternate keys.
Expand Down
2 changes: 1 addition & 1 deletion Keyboards/KeyboardsBase/KeyAltChars.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func setKeyboardAlternateKeys() {
"'": apostropheAlternateKeys,
"\"": quotationAlternateKeys,
"=": equalSignAlternateKeys,
currencySymbol: currencySymbolAlternates,
currencySymbol: currencySymbolAlternates
]
}

Expand Down
2 changes: 1 addition & 1 deletion Keyboards/KeyboardsBase/KeyboardStyling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var keysThatAreSlightlyLarger = [
"capslock",
"capslock.fill",
"arrow.forward.to.line",
"arrowtriangle.right.fill",
"arrowtriangle.right.fill"
]

/// Get the icon configurations for keys if the device is an iPhone.
Expand Down
22 changes: 11 additions & 11 deletions Keyboards/KeyboardsBase/KeyboardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all buttons for the 3x2 conjugation display.
func get3x2FormDisplayButtons() -> [UIButton] {
let conjugationButtons: [UIButton] = [
formKeyFPS, formKeySPS, formKeyTPS, formKeyFPP, formKeySPP, formKeyTPP,
formKeyFPS, formKeySPS, formKeyTPS, formKeyFPP, formKeySPP, formKeyTPP
]

return conjugationButtons
Expand All @@ -995,7 +995,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all labels for the 3x2 conjugation display.
func get3x2FormDisplayLabels() -> [UIButton] {
let conjugationLabels: [UIButton] = [
formLblFPS, formLblSPS, formLblTPS, formLblFPP, formLblSPP, formLblTPP,
formLblFPS, formLblSPS, formLblTPS, formLblFPP, formLblSPP, formLblTPP
]

return conjugationLabels
Expand Down Expand Up @@ -1032,7 +1032,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all buttons for the 3x1 conjugation display
func get3x1FormDisplayButtons() -> [UIButton] {
let conjugationButtons: [UIButton] = [
formKeyTop, formKeyMiddle, formKeyBottom,
formKeyTop, formKeyMiddle, formKeyBottom
]

return conjugationButtons
Expand All @@ -1045,7 +1045,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all labels for the 3x1 conjugation display.
func get3x1FormDisplayLabels() -> [UIButton] {
let conjugationLabels: [UIButton] = [
formLblTop, formLblMiddle, formLblBottom,
formLblTop, formLblMiddle, formLblBottom
]

return conjugationLabels
Expand Down Expand Up @@ -1080,7 +1080,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all buttons for the 2x2 conjugation display
func get2x2FormDisplayButtons() -> [UIButton] {
let conjugationButtons: [UIButton] = [
formKeyTL, formKeyTR, formKeyBL, formKeyBR,
formKeyTL, formKeyTR, formKeyBL, formKeyBR
]

return conjugationButtons
Expand All @@ -1094,7 +1094,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all labels for the 2x2 conjugation display.
func get2x2FormDisplayLabels() -> [UIButton] {
let conjugationLabels: [UIButton] = [
formLblTL, formLblTR, formLblBL, formLblBR,
formLblTL, formLblTR, formLblBL, formLblBR
]

return conjugationLabels
Expand Down Expand Up @@ -1129,7 +1129,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all buttons for the 1x2 conjugation display
func get1x2FormDisplayButtons() -> [UIButton] {
let conjugationButtons: [UIButton] = [
formKeyLeft, formKeyRight,
formKeyLeft, formKeyRight
]

return conjugationButtons
Expand All @@ -1141,7 +1141,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all labels for the 1x2 conjugation display.
func get1x2FormDisplayLabels() -> [UIButton] {
let conjugationLabels: [UIButton] = [
formLblLeft, formLblRight,
formLblLeft, formLblRight
]

return conjugationLabels
Expand Down Expand Up @@ -1172,7 +1172,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all buttons for the 1x1 conjugation display
func get1x1FormDisplayButtons() -> [UIButton] {
let conjugationButtons: [UIButton] = [
formKeySingle,
formKeySingle
]

return conjugationButtons
Expand All @@ -1183,7 +1183,7 @@ class KeyboardViewController: UIInputViewController {
/// Returns all labels for the 1x1 conjugation display.
func get1x1FormDisplayLabels() -> [UIButton] {
let conjugationLabels: [UIButton] = [
formLblSingle,
formLblSingle
]

return conjugationLabels
Expand Down Expand Up @@ -1253,7 +1253,7 @@ class KeyboardViewController: UIInputViewController {
&& [
.accusativeDefinite, .accusativeIndefinite, .accusativeDemonstrative,
.dativeDefinite, .dativeIndefinite, .dativeDemonstrative,
.genitiveDefinite, .genitiveIndefinite, .genitiveDemonstrative,
.genitiveDefinite, .genitiveIndefinite, .genitiveDemonstrative
].contains(deCaseDeclensionState)
{
formsDisplayDimensions = .view2x2
Expand Down
6 changes: 3 additions & 3 deletions Keyboards/KeyboardsBase/ScribeFunctionality/Annotate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ var nounFormToColorDict = [
"Ж": annotateRed,
"М": annotateBlue,
"Н": annotateGreen,
"МН": annotateOrange,
"МН": annotateOrange
]

// Dictionary to convert noun annotations into the keyboard language.
let nounAnnotationConversionDict = [
"Swedish": ["C": "U"],
"Russian": ["F": "Ж", "M": "М", "N": "Н", "PL": "МН"],
"Russian": ["F": "Ж", "M": "М", "N": "Н", "PL": "МН"]
]

// Dictionary to convert case annotations into the keyboard language.
let prepAnnotationConversionDict = [
"German": ["Acc": "Akk"],
"Russian": ["Acc": "Вин", "Dat": "Дат", "Gen": "Род", "Loc": "Мес", "Pre": "Пре", "Ins": "Инс"],
"Russian": ["Acc": "Вин", "Dat": "Дат", "Gen": "Род", "Loc": "Мес", "Pre": "Пре", "Ins": "Инс"]
]

/// The base function for annotation that's accessed by `selectedWordAnnotation` and `typedWordAnnotation`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class CommandBar: UILabel {
infoButton.heightAnchor.constraint(equalTo: heightAnchor),
infoButton.widthAnchor.constraint(equalTo: heightAnchor),
infoButton.centerYAnchor.constraint(equalTo: centerYAnchor),
infoButton.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -8),
infoButton.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -8)
])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ var formLabelsDict = [
"BR": "",
"Left": "",
"Right": "",
"Single": "",
"Single": ""
]

var verbToConjugate = ""
Expand Down
6 changes: 3 additions & 3 deletions Keyboards/KeyboardsBase/ScribeFunctionality/Conjugate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let keyboardConjTitleDict: [String: Any] = [
"Portuguese": ptGetConjugationTitle,
"Russian": ruGetConjugationTitle,
"Spanish": esGetConjugationTitle,
"Swedish": svGetConjugationTitle,
"Swedish": svGetConjugationTitle
]

// Dictionary for accessing keyboard conjugation state.
Expand All @@ -38,7 +38,7 @@ let keyboardConjStateDict: [String: Any] = [
"Portuguese": ptGetConjugationState,
"Russian": ruGetConjugationState,
"Spanish": esGetConjugationState,
"Swedish": svGetConjugationState,
"Swedish": svGetConjugationState
]

// Dictionary for accessing keyboard conjugation state.
Expand All @@ -49,7 +49,7 @@ let keyboardConjLabelDict: [String: Any] = [
"Portuguese": ptSetConjugationLabels,
"Russian": ruSetConjugationLabels,
"Spanish": esSetConjugationLabels,
"Swedish": svSetConjugationLabels,
"Swedish": svSetConjugationLabels
]

/// Returns a declension once a user presses a key in the conjugateView.
Expand Down
4 changes: 2 additions & 2 deletions Keyboards/KeyboardsBase/ScribeFunctionality/ScribeKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ScribeKey: UIButton {
func setFullCornerRadius() {
layer.borderColor = UIColor.clear.cgColor // border is set by the shadow
layer.maskedCorners = [
.layerMinXMinYCorner, .layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner,
.layerMinXMinYCorner, .layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner
]
}

Expand All @@ -102,7 +102,7 @@ class ScribeKey: UIButton {
shadow.backgroundColor = specialKeyColor
shadow.layer.cornerRadius = commandKeyCornerRadius
shadow.layer.maskedCorners = [
.layerMinXMinYCorner, .layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner,
.layerMinXMinYCorner, .layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner
]
shadow.clipsToBounds = true
shadow.layer.masksToBounds = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum InformationToolTipData {
attributes: [
NSAttributedString.Key.font: UIFont.systemFont(
ofSize: DeviceType.isPhone ? letterKeyWidth / 2 : letterKeyWidth / 2.5
),
)
]
)

Expand All @@ -35,7 +35,7 @@ enum InformationToolTipData {
attributes: [
NSAttributedString.Key.font: UIFont.systemFont(
ofSize: DeviceType.isPhone ? letterKeyWidth / 2 : letterKeyWidth / 2.5
),
)
]
)

Expand All @@ -44,15 +44,15 @@ enum InformationToolTipData {
attributes: [
NSAttributedString.Key.font: UIFont.systemFont(
ofSize: DeviceType.isPhone ? letterKeyWidth / 2 : letterKeyWidth / 2.75
),
)
]
)

static func getContent() -> [NSMutableAttributedString] {
[
InformationToolTipData.wikiDataExplanation,
InformationToolTipData.wikiDataContationOrigin,
InformationToolTipData.howToContribute,
InformationToolTipData.howToContribute
]
}
}
16 changes: 8 additions & 8 deletions Keyboards/LanguageKeyboards/Danish/DAInterfaceVariables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ public enum DanishKeyboardConstants {
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "æ", "ø"],
["shift", "z", "x", "c", "v", "b", "n", "m", "delete"],
["123", "selectKeyboard", "space", "return"], // "undo"
["123", "selectKeyboard", "space", "return"] // "undo"
]

static let numberKeysPhone = [
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"],
["-", "/", ":", ";", "(", ")", "", "&", "@", "\""],
["#+=", ".", ",", "?", "!", "'", "delete"],
["ABC", "selectKeyboard", "space", "return"], // "undo"
["ABC", "selectKeyboard", "space", "return"] // "undo"
]

static let symbolKeysPhone = [
["[", "]", "{", "}", "#", "%", "^", "*", "+", "="],
["_", "\\", "|", "~", "<", ">", "", "£", "¥", "·"],
["123", ".", ",", "?", "!", "'", "delete"],
["ABC", "selectKeyboard", "space", "return"], // "undo"
["ABC", "selectKeyboard", "space", "return"] // "undo"
]

// iPad keyboard layouts.
Expand All @@ -48,21 +48,21 @@ public enum DanishKeyboardConstants {
["q", "w", "e", "r", "t", "y", "u", "i", "o", "æ", "ø", "delete"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "return"],
["shift", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"],
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undo"
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"] // "undo"
]

static let numberKeysPad = [
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "`", "delete"],
["@", "#", "kr", "&", "*", "(", ")", "'", "\"", "+", "·", "return"],
["#+=", "%", "_", "-", "=", "/", ";", ":", ",", ".", "?", "#+="],
["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "undo"
["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"] // "undo"
]

static let symbolKeysPad = [
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "'", "delete"],
["", "$", "£", "^", "[", "]", "{", "}", "", "", "...", "return"],
["123", "§", "|", "~", "", "", "\\", "<", ">", "!", "?", "123"],
["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "undo"
["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"] // "undo"
]

// Expanded iPad keyboard layouts for wider devices.
Expand All @@ -71,15 +71,15 @@ public enum DanishKeyboardConstants {
[SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å", "@", "¨"],
[SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "æ", "ø", "'", "return"],
["shift", "*", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"],
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble"
["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"] // "microphone", "scribble"
]

static let symbolKeysPadExpanded = [
["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"],
[SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", ""],
[SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo"
["shift", "", "?", "!", "", "'", "\"", "_", "", ",", ".", "-", "shift"], // "redo"
["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble"
["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"] // "microphone", "scribble"
]

// Alternate key vars.
Expand Down
Loading

0 comments on commit 3374f9e

Please sign in to comment.