Skip to content

Commit

Permalink
MID-6557 initial objects localization keys
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar authored and Kateryna Honchar committed May 18, 2022
1 parent b9de327 commit dd17c3a
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2068,12 +2068,8 @@ private MainMenuItem createHomeItems() {
DashboardType dashboard = prismObject.getRealValue();
Validate.notNull(dashboard, "Dashboard object is null");

StringResourceModel label = null;
if(dashboard.getDisplay() != null && dashboard.getDisplay().getLabel() != null) {
label = createStringResource(dashboard.getDisplay().getLabel().getOrig());
} else {
label = createStringResource(dashboard.getName());
}
StringResourceModel label = createStringResourceDefault(WebComponentUtil.getTranslatedPolyString(dashboard.getName()),
WebComponentUtil.getCollectionLabel(dashboard.getDisplay(), null, dashboard));
PageParameters pageParameters = new PageParameters();
pageParameters.add(OnePageParameterEncoder.PARAMETER, dashboard.getOid());
MenuItem menu = new MenuItem(label, "", PageDashboardConfigurable.class, pageParameters, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,12 @@
<display>
<label>My cases</label>
<!-- We need to explicitly specify plural label here. Otherwise it will be overwritten by a plural label from archetype. -->
<pluralLabel>My cases</pluralLabel>
<pluralLabel>
<orig>My cases</orig>
<translation>
<key>MyCases.title</key>
</translation>
</pluralLabel>
<singularLabel>My case</singularLabel>
<icon>
<cssClass>fe fe-case-object</cssClass>
Expand All @@ -234,7 +239,12 @@
<display>
<label>Manual cases</label> <!-- "Manual provisioning cases" is too long for the menu -->
<!-- We need to explicitly specify plural label here. Otherwise it will be overwritten by a plural label from archetype. -->
<pluralLabel>All manual cases</pluralLabel>
<pluralLabel>
<orig>All manual cases</orig>
<translation>
<key>AllManualCases.title</key>
</translation>
</pluralLabel>
<singularLabel>Manual case</singularLabel>
<tooltip>Manual provisioning cases</tooltip>
</display>
Expand All @@ -250,7 +260,12 @@
<display>
<label>Requests</label> <!-- "Operation requests" is too long for the menu -->
<!-- We need to explicitly specify plural label here. Otherwise it will be overwritten by a plural label from archetype. -->
<pluralLabel>All requests</pluralLabel>
<pluralLabel>
<orig>All requests</orig>
<translation>
<key>AllRequests.title</key>
</translation>
</pluralLabel>
<singularLabel>Request</singularLabel>
<tooltip>Operation requests</tooltip>
</display>
Expand All @@ -266,7 +281,12 @@
<display>
<label>Approvals</label> <!-- "Approval cases" is too long for the menu -->
<!-- We need to explicitly specify plural label here. Otherwise it will be overwritten by a plural label from archetype. -->
<pluralLabel>All approvals</pluralLabel>
<pluralLabel>
<orig>All approvals</orig>
<translation>
<key>AllApprovals.title</key>
</translation>
</pluralLabel>
<singularLabel>Approval</singularLabel>
<tooltip>Approval cases</tooltip>
</display>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@
oid="00000000-0000-0000-0001-000000000001">
<name>admin-dashboard</name>
<display>
<label>Admin dashboard</label>
<label>
<orig>Admin dashboard</orig>
<translation>
<key>AdminDashboard.title</key>
</translation>
</label>
</display>
<widget>
<identifier>resources-up</identifier>
<description>Widget that shows all the resources that are up. Based on "Resources Up" object collection.</description>
<display>
<label>Resources up</label>
<label>
<orig>Resources up</orig>
<translation>
<key>AdminDashboard.resourcesUp</key>
</translation>
</label>
<color>#00a65a</color>
<icon>
<cssClass>fa fa-database</cssClass>
Expand Down Expand Up @@ -62,7 +72,12 @@
<identifier>audit-recent-errors</identifier>
<description>Widget that shows recent errors. Data are taken from audit log.</description>
<display>
<label>Recent errors</label>
<label>
<orig>Recent errors</orig>
<translation>
<key>AdminDashboard.recentErrors</key>
</translation>
</label>
<color>#00a65a</color>
<icon>
<cssClass>fa fa-ban</cssClass>
Expand Down Expand Up @@ -105,7 +120,12 @@
<identifier>audit-recent-modifications</identifier>
<description>Widget that shows recent modifications. Data are taken from audit log.</description>
<display>
<label>Recent modifications</label>
<label>
<orig>Recent modifications</orig>
<translation>
<key>AdminDashboard.recentModifications</key>
</translation>
</label>
<color>#00a65a</color>
<icon>
<cssClass>fa fa-cog</cssClass>
Expand Down Expand Up @@ -137,7 +157,12 @@
<widget>
<identifier>active-task</identifier>
<display>
<label>Active tasks</label>
<label>
<orig>Active tasks</orig>
<translation>
<key>AdminDashboard.activeTasks</key>
</translation>
</label>
<color>#00a65a</color>
<icon>
<cssClass>fa fa-tasks</cssClass>
Expand Down

0 comments on commit dd17c3a

Please sign in to comment.