Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Emojis for the following are chosen based on [gitmoji](https://gitmoji.dev/).
- Downloading or checking for language data updates no longer crashes the app when the server returns a malformed timestamp ([#700](https://github.com/scribe-org/Scribe-Android/issues/700)).
- Native dictionaries are re-extracted after an app update so autosuggestions no longer use dictionaries from a previous install ([#701](https://github.com/scribe-org/Scribe-Android/issues/701)).
- Tutorial practice text is now preserved across configuration changes such as device rotation ([#736](https://github.com/scribe-org/Scribe-Android/issues/736)).
- Verb conjugation lookups in the keyboard now support case-insensitive matching, inflected forms, and fallback to downloaded language databases, resolving "Not in Wikidata" errors ([#598](https://github.com/scribe-org/Scribe-Android/issues/598), [#738](https://github.com/scribe-org/Scribe-Android/issues/738)).

### 🔒 Security

Expand Down
6 changes: 4 additions & 2 deletions app/src/main/java/be/scri/helpers/DatabaseFileManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class DatabaseFileManager(
* @return An open, read-only [SQLiteDatabase] instance, or `null` on failure.
*/
fun getLanguageDatabase(language: String): SQLiteDatabase? {
val dbName = "${language}LanguageData.sqlite"
val normalizedLang = language.uppercase()
val dbName = "${normalizedLang}LanguageData.sqlite"
val dbFile = context.getDatabasePath(dbName)

if (!dbFile.exists()) {
Expand Down Expand Up @@ -72,7 +73,8 @@ class DatabaseFileManager(
* @return An open, read-only [SQLiteDatabase] instance, or `null` on failure.
*/
fun getConjugateDatabase(language: String): SQLiteDatabase? {
val dbName = "${language}ConjugateData.sqlite"
val normalizedLang = language.uppercase()
val dbName = "${normalizedLang}ConjugateData.sqlite"
val dbFile = context.getDatabasePath(dbName)

if (!dbFile.exists()) {
Expand Down
Loading
Loading