mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-24 16:21:16 +02:00
Changes Persian transliteration such that it does not alter Arabic. Test should run fine now. Also added punctuations.
This commit is contained in:
parent
5460de37d2
commit
ddecab7d25
@ -77,12 +77,8 @@ public class LanguageUtils {
|
||||
put('آ', "2"); put('ئ', "2"); put('إ', "2"); put('ؤ', "2"); put('أ', "2"); put('ء', "2");
|
||||
|
||||
// Persian(Farsi)
|
||||
put('ا', "a"); put('ب', "b"); put('پ', "p"); put('ت', "t"); put('ث', "th"); put('ج', "j"); put('چ', "ch");
|
||||
put('ح', "h"); put('خ', "kh"); put('د', "d"); put('ذ', "z"); put('ر', "r"); put('ز', "z"); put('ژ', "zh");
|
||||
put('س', "s"); put('ش', "sh"); put('ص', "s"); put('ض', "z"); put('ط', "t"); put('ظ', "z'"); put('ع', "e");
|
||||
put('غ', "gh"); put('ف', "f"); put('ق', "q"); put('ک', "k"); put('گ', "g"); put('ل', "l"); put('م', "m");
|
||||
put('ن', "n"); put('و', "v"); put('ه', "h"); put('ي', "y"); put('ی', "y"); put('آ', "A"); put('ئ', "e");
|
||||
put('ء', "e"); put('ؤ', "w"); put('؟', "?");
|
||||
put('پ', "p"); put('چ', "ch"); put('ژ', "zh"); put('ک', "k"); put('گ', "g"); put('ی', "y");
|
||||
put('؟', "?"); put('٪', "%"); put('؛', ";"); put('،', ",");
|
||||
|
||||
// Polish
|
||||
put('Ł', "L"); put('ł', "l");
|
||||
|
@ -51,8 +51,8 @@ public class LanguageUtilsTest extends TestBase {
|
||||
String hamzaActual = LanguageUtils.transliterate(hamza);
|
||||
assertEquals("hamza transliteration failed", hamzaExpected, hamzaActual);
|
||||
|
||||
String farsi = "پچڜڤڥڨگݣ";
|
||||
String farsiExpected = "pchchvvggg";
|
||||
String farsi = "گچپژ";
|
||||
String farsiExpected = "gchpzh";
|
||||
String farsiActual = LanguageUtils.transliterate(farsi);
|
||||
assertEquals("Farsi transiteration failed", farsiExpected, farsiActual);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user