Use translations for action in project delete modal

This commit is contained in:
James Allen 2016-03-22 12:12:11 +00:00
parent aa1f2cc8a9
commit 4595c90363
2 changed files with 6 additions and 4 deletions

View file

@ -183,7 +183,9 @@ script(type='text/ng-template', id='deleteProjectsModalTemplate')
data-dismiss="modal"
ng-click="cancel()"
) ×
h3 {{action}} #{translate("projects")}
h3(ng-if="action == 'delete'") #{translate("delete_projects")}
h3(ng-if="action == 'leave'") #{translate("leave_projects")}
h3(ng-if="action == 'delete-and-leave'") #{translate("delete_and_leave_projects")}
.modal-body
div(ng-show="projectsToDelete.length > 0")
p #{translate("about_to_delete_projects")}

View file

@ -65,11 +65,11 @@ define [
$scope.projectsToLeave = projects.filter (project) -> project.accessLevel != "owner"
if $scope.projectsToLeave.length > 0 and $scope.projectsToDelete.length > 0
$scope.action = "Delete & Leave"
$scope.action = "delete-and-leave"
else if $scope.projectsToLeave.length == 0 and $scope.projectsToDelete.length > 0
$scope.action = "Delete"
$scope.action = "delete"
else
$scope.action = "Leave"
$scope.action = "leave"
$scope.delete = () ->
$modalInstance.close()