i18n: Avoid to translate language names and use the original ones
It doesn't have too much sense keep translations of each language supported in LibrePlan.
This commit is contained in:
parent
3a812dd8d0
commit
92b1dcc27d
2 changed files with 13 additions and 9 deletions
|
|
@ -32,13 +32,13 @@ import java.util.Locale;
|
|||
public enum Language {
|
||||
|
||||
BROWSER_LANGUAGE(_("Use browser language configuration"), null),
|
||||
GALICIAN_LANGUAGE(_("Galician"), new Locale("gl")),
|
||||
SPANISH_LANGUAGE(_("Spanish"), new Locale("es")),
|
||||
ENGLISH_LANGUAGE(_("English"), Locale.ENGLISH),
|
||||
RUSSIAN_LANGUAGE(_("Russian"), new Locale("ru")),
|
||||
PORTUGUESE_LANGUAGE(_("Portuguese"), new Locale("pt")),
|
||||
ITALIAN_LANGUAGE(_("Italian"), new Locale("it")),
|
||||
FRENCH_LANGUAGE(_("French"), new Locale("fr"));
|
||||
GALICIAN_LANGUAGE("Galego", new Locale("gl")),
|
||||
SPANISH_LANGUAGE("Español", new Locale("es")),
|
||||
ENGLISH_LANGUAGE("English", Locale.ENGLISH),
|
||||
RUSSIAN_LANGUAGE("Pусский", new Locale("ru")),
|
||||
PORTUGUESE_LANGUAGE("Português", new Locale("pt")),
|
||||
ITALIAN_LANGUAGE("Italiano", new Locale("it")),
|
||||
FRENCH_LANGUAGE("Français", new Locale("fr"));
|
||||
|
||||
private final String displayName;
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,11 @@ public class SettingsController extends GenericForwardComposer {
|
|||
public void render(org.zkoss.zul.Listitem item, Object data)
|
||||
throws Exception {
|
||||
Language language = (Language) data;
|
||||
item.setLabel(_(language.getDisplayName()));
|
||||
String displayName = language.getDisplayName();
|
||||
if (language.equals(Language.BROWSER_LANGUAGE)) {
|
||||
displayName = _(language.getDisplayName());
|
||||
}
|
||||
item.setLabel(displayName);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -80,7 +84,7 @@ public class SettingsController extends GenericForwardComposer {
|
|||
if (o2.equals(Language.BROWSER_LANGUAGE)) {
|
||||
return 1;
|
||||
}
|
||||
return _(o1.getDisplayName()).compareTo(_(o2.getDisplayName()));
|
||||
return o1.getDisplayName().compareTo(o2.getDisplayName());
|
||||
}
|
||||
});
|
||||
return languages;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue