mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-03 21:15:37 +02: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('آ', "2"); put('ئ', "2"); put('إ', "2"); put('ؤ', "2"); put('أ', "2"); put('ء', "2");
|
||||
|
||||
// Farsi
|
||||
put('پ', "p"); put('چ', "ch"); put('ڜ', "ch"); put('ڤ', "v"); put('ڥ', "v");
|
||||
put('ڨ', "g"); put('گ', "g"); put('ݣ', "g");
|
||||
// Persian(Farsi)
|
||||
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