regression: fixed incorrect labels on 0- and 1-key in Hindi
This commit is contained in:
parent
819621cb98
commit
b6dd388c71
2 changed files with 9 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
|||
import java.util.Locale;
|
||||
|
||||
import io.github.sspanak.tt9.languages.exceptions.InvalidLanguageCharactersException;
|
||||
import io.github.sspanak.tt9.util.chars.Characters;
|
||||
|
||||
abstract public class Language {
|
||||
protected int id;
|
||||
|
|
@ -77,7 +78,7 @@ abstract public class Language {
|
|||
|
||||
boolean hasCharsOn0 = false;
|
||||
for (String ch : getKeyCharacters(0)) {
|
||||
if (Character.isAlphabetic(ch.charAt(0))) {
|
||||
if (Character.isAlphabetic(ch.charAt(0)) && !Characters.isOm(ch.charAt(0))) {
|
||||
hasCharsOn0 = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -85,7 +86,7 @@ abstract public class Language {
|
|||
|
||||
boolean hasCharsOn1 = false;
|
||||
for (String ch : getKeyCharacters(1)) {
|
||||
if (Character.isAlphabetic(ch.charAt(0))) {
|
||||
if (Character.isAlphabetic(ch.charAt(0)) && !Characters.isOm(ch.charAt(0))) {
|
||||
hasCharsOn1 = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,4 +67,10 @@ public class Characters extends Emoji {
|
|||
public static boolean isFathatan(char ch) {
|
||||
return ch == 0x064B;
|
||||
}
|
||||
|
||||
public static boolean isOm(char ch) {
|
||||
return
|
||||
ch == 0x0950 // Devanagari
|
||||
|| ch == 0x0AD0; // Gujarati
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue