diff --git a/HISTORY.md b/HISTORY.md index 3c7fa6f..9785eab 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ https://github.com/josdejong/jsoneditor ## not yet published, version 8.6.5 +- Fix #964: translation of titles of some context menu items not working. - Update ace editor to `v1.4.9`. diff --git a/src/js/Node.js b/src/js/Node.js index 65b9730..88e84a8 100644 --- a/src/js/Node.js +++ b/src/js/Node.js @@ -3633,7 +3633,15 @@ export class Node { */ showContextMenu (anchor, onClose) { const node = this - const titles = Node.TYPE_TITLES + + // titles with explanation for the different types + const titles = { + auto: translate('autoType'), + object: translate('objectType'), + array: translate('arrayType'), + string: translate('stringType') + } + let items = [] if (this.editable.value) { @@ -4600,14 +4608,6 @@ Node.blurNodes = nodes => { } } -// titles with explanation for the different types -Node.TYPE_TITLES = { - auto: translate('autoType'), - object: translate('objectType'), - array: translate('arrayType'), - string: translate('stringType') -} - // helper function to get the internal path of a node function getInternalPath (node) { return node.getInternalPath()