Skip to content

Commit c4fbbaf

Browse files
authored
Merge pull request #11 from NolanKingdon/MYG-9749-HeaderFix
MYG-9749-HeaderFix
2 parents ebb3452 + 739ffa7 commit c4fbbaf

File tree

4 files changed

+75
-62
lines changed

4 files changed

+75
-62
lines changed

generators/app/templates/src/.dev/navbar/NavFactory.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class NavFactory {
4040
* @param {object} props subheader object in the props list
4141
*/
4242
subHeader(props){
43-
let subHead = new SubHeader(props);
43+
let subHead = new SubHeader(props, this.language);
4444
return subHead.returnHTML();
4545
}
4646
}
@@ -84,12 +84,13 @@ class OpenSubMenu {
8484
}
8585

8686
class SubHeader {
87-
constructor(props){
87+
constructor(props, language){
88+
let title = props.labelText[language] ? props.labelText[language] : props.labelText["en"];
8889
this.html = `
8990
<li class="mainMenuOption">
9091
<a class="mainMenuLink" title="The Product Guide provides an introduction to the application and its features." href="#${props.name}">
9192
<span class="icon geotabIcons_${props.name}"></span>
92-
<div class="ellipsis">${props.labelText}</div>
93+
<div class="ellipsis">${title}</div>
9394
</a>
9495
</li>`.trim();
9596
}

generators/app/templates/src/.dev/navbar/props.js

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ const props = [
66
<% if (path == 'GettingStartedLink/') { %>
77
{
88
name: 'help', //Used in css and js reference
9-
labelText: 'Getting Started &amp; Help', // Displayed to user
9+
labelText: {
10+
en: 'Getting Started &amp; Help'
11+
}, // Displayed to user
1012
hasSubmenu: true, // Used to build the nav tree
1113
submenuItems: [
1214
{
@@ -19,7 +21,9 @@ const props = [
1921
<% if (path == 'ActivityLink/') { %>
2022
{
2123
name: 'activity',
22-
labelText: 'Activity',
24+
labelText: {
25+
en: 'Activity'
26+
},
2327
hasSubmenu: true,
2428
submenuItems: [
2529
{
@@ -32,7 +36,9 @@ const props = [
3236
<% if (path == 'EngineMaintenanceLink/') { %>
3337
{
3438
name: 'engine',
35-
labelText: 'Engine &amp; Maintenance',
39+
labelText: {
40+
en:'Engine &amp; Maintenance'
41+
},
3642
hasSubmenu: true,
3743
submenuItems: [
3844
{
@@ -45,7 +51,9 @@ const props = [
4551
<% if (path == 'ZoneAndMessagesLink/') { %>
4652
{
4753
name: 'zone',
48-
labelText: 'Zones &amp; Messages',
54+
labelText: {
55+
en: 'Zones &amp; Messages'
56+
},
4957
hasSubmenu: true,
5058
submenuItems: [
5159
{
@@ -58,7 +66,9 @@ const props = [
5866
<% if (path == 'RuleAndGroupsLink/') { %>
5967
{
6068
name: 'rule',
61-
labelText: 'Rules &amp; Groups',
69+
labelText: {
70+
en: 'Rules &amp; Groups'
71+
},
6272
hasSubmenu: true,
6373
submenuItems: [
6474
{
@@ -71,7 +81,9 @@ const props = [
7181
<% if (path == 'AdministrationLink/') { %>
7282
{
7383
name: 'administration',
74-
labelText: 'Administration',
84+
labelText: {
85+
en: 'Administration'
86+
},
7587
hasSubmenu: true,
7688
submenuItems: [
7789
{

0 commit comments

Comments
 (0)