diff --git a/static/js/deleteDocumentDialog.js b/static/js/deleteDocumentDialog.js index 8fdac612d..02829cf2a 100644 --- a/static/js/deleteDocumentDialog.js +++ b/static/js/deleteDocumentDialog.js @@ -3,11 +3,12 @@ pandora.ui.deleteDocumentDialog = function(files, callback) { - var that = pandora.ui.iconDialog({ + var string = files.length == 1 ? 'Document' : 'Documents', + that = pandora.ui.iconDialog({ buttons: [ Ox.Button({ id: 'keep', - title: files.length == 1 ? Ox._('Keep Document') : Ox._('Keep Documents') + title: Ox._('Keep ' + string) }).bindEvent({ click: function() { that.close(); @@ -15,7 +16,7 @@ pandora.ui.deleteDocumentDialog = function(files, callback) { }), Ox.Button({ id: 'delete', - title: files.length == 1 ? Ox._('Delete Document') : Ox._('Delete Documents') + title: Ox._('Delete ' + string) }).bindEvent({ click: function() { that.close(); @@ -29,7 +30,9 @@ pandora.ui.deleteDocumentDialog = function(files, callback) { ? Ox._('Are you sure you want to delete the document "{0}"?', [files[0]]) : Ox._('Are you sure you want to delete {0} documents?', [files.length]), keys: {enter: 'delete', escape: 'keep'}, - title: files.length == 1 ? Ox._('Delete Document') : Ox._('Delete {0} Documents', [files.length]) + title: files.length == 1 + ? Ox._('Delete Document') + : Ox._('Delete {0} Documents', [files.length]) }); return that;