Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 28 #434

Merged
merged 39 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
597b81a
Skipped unnecessary SQLite index creation on the very first start. In…
sspanak Feb 10, 2024
a03520e
minor gradle script improvements
sspanak Feb 10, 2024
990c88b
upgraded Gradle 8.0.2 -> 8.2.2
sspanak Feb 10, 2024
beb715c
removed YAML validator, because it breaks R8 and because the language…
sspanak Feb 10, 2024
d73ac91
fixed a spelling mistake
sspanak Feb 10, 2024
356b735
automatic language selection on startup
sspanak Feb 11, 2024
6404da5
automatic database initialization on startup
sspanak Feb 11, 2024
77218e4
clicking on the dictionary loading notification now opens the Settings
sspanak Feb 11, 2024
b2d9794
enabled the filtering hotkeys and the suggestion hotkeys by default w…
sspanak Feb 11, 2024
9ddedac
added a hack for sending with OK in Google Chat
sspanak Feb 11, 2024
fcda338
multi-press protection hack
sspanak Feb 11, 2024
e8176d1
finer log level controls
sspanak Feb 12, 2024
f3b4a95
Adding words, word normalization and typing in Predictive mode are no…
sspanak Feb 12, 2024
5b5ee52
documentation update
sspanak Feb 11, 2024
bd7e680
added currency character typing in all modes
sspanak Feb 13, 2024
390f642
AndroidManifest.xml versionCode is now automatically updated (require…
sspanak Feb 13, 2024
d16df89
automatic APK name
sspanak Feb 13, 2024
a70dd44
Text and Language tools code cleanup
sspanak Feb 15, 2024
87c8a59
fixed holding the virtual keyboard keys in 123 mode typing the wrong …
sspanak Feb 17, 2024
6c59964
fixed uppercase uppercase or capitalized words sometimes not becoming…
sspanak Feb 20, 2024
ef362c6
fixed the virtual keyboard ignoring number key presses, after the sam…
sspanak Feb 20, 2024
68f3e02
dictionary properties are now calculated in parallel for faster build…
sspanak Feb 19, 2024
8cb3458
db migrations
sspanak Feb 19, 2024
a0331e3
fixed progress not displayed on the Preferences screen, after auto-lo…
sspanak Feb 20, 2024
06bdc56
fixed the auto-update reminder being too aggressive
sspanak Feb 20, 2024
cfd17c6
English: spelling fixes and a couple of new words
sspanak Feb 20, 2024
628caaf
Bulgarian: fixed the spelling of a couple of words, and added a few more
sspanak Feb 20, 2024
28bf457
fixed auto-space after words not working, because of misspelled funct…
sspanak Feb 21, 2024
fc6bce3
dictionary update prompt was too conservative; this must be it
sspanak Feb 21, 2024
3e9ecd0
a script for removing compound words consisting of existing simple words
sspanak Feb 22, 2024
823caaf
cosmetic fixes + a couple of new special characters
sspanak Feb 23, 2024
4838018
removed the Irish "O'" names from French and German to prevent typing…
sspanak Feb 23, 2024
2d022f6
small improvements in the word processing scripts
sspanak Feb 23, 2024
8fd01a9
removed Hebrew status icons which are long not in use
sspanak Feb 23, 2024
083262f
language list is now properly sorted on Android < 7.0
sspanak Feb 24, 2024
57ecef1
AndroidManifest.xml versionName is also automatically updated on build
sspanak Feb 24, 2024
884710b
Updated Ukrainian translation (#440)
WallK Feb 23, 2024
bf954c1
documentation update
sspanak Feb 22, 2024
5f4493a
Portuguese (#438)
sspanak Feb 26, 2024
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
Prev Previous commit
Next Next commit
language list is now properly sorted on Android < 7.0
  • Loading branch information
sspanak committed Feb 24, 2024
commit 083262fedd8fb59d0c45501c30ca81bb32b5749d
10 changes: 9 additions & 1 deletion app/src/main/java/io/github/sspanak/tt9/languages/Language.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.Locale;


public class Language {
public class Language implements Comparable<Language> {
public static String SPECIAL_CHARS_KEY = "0";
public static String PUNCTUATION_KEY = "1";

Expand Down Expand Up @@ -271,4 +271,12 @@ public String getDigitSequenceForWord(String word) throws InvalidLanguageCharact
public String toString() {
return getName();
}


@Override
public int compareTo(Language other) {
String key = getName().equals("Suomi") ? "su" : getLocale().toString();
String otherKey = other.getName().equals("Suomi") ? "su" : other.getLocale().toString();
return key.compareTo(otherKey);
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package io.github.sspanak.tt9.languages;

import android.content.Context;
import android.os.Build;

import androidx.annotation.Nullable;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.Collections;
import java.util.HashMap;

import io.github.sspanak.tt9.Logger;
Expand Down Expand Up @@ -77,10 +76,11 @@ public static ArrayList<Language> getAll(Context context, ArrayList<Integer> lan
}
}

if (sort && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
langList.sort(Comparator.comparing(l -> l.getLocale().toString()));
if (sort) {
Collections.sort(langList);
}


return langList;
}

Expand All @@ -91,8 +91,8 @@ public static ArrayList<Language> getAll(Context context, ArrayList<Integer> lan
public static ArrayList<Language> getAll(Context context, boolean sort) {
ArrayList<Language> langList = new ArrayList<>(getInstance(context).languages.values());

if (sort && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
langList.sort(Comparator.comparing(l -> l.getLocale().toString()));
if (sort) {
Collections.sort(langList);
}

return langList;
Expand All @@ -108,7 +108,9 @@ public static String toString(ArrayList<Language> list) {

for (int i = 0; i < listSize; i++) {
stringList.append(list.get(i));
stringList.append((i < listSize - 1) ? ", " : " ");
if (i < listSize - 1) {
stringList.append(", ");
}
}

return stringList.toString();
Expand Down