SEBSERV-444 fixed
This commit is contained in:
parent
a896737f5b
commit
d50e818d6e
1 changed files with 9 additions and 1 deletions
|
@ -11,7 +11,9 @@ package ch.ethz.seb.sebserver.gui.service.i18n.impl;
|
|||
import java.util.Locale;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
import org.eclipse.rap.rwt.RWT;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
|
@ -269,8 +271,14 @@ public final class PolyglotPageServiceImpl implements PolyglotPageService {
|
|||
final I18nSupport i18nSupport) {
|
||||
|
||||
return label -> {
|
||||
|
||||
if (locTextKey != null) {
|
||||
label.setText(i18nSupport.getText(locTextKey));
|
||||
final String text = i18nSupport.getText(locTextKey);
|
||||
if (BooleanUtils.toBoolean((Boolean) label.getData(RWT.MARKUP_ENABLED))) {
|
||||
label.setText(StringEscapeUtils.escapeHtml4(text));
|
||||
} else {
|
||||
label.setText(text);
|
||||
}
|
||||
}
|
||||
if (i18nSupport.hasText(locToolTipKey)) {
|
||||
label.setToolTipText(Utils.formatLineBreaks(i18nSupport.getText(locToolTipKey)));
|
||||
|
|
Loading…
Reference in a new issue