Browse Source

Merge pull request #8450 from vvlladd28/bug/edge/fix-translate

Improve Edge translation
pull/8463/head
Igor Kulikov 3 years ago
committed by GitHub
parent
commit
42df62340b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui-ngx/src/app/modules/home/pages/edge/edge-routing.module.ts
  2. 2
      ui-ngx/src/app/modules/home/pages/edge/edge.component.html
  3. 18
      ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts
  4. 2
      ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.resolver.ts
  5. 2
      ui-ngx/src/assets/locale/locale.constant-en_US.json

2
ui-ngx/src/app/modules/home/pages/edge/edge-routing.module.ts

@ -260,7 +260,7 @@ const routes: Routes = [
path: ':edgeId/ruleChains',
data: {
breadcrumb: {
label: 'edge.edge-rulechains',
label: 'edge.rulechains',
icon: 'settings_ethernet'
}
},

2
ui-ngx/src/app/modules/home/pages/edge/edge.component.html

@ -117,7 +117,7 @@
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openInstructions')"
[fxShow]="!isEdit">
[fxShow]="!isEdit && edgeScope !== 'customer_user'">
<mat-icon>info_outline</mat-icon>
<span>{{ 'edge.install-connect-instructions' | translate }}</span>
</button>

18
ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts

@ -211,31 +211,31 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI
onAction: ($event, entity) => this.unassignFromCustomer($event, entity)
},
{
name: this.translate.instant('edge.edge-assets'),
name: this.translate.instant('edge.manage-assets'),
icon: 'domain',
isEnabled: (entity) => true,
onAction: ($event, entity) => this.openEdgeEntitiesByType($event, entity, EntityType.ASSET)
},
{
name: this.translate.instant('edge.edge-devices'),
name: this.translate.instant('edge.manage-devices'),
icon: 'devices_other',
isEnabled: (entity) => true,
onAction: ($event, entity) => this.openEdgeEntitiesByType($event, entity, EntityType.DEVICE)
},
{
name: this.translate.instant('edge.edge-entity-views'),
name: this.translate.instant('edge.manage-entity-views'),
icon: 'view_quilt',
isEnabled: (entity) => true,
onAction: ($event, entity) => this.openEdgeEntitiesByType($event, entity, EntityType.ENTITY_VIEW)
},
{
name: this.translate.instant('edge.edge-dashboards'),
name: this.translate.instant('edge.manage-dashboards'),
icon: 'dashboard',
isEnabled: (entity) => true,
onAction: ($event, entity) => this.openEdgeEntitiesByType($event, entity, EntityType.DASHBOARD)
},
{
name: this.translate.instant('edge.edge-rulechains'),
name: this.translate.instant('edge.manage-rulechains'),
icon: 'settings_ethernet',
isEnabled: (entity) => true,
onAction: ($event, entity) => this.openEdgeEntitiesByType($event, entity, EntityType.RULE_CHAIN)
@ -261,25 +261,25 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI
if (edgeScope === 'customer_user') {
actions.push(
{
name: this.translate.instant('edge.edge-assets'),
name: this.translate.instant('edge.manage-assets'),
icon: 'domain',
isEnabled: (entity) => true,
onAction: ($event, entity) => this.openEdgeEntitiesByType($event, entity, EntityType.ASSET)
},
{
name: this.translate.instant('edge.edge-devices'),
name: this.translate.instant('edge.manage-devices'),
icon: 'devices_other',
isEnabled: (entity) => true,
onAction: ($event, entity) => this.openEdgeEntitiesByType($event, entity, EntityType.DEVICE)
},
{
name: this.translate.instant('edge.edge-entity-views'),
name: this.translate.instant('edge.manage-entity-views'),
icon: 'view_quilt',
isEnabled: (entity) => true,
onAction: ($event, entity) => this.openEdgeEntitiesByType($event, entity, EntityType.ENTITY_VIEW)
},
{
name: this.translate.instant('edge.edge-dashboards'),
name: this.translate.instant('edge.manage-dashboards'),
icon: 'dashboard',
isEnabled: (entity) => true,
onAction: ($event, entity) => this.openEdgeEntitiesByType($event, entity, EntityType.DASHBOARD)

2
ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.resolver.ts

@ -198,7 +198,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig<
} else if (ruleChainScope === 'edges') {
return this.translate.instant('edge.rulechain-templates');
} else if (ruleChainScope === 'edge') {
return this.config.tableTitle = edge.name + ': ' + this.translate.instant('edge.rulechains');
return this.config.tableTitle = edge.name + ': ' + this.translate.instant('rulechain.rulechains');
}
}

2
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -1861,7 +1861,7 @@
"dashboards": "Edge Dashboards",
"rulechain-templates": "Rule chain templates",
"edge-rulechain-templates": "Edge rule chain templates",
"rulechains": "Rule chains",
"rulechains": "Edge rule chains",
"search": "Search edges",
"selected-edges": "{ count, plural, =1 {1 edge} other {# edges} } selected",
"any-edge": "Any edge",

Loading…
Cancel
Save