Translate the text in the sort modal

This commit is contained in:
jos 2018-06-02 20:21:27 +02:00
parent b28f73ee13
commit 185a81e03a
4 changed files with 36 additions and 10 deletions

View File

@ -290,6 +290,9 @@ div.jsoneditor-contextmenu button.jsoneditor-type-modes > div.jsoneditor-icon {
height: 30px;
line-height: 30px;
font-family: arial, sans-serif;
font-size: 11pt;
background: #3883fa;
color: white;
}

View File

@ -11,7 +11,6 @@ div.jsoneditor-menu {
color: white;
background-color: #3883fa;
border-bottom: 1px solid #3883fa;
overflow: hidden;
}
div.jsoneditor-menu > button,

View File

@ -3732,30 +3732,31 @@ Node.prototype.showContextMenu = function (anchor, onClose) {
Node.prototype._showSortModal = function () {
var node = this;
// TODO: escape the translated text
var content = '<div class="pico-modal-contents">' +
'<div class="pico-modal-header">Sort</div>' +
'<div class="pico-modal-header">' + translate('sort') + '</div>' +
'<form>' +
'<table>' +
'<tbody>' +
'<tr>' +
' <td>Field:</td>' +
' <td>' + translate('sortFieldLabel') + ' </td>' +
' <td class="jsoneditor-modal-input">' +
' <select id="field" title="Select the nested field by which to sort the array or object">' +
' <select id="field" title="' + translate('sortFieldTitle') + '">' +
' </select>' +
' </td>' +
'</tr>' +
'<tr>' +
' <td>Direction:</td>' +
' <td>' + translate('sortDirectionLabel') + ' </td>' +
' <td class="jsoneditor-modal-input">' +
' <div id="direction" class="jsoneditor-button-group">' +
'<input type="button" ' +
'value="Ascending" ' +
'title="Sort the selected field in ascending order" ' +
'value="' + translate('sortAscending') + '" ' +
'title="' + translate('sortAscendingTitle') + '" ' +
'data-value="asc" ' +
'class="jsoneditor-button-first jsoneditor-button-asc"/>' +
'<input type="button" ' +
'value="Descending" ' +
'title="Sort the selected field in descending order" ' +
'value="' + translate('sortDescending') + '" ' +
'title="' + translate('sortDescendingTitle') + '" ' +
'data-value="desc" ' +
'class="jsoneditor-button-last jsoneditor-button-desc"/>' +
' </div>' +
@ -3763,7 +3764,7 @@ Node.prototype._showSortModal = function () {
'</tr>' +
'<tr>' +
'<td colspan="2" class="jsoneditor-modal-input jsoneditor-modal-actions">' +
' <input type="submit" id="ok" value="Ok" />' +
' <input type="submit" id="ok" value="' + translate('ok') + '" />' +
'</td>' +
'</tr>' +
'</tbody>' +

View File

@ -28,6 +28,7 @@ var _defs = {
'insertTitle': 'Insert a new field with type \'auto\' before this field (Ctrl+Ins)',
'insertSub': 'Select the type of the field to be inserted',
'object': 'Object',
'ok': 'Ok',
'redo': 'Redo (Ctrl+Shift+Z)',
'removeText': 'Remove',
'removeTitle': 'Remove selected fields (Ctrl+Del)',
@ -37,6 +38,13 @@ var _defs = {
'showMoreStatus': 'displaying ${visibleChilds} of ${totalChilds} items.',
'sort': 'Sort',
'sortTitle': 'Sort the childs of this ',
'sortFieldLabel': 'Field:',
'sortDirectionLabel': 'Direction:',
'sortFieldTitle': 'Select the nested field by which to sort the array or object',
'sortAscending': 'Ascending',
'sortAscendingTitle': 'Sort the selected field in ascending order',
'sortDescending': 'Descending',
'sortDescendingTitle': 'Sort the selected field in descending order',
'string': 'String',
'type': 'Type',
'typeTitle': 'Change the type of this field',
@ -80,6 +88,7 @@ var _defs = {
'insertTitle': 'Inserir um novo campo do tipo \'auto\' antes deste campo (Ctrl+Ins)',
'insertSub': 'Selecionar o tipo de campo a ser inserido',
'object': 'Objeto',
'ok': 'Ok',
'redo': 'Refazer (Ctrl+Shift+Z)',
'removeText': 'Remover',
'removeTitle': 'Remover campos selecionados (Ctrl+Del)',
@ -92,6 +101,20 @@ var _defs = {
'showMoreStatus': 'exibindo ${visibleChilds} de ${totalChilds} itens.',
'sort': 'Organizar',
'sortTitle': 'Organizar os filhos deste ',
// TODO: correctly translate sortFieldLabel
'sortFieldLabel': 'Field:',
// TODO: correctly translate sortDirectionLabel
'sortDirectionLabel': 'Direction:',
// TODO: correctly translate sortFieldTitle
'sortFieldTitle': 'Select the nested field by which to sort the array or object',
// TODO: correctly translate sortAscending
'sortAscending': 'Ascending',
// TODO: correctly translate sortAscendingTitle
'sortAscendingTitle': 'Sort the selected field in ascending order',
// TODO: correctly translate sortDescending
'sortDescending': 'Descending',
// TODO: correctly translate sortDescendingTitle
'sortDescendingTitle': 'Sort the selected field in descending order',
'string': 'Texto',
'type': 'Tipo',
'typeTitle': 'Mudar o tipo deste campo',