diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js index 026b2260e215..70688f045cb7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/edit.controller.js @@ -37,10 +37,10 @@ vm.labels = {}; - vm.versionRegex = /^(\d+\.)(\d+\.)(\*|\d+)$/; + vm.versionRegex = /^(\d+\.)(\d+\.)(\*|\d+)$/; function onInit() { - + if (create) { // Pre populate package with some values packageResource.getEmpty().then(scaffold => { @@ -53,8 +53,9 @@ vm.loading = false; }); - localizationService.localize("general_create").then(function (value) { - vm.labels.button = value; + localizationService.localizeMany(["general_create", "packager_includeAllChildNodes"]).then(function (values) { + vm.labels.button = values[0]; + vm.labels.includeAllChildNodes = values[1]; }); } else { // Load package @@ -77,11 +78,11 @@ }); + localizationService.localizeMany(["buttons_save", "packager_includeAllChildNodes"]).then(function (values) { vm.labels.button = values[0]; vm.labels.includeAllChildNodes = values[1]; }); - } } @@ -201,8 +202,8 @@ //don't add a browser history for this $location.replace(); } - - }, function(err){ + + }, function (err) { formHelper.handleError(err); vm.buttonState = "error"; }); @@ -215,14 +216,14 @@ function openContentPicker() { const contentPicker = { - submit: function(model) { - if(model.selection && model.selection.length > 0) { + submit: function (model) { + if (model.selection && model.selection.length > 0) { vm.package.contentNodeId = model.selection[0].id.toString(); vm.contentNodeDisplayModel = model.selection[0]; } editorService.close(); }, - close: function() { + close: function () { editorService.close(); } }; @@ -240,25 +241,25 @@ entityType: "file", multiPicker: true, isDialog: true, - select: function(node) { + select: function (node) { node.selected = !node.selected; const id = decodeURIComponent(node.id.replace(/\+/g, " ")); const index = selection.indexOf(id); - if(node.selected) { - if(index === -1) { + if (node.selected) { + if (index === -1) { selection.push(id); } } else { selection.splice(index, 1); } }, - submit: function() { + submit: function () { vm.package.files = selection; editorService.close(); }, - close: function() { + close: function () { editorService.close(); } }; @@ -283,12 +284,12 @@ } }, filterCssClass: "not-allowed", - select: function(node) { + select: function (node) { const id = decodeURIComponent(node.id.replace(/\+/g, " ")); vm.package.packageView = id; editorService.close(); }, - close: function() { + close: function () { editorService.close(); } }; @@ -384,7 +385,7 @@ } function buildContributorsEditor(pkg) { - + vm.contributorsEditor = { alias: "contributors", editor: "Umbraco.MultipleTextstring",