Merge branch 'dev-1.5' into development
This commit is contained in:
commit
9ef49a8560
2 changed files with 5 additions and 10 deletions
|
@ -18,6 +18,7 @@ import java.util.function.BooleanSupplier;
|
|||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
|
@ -151,7 +152,9 @@ public class MonitoringRunningExam implements TemplateComposer {
|
|||
|
||||
final Composite content = this.pageService.getWidgetFactory().defaultPageLayout(
|
||||
pageContext.getParent(),
|
||||
new LocTextKey("sebserver.monitoring.exam", exam.name));
|
||||
new LocTextKey(
|
||||
"sebserver.monitoring.exam",
|
||||
StringEscapeUtils.escapeHtml4(exam.name)));
|
||||
|
||||
final Composite tablePane = new Composite(content, SWT.NONE);
|
||||
tablePane.setLayout(new GridLayout());
|
||||
|
|
|
@ -11,9 +11,7 @@ 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;
|
||||
|
@ -279,14 +277,8 @@ public final class PolyglotPageServiceImpl implements PolyglotPageService {
|
|||
final I18nSupport i18nSupport) {
|
||||
|
||||
return label -> {
|
||||
|
||||
if (locTextKey != null) {
|
||||
final String text = i18nSupport.getText(locTextKey);
|
||||
if (BooleanUtils.toBoolean((Boolean) label.getData(RWT.MARKUP_ENABLED))) {
|
||||
label.setText(StringEscapeUtils.escapeHtml4(text));
|
||||
} else {
|
||||
label.setText(text);
|
||||
}
|
||||
label.setText(i18nSupport.getText(locTextKey));
|
||||
}
|
||||
if (i18nSupport.hasText(locToolTipKey)) {
|
||||
label.setToolTipText(Utils.formatLineBreaks(i18nSupport.getText(locToolTipKey)));
|
||||
|
|
Loading…
Reference in a new issue