even more localization

This commit is contained in:
j 2013-05-10 14:54:30 +00:00
parent d215c0fad0
commit 96ad166cb1
17 changed files with 50 additions and 50 deletions

View file

@ -383,10 +383,10 @@ pandora.ui.accountWelcomeDialog = function() {
.append( .append(
Ox.Element() Ox.Element()
.css({position: 'absolute', left: '96px', top: '16px', width: '192px'}) .css({position: 'absolute', left: '96px', top: '16px', width: '192px'})
.html( .html(Ox._(
'Welcome, ' + Ox.encodeHTMLEntities(pandora.user.username) 'Welcome, {0}!<br/><br/>Your account has been created.',
+ '!<br/><br/>Your account has been created.' [Ox.encodeHTMLEntities(pandora.user.username)]
) ))
), ),
fixedSize: true, fixedSize: true,
height: 128, height: 128,

View file

@ -13,7 +13,8 @@ pandora.ui.editor = function(data) {
annotationsRange: ui.annotationsRange, annotationsRange: ui.annotationsRange,
annotationsSize: ui.annotationsSize, annotationsSize: ui.annotationsSize,
annotationsSort: ui.annotationsSort, annotationsSort: ui.annotationsSort,
annotationsTooltip: 'annotations <span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>', annotationsTooltip: Ox._('annotations {}',
['<span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>']),
censored: data.censored, censored: data.censored,
censoredIcon: pandora.site.cantPlay.icon, censoredIcon: pandora.site.cantPlay.icon,
censoredTooltip: pandora.site.cantPlay.text, censoredTooltip: pandora.site.cantPlay.text,

View file

@ -274,7 +274,7 @@ pandora.ui.folderList = function(id) {
if (id == 'personal') { if (id == 'personal') {
if (event.keys == '' || event.keys == 'alt') { if (event.keys == '' || event.keys == 'alt') {
pandora.api.addList({ pandora.api.addList({
name: 'Untitled', name: Ox._('Untitled'),
status: 'private', status: 'private',
type: event.keys == '' ? 'static' : 'smart' type: event.keys == '' ? 'static' : 'smart'
}, function(result) { }, function(result) {

View file

@ -259,7 +259,7 @@ pandora.ui.folders = function() {
hasFocus, id; hasFocus, id;
if (data.id == 'new' || data.id == 'newsmart') { if (data.id == 'new' || data.id == 'newsmart') {
pandora.api.addList({ pandora.api.addList({
name: 'Untitled', name: Ox._('Untitled'),
status: 'private', status: 'private',
type: data.id == 'new' ? 'static' : 'smart' type: data.id == 'new' ? 'static' : 'smart'
}, function(result) { }, function(result) {

View file

@ -140,7 +140,7 @@ pandora.ui.info = function() {
marginTop: '2px', marginTop: '2px',
fontSize: '9px', fontSize: '9px',
textAlign: 'center' textAlign: 'center'
}).html('No Video') }).html(Ox._('No Video'))
) )
); );
} }

View file

@ -19,7 +19,7 @@ pandora.ui.infoView = function(data) {
iconLeft = iconSize == 256 ? Math.floor((iconSize - iconWidth) / 2) : 0, iconLeft = iconSize == 256 ? Math.floor((iconSize - iconWidth) / 2) : 0,
borderRadius = ui.icons == 'posters' ? 0 : iconSize / 8, borderRadius = ui.icons == 'posters' ? 0 : iconSize / 8,
margin = 16, margin = 16,
nameKeys = ['director', 'cinematograper', 'featuring'], nameKeys = ['director', 'cinematographer', 'featuring'],
listKeys = nameKeys.concat(['language', 'topic', 'license', 'groups']), listKeys = nameKeys.concat(['language', 'topic', 'license', 'groups']),
statisticsWidth = 128, statisticsWidth = 128,

View file

@ -15,7 +15,7 @@ pandora.ui.leftPanel = function() {
collapsible: true, collapsible: true,
element: pandora.$ui.info = pandora.ui.info(), element: pandora.$ui.info = pandora.ui.info(),
size: pandora.getInfoHeight(true), size: pandora.getInfoHeight(true),
tooltip: 'info <span class="OxBright">' tooltip: Ox('info') + ' <span class="OxBright">'
+ Ox.SYMBOLS.SHIFT + 'I</span>' + Ox.SYMBOLS.SHIFT + 'I</span>'
} }
], ],

View file

@ -80,7 +80,7 @@ pandora.ui.listDialog = function(section) {
pandora.$ui.findIconItemInput = Ox.Input({ pandora.$ui.findIconItemInput = Ox.Input({
changeOnKeypress: true, changeOnKeypress: true,
clear: true, clear: true,
placeholder: 'Find: All', placeholder: Ox._('Find: All'),
width: 128 + Ox.UI.SCROLLBAR_SIZE width: 128 + Ox.UI.SCROLLBAR_SIZE
}) })
.bindEvent({ .bindEvent({
@ -165,7 +165,7 @@ pandora.ui.listGeneralPanel = function(listData) {
subscribers = result.data.items[0].subscribers, subscribers = result.data.items[0].subscribers,
$icon = Ox.Element({ $icon = Ox.Element({
element: '<img>', element: '<img>',
tooltip: 'Doubleclick to edit icon' tooltip: Ox._('Doubleclick to edit icon')
}) })
.attr({ .attr({
src: '/' + folderItem.toLowerCase() + '/' + listData.id + '/icon256.jpg?' + Ox.uid() src: '/' + folderItem.toLowerCase() + '/' + listData.id + '/icon256.jpg?' + Ox.uid()
@ -185,7 +185,7 @@ pandora.ui.listGeneralPanel = function(listData) {
}) })
.appendTo(that), .appendTo(that),
$nameInput = Ox.Input({ $nameInput = Ox.Input({
label: 'Name', label: Ox._('Name'),
labelWidth: 80, labelWidth: 80,
value: listData.name, value: listData.name,
width: 320 width: 320
@ -199,7 +199,7 @@ pandora.ui.listGeneralPanel = function(listData) {
$itemsInput = ui.section == 'items' $itemsInput = ui.section == 'items'
? Ox.Input({ ? Ox.Input({
disabled: true, disabled: true,
label: 'Items', label: Ox._('Items'),
labelWidth: 80, labelWidth: 80,
value: listData.items, value: listData.items,
width: 320 width: 320
@ -214,7 +214,7 @@ pandora.ui.listGeneralPanel = function(listData) {
title: rightsLevel.name, title: rightsLevel.name,
}; };
}), }),
label: 'Rights Level', label: Ox._('Rights Level'),
labelWidth: 90, labelWidth: 90,
value: listData.rightslevel, value: listData.rightslevel,
width: 320 width: 320
@ -227,7 +227,7 @@ pandora.ui.listGeneralPanel = function(listData) {
$statusSelect = listData.status == 'featured' $statusSelect = listData.status == 'featured'
? Ox.Input({ ? Ox.Input({
disabled: true, disabled: true,
label: 'Status', label: Ox._('Status'),
labelWidth: 80, labelWidth: 80,
value: 'Featured', value: 'Featured',
width: 320 width: 320
@ -239,7 +239,7 @@ pandora.ui.listGeneralPanel = function(listData) {
{id: 'private', title: Ox._('Private')}, {id: 'private', title: Ox._('Private')},
{id: 'public', title: Ox._('Public')} {id: 'public', title: Ox._('Public')}
], ],
label: 'Status', label: Ox._('Status'),
labelWidth: 80, labelWidth: 80,
value: listData.status, value: listData.status,
width: 320 width: 320
@ -251,7 +251,7 @@ pandora.ui.listGeneralPanel = function(listData) {
.appendTo(that), .appendTo(that),
$subscribersInput = Ox.Input({ $subscribersInput = Ox.Input({
disabled: true, disabled: true,
label: 'Subscribers', label: Ox._('Subscribers'),
labelWidth: 80, labelWidth: 80,
value: subscribers, value: subscribers,
width: 320 width: 320
@ -261,7 +261,7 @@ pandora.ui.listGeneralPanel = function(listData) {
.appendTo(that), .appendTo(that),
$descriptionInput = Ox.Input({ $descriptionInput = Ox.Input({
height: getDescriptionHeight(), height: getDescriptionHeight(),
placeholder: 'Description', placeholder: Ox._('Description'),
type: 'textarea', type: 'textarea',
value: description, value: description,
width: 320 width: 320
@ -297,7 +297,7 @@ pandora.ui.listGeneralPanel = function(listData) {
Ox.Request.clearCache('find' + folderItems); Ox.Request.clearCache('find' + folderItems);
pandora.$ui.info.updateListInfo(); pandora.$ui.info.updateListInfo();
pandora.$ui.listDialog.options({ pandora.$ui.listDialog.options({
title: folderItem + ' &mdash; ' + Ox.encodeHTMLEntities(listData.name) title: Ox._(folderItem) + ' &mdash; ' + Ox.encodeHTMLEntities(listData.name)
}); });
} }
}); });

View file

@ -32,7 +32,7 @@ pandora.ui.logsDialog = function() {
$findInput = Ox.Input({ $findInput = Ox.Input({
changeOnKeypress: true, changeOnKeypress: true,
clear: true, clear: true,
placeholder: 'Find: All', placeholder: Ox._('Find: All'),
width: 192 width: 192
}) })
.bindEvent({ .bindEvent({

View file

@ -248,7 +248,7 @@ pandora.ui.metadataDialog = function(data) {
}) })
], ],
separators: [ separators: [
{title: ['Current', 'Update'][i], width: 64} {title: [Ox._('Current'), Ox_('Update')][i], width: 64}
] ]
}) })
.css({display: 'inline-block', margin: '3px'}) .css({display: 'inline-block', margin: '3px'})

View file

@ -239,10 +239,8 @@ pandora.ui.navigationView = function(type, videoRatio) {
} }
function updateStatusbar(items) { function updateStatusbar(items) {
$status.html( //fixme how to capitalize Ox.formatCount?
(items ? Ox.formatNumber(items) : 'No') $status.html(Ox.formatCount(items, 'Clip'));
+ ' Clip' + (items == 1 ? '' : 's')
);
} }
if (type == 'map') { if (type == 'map') {

View file

@ -111,7 +111,7 @@ pandora.ui.news = function(width, height) {
clickLink: pandora.clickLink, clickLink: pandora.clickLink,
editable: isEditable, editable: isEditable,
maxHeight: height - 96, maxHeight: height - 96,
placeholder: 'No text', placeholder: Ox._('No text'),
tooltip: isEditable ? pandora.getEditTooltip() : '', tooltip: isEditable ? pandora.getEditTooltip() : '',
type: 'textarea', type: 'textarea',
value: items[index].text, value: items[index].text,

View file

@ -13,7 +13,8 @@ pandora.ui.player = function(data) {
annotationsRange: ui.annotationsRange, annotationsRange: ui.annotationsRange,
annotationsSize: ui.annotationsSize, annotationsSize: ui.annotationsSize,
annotationsSort: ui.annotationsSort, annotationsSort: ui.annotationsSort,
annotationsTooltip: 'annotations <span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>', annotationsTooltip: Ox._('annotations {}',
['<span class="OxBright">' + Ox.SYMBOLS.SHIFT + 'A</span>']),
censored: data.censored, censored: data.censored,
censoredIcon: pandora.site.cantPlay.icon, censoredIcon: pandora.site.cantPlay.icon,
censoredTooltip: pandora.site.cantPlay.text, censoredTooltip: pandora.site.cantPlay.text,

View file

@ -356,11 +356,11 @@ pandora.ui.sequencesDialog = function() {
} }
function getTitle() { function getTitle() {
return pandora.user.ui.sequenceSort[0].operator == '+' ? 'up' : 'down'; return pandora.user.ui.sequenceSort[0].operator == '+' ? Ox._('up') : Ox._('down');
} }
function getTooltip() { function getTooltip() {
return pandora.user.ui.sequenceSort[0].operator == '+' ? 'Ascending' : 'Descending'; return pandora.user.ui.sequenceSort[0].operator == '+' ? Ox._('Ascending') : Ox._('Descending');
} }
function openClip() { function openClip() {

View file

@ -394,7 +394,7 @@ pandora.ui.textEmbed = function() {
$message = $('<div>') $message = $('<div>')
.css({marginTop: '16px', textAlign: 'center'}) .css({marginTop: '16px', textAlign: 'center'})
.html('No Embeds') .html(Ox._('No Embeds'))
.hide() .hide()
.appendTo(that), .appendTo(that),

View file

@ -612,23 +612,23 @@ pandora.ui.usersDialog = function() {
items: [ items: [
Ox.Checkbox({ Ox.Checkbox({
id: 'status', id: 'status',
label: 'Status', label: Ox._('Status'),
labelWidth: 80, labelWidth: 80,
title: !user.disabled ? 'Enabled' : 'Disabled', title: !user.disabled ? Ox._('Enabled') : Ox._('Disabled'),
value: !user.disabled, value: !user.disabled,
width: formWidth - 16 width: formWidth - 16
}) })
.bindEvent({ .bindEvent({
change: function(data) { change: function(data) {
this.options({ this.options({
title: this.options('title') == 'Enabled' title: this.options('title') == Ox._('Enabled')
? 'Disabled' : 'Enabled' ? Ox._('Disabled') : Ox._('Enabled')
}); });
} }
}), }),
Ox.Input({ Ox.Input({
id: 'username', id: 'username',
label: 'Username', label: Ox._('Username'),
labelWidth: 80, labelWidth: 80,
value: user.username, value: user.username,
width: formWidth - 16 width: formWidth - 16
@ -640,7 +640,7 @@ pandora.ui.usersDialog = function() {
}), }),
Ox.Input({ Ox.Input({
id: 'email', id: 'email',
label: 'E-Mail', label: Ox._('E-Mail'),
labelWidth: 80, labelWidth: 80,
value: user.email, value: user.email,
width: formWidth - 16 width: formWidth - 16
@ -658,30 +658,30 @@ pandora.ui.usersDialog = function() {
title: Ox.toTitleCase(level) title: Ox.toTitleCase(level)
}; };
}), }),
label: 'Level', label: Ox._('Level'),
labelWidth: 80, labelWidth: 80,
value: user.level, value: user.level,
width: formWidth - 16 width: formWidth - 16
}), }),
Ox.Checkbox({ Ox.Checkbox({
id: 'newsletter', id: 'newsletter',
label: 'Newsletter', label: Ox._('Newsletter'),
labelWidth: 80, labelWidth: 80,
title: user.newsletter ? 'Subscribed' : 'Unsubscribed', title: user.newsletter ? Ox._('Subscribed') : Ox._('Unsubscribed'),
value: user.newsletter, value: user.newsletter,
width: formWidth - 16 width: formWidth - 16
}) })
.bindEvent({ .bindEvent({
change: function(data) { change: function(data) {
this.options({ this.options({
title: this.options('title') == 'Subscribed' title: this.options('title') == Ox._('Subscribed')
? 'Unsubscribed' : 'Subscribed' ? Ox._('Unsubscribed') : Ox._('Subscribed')
}); });
} }
}), }),
Ox.Input({ Ox.Input({
id: 'groups', id: 'groups',
label: 'Groups', label: Ox._('Groups'),
labelWidth: 80, labelWidth: 80,
value: user.groups ? user.groups.join(', ') : '', value: user.groups ? user.groups.join(', ') : '',
width: formWidth - 16 width: formWidth - 16
@ -694,7 +694,7 @@ pandora.ui.usersDialog = function() {
Ox.Input({ Ox.Input({
height: dialogHeight - 184, height: dialogHeight - 184,
id: 'notes', id: 'notes',
placeholder: 'Notes', placeholder: Ox._('Notes'),
type: 'textarea', type: 'textarea',
value: user.notes, value: user.notes,
width: formWidth - 16 width: formWidth - 16
@ -735,7 +735,7 @@ pandora.ui.usersDialog = function() {
Ox.Input({ Ox.Input({
disabled: true, disabled: true,
id: 'from', id: 'from',
label: 'From', label: Ox_('From'),
labelWidth: 80, labelWidth: 80,
value: pandora.site.site.name + ' <' + pandora.site.site.email.contact + '>', value: pandora.site.site.name + ' <' + pandora.site.site.email.contact + '>',
width: formWidth - 16 width: formWidth - 16
@ -743,7 +743,7 @@ pandora.ui.usersDialog = function() {
Ox.Input({ Ox.Input({
disabled: true, disabled: true,
id: 'to', id: 'to',
label: 'To', label: Ox._('To'),
labelWidth: 80, labelWidth: 80,
value: '', value: '',
width: formWidth - 16 width: formWidth - 16
@ -754,7 +754,7 @@ pandora.ui.usersDialog = function() {
{id: 'users', title: Ox._('All users')}, {id: 'users', title: Ox._('All users')},
{id: 'subscribers', title: Ox._('Subscribers only')}, {id: 'subscribers', title: Ox._('Subscribers only')},
], ],
label: 'Include', label: Ox._('Include'),
labelWidth: 80, labelWidth: 80,
width: formWidth - 16 width: formWidth - 16
}) })
@ -766,7 +766,7 @@ pandora.ui.usersDialog = function() {
}), }),
Ox.Input({ Ox.Input({
id: 'subject', id: 'subject',
label: 'Subject', label: Ox._('Subject'),
labelWidth: 80, labelWidth: 80,
value: pandora.site.site.email.prefix + ' ', value: pandora.site.site.email.prefix + ' ',
width: formWidth - 16 width: formWidth - 16
@ -777,7 +777,7 @@ pandora.ui.usersDialog = function() {
Ox.Input({ Ox.Input({
height: dialogHeight - 208, height: dialogHeight - 208,
id: 'message', id: 'message',
placeholder: 'Message', placeholder: Ox._('Message'),
type: 'textarea', type: 'textarea',
value: '\n\n' + pandora.site.site.email.footer, value: '\n\n' + pandora.site.site.email.footer,
width: formWidth - 16 width: formWidth - 16

View file

@ -21,7 +21,7 @@ pandora.addList = function() {
isSmart = arguments[0]; isSmart = arguments[0];
isFrom = arguments[1]; isFrom = arguments[1];
data = { data = {
name: 'Untitled', name: Ox._('Untitled'),
status: 'private', status: 'private',
type: !isSmart ? 'static' : 'smart' type: !isSmart ? 'static' : 'smart'
}; };