locales: fix some errors

This commit is contained in:
jean-emmanuel 2018-08-27 15:44:32 +02:00
parent d8a9fb4957
commit 7a6952fdd4
2 changed files with 11 additions and 11 deletions

View file

@ -157,25 +157,24 @@ var handleClick = function(event) {
var index = editor.selectedWidgets.map((w)=>DOM.index(w.container)).sort((a,b)=>{return b-a}),
data = editor.selectedWidgets.map((w)=>w.props),
type = editor.selectedWidgets[0].props.type == 'tab' ? 'tab' : 'widget',
parent = editor.selectedWidgets[0].parent
parent = editor.selectedWidgets[0].parent,
actions = {}
// case root: only "add tab" option
if (parent === widgetManager) {
contextMenu.open(eventData,{
'<i class="fa fa-plus"></i> Add tab': function(){
data[0].tabs.push({})
updateWidget(widget)
editor.pushHistory()
}
})
actions['<i class="fa fa-plus"></i> ' + locales('editor_addtab')] = ()=>{
data[0].tabs.push({})
updateWidget(widget)
editor.pushHistory()
}
contextMenu.open(eventData, actions)
return
}
// case !root
var actions = {},
clickX = Math.round((eventData.offsetX + eventData.target.scrollLeft) / (GRIDWIDTH * PXSCALE)) * GRIDWIDTH,
var clickX = Math.round((eventData.offsetX + eventData.target.scrollLeft) / (GRIDWIDTH * PXSCALE)) * GRIDWIDTH,
clickY = Math.round((eventData.offsetY + eventData.target.scrollTop) / (GRIDWIDTH * PXSCALE)) * GRIDWIDTH
actions['<i class="fa fa-expand"></i> ' + locales('editor_editparent')] = ()=>{

View file

@ -9,12 +9,13 @@ module.exports = {
editor_editparent: 'Edit parent',
editor_copy: 'Copy',
editor_cut: 'Cut',
editor_wrap: 'Wrap',
editor_wrap: 'Wrap in',
editor_paste: 'Paste',
editor_pasteindent: 'ID + 1',
editor_clone: 'Clone',
editor_addwidget: 'Add widget',
editor_addtab: 'Add tab',
editor_delete: 'Delete',
// loadings
loading_upload: 'Uploading file...',