ONOS-6730: Topo View i18n:
- Completed remainder of topology view modules.
- fixed some ESLint issues.
Change-Id: I9cf474198cc4d30be629a2b05cbe19a3bbb43811
diff --git a/web/gui/src/main/webapp/app/view/topo/topoToolbar.js b/web/gui/src/main/webapp/app/view/topo/topoToolbar.js
index fa86f82..8b37002 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoToolbar.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoToolbar.js
@@ -29,6 +29,11 @@
// getActionEntry
// setUpKeys
+ // function to be replaced by the localization bundle function
+ var topoLion = function (x) {
+ return '#ttbar#' + x + '#';
+ };
+
// internal state
var toolbar, keyData, cachedState, thirdRow, ovRset, ovIndex;
@@ -36,7 +41,7 @@
var name = 'topo-tbar',
cooktag = 'topo_prefs',
soa = 'switchOverlayActions: ',
- selOver = 'Select overlay here ⇧',
+ selOver = '************',
defaultOverlay = 'traffic';
@@ -134,7 +139,7 @@
// tooltip function invoked at the time the tooltip is displayed
value.tt = function () {
- return fs.isF(ttfn) ? ttfn() : "" + ttfn;
+ return fs.isF(ttfn) ? ttfn() : '' + ttfn;
};
});
}
@@ -188,7 +193,7 @@
// generate radio button set for overlays; start with 'none'
var rset = [{
gid: 'm_unknown',
- tooltip: 'No Overlay',
+ tooltip: topoLion('ov_tt_none'),
cb: function () {
tov.tbSelection(null, switchOverlayActions);
},
@@ -236,7 +241,11 @@
value = keyBindings[key];
bid = oid + '-' + key;
gid = tov.mkGlyphId(oid, value.gid);
- tt = value.tt + ' (' + key + ')';
+ tt = function () {
+ var ttfn = value.tt,
+ txt = fs.isF(ttfn) ? ttfn() : ttfn;
+ return txt + ' (' + key + ')';
+ };
thirdRow.addButton(bid, gid, value.cb, tt);
}
});
@@ -333,6 +342,7 @@
selectOverlay: selectOverlay,
defaultPrefs: defaultPrefsState,
fnkey: fnkey,
+ setLionBundle: function (bundle) { topoLion = bundle; },
};
}]);
}());