Search in sources :

Example 1 with ErrorTranslator

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();
}
Also used : ErrorTranslator(org.ovirt.engine.ui.frontend.ErrorTranslator)

Aggregations

ErrorTranslator (org.ovirt.engine.ui.frontend.ErrorTranslator)1