Skip to content
Snippets Groups Projects
Commit d8e14242 authored by uhensler's avatar uhensler
Browse files

OO-3112: Show the level name if a level is not translated

parent 6c336d52
No related branches found
No related tags found
No related merge requests found
......@@ -292,8 +292,8 @@ public class QEducationalContextsAdminController extends FormBasicController {
case levelI18n: {
String i18nKey = "item.level." + level.getLevel().toLowerCase();
String translation = getTranslator().translate(i18nKey);
if(translation.length() > 256) {
return getTranslator().translate("translation.missing");
if(i18nKey.equals(translation) || translation.length() > 256) {
return level.getLevel();
}
return translation;
}
......
......@@ -78,7 +78,6 @@ taxonomy.selectable=Ausw\u00E4lbare Fachbereiche
taxonomyLevel.deleted=Fachbereich wurde erfolgreich gel\u00F6scht
taxonomyLevel.notdeleted=Fachbereich konnte nicht gel\u00F6scht werden, eventuell wird er bereits verwendet.
translation=\u00dcbersetzung
translation.missing=Keine \u00dcbersetzung
type.key=ID
type.translation=\u00DCbersetzung
type.type=Typ
......
......@@ -77,7 +77,6 @@ taxonomy.selectable=Selectable subjects
taxonomyLevel.deleted=Subject has been successfully deleted.
taxonomyLevel.notdeleted=The subject cannot be deleted, it is probably in use.
translation=Translation
translation.missing=Translation missing
type.key=ID
type.translation=Translation
type.type=Type
......
......@@ -78,8 +78,9 @@ public class MetaUIFactory {
int count = 0;
for(QEducationalContext level:levels) {
contextKeys[count] = level.getLevel();
String translation = translator.translate("item.level." + level.getLevel().toLowerCase());
if(translation.length() > 128) {
String i18nKey = "item.level." + level.getLevel().toLowerCase();
String translation = translator.translate(i18nKey);
if(i18nKey.equals(translation) || translation.length() > 256) {
translation = level.getLevel();
}
contextValues[count++] = translation;
......
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