fix dialog text for users who are not logged in

This commit is contained in:
rlx 2016-01-21 18:32:53 +05:30
parent 46852d9e4d
commit cbadc5ed89

View file

@ -31,11 +31,12 @@ pandora.ui.folders = function(section) {
var extras, $select; var extras, $select;
if (folder.id == 'personal') { if (folder.id == 'personal') {
if (pandora.user.level == 'guest') { if (pandora.user.level == 'guest') {
extras = [ extras = [infoButton(
infoButton(Ox._('Personal ' + folderItems), Ox._('Personal ' + folderItems),
Ox._('To create and share your own lists of {0}, please sign up or sign in.', [Ox._(pandora.site.itemName.plural.toLowerCase())]), section == 'items'
Ox._('To create and share your own {0}, please sign up or sign in.', [section])) ? Ox._('To create and share your own lists of {0}, please sign up or sign in.', [Ox._(pandora.site.itemName.plural.toLowerCase())]),
]; : Ox._('To create and share your own {0}, please sign up or sign in.', [section])
)];
} else { } else {
if (section == 'items') { if (section == 'items') {
extras = [ extras = [
@ -185,8 +186,10 @@ pandora.ui.folders = function(section) {
} }
} else if (folder.id == 'favorite') { } else if (folder.id == 'favorite') {
if (pandora.user.level == 'guest') { if (pandora.user.level == 'guest') {
extras = [infoButton(Ox._('Favorite ' + folderItems), extras = [infoButton(
Ox._('To browse and subscribe to {0} shared by other users, please sign up or sign in.', [Ox._(folderItems.toLowerCase())]))]; Ox._('Favorite ' + folderItems),
Ox._('To browse and subscribe to {0} shared by other users, please sign up or sign in.', [Ox._(folderItems.toLowerCase())])
)];
} else { } else {
extras = [pandora.$ui.manageListsButton['favorite'] = Ox.Button({ extras = [pandora.$ui.manageListsButton['favorite'] = Ox.Button({
selectable: true, selectable: true,
@ -234,9 +237,10 @@ pandora.ui.folders = function(section) {
} }
} else if (folder.id == 'featured') { } else if (folder.id == 'featured') {
if (!canEditFeatured) { if (!canEditFeatured) {
extras = [infoButton(Ox._('Featured ' + folderItems), extras = [infoButton(
Ox._('Featured {0} are selected public {0}, picked by the {1} staff.', Ox._('Featured ' + folderItems),
[Ox._(folderItems.toLowerCase()), pandora.site.site.name]))]; Ox._('Featured {0} are selected public {0}, picked by the {1} staff.', [Ox._(folderItems.toLowerCase()), pandora.site.site.name])
)];
} else { } else {
extras = [pandora.$ui.manageListsButton['featured'] = Ox.Button({ extras = [pandora.$ui.manageListsButton['featured'] = Ox.Button({
selectable: true, selectable: true,
@ -291,8 +295,10 @@ pandora.ui.folders = function(section) {
} }
} else if (folder.id == 'volumes') { } else if (folder.id == 'volumes') {
if (pandora.user.level == 'guest') { if (pandora.user.level == 'guest') {
extras = [infoButton(Ox._('Local Volumes'), Ox._('To import {0} from a local disk, please sign up or sign in.', extras = [infoButton(
[Ox._(pandora.site.itemName.plural.toLocaleLowerCase())]))]; Ox._('Local Volumes'),
Ox._('To import {0} from a local disk, please sign up or sign in.', [Ox._(pandora.site.itemName.plural.toLocaleLowerCase())])
)];
} else { } else {
extras = [Ox.MenuButton({ extras = [Ox.MenuButton({
items: [ items: [