Merge pull request #4620 from keymanapp/fix/web/4566-undefined-in-ui-toolbar-menu

fix(web): use language code correctly in toolbar
This commit is contained in:
Marc Durdin 2021-03-09 06:05:42 +11:00 committed by GitHub
commit 9bc6beb6e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -531,7 +531,7 @@ if(!window['keyman']['ui']['name']) {
var itemNode = ui.createNode('li');
kbdText = lang.keyboards[n]['Name'].replace(/\s?keyboard/i,'');
// We append the full BCP-47 code here for disambiguation when regional and/or script variants exist.
kbdText = kbdText + " [" + lang.keyboards[n].LanguageCode + "]";
kbdText = kbdText + " [" + lang.keyboards[n]['LanguageCode'] + "]";
aNode = ui.createNode('a', null, null, kbdText);
aNode.href = '#';
aNode.title = '';