use of com.evolveum.midpoint.util.LocalizableMessageList in project midpoint by Evolveum.
the class LocalizationServiceImpl method translate.
// todo deduplicate with similar method in WebComponentUtil
public String translate(LocalizableMessageList msgList, Locale locale) {
String separator = translateIfPresent(msgList.getSeparator(), locale);
String prefix = translateIfPresent(msgList.getPrefix(), locale);
String suffix = translateIfPresent(msgList.getPostfix(), locale);
return msgList.getMessages().stream().map(m -> translate(m, locale)).collect(Collectors.joining(separator, prefix, suffix));
}
Aggregations