Capitalize German nouns in autocompletions even if the keyboard is lower case#597
Capitalize German nouns in autocompletions even if the keyboard is lower case#597Femimat wants to merge 1 commit intoscribe-org:mainfrom
Conversation
Thank you for the pull request! 💙🩵The Scribe-Android team will do our best to address your contribution as soon as we can. The following are some important points:
Note Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible. |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
|
|
Hi @andrewtavis, @DeleMike |
Contributor checklist
./gradlew lintKotlin detekt testcommand as directed in the testing section of the contributing guideDescription
In German, all nouns are capitalized regardless of their position in a sentence. Since the autocompletion system (especially the fallback mechanism added in #556) pulls words from the nouns table, we can identify which suggestions are nouns and ensure they are presented with an uppercase first letter.
I have implemented the following logic in AutocompletionDataManager.kt file:
Noun Tracking: It now populates a germanNouns set whenever German (DE) data is loaded.
Smart Capitalization: In getAutocompletions, it checks if the language is German and if the word exists in the germanNouns set. If either condition is met (user started with a capital letter OR it's a known German noun), the suggestion is capitalised.