Skip to content
Snippets Groups Projects
Commit b937ce2a authored by Luboš Horáček's avatar Luboš Horáček
Browse files

Merge branch 'build_types' into 'devel'

Build types

See merge request !7
parents 6213acec 23424105
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ public class TablexiaSettings {
private final BuildType BUILD_TYPE;
private Preferences preferences;
private Locale systemLocale;
private LocaleDefinition systemLocale;
private LocaleDefinition selectedLocale;
......@@ -85,7 +85,7 @@ public class TablexiaSettings {
}
public Locale getLocale() {
return locale != null ? locale : instance.systemLocale;
return locale != null ? locale : instance.systemLocale.locale;
}
@Override
......@@ -105,6 +105,15 @@ public class TablexiaSettings {
}
return FALLBACK_VARIANT;
}
public static LocaleDefinition getLocaleDefinitionForLocale(Locale locale) {
for(LocaleDefinition localeDefinition: LocaleDefinition.values()) {
if (localeDefinition.locale != null && localeDefinition.locale.equals(locale)) {
return localeDefinition;
}
}
return DEFAULT_LOCALE;
}
}
......@@ -114,7 +123,7 @@ public class TablexiaSettings {
private TablexiaSettings(BuildType buildType, Locale systemLocale) {
BUILD_TYPE = buildType;
this.systemLocale = systemLocale;
this.systemLocale = LocaleDefinition.getLocaleDefinitionForLocale(systemLocale);
}
public static TablexiaSettings getInstance() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment