Skip to content
Snippets Groups Projects
Commit 9184af67 authored by Matyáš Latner's avatar Matyáš Latner
Browse files

#1 Android text localisation fix

parent fadbf18d
Branches
Tags
No related merge requests found
......@@ -77,7 +77,7 @@ public class TablexiaSettings {
@Override
public String toString() {
if (ApplicationTextManager.getInstance().update()) {
return ApplicationTextManager.getInstance().getResult().get(descriptionKey);
return ApplicationTextManager.getInstance().getText(descriptionKey);
} else {
return name();
}
......
......@@ -56,6 +56,14 @@ public class ApplicationTextManager extends TablexiaDataManager<I18NBundle> impl
public void load() {
setAsyncTask(new ApplicationTextLoader(APPLICATION_TEXT_RESOURCE_FILE, TablexiaSettings.getInstance().getLocale()));
}
public String getText(String textKey) {
return getResult().get(textKey);
}
public String getFormattedText(String textKey, Object... args) {
return getResult().format(textKey, args);
}
@Override
public void dispose() {
......
......@@ -28,7 +28,7 @@ public enum MainMenuDefinition implements ApplicationEvent, IMenuItem {
@Override
public String getTitle() {
return ApplicationTextManager.getInstance().getResult().get(menuTextKey);
return ApplicationTextManager.getInstance().getText(menuTextKey);
}
@Override
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment