use of org.ovirt.engine.ui.frontend.ErrorTranslator in project ovirt-engine by oVirt.
the class RegisterVmModel method translateMessages.
private String translateMessages(List<List<String>> vmMessages) {
StringBuilder stringBuilder = new StringBuilder();
final ErrorTranslator appErrorsTranslator = Frontend.getInstance().getAppErrorsTranslator();
for (List<String> vmMessage : vmMessages) {
if (vmMessage.isEmpty()) {
continue;
}
for (String translatedMessage : appErrorsTranslator.translateErrorText(new ArrayList<>(vmMessage))) {
stringBuilder.append(translatedMessage);
}
stringBuilder.append(NEWLINE);
}
return stringBuilder.toString();
}
Aggregations