1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 12:56:49 +01:00

Merge pull request #1250 from haditim/persianTransliteration

Persian transliteration
This commit is contained in:
Carsten Pfeiffer 2018-09-05 23:33:34 +02:00 committed by GitHub
commit 7b709dd975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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");

View File

@ -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);
} }