Skip to content

Commit

Permalink
chore(admin-ui): Restore nav bar translations
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Sep 30, 2019
1 parent f451115 commit e486b61
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

import { _ } from '../../providers/i18n/mark-for-extraction';
import { NavMenuItem } from '../../providers/nav-builder/nav-builder-types';
import { NavBuilderService } from '../../providers/nav-builder/nav-builder.service';

Expand All @@ -21,133 +22,133 @@ export class MainNavComponent implements OnInit {
{
requiresPermission: 'ReadCatalog',
id: 'catalog',
label: 'nav.catalog',
label: _('nav.catalog'),
items: [
{
id: 'products',
label: 'nav.products',
label: _('nav.products'),
icon: 'library',
routerLink: ['/catalog', 'products'],
},
{
id: 'facets',
label: 'nav.facets',
label: _('nav.facets'),
icon: 'tag',
routerLink: ['/catalog', 'facets'],
},
{
id: 'collections',
label: 'nav.collections',
label: _('nav.collections'),
icon: 'folder-open',
routerLink: ['/catalog', 'collections'],
},
{
id: 'assets',
label: 'nav.assets',
label: _('nav.assets'),
icon: 'image-gallery',
routerLink: ['/catalog', 'assets'],
},
],
},
{
id: 'sales',
label: 'nav.sales',
label: _('nav.sales'),
requiresPermission: 'ReadOrder',
items: [
{
id: 'orders',
label: 'nav.orders',
label: _('nav.orders'),
routerLink: ['/orders'],
icon: 'shopping-cart',
},
],
},
{
id: 'customers',
label: 'nav.customers',
label: _('nav.customers'),
requiresPermission: 'ReadCustomer',
items: [
{
id: 'customers',
label: 'nav.customers',
label: _('nav.customers'),
routerLink: ['/customer', 'customers'],
icon: 'user',
},
],
},
{
id: 'marketing',
label: 'nav.marketing',
label: _('nav.marketing'),
requiresPermission: 'ReadPromotion',
items: [
{
id: 'promotions',
label: 'nav.promotions',
label: _('nav.promotions'),
routerLink: ['/marketing', 'promotions'],
icon: 'asterisk',
},
],
},
{
id: 'settings',
label: 'nav.settings',
label: _('nav.settings'),
requiresPermission: 'ReadSettings',
collapsible: true,
collapsedByDefault: true,
items: [
{
id: 'channels',
label: 'nav.channels',
label: _('nav.channels'),
routerLink: ['/settings', 'channels'],
icon: 'layers',
},
{
id: 'administrators',
label: 'nav.administrators',
label: _('nav.administrators'),
requiresPermission: 'ReadAdministrator',
routerLink: ['/settings', 'administrators'],
icon: 'administrator',
},
{
id: 'roles',
label: 'nav.roles',
label: _('nav.roles'),
requiresPermission: 'ReadAdministrator',
routerLink: ['/settings', 'roles'],
icon: 'users',
},
{
id: 'shipping-methods',
label: 'nav.shipping-methods',
label: _('nav.shipping-methods'),
routerLink: ['/settings', 'shipping-methods'],
icon: 'truck',
},
{
id: 'payment-methods',
label: 'nav.payment-methods',
label: _('nav.payment-methods'),
routerLink: ['/settings', 'payment-methods'],
icon: 'credit-card',
},
{
id: 'tax-categories',
label: 'nav.tax-categories',
label: _('nav.tax-categories'),
routerLink: ['/settings', 'tax-categories'],
icon: 'view-list',
},
{
id: 'tax-rates',
label: 'nav.tax-rates',
label: _('nav.tax-rates'),
routerLink: ['/settings', 'tax-rates'],
icon: 'calculator',
},
{
id: 'countries',
label: 'nav.countries',
label: _('nav.countries'),
routerLink: ['/settings', 'countries'],
icon: 'world',
},
{
id: 'global-settings',
label: 'nav.global-settings',
label: _('nav.global-settings'),
routerLink: ['/settings', 'global-settings'],
icon: 'cog',
},
Expand Down
24 changes: 23 additions & 1 deletion packages/admin-ui/src/i18n-messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,28 @@
"conditions": "Conditions",
"create-new-promotion": "Create new promotion"
},
"nav": {
"administrators": "Administrators",
"assets": "Assets",
"catalog": "Catalog",
"channels": "Channels",
"collections": "Collections",
"countries": "Countries",
"customers": "Customers",
"facets": "Facets",
"global-settings": "Global settings",
"marketing": "Marketing",
"orders": "Orders",
"payment-methods": "Payment methods",
"products": "Products",
"promotions": "Promotions",
"roles": "Roles",
"sales": "Sales",
"settings": "Settings",
"shipping-methods": "Shipping methods",
"tax-categories": "Tax categories",
"tax-rates": "Tax Rates"
},
"order": {
"add-note": "Add note",
"add-note-success": "Note successfully added",
Expand Down Expand Up @@ -523,4 +545,4 @@
"update": "Update",
"zone": "Zone"
}
}
}

0 comments on commit e486b61

Please sign in to comment.