use of net.mcreator.ui.init.L10N in project MCreator by MCreator.
the class ModElementUITest method testModElementsNonDefaultLocale.
// use non-default translation to test translations at the same time
@Test
public void testModElementsNonDefaultLocale() throws Exception {
long rgenseed = System.currentTimeMillis();
Random random = new Random(rgenseed);
LOG.info("Random number generator seed: " + rgenseed);
PreferencesManager.PREFERENCES.ui.language = L10N.getSupportedLocales().stream().filter(locale -> locale != L10N.DEFAULT_LOCALE).max(Comparator.comparingInt(L10N::getUITextsLocaleSupport)).orElse(null);
L10N.initTranslations();
LOG.info("Testing mod element GUI for locale " + PreferencesManager.PREFERENCES.ui.language);
testModElementLoading(random);
}
Aggregations