diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js index 1451a3d0c4..69d12fcb73 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js @@ -31,14 +31,36 @@ "general_design", "general_listView", "general_rights", - "treeHeaders_templates" + "treeHeaders_templates", + "main_sections", + "shortcuts_navigateSections", + "shortcuts_addTab", + "shortcuts_addProperty", + "shortcuts_addEditor", + "shortcuts_editDataType", + "shortcuts_toggleListView", + "shortcuts_toggleAllowAsRoot", + "shortcuts_addChildNode", + "shortcuts_addTemplate" ]; localizationService.localizeMany(labelKeys).then(function (values) { + // navigation vm.labels.design = values[0]; vm.labels.listview = values[1]; vm.labels.permissions = values[2]; vm.labels.templates = values[3]; + // keyboard shortcuts + vm.labels.sections = values[4]; + vm.labels.navigateSections = values[5]; + vm.labels.addTab = values[6]; + vm.labels.addProperty = values[7]; + vm.labels.addEditor = values[8]; + vm.labels.editDataType = values[9]; + vm.labels.toggleListView = values[10]; + vm.labels.allowAsRoot = values[11]; + vm.labels.addChildNode = values[12]; + vm.labels.addTemplate = values[13]; var buttons = [ { @@ -68,75 +90,75 @@ } ]; + vm.page.keyboardShortcutsOverview = [ + { + "name": vm.labels.sections, + "shortcuts": [ + { + "description": vm.labels.navigateSections, + "keys": [{ "key": "1" }, { "key": "4" }], + "keyRange": true + } + ] + }, + { + "name": vm.labels.design, + "shortcuts": [ + { + "description": vm.labels.addTab, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "t" }] + }, + { + "description": vm.labels.addProperty, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "p" }] + }, + { + "description": vm.labels.addEditor, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "e" }] + }, + { + "description": vm.labels.editDataType, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "d" }] + } + ] + }, + { + "name": vm.labels.listview, + "shortcuts": [ + { + "description": vm.labels.toggleListView, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "l" }] + } + ] + }, + { + "name": vm.labels.permissions, + "shortcuts": [ + { + "description": vm.labels.allowAsRoot, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "r" }] + }, + { + "description": vm.labels.addChildNode, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "c" }] + } + ] + }, + { + "name": vm.labels.templates, + "shortcuts": [ + { + "description": vm.labels.addTemplate, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "t" }] + } + ] + } + ]; + loadButtons(buttons); }); - vm.page.keyboardShortcutsOverview = [ - { - "name": localizationService.localize("main_sections"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_navigateSections"), - "keys": [{ "key": "1" }, { "key": "4" }], - "keyRange": true - } - ] - }, - { - "name": localizationService.localize("general_design"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_addTab"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "t" }] - }, - { - "description": localizationService.localize("shortcuts_addProperty"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "p" }] - }, - { - "description": localizationService.localize("shortcuts_addEditor"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "e" }] - }, - { - "description": localizationService.localize("shortcuts_editDataType"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "d" }] - } - ] - }, - { - "name": localizationService.localize("general_listView"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_toggleListView"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "l" }] - } - ] - }, - { - "name": localizationService.localize("general_rights"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_toggleAllowAsRoot"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "r" }] - }, - { - "description": localizationService.localize("shortcuts_addChildNode"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "c" }] - } - ] - }, - { - "name": localizationService.localize("treeHeaders_templates"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_addTemplate"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "t" }] - } - ] - } - ]; - contentTypeHelper.checkModelsBuilderStatus().then(function (result) { vm.page.modelsBuilder = result; if (result) { diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js index 5e7e93fcd9..47377ae01b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/edit.controller.js @@ -26,14 +26,34 @@ var labelKeys = [ "general_design", "general_listView", - "general_rights" + "general_rights", + + "main_sections", + "shortcuts_navigateSections", + "shortcuts_addTab", + "shortcuts_addProperty", + "shortcuts_addEditor", + "shortcuts_editDataType", + "shortcuts_toggleListView", + "shortcuts_toggleAllowAsRoot", + "shortcuts_addChildNode" ]; localizationService.localizeMany(labelKeys).then(function (values) { - + // navigation vm.labels.design = values[0]; vm.labels.listview = values[1]; vm.labels.permissions = values[2]; + // keyboard shortcuts + vm.labels.sections = values[3]; + vm.labels.navigateSections = values[4]; + vm.labels.addTab = values[5]; + vm.labels.addProperty = values[6]; + vm.labels.addEditor = values[7]; + vm.labels.editDataType = values[8]; + vm.labels.toggleListView = values[9]; + vm.labels.allowAsRoot = values[10]; + vm.labels.addChildNode = values[11]; vm.page.navigation = [ { @@ -54,64 +74,63 @@ } ]; + vm.page.keyboardShortcutsOverview = [ + { + "name": vm.labels.sections, + "shortcuts": [ + { + "description": vm.labels.navigateSections, + "keys": [{ "key": "1" }, { "key": "3" }], + "keyRange": true + } + ] + }, + { + "name": vm.labels.design, + "shortcuts": [ + { + "description": vm.labels.addTab, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "t" }] + }, + { + "description": vm.labels.addProperty, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "p" }] + }, + { + "description": vm.labels.addEditor, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "e" }] + }, + { + "description": vm.labels.editDataType, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "d" }] + } + ] + }, + { + "name": vm.labels.listview, + "shortcuts": [ + { + "description": vm.labels.toggleListView, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "l" }] + } + ] + }, + { + "name": vm.labels.permissions, + "shortcuts": [ + { + "description": vm.labels.allowAsRoot, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "r" }] + }, + { + "description": vm.labels.addChildNode, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "c" }] + } + ] + } + ]; }); - vm.page.keyboardShortcutsOverview = [ - { - "name": localizationService.localize("main_sections"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_navigateSections"), - "keys": [{ "key": "1" }, { "key": "3" }], - "keyRange": true - } - ] - }, - { - "name": localizationService.localize("general_design"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_addTab"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "t" }] - }, - { - "description": localizationService.localize("shortcuts_addProperty"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "p" }] - }, - { - "description": localizationService.localize("shortcuts_addEditor"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "e" }] - }, - { - "description": localizationService.localize("shortcuts_editDataType"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "d" }] - } - ] - }, - { - "name": localizationService.localize("general_listView"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_toggleListView"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "l" }] - } - ] - }, - { - "name": localizationService.localize("general_rights"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_toggleAllowAsRoot"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "r" }] - }, - { - "description": localizationService.localize("shortcuts_addChildNode"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "c" }] - } - ] - } - ]; - contentTypeHelper.checkModelsBuilderStatus().then(function (result) { vm.page.modelsBuilder = result; if (result) { diff --git a/src/Umbraco.Web.UI.Client/src/views/membertypes/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/membertypes/edit.controller.js index 64d560d9ec..27fc36bc0c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/membertypes/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/membertypes/edit.controller.js @@ -22,8 +22,24 @@ vm.page.saveButtonState = "init"; vm.labels = {}; - localizationService.localize("general_design").then(function(data){ - vm.labels.design = data; + var labelKeys = [ + "general_design", + "shortcuts_shortcut", + "shortcuts_addTab", + "shortcuts_addProperty", + "shortcuts_addEditor", + "shortcuts_editDataType" + ]; + + localizationService.localizeMany(labelKeys).then(function(values){ + + vm.labels.design = values[0]; + vm.labels.shortcut = values[1]; + vm.labels.addTab = values[2]; + vm.labels.addProperty = values[3]; + vm.labels.addEditor = values[4]; + vm.labels.editDataType = values[5]; + vm.page.navigation = [ { "name": vm.labels.design, @@ -32,31 +48,32 @@ "active": true } ]; - }); - vm.page.keyboardShortcutsOverview = [ - { - "name": localizationService.localize("shortcuts_shortcut"), - "shortcuts": [ - { - "description": localizationService.localize("shortcuts_addTab"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "t" }] - }, - { - "description": localizationService.localize("shortcuts_addProperty"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "p" }] - }, - { - "description": localizationService.localize("shortcuts_addEditor"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "e" }] - }, - { - "description": localizationService.localize("shortcuts_editDataType"), - "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "d" }] - } - ] - } - ]; + vm.page.keyboardShortcutsOverview = [ + { + "name": vm.labels.shortcut, + "shortcuts": [ + { + "description": vm.labels.addTab, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "t" }] + }, + { + "description": vm.labels.addProperty, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "p" }] + }, + { + "description": vm.labels.addEditor, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "e" }] + }, + { + "description": vm.labels.editDataType, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "d" }] + } + ] + } + ]; + + }); contentTypeHelper.checkModelsBuilderStatus().then(function (result) { vm.page.modelsBuilder = result;