loleaflet: Don't try to translate command names
Command names are sent to loleaflet in already translated form when there are appropriate langpacks installed in the system. Only translate when we can. Change-Id: I92dc5865da85c76bd5a2529b0e6df994937c4c28
This commit is contained in:
parent
d837839449
commit
34aed93d83
1 changed files with 6 additions and 1 deletions
7
loleaflet/dist/toolbar/toolbar.js
vendored
7
loleaflet/dist/toolbar/toolbar.js
vendored
|
@ -1399,7 +1399,12 @@ function updateCommandValues() {
|
|||
data = data.concat({text: '\u2500\u2500\u2500\u2500\u2500\u2500', disabled: true});
|
||||
|
||||
commands.forEach(function (command) {
|
||||
data = data.concat({id: command.id, text: L.Styles.styleMappings[command.text].toLocaleString()});
|
||||
var translated = command.text;
|
||||
if (L.Styles.styleMappings[command.text]) {
|
||||
// if it's in English, translate it
|
||||
translated = L.Styles.styleMappings[command.text].toLocaleString();
|
||||
}
|
||||
data = data.concat({id: command.id, text: translated });
|
||||
}, this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue