diff --git a/static/js/makeListPrivateDialog.js b/static/js/makeListPrivateDialog.js index 5023484d7..735f7e467 100644 --- a/static/js/makeListPrivateDialog.js +++ b/static/js/makeListPrivateDialog.js @@ -1,12 +1,16 @@ +// vim: et:ts=4:sw=4:sts=4:ft=javascript + 'use strict'; pandora.ui.makeListPrivateDialog = function(name, subscribers, callback) { - var that = pandora.ui.iconDialog({ + var ui = pandora.user.ui, + folderItem = ui.section == 'item' ? 'List' : 'Edit', + that = pandora.ui.iconDialog({ buttons: [ Ox.Button({ id: 'keep', - title: Ox._('Keep List Public') + title: Ox._('Keep {0} Public', [folderItem]) }).bindEvent({ click: function() { that.close(); @@ -15,7 +19,7 @@ pandora.ui.makeListPrivateDialog = function(name, subscribers, callback) { }), Ox.Button({ id: 'make', - title: Ox._('Make List Private') + title: Ox._('Make {0} Private', [folderItem]) }).bindEvent({ click: function() { that.close(); @@ -23,10 +27,13 @@ pandora.ui.makeListPrivateDialog = function(name, subscribers, callback) { } }) ], - content: Ox._('Are you sure you want to make the list "{0}" private and lose its {1}?', - [name, subscribers == 1 ? Ox._('subscriber') : Ox._('{0} subscribers', [subscribers])]), + content: Ox._('Are you sure you want to make the {0} "{1}" private and lose its {2}?', [ + folderItem.toLowerCase(), + name, + subscribers == 1 ? Ox._('subscriber') : Ox._('{0} subscribers', [subscribers]) + ]), keys: {enter: 'make', escape: 'keep'}, - title: Ox._('Make List Private') + title: Ox._('Make {0} Private', [folderItem]) }); return that;