mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-02 16:33:02 +01: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");
|
put('آ', "2"); put('ئ', "2"); put('إ', "2"); put('ؤ', "2"); put('أ', "2"); put('ء', "2");
|
||||||
|
|
||||||
// Persian(Farsi)
|
// Persian(Farsi)
|
||||||
put('ا', "a"); put('ب', "b"); put('پ', "p"); put('ت', "t"); put('ث', "th"); put('ج', "j"); put('چ', "ch");
|
put('پ', "p"); put('چ', "ch"); put('ژ', "zh"); put('ک', "k"); put('گ', "g"); put('ی', "y");
|
||||||
put('ح', "h"); put('خ', "kh"); put('د', "d"); put('ذ', "z"); put('ر', "r"); put('ز', "z"); put('ژ', "zh");
|
put('؟', "?"); put('٪', "%"); put('؛', ";"); put('،', ",");
|
||||||
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('؟', "?");
|
|
||||||
|
|
||||||
// Polish
|
// Polish
|
||||||
put('Ł', "L"); put('ł', "l");
|
put('Ł', "L"); put('ł', "l");
|
||||||
|
@ -51,8 +51,8 @@ public class LanguageUtilsTest extends TestBase {
|
|||||||
String hamzaActual = LanguageUtils.transliterate(hamza);
|
String hamzaActual = LanguageUtils.transliterate(hamza);
|
||||||
assertEquals("hamza transliteration failed", hamzaExpected, hamzaActual);
|
assertEquals("hamza transliteration failed", hamzaExpected, hamzaActual);
|
||||||
|
|
||||||
String farsi = "پچڜڤڥڨگݣ";
|
String farsi = "گچپژ";
|
||||||
String farsiExpected = "pchchvvggg";
|
String farsiExpected = "gchpzh";
|
||||||
String farsiActual = LanguageUtils.transliterate(farsi);
|
String farsiActual = LanguageUtils.transliterate(farsi);
|
||||||
assertEquals("Farsi transiteration failed", farsiExpected, farsiActual);
|
assertEquals("Farsi transiteration failed", farsiExpected, farsiActual);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user