added Hinglish
This commit is contained in:
parent
1241951fdd
commit
5b9dd6bac4
8 changed files with 179590 additions and 5 deletions
14
app/languages/definitions/Hinglish.yml
Normal file
14
app/languages/definitions/Hinglish.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
locale: en-IN
|
||||
dictionaryFile: hing-utf8.csv
|
||||
name: Hinglish
|
||||
layout:
|
||||
- [SPECIAL] # 0
|
||||
- [PUNCTUATION] # 1
|
||||
- [a, b, c] # 2
|
||||
- [d, e, f] # 3
|
||||
- [g, h, i] # 4
|
||||
- [j, k, l] # 5
|
||||
- [m, n, o] # 6
|
||||
- [p, q, r, s] # 7
|
||||
- [t, u, v] # 8
|
||||
- [w, x, y, z] # 9
|
||||
179554
app/languages/dictionaries/hing-utf8.csv
Normal file
179554
app/languages/dictionaries/hing-utf8.csv
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -7,6 +7,7 @@ public class LanguageKind {
|
|||
public static boolean isFrench(Language language) { return language != null && language.getId() == 596550; }
|
||||
public static boolean isGreek(Language language) { return language != null && language.getId() == 597381; }
|
||||
public static boolean isHebrew(Language language) { return language != null && (language.getId() == 305450 || language.getId() == 403177); }
|
||||
public static boolean isHinglish(Language language) { return language != null && language.getId() == 468421; }
|
||||
public static boolean isLatinBased(Language language) { return language != null && language.getKeyCharacters(2).contains("a"); }
|
||||
public static boolean isRTL(Language language) { return isArabic(language) || isHebrew(language); }
|
||||
public static boolean isUkrainian(Language language) { return language != null && language.getId() == 54645; }
|
||||
|
|
|
|||
|
|
@ -145,6 +145,10 @@ public class NaturalLanguage extends Language implements Comparable<NaturalLangu
|
|||
|
||||
|
||||
private String getSortingId() {
|
||||
if ("IN".equals(getLocale().getCountry()) && "en".equals(getLocale().getLanguage())) {
|
||||
return "hi";
|
||||
}
|
||||
|
||||
switch (getLocale().getLanguage()) {
|
||||
case "fi":
|
||||
return "su";
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import java.util.Set;
|
|||
import io.github.sspanak.tt9.BuildConfig;
|
||||
import io.github.sspanak.tt9.R;
|
||||
import io.github.sspanak.tt9.db.entities.WordFile;
|
||||
import io.github.sspanak.tt9.languages.LanguageKind;
|
||||
import io.github.sspanak.tt9.languages.NaturalLanguage;
|
||||
import io.github.sspanak.tt9.preferences.PreferencesActivity;
|
||||
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
||||
|
|
@ -44,8 +45,12 @@ public class PreferenceSwitchLanguage extends SwitchPreferenceCompat {
|
|||
|
||||
|
||||
private String generateSummary(Activity activity, NaturalLanguage language) {
|
||||
StringBuilder summary = new StringBuilder(language.getLocale().getDisplayLanguage());
|
||||
// name
|
||||
StringBuilder summary = new StringBuilder(
|
||||
LanguageKind.isHinglish(language) ? language.getName() : language.getLocale().getDisplayLanguage()
|
||||
);
|
||||
|
||||
// word count
|
||||
WordFile wordFile = new WordFile(activity, language.getDictionaryFile(), activity.getAssets());
|
||||
summary
|
||||
.append(", ")
|
||||
|
|
@ -53,6 +58,7 @@ public class PreferenceSwitchLanguage extends SwitchPreferenceCompat {
|
|||
wordFile.getFormattedTotalLines(activity.getString(R.string.language_selection_words))
|
||||
);
|
||||
|
||||
// download size
|
||||
if (BuildConfig.LITE) {
|
||||
summary.append(", ").append(wordFile.getFormattedSize());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue