mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 21:06:50 +01:00
Merge pull request #1250 from haditim/persianTransliteration
Persian transliteration
This commit is contained in:
commit
7b709dd975
@ -78,9 +78,9 @@ public class LanguageUtils {
|
|||||||
put('و', "w"); put('ي', "y"); put('ى', "a"); put('ﺓ', "");
|
put('و', "w"); put('ي', "y"); put('ى', "a"); put('ﺓ', "");
|
||||||
put('آ', "2"); put('ئ', "2"); put('إ', "2"); put('ؤ', "2"); put('أ', "2"); put('ء', "2");
|
put('آ', "2"); put('ئ', "2"); put('إ', "2"); put('ؤ', "2"); put('أ', "2"); put('ء', "2");
|
||||||
|
|
||||||
// Farsi
|
// Persian(Farsi)
|
||||||
put('پ', "p"); put('چ', "ch"); put('ڜ', "ch"); put('ڤ', "v"); put('ڥ', "v");
|
put('پ', "p"); put('چ', "ch"); put('ژ', "zh"); put('ک', "k"); put('گ', "g"); put('ی', "y");
|
||||||
put('ڨ', "g"); put('گ', "g"); put('ݣ', "g");
|
put('؟', "?"); put('٪', "%"); put('؛', ";"); 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