Skip to content

Commit

Permalink
Fix josdejong#964: translation of titles of some context menu items n…
Browse files Browse the repository at this point in the history
…ot working
  • Loading branch information
josdejong committed Apr 19, 2020
1 parent c42ddd4 commit 894af51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.


Expand Down
18 changes: 9 additions & 9 deletions src/js/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 894af51

Please sign in to comment.