add localization to UI items (#804)
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
This commit is contained in:
committed by
Stefan Behl
parent
664c467920
commit
c3843416b9
@@ -221,7 +221,7 @@ public abstract class AbstractTable<E extends NamedEntity> extends Table impleme
|
||||
|
||||
private void addDeleteButtonToColumnList(final List<TableColumn> columnList) {
|
||||
if (hasDeletePermission()) {
|
||||
columnList.add(new TableColumn(SPUIDefinitions.DELETE_ENTITY, "", 0.0F));
|
||||
columnList.add(new TableColumn(SPUIDefinitions.DELETE_ENTITY, i18n.getMessage("header.delete"), 0.0F));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ public class ActionHistoryGrid extends AbstractGrid<LazyQueryContainer> {
|
||||
getColumn(ProxyAction.PXY_ACTION_IS_ACTIVE_DECO).setRenderer(new HtmlLabelRenderer(),
|
||||
new HtmlIsActiveLabelConverter(this::createIsActiveLabelMetadata));
|
||||
getColumn(VIRT_PROP_FORCED).setRenderer(new HtmlLabelRenderer(),
|
||||
new HtmlVirtPropLabelConverter(ActionHistoryGrid::createForcedLabelMetadata));
|
||||
new HtmlVirtPropLabelConverter(this::createForcedLabelMetadata));
|
||||
getColumn(VIRT_PROP_TIMEFORCED).setRenderer(new HtmlLabelRenderer(),
|
||||
new HtmlVirtPropLabelConverter(this::createTimeForcedLabelMetadata));
|
||||
getColumn(VIRT_PROP_ACTION_CANCEL).setRenderer(
|
||||
@@ -270,10 +270,11 @@ public class ActionHistoryGrid extends AbstractGrid<LazyQueryContainer> {
|
||||
return activeStates.get(isActiveDeco);
|
||||
}
|
||||
|
||||
private static StatusFontIcon createForcedLabelMetadata(final Action action) {
|
||||
private StatusFontIcon createForcedLabelMetadata(final Action action) {
|
||||
StatusFontIcon result = null;
|
||||
if (ActionType.FORCED.equals(action.getActionType()) || ActionType.TIMEFORCED.equals(action.getActionType())) {
|
||||
result = new StatusFontIcon(FontAwesome.BOLT, STATUS_ICON_FORCED, "Forced",
|
||||
result = new StatusFontIcon(FontAwesome.BOLT, STATUS_ICON_FORCED,
|
||||
i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_FORCED),
|
||||
UIComponentIdProvider.ACTION_HISTORY_TABLE_FORCED_LABEL_ID);
|
||||
}
|
||||
return result;
|
||||
@@ -288,12 +289,14 @@ public class ActionHistoryGrid extends AbstractGrid<LazyQueryContainer> {
|
||||
String title;
|
||||
if (action.isHitAutoForceTime(currentTimeMillis)) {
|
||||
style = STATUS_ICON_GREEN;
|
||||
title = "auto forced since "
|
||||
+ SPDateTimeUtil.getDurationFormattedString(action.getForcedTime(), currentTimeMillis, i18n);
|
||||
final String duration = SPDateTimeUtil.getDurationFormattedString(action.getForcedTime(),
|
||||
currentTimeMillis, i18n);
|
||||
title = i18n.getMessage(UIMessageIdProvider.TOOLTIP_TIMEFORCED_FORCED_SINCE, duration);
|
||||
} else {
|
||||
style = STATUS_ICON_PENDING;
|
||||
title = "auto forcing in "
|
||||
+ SPDateTimeUtil.getDurationFormattedString(currentTimeMillis, action.getForcedTime(), i18n);
|
||||
final String duration = SPDateTimeUtil.getDurationFormattedString(currentTimeMillis,
|
||||
action.getForcedTime(), i18n);
|
||||
title = i18n.getMessage(UIMessageIdProvider.TOOLTIP_TIMEFORCED_FORCED_IN, duration);
|
||||
}
|
||||
result = new StatusFontIcon(FontAwesome.HISTORY, style, title,
|
||||
UIComponentIdProvider.ACTION_HISTORY_TABLE_TIMEFORCED_LABEL_ID);
|
||||
@@ -466,7 +469,7 @@ public class ActionHistoryGrid extends AbstractGrid<LazyQueryContainer> {
|
||||
.setHeaderCaption(i18n.getMessage("header.rolloutgroup.target.date"));
|
||||
getColumn(ProxyAction.PXY_ACTION_STATUS).setHeaderCaption(i18n.getMessage("header.status"));
|
||||
getColumn(ProxyAction.PXY_ACTION_MAINTENANCE_WINDOW)
|
||||
.setHeaderCaption(SPUIDefinitions.ACTION_HIS_TBL_MAINTENANCE_WINDOW);
|
||||
.setHeaderCaption(i18n.getMessage("header.maintenancewindow"));
|
||||
getColumn(VIRT_PROP_FORCED).setHeaderCaption(String.valueOf(forceClientRefreshToggle));
|
||||
forceClientRefreshToggle = !forceClientRefreshToggle;
|
||||
|
||||
|
||||
@@ -620,7 +620,8 @@ public class RolloutListGrid extends AbstractGrid<LazyQueryContainer> {
|
||||
String description = null;
|
||||
|
||||
if (SPUILabelDefinitions.VAR_STATUS.equals(cell.getPropertyId())) {
|
||||
description = cell.getProperty().getValue().toString().toLowerCase().replace("_", " ");
|
||||
final String status = cell.getProperty().getValue().toString().toLowerCase();
|
||||
description = i18n.getMessage(UIMessageIdProvider.TOOLTIP_ROLLOUT_STATUS_PREFIX + status);
|
||||
} else if (getActionLabeltext().equals(cell.getPropertyId())) {
|
||||
description = getActionLabeltext().toLowerCase();
|
||||
} else if (ROLLOUT_RENDERER_DATA.equals(cell.getPropertyId())) {
|
||||
|
||||
@@ -123,6 +123,10 @@ public final class UIMessageIdProvider {
|
||||
|
||||
public static final String TOOLTIP_TIMEFORCED_ITEM = "tooltip.timeforced.item";
|
||||
|
||||
public static final String TOOLTIP_TIMEFORCED_FORCED_IN = "tooltip.timeforced.forced.in";
|
||||
|
||||
public static final String TOOLTIP_TIMEFORCED_FORCED_SINCE = "tooltip.timeforced.forced.since";
|
||||
|
||||
public static final String TOOLTIP_SOFT_ITEM = "tooltip.soft.item";
|
||||
|
||||
public static final String TOOLTIP_FORCED_ITEM = "tooltip.forced.item";
|
||||
@@ -179,6 +183,8 @@ public final class UIMessageIdProvider {
|
||||
|
||||
public static final String MESSAGE_TARGET_BULKUPLOAD_RESULT_FAIL = "message.bulk.upload.result.fail";
|
||||
|
||||
public static final String TOOLTIP_ROLLOUT_STATUS_PREFIX = "tooltip.rollout.status.";
|
||||
|
||||
/**
|
||||
* Private Constructor.
|
||||
*/
|
||||
|
||||
@@ -281,9 +281,11 @@ tooltip.status.error = Error
|
||||
tooltip.status.insync = In-sync
|
||||
tooltip.status.overdue = Overdue
|
||||
tooltip.delete.module = Select and delete Software Module
|
||||
tooltip.forced.item=Forced update action
|
||||
tooltip.soft.item=Soft update action which interacts with an user as a attempt update action for example
|
||||
tooltip.timeforced.item=Soft update until a specific time and then the action will be forced
|
||||
tooltip.forced.item=Device is supposed to install the update immediately
|
||||
tooltip.soft.item=Device can execute the update at any time, e.g. with user approval or according to its regular update time plan
|
||||
tooltip.timeforced.item=Soft update which turns into a forced update after a specific time
|
||||
tooltip.timeforced.forced.in=Auto forcing in {0}
|
||||
tooltip.timeforced.forced.since=Auto forced since {0}
|
||||
tooltip.check.for.mandatory=Check to make Mandatory
|
||||
tooltip.artifact.icon=Show Artifact Details
|
||||
tooltip.click.to.edit = Click to edit
|
||||
@@ -302,6 +304,19 @@ tooltip.rollout.copy = Copy..
|
||||
tooltip.delete = Delete..
|
||||
tooltip.overdue = Overdue for {0}
|
||||
|
||||
#rollout status
|
||||
tooltip.rollout.status.creating=Creating
|
||||
tooltip.rollout.status.waiting_for_approval=Waiting for approval
|
||||
tooltip.rollout.status.approval_denied=Approval denied
|
||||
tooltip.rollout.status.ready=Ready
|
||||
tooltip.rollout.status.paused=Paused
|
||||
tooltip.rollout.status.starting=Starting
|
||||
tooltip.rollout.status.stopped=Stopped
|
||||
tooltip.rollout.status.running=Running
|
||||
tooltip.rollout.status.finished=Finished
|
||||
tooltip.rollout.status.deleting=Deleting
|
||||
tooltip.rollout.status.deleted=Deleted
|
||||
|
||||
tooltip.close = Close
|
||||
tooltip.search = Search
|
||||
tooltip.save = Save
|
||||
@@ -560,6 +575,7 @@ header.createdDate = Created Date
|
||||
header.modifiedBy = Modified By
|
||||
header.modifiedDate = Modified Date
|
||||
header.delete = Delete
|
||||
header.maintenancewindow = Maintenance Window
|
||||
header.assigned.ds = Assigned DS
|
||||
header.installed.ds = Installed DS
|
||||
header.target.status = Status
|
||||
|
||||
Reference in New Issue
Block a user