mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-27 18:17:33 +01:00
added test, added to defaultLanguagesIfEnabled
This commit is contained in:
parent
ee3b4d4aa1
commit
58a8484322
@ -1186,7 +1186,7 @@ public class GBApplication extends Application {
|
|||||||
|
|
||||||
if (oldVersion < 16) {
|
if (oldVersion < 16) {
|
||||||
// If transliteration was enabled for a device, migrate it to the per-language setting
|
// If transliteration was enabled for a device, migrate it to the per-language setting
|
||||||
final String defaultLanguagesIfEnabled = "extended_ascii,common_symbols,scandinavian,german,russian,hebrew,greek,ukranian,arabic,persian,latvian,lithuanian,polish,estonian,icelandic,czech,turkish,bengali,korean";
|
final String defaultLanguagesIfEnabled = "extended_ascii,common_symbols,scandinavian,german,russian,hebrew,greek,ukranian,arabic,persian,latvian,lithuanian,polish,estonian,icelandic,czech,turkish,bengali,korean,hungarian";
|
||||||
try (DBHandler db = acquireDB()) {
|
try (DBHandler db = acquireDB()) {
|
||||||
final DaoSession daoSession = db.getDaoSession();
|
final DaoSession daoSession = db.getDaoSession();
|
||||||
final List<Device> activeDevices = DBHelper.getActiveDevices(daoSession);
|
final List<Device> activeDevices = DBHelper.getActiveDevices(daoSession);
|
||||||
|
@ -189,6 +189,16 @@ public class LanguageUtilsTest extends TestBase {
|
|||||||
assertEquals("georgian transliteration failed", expected, output);
|
assertEquals("georgian transliteration failed", expected, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testStringTransliterateHungarian() {
|
||||||
|
final Transliterator transliterator = LanguageUtils.getTransliterator("hungarian");
|
||||||
|
|
||||||
|
String input = "á é í ó ö ő ü ű";
|
||||||
|
String output = transliterator.transliterate(input);
|
||||||
|
String expected = "a e i o o u u";
|
||||||
|
assertEquals("hungarian transliteration failed", expected, output);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testStringTransliterateCommonSymbols() {
|
public void testStringTransliterateCommonSymbols() {
|
||||||
final Transliterator transliterator = LanguageUtils.getTransliterator("common_symbols");
|
final Transliterator transliterator = LanguageUtils.getTransliterator("common_symbols");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user