use of com.evolveum.prism.xml.ns._public.types_3.PolyStringTranslationArgumentType in project midpoint by Evolveum.
the class LocalizationServiceImpl method translate.
private String translate(PolyStringTranslationType translation, Locale locale) {
String key = translation.getKey();
if (StringUtils.isEmpty(key)) {
return translateFromFallback(translation, locale, key);
}
String result;
List<PolyStringTranslationArgumentType> arguments = translation.getArgument();
if (arguments == null) {
result = translate(key, null, locale, key);
} else {
result = translate(key, arguments.toArray(), locale, key);
}
if (result != null) {
return result;
} else {
return translateFromFallback(translation, locale, null);
}
}
use of com.evolveum.prism.xml.ns._public.types_3.PolyStringTranslationArgumentType in project midpoint by Evolveum.
the class LocalizationServiceImpl method translate.
private String translate(PolyStringTranslationArgumentType polyStringTranslationArgument, Locale locale) {
String value = polyStringTranslationArgument.getValue();
if (value != null) {
return value;
}
PolyStringTranslationType translation = polyStringTranslationArgument.getTranslation();
if (translation != null) {
return translate(translation, locale);
}
return null;
}
Aggregations