mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 10:05:49 +01:00
Refactoring
This commit is contained in:
parent
2de9580dea
commit
bfe24dd9f0
@ -10,7 +10,7 @@ public class LanguageUtils {
|
||||
private static Map<Character, String> transliterateMap = new HashMap<Character, String>(){
|
||||
{
|
||||
//extended ASCII characters
|
||||
put('æ', "ae"); put('œ', "oe"); put('ß', "B");
|
||||
put('æ', "ae"); put('œ', "oe"); put('ß', "B"); put('ª', "a"); put('º', "o");
|
||||
|
||||
//russian chars
|
||||
put('а', "a"); put('б', "b"); put('в', "v"); put('г', "g"); put('д', "d"); put('е', "e"); put('ё', "jo"); put('ж', "zh");
|
||||
@ -67,13 +67,7 @@ public class LanguageUtils {
|
||||
|
||||
//convert diacritic
|
||||
private static String flattenToAscii(String string) {
|
||||
char[] out = new char[string.length()];
|
||||
string = Normalizer.normalize(string, Normalizer.Form.NFD);
|
||||
int j = 0;
|
||||
for (int i = 0, n = string.length(); i < n; ++i) {
|
||||
char c = string.charAt(i);
|
||||
if (c <= '\u007F') out[j++] = c;
|
||||
}
|
||||
return new String(out);
|
||||
return string.replaceAll("\\p{M}", "");
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<changelog>
|
||||
<release version="0.17.0" versioncode="81">
|
||||
<change>Add weather support through "Weather Notification" app</change>
|
||||
<change>Various fixes for K9 mail when using the generic notification receiver</change>
|
||||
<change>Various fixes for K9 mail when using the generic notification receiver</change>
|
||||
<change>Added transliteration option for notifications in the settings screen</change>
|
||||
<change>Add a preference to hide the notification icon of Gadgetbridge</change>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user