added support for keys without letters
This commit is contained in:
parent
c844db1fa1
commit
afa509cee0
4 changed files with 4 additions and 3 deletions
|
|
@ -38,7 +38,7 @@ class LocaleWordsSorter {
|
|||
|
||||
|
||||
ArrayList<String> sort(ArrayList<String> words) {
|
||||
if (sortingPattern == null || words == null) {
|
||||
if (sortingPattern == null || words == null || words.isEmpty()) {
|
||||
return words;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ public class NaturalLanguage extends Language implements Comparable<NaturalLangu
|
|||
private void generateCharacterKeyMap() {
|
||||
characterKeyMap.clear();
|
||||
for (int digit = 0; digit <= 9; digit++) {
|
||||
characterKeyMap.put(getKeyNumber(digit).charAt(0), String.valueOf(digit));
|
||||
for (String keyChar : getKeyCharacters(digit)) {
|
||||
characterKeyMap.put(keyChar.charAt(0), String.valueOf(digit));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class SoftKeyNumber2to9 extends SoftKeyNumber {
|
|||
displayChars = abbreviateCharList(displayChars, language.getLocale(), isUppercase);
|
||||
}
|
||||
|
||||
return displayChars;
|
||||
return displayChars.isEmpty() ? "--" : displayChars;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ static def extractSoundFromLine(String line) {
|
|||
|
||||
|
||||
static def isLayoutLine(String line) {
|
||||
return line.matches('\\s+- \\[.+?\\].*') && !line.find('\\d+]')
|
||||
return line.matches('\\s+- \\[.*?\\].*') && !line.find('\\d+]')
|
||||
}
|
||||
|
||||
//////////////////// VALIDATION ////////////////////
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue