Update localization of listview bulk actions
This commit is contained in:
@@ -371,41 +371,34 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
applySelected(
|
||||
function (selected, index) { return deleteItemCallback(getIdCallback(selected[index])); },
|
||||
function (count, total) {
|
||||
return "Deleted " + count + " out of " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_deletedItemOfItem" : "bulk_deletedItemOfItems");
|
||||
//localizationService.localize(key, [count, total]).then(function (value) {
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_deletedItemOfItem" : "bulk_deletedItemOfItems");
|
||||
localizationService.localize(key, [count, total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
},
|
||||
function (total) {
|
||||
return "Deleted " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_deletedItem" : "bulk_deletedItems");
|
||||
//localizationService.localize(key, [total]).then(function (value) {
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_deletedItem" : "bulk_deletedItems");
|
||||
localizationService.localize(key, [total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
},
|
||||
//localizationService.localize("defaultdialogs_confirmdelete") + "?"
|
||||
"Sure you want to delete?");
|
||||
localizationService.localize("defaultdialogs_confirmdelete") + "?");
|
||||
};
|
||||
|
||||
$scope.publish = function () {
|
||||
applySelected(
|
||||
function (selected, index) { return contentResource.publishById(getIdCallback(selected[index])); },
|
||||
function (count, total) {
|
||||
return "Published " + count + " out of " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_publishedItemOfItem" : "bulk_publishedItemOfItems");
|
||||
//localizationService.localize(key, [count, total]).then(function (value) {
|
||||
// console.log(key, value);
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_publishedItemOfItem" : "bulk_publishedItemOfItems");
|
||||
localizationService.localize(key, [count, total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
},
|
||||
function (total) {
|
||||
return "Published " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_publishedItem" : "bulk_publishedItems");
|
||||
//localizationService.localize(key, [total]).then(function (value) {
|
||||
// console.log(key, value);
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_publishedItem" : "bulk_publishedItems");
|
||||
localizationService.localize(key, [total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -413,18 +406,16 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
applySelected(
|
||||
function (selected, index) { return contentResource.unPublish(getIdCallback(selected[index])); },
|
||||
function (count, total) {
|
||||
return "Unpublished " + count + " out of " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_unpublishedItemOfItem" : "bulk_unpublishedItemOfItems");
|
||||
//localizationService.localize(key, [count, total]).then(function (value) {
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_unpublishedItemOfItem" : "bulk_unpublishedItemOfItems");
|
||||
localizationService.localize(key, [count, total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
},
|
||||
function (total) {
|
||||
return "Unpublished " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_unpublishedItem" : "bulk_unpublishedItems");
|
||||
//localizationService.localize(key, [total]).then(function (value) {
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_unpublishedItem" : "bulk_unpublishedItems");
|
||||
localizationService.localize(key, [total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -458,18 +449,16 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
applySelected(
|
||||
function (selected, index) { return contentResource.move({ parentId: target.id, id: getIdCallback(selected[index]) }); },
|
||||
function (count, total) {
|
||||
return "Moved " + count + " out of " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_movedItemOfItem" : "bulk_movedItemOfItems");
|
||||
//localizationService.localize(key, [count, total]).then(function (value) {
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_movedItemOfItem" : "bulk_movedItemOfItems");
|
||||
localizationService.localize(key, [count, total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
},
|
||||
function (total) {
|
||||
return "Moved " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_movedItem" : "bulk_movedItems");
|
||||
//localizationService.localize(key, [total]).then(function (value) {
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_movedItem" : "bulk_movedItems");
|
||||
localizationService.localize(key, [total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -501,18 +490,16 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
applySelected(
|
||||
function (selected, index) { return contentResource.copy({ parentId: target.id, id: getIdCallback(selected[index]), relateToOriginal: relateToOriginal }); },
|
||||
function (count, total) {
|
||||
return "Copied " + count + " out of " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_copiedItemOfItem" : "bulk_copiedItemOfItems");
|
||||
//localizationService.localize(key, [count, total]).then(function (value) {
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_copiedItemOfItem" : "bulk_copiedItemOfItems");
|
||||
localizationService.localize(key, [count, total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
},
|
||||
function (total) {
|
||||
return "Copied " + total + " item" + (total > 1 ? "s" : "");
|
||||
//var key = (total === 1 ? "bulk_copiedItem" : "bulk_copiedItems");
|
||||
//localizationService.localize(key, [total]).then(function (value) {
|
||||
// return value;
|
||||
//});
|
||||
var key = (total === 1 ? "bulk_copiedItem" : "bulk_copiedItems");
|
||||
localizationService.localize(key, [total]).then(function (value) {
|
||||
return value;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user