From dc554ed5add695bbec6c7320fa2017e0f663f5a2 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Fri, 16 Aug 2024 01:54:48 +0200 Subject: [PATCH] #7 update changelog, fix conjugation table vals, fix plural bug --- CHANGELOG.md | 8 ++++++++ Keyboards/KeyboardsBase/KeyboardViewController.swift | 4 ++-- Keyboards/KeyboardsBase/ScribeFunctionality/Plural.swift | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fab665b..bae6f8eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ Emojis for the following are chosen based on [gitmoji](https://gitmoji.dev/). # [Upcoming] Scribe-iOS 3.2.0 +### ⌨️ New Keyboards + +- Adds an English keyboard ([#7](https://github.com/scribe-org/Scribe-iOS/issues/7)). + ### ✨ New Features - Scribe commands can now be triggered directly on a selected word by pressing the Scribe key and then choosing which command to use ([#141](https://github.com/scribe-org/Scribe-iOS/issues/141)). @@ -31,6 +35,10 @@ Emojis for the following are chosen based on [gitmoji](https://gitmoji.dev/). - Localization strings for English, German, Swedish and Spanish have been added for all remaining app texts ([Scribe-i18n#28](https://github.com/scribe-org/Scribe-i18n/issues/28)). +### 🐞 Bug Fixes + +- The plural command now reacts to the capitalization of the input word when a word that's already plural is entered. + # Scribe-iOS 3.1.0 ### ✨ New Features diff --git a/Keyboards/KeyboardsBase/KeyboardViewController.swift b/Keyboards/KeyboardsBase/KeyboardViewController.swift index 28cc5ded..54fad788 100644 --- a/Keyboards/KeyboardsBase/KeyboardViewController.swift +++ b/Keyboards/KeyboardsBase/KeyboardViewController.swift @@ -1559,9 +1559,9 @@ class KeyboardViewController: UIInputViewController { conjugationToDisplay = simple[0] + "/" + conjugationToDisplay } else if index == 1 && allConjugations[index] == "presPart" { if enConjugationState == .present { - conjugationToDisplay = "am/are/is/" + conjugationToDisplay + conjugationToDisplay = "am/are/is " + conjugationToDisplay } else { - conjugationToDisplay = "was/were/" + conjugationToDisplay + conjugationToDisplay = "was/were " + conjugationToDisplay } } else if index == 3 && allConjugations[index] == "presPerfTPS" { conjugationToDisplay = "have/" + conjugationToDisplay diff --git a/Keyboards/KeyboardsBase/ScribeFunctionality/Plural.swift b/Keyboards/KeyboardsBase/ScribeFunctionality/Plural.swift index 90757025..00068c10 100644 --- a/Keyboards/KeyboardsBase/ScribeFunctionality/Plural.swift +++ b/Keyboards/KeyboardsBase/ScribeFunctionality/Plural.swift @@ -64,7 +64,11 @@ func queryPluralNoun(queriedNoun: String) { proxy.insertText(wordToReturn + getOptionalSpace()) } } else { - proxy.insertText(noun + getOptionalSpace()) + if inputWordIsCapitalized { + proxy.insertText(noun.capitalized + getOptionalSpace()) + } else { + proxy.insertText(noun + getOptionalSpace()) + } commandState = .alreadyPlural } }