wrap more strings
This commit is contained in:
parent
5905e339e3
commit
e8e4639dce
15 changed files with 61 additions and 64 deletions
|
@ -10,7 +10,7 @@ pandora.ui.contentPanel = function() {
|
|||
resizable: true,
|
||||
resize: [96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256],
|
||||
size: pandora.user.ui.filtersSize,
|
||||
tooltip: 'filters <span class="OxBright">'
|
||||
tooltip: Ox._('filters') + ' <span class="OxBright">'
|
||||
+ Ox.SYMBOLS.SHIFT + 'F</span>'
|
||||
},
|
||||
{
|
||||
|
@ -26,8 +26,8 @@ pandora.ui.contentPanel = function() {
|
|||
collapsible: true,
|
||||
element: pandora.$ui.browser = pandora.ui.browser(),
|
||||
size: 112 + Ox.UI.SCROLLBAR_SIZE,
|
||||
tooltip: pandora.site.itemName.singular.toLowerCase()
|
||||
+ ' browser <span class="OxBright">'
|
||||
tooltip: Ox._('{0} browser', [Ox._(pandora.site.itemName.singular.toLowerCase())])
|
||||
+ ' <span class="OxBright">'
|
||||
+ Ox.SYMBOLS.SHIFT + 'B</span>'
|
||||
},
|
||||
{
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
pandora.ui.deleteDocumentDialog = function(files, callback) {
|
||||
|
||||
var string = files.length == 1 ? 'Document' : 'Documents',
|
||||
var string = Ox._(files.length == 1 ? 'Document' : 'Documents'),
|
||||
that = pandora.ui.iconDialog({
|
||||
buttons: [
|
||||
Ox.Button({
|
||||
id: 'keep',
|
||||
title: Ox._('Keep ' + string)
|
||||
title: Ox._('Keep {0}', [string])
|
||||
}).bindEvent({
|
||||
click: function() {
|
||||
that.close();
|
||||
|
@ -16,7 +16,7 @@ pandora.ui.deleteDocumentDialog = function(files, callback) {
|
|||
}),
|
||||
Ox.Button({
|
||||
id: 'delete',
|
||||
title: Ox._('Delete ' + string)
|
||||
title: Ox._('Delete {0}', [string])
|
||||
}).bindEvent({
|
||||
click: function() {
|
||||
that.close();
|
||||
|
@ -33,7 +33,7 @@ pandora.ui.deleteDocumentDialog = function(files, callback) {
|
|||
: 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}', [string])
|
||||
: Ox._('Delete {0} Documents', [files.length])
|
||||
});
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ pandora.ui.deleteListDialog = function(list) {
|
|||
buttons: [
|
||||
Ox.Button({
|
||||
id: 'keep',
|
||||
title: Ox._('Keep {0}', [folderItem])
|
||||
title: Ox._('Keep {0}', [Ox._(folderItem)])
|
||||
}).bindEvent({
|
||||
click: function() {
|
||||
that.close();
|
||||
|
@ -22,7 +22,7 @@ pandora.ui.deleteListDialog = function(list) {
|
|||
}),
|
||||
Ox.Button({
|
||||
id: 'delete',
|
||||
title: Ox._('Delete {0}', [folderItem])
|
||||
title: Ox._('Delete {0}', [Ox._(folderItem)])
|
||||
}).bindEvent({
|
||||
click: function() {
|
||||
that.close();
|
||||
|
@ -51,9 +51,9 @@ pandora.ui.deleteListDialog = function(list) {
|
|||
})
|
||||
],
|
||||
content: Ox._('Are you sure you want to delete the {0} "{1}"?',
|
||||
[folderItem.toLowerCase(), listData.name]),
|
||||
[Ox._(folderItem.toLowerCase()), listData.name]),
|
||||
keys: {enter: 'delete', escape: 'keep'},
|
||||
title: Ox._('Delete {0}', [folderItem])
|
||||
title: Ox._('Delete {0}', [Ox._(folderItem)])
|
||||
});
|
||||
|
||||
return that;
|
||||
|
|
|
@ -235,7 +235,7 @@ pandora.ui.documentsPanel = function(options) {
|
|||
$itemMenu = Ox.MenuButton({
|
||||
items: isItemView ? [
|
||||
{id: 'add', title: Ox._(
|
||||
'Add Documents to ' + pandora.site.itemName.singular + '...'
|
||||
'Add Documents to {0}...', [pandora.site.itemName.singular]
|
||||
), keyboard: 'control n'},
|
||||
{},
|
||||
{id: 'open', title: '', keyboard: 'return'},
|
||||
|
@ -244,13 +244,13 @@ pandora.ui.documentsPanel = function(options) {
|
|||
{},
|
||||
{id: 'remove', title: '', keyboard: 'delete'}
|
||||
] : [
|
||||
{id: 'upload', title: Ox._('Upload Documents...'), file: {width: 192}},
|
||||
{id: 'upload', title: Ox._('Upload {0}...', [Ox._('Documents')]), file: {width: 192}},
|
||||
{},
|
||||
{id: 'open', title: '', keyboard: 'return'},
|
||||
{id: 'add', title: ''},
|
||||
{id: 'embed', title: Ox._('Embed Document...')},
|
||||
{},
|
||||
{id: 'replace', title: Ox._('Replace Document...')},
|
||||
{id: 'replace', title: Ox._('Replace {0}...', [Ox._('Document')])},
|
||||
{id: 'delete', title: '', keyboard: 'delete'}
|
||||
],
|
||||
title: 'set',
|
||||
|
@ -791,28 +791,28 @@ pandora.ui.documentsPanel = function(options) {
|
|||
return;
|
||||
}
|
||||
var selected = ui.documentsSelection[isItemView ? ui.item : ''] || [],
|
||||
string = selected.length < 2 ? 'Document' : ' Documents';
|
||||
string = Ox._(selected.length < 2 ? 'Document' : 'Documents');
|
||||
$list.options({selected: selected});
|
||||
$itemMenu.setItemTitle('open', Ox._('Open ' + string))
|
||||
$itemMenu.setItemTitle('open', Ox._('Open {0}', [string]))
|
||||
[selected.length ? 'enableItem' : 'disableItem']('open');
|
||||
if (isItemView) {
|
||||
$itemMenu.setItemTitle('edit', Ox._('Edit ' + string + '...'))
|
||||
$itemMenu.setItemTitle('edit', Ox._('Edit {0}...', [string]))
|
||||
.setItemTitle('remove', Ox._(
|
||||
'Remove ' + string + ' from '
|
||||
+ pandora.site.itemName.singular
|
||||
'Remove {0} from {1}',
|
||||
[string, Ox._(pandora.site.itemName.singular)]
|
||||
))
|
||||
[selected.length ? 'enableItem' : 'disableItem']('edit')
|
||||
[selected.length ? 'enableItem' : 'disableItem']('embed')
|
||||
[selected.length ? 'enableItem' : 'disableItem']('remove');
|
||||
} else {
|
||||
$itemMenu.setItemTitle('add', Ox._('Add ' + string + ' to ' + (
|
||||
hasListSelection ? 'Selected' : 'Current'
|
||||
) + ' {0}', [pandora.site.itemName[
|
||||
$itemMenu.setItemTitle('add', Ox._('Add {0} to {1} {2}', [
|
||||
Ox._(hasListSelection ? 'Selected' : 'Current'),
|
||||
string, Ox._(pandora.site.itemName[
|
||||
hasListSelection && ui.listSelection.length > 1
|
||||
? 'plural' : 'singular'
|
||||
]]))
|
||||
.setItemTitle('replace', Ox._('Replace ' + string + '...'))
|
||||
.setItemTitle('delete', Ox._('Delete ' + string + '...'))
|
||||
? 'plural' : 'singular'])
|
||||
]))
|
||||
.setItemTitle('replace', Ox._('Replace {0}...', [string]))
|
||||
.setItemTitle('delete', Ox._('Delete {0}...', [string]))
|
||||
[selected.length && (hasItemView || hasListSelection) ? 'enableItem' : 'disableItem']('add')
|
||||
[selected.length ? 'enableItem' : 'disableItem']('embed')
|
||||
[selected.length == 1 ? 'enableItem' : 'disableItem']('replace')
|
||||
|
|
|
@ -143,7 +143,7 @@ pandora.ui.editPanel = function(isEmbed) {
|
|||
),
|
||||
subtitles: getSubtitles(edit.clips),
|
||||
timeline: ui.videoTimeline,
|
||||
timelineTooltip: 'timeline <span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'T</span>',
|
||||
timelineTooltip: Ox._('timeline') + ' <span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'T</span>',
|
||||
video: getVideos(),
|
||||
volume: ui.videoVolume,
|
||||
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
|
|
|
@ -13,13 +13,11 @@ pandora.ui.editor = function(data) {
|
|||
annotationsRange: ui.annotationsRange,
|
||||
annotationsSize: ui.annotationsSize,
|
||||
annotationsSort: ui.annotationsSort,
|
||||
annotationsTooltip: Ox._(
|
||||
'annotations {0}',
|
||||
['<span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>']
|
||||
),
|
||||
annotationsTooltip: Ox._('annotations')
|
||||
+ ' <span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>',
|
||||
censored: data.censored,
|
||||
censoredIcon: pandora.site.cantPlay.icon,
|
||||
censoredTooltip: pandora.site.cantPlay.text,
|
||||
censoredTooltip: Ox._(pandora.site.cantPlay.text),
|
||||
clickLink: pandora.clickLink,
|
||||
cuts: data.cuts || [],
|
||||
duration: data.duration,
|
||||
|
|
|
@ -129,7 +129,7 @@ pandora.ui.folderBrowserList = function(id, section) {
|
|||
tooltip: function(data) {
|
||||
var checked = id == 'favorite' ? data.subscribed : data.status == 'featured';
|
||||
return Ox._((checked ? 'Remove from' : 'Add to')
|
||||
+ ' ' + Ox.toTitleCase(id) + ' ' + folderItems);
|
||||
+ ' {0} {1}', [Ox._(Ox.toTitleCase(id)), Ox._(folderItems)]);
|
||||
},
|
||||
visible: true,
|
||||
width: 16
|
||||
|
|
|
@ -9,13 +9,10 @@ pandora.ui.folderPlaceholder = function(id, section) {
|
|||
});
|
||||
that.updateText = function(string, isFind) {
|
||||
return that.html(
|
||||
Ox._(
|
||||
string != 'volumes'
|
||||
? 'No ' + string + ' '
|
||||
+ (section == 'items' ? 'lists' : section)
|
||||
+ (isFind ? ' found' : '')
|
||||
: 'No local volumes'
|
||||
)
|
||||
string != 'volumes'
|
||||
? Ox._('No {0} {1}' + (isFind ? ' found' : ''),
|
||||
[Ox._(string), Ox._(section == 'items' ? 'lists' : section)])
|
||||
: Ox._('No local volumes')
|
||||
);
|
||||
};
|
||||
return that.updateText(id);
|
||||
|
|
|
@ -516,9 +516,9 @@ pandora.ui.infoView = function(data) {
|
|||
key = Ox._(item ? item.title : key);
|
||||
mode = mode || 'text';
|
||||
if (key == 'alternativeTitles') {
|
||||
key = 'alternative title' + (
|
||||
key = Ox._('Alternative Title' + (
|
||||
data.alternativeTitles && data.alternativeTitles.length == 1 ? '' : 's'
|
||||
);
|
||||
));
|
||||
} else if (key == 'keyword') {
|
||||
key = 'keywords'
|
||||
}
|
||||
|
@ -528,8 +528,7 @@ pandora.ui.infoView = function(data) {
|
|||
? Ox.toTitleCase(key)
|
||||
: Ox.Element()
|
||||
.css({marginBottom: '4px', fontWeight: 'bold'})
|
||||
.html(Ox.toTitleCase(key)
|
||||
.replace(' Per ', ' per '));
|
||||
.html(Ox.toTitleCase(key).replace(' Per ', ' per '));
|
||||
}
|
||||
|
||||
function formatLight(str) {
|
||||
|
@ -749,14 +748,15 @@ pandora.ui.infoView = function(data) {
|
|||
var hasCapability = pandora.site.capabilities[capability.name][userLevel] >= rightsLevel,
|
||||
$element = Ox.Theme.formatColorLevel(hasCapability, ['', '']);
|
||||
Ox.Button({
|
||||
tooltip: Ox._((canEdit ? Ox.toTitleCase(userLevel) : 'You') + ' '
|
||||
tooltip: Ox._('{0} '
|
||||
+ (hasCapability ? 'can' : 'can\'t') + ' '
|
||||
+ Ox.toSlashes(capability.name)
|
||||
.split('/').slice(1).join(' ')
|
||||
.toLowerCase()
|
||||
.replace('see item', 'see the item')
|
||||
.replace('play video', 'play the full video')
|
||||
.replace('download video', 'download the video')),
|
||||
.replace('download video', 'download the video'),
|
||||
[canEdit ? Ox.toTitleCase(userLevel) : Ox._('You')]),
|
||||
title: capability.symbol,
|
||||
type: 'image'
|
||||
})
|
||||
|
|
|
@ -26,7 +26,10 @@ pandora.ui.listDialog = function(section) {
|
|||
} else if (id == 'icon') {
|
||||
return pandora.$ui.listIconPanel = pandora.ui.listIconPanel(listData);
|
||||
} else if (id == 'query') {
|
||||
return pandora.$ui.filterForm = pandora.ui.filterForm(listData)
|
||||
return pandora.$ui.filterForm = pandora.ui.filterForm({
|
||||
mode: 'list',
|
||||
list: listData
|
||||
})
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
listData.query = data.query;
|
||||
|
|
|
@ -196,7 +196,7 @@ pandora.ui.mainMenu = function() {
|
|||
}) }
|
||||
] },
|
||||
{},
|
||||
{ id: 'embed', title: Ox._('Embed...'), disabled: true }
|
||||
{ id: 'embed', title: Ox._('Embed...') }
|
||||
]},
|
||||
getSortMenu(),
|
||||
getFindMenu(),
|
||||
|
@ -487,6 +487,8 @@ pandora.ui.mainMenu = function() {
|
|||
Ox.Fullscreen.toggle();
|
||||
} else if (data.id == 'entervideofullscreen') {
|
||||
pandora.$ui.player.options({fullscreen: true});
|
||||
} else if (data.id == 'embed') {
|
||||
pandora.$ui.embedDialog = pandora.ui.embedDialog().open();
|
||||
} else if (data.id == 'advancedfind') {
|
||||
pandora.$ui.filterDialog = pandora.ui.filterDialog().open();
|
||||
} else if (data.id == 'findsimilar') {
|
||||
|
@ -1026,7 +1028,8 @@ pandora.ui.mainMenu = function() {
|
|||
items: Ox.isUndefined(lists[folder])
|
||||
? [{id: 'loading', title: Ox._('Loading...'), disabled: true}]
|
||||
: lists[folder].length == 0
|
||||
? [{id: 'nolists', title: Ox._('No ' + Ox.toTitleCase(folder) + ' ' + itemNamePlural), disabled: true}]
|
||||
? [{id: 'nolists', title: Ox._('No {0} {1}',
|
||||
[Ox._(Ox.toTitleCase(folder)), Ox._(itemNamePlural)]), disabled: true}]
|
||||
: lists[folder].map(function(list) {
|
||||
return {
|
||||
id: 'viewlist' + list.id.replace(/_/g, Ox.char(9)),
|
||||
|
|
|
@ -11,7 +11,7 @@ pandora.ui.mainPanel = function() {
|
|||
resizable: true,
|
||||
resize: [192, 256, 320, 384],
|
||||
size: ui.sidebarSize,
|
||||
tooltip: 'sidebar <span class="OxBright">'
|
||||
tooltip: Ox._('sidebar') + ' <span class="OxBright">'
|
||||
+ Ox.SYMBOLS.SHIFT + 'S</span>'
|
||||
},
|
||||
{
|
||||
|
|
|
@ -13,13 +13,11 @@ pandora.ui.player = function(data) {
|
|||
annotationsRange: ui.annotationsRange,
|
||||
annotationsSize: ui.annotationsSize,
|
||||
annotationsSort: ui.annotationsSort,
|
||||
annotationsTooltip: Ox._(
|
||||
'annotations {0}',
|
||||
['<span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>']
|
||||
),
|
||||
annotationsTooltip: Ox._('annotations')
|
||||
+ ' <span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>',
|
||||
censored: data.censored,
|
||||
censoredIcon: pandora.site.cantPlay.icon,
|
||||
censoredTooltip: pandora.site.cantPlay.text,
|
||||
censoredTooltip: Ox._(pandora.site.cantPlay.text),
|
||||
clickLink: pandora.clickLink,
|
||||
cuts: data.cuts || [],
|
||||
duration: data.duration,
|
||||
|
@ -53,7 +51,7 @@ pandora.ui.player = function(data) {
|
|||
smallTimelineURL: pandora.getMediaURL('/' + ui.item + '/timeline16p.jpg'),
|
||||
subtitles: data.subtitles,
|
||||
timeline: ui.videoTimeline,
|
||||
timelineTooltip: 'timeline <span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'T</span>',
|
||||
timelineTooltip: Ox._('timeline') + ' <span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'T</span>',
|
||||
video: data.video,
|
||||
volume: ui.videoVolume,
|
||||
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1
|
||||
|
|
|
@ -13,13 +13,11 @@ pandora.ui.timeline = function(data) {
|
|||
annotationsRange: ui.annotationsRange,
|
||||
annotationsSize: ui.annotationsSize,
|
||||
annotationsSort: ui.annotationsSort,
|
||||
annotationsTooltip: Ox._(
|
||||
'annotations {0}',
|
||||
['<span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>']
|
||||
),
|
||||
annotationsTooltip: Ox._('annotations')
|
||||
+ ' <span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>',
|
||||
censored: data.censored,
|
||||
censoredIcon: pandora.site.cantPlay.icon,
|
||||
censoredTooltip: pandora.site.cantPlay.text,
|
||||
censoredTooltip: Ox._(pandora.site.cantPlay.text),
|
||||
clickLink: pandora.clickLink,
|
||||
cuts: data.cuts || [],
|
||||
duration: data.duration,
|
||||
|
|
|
@ -969,10 +969,10 @@ pandora.getClipVideos = function(clip, resolution) {
|
|||
? pandora.user.ui._list.split(':').slice(1).join(':')
|
||||
: pandora.getAllItemsTitle('items')
|
||||
);
|
||||
parts.push(Ox._(Ox.toTitleCase(pandora.user.ui.listView) + ' View'));
|
||||
parts.push(Ox._("{0} View", [Ox._(Ox.toTitleCase(pandora.user.ui.listView))]));
|
||||
} else {
|
||||
parts.push(itemTitles[pandora.user.ui.item] || pandora.user.ui.item);
|
||||
parts.push(Ox._(Ox.toTitleCase(pandora.user.ui.itemView) + ' View'));
|
||||
parts.push(Ox._("{0} View", [Ox._(Ox.toTitleCase(pandora.user.ui.itemView))]));
|
||||
}
|
||||
} else if (pandora.user.ui.section == 'edits') {
|
||||
if (pandora.user.ui.edit) {
|
||||
|
@ -1005,7 +1005,7 @@ pandora.getEditTooltip = function(title) {
|
|||
return (
|
||||
$target.is('a') || $target.parents('a').length
|
||||
? Ox._('Shift+doubleclick to edit') : Ox._('Doubleclick to edit')
|
||||
) + (title ? ' ' + title : '');
|
||||
) + (title ? ' ' + Ox._(title) : '');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue