wrap more strings in Ox._

This commit is contained in:
j 2013-07-17 10:25:01 +00:00
parent 5489823a61
commit 3e6a16d191
7 changed files with 13 additions and 16 deletions

View file

@ -26,7 +26,7 @@ pandora.ui.folders = function(section) {
if (folder.id == 'personal') {
if (pandora.user.level == 'guest') {
extras = [
infoButton(Ox._('Personal {0}', [Ox._(folderItems)]),
infoButton(Ox._('Personal ' + folderItems),
Ox._('To create and share your own list 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]))
];
@ -148,7 +148,7 @@ pandora.ui.folders = function(section) {
}
} else if (folder.id == 'favorite') {
if (pandora.user.level == 'guest') {
extras = [infoButton(Ox._('Favorite ', folderItems),
extras = [infoButton(Ox._('Favorite ' + folderItems),
Ox._('To browse and subscribe to shared {0} from other users, please sign up or sign in.', [Ox._(folderItems.toLowerCase())]))];
} else {
extras = [pandora.$ui.manageListsButton['favorite'] = Ox.Button({
@ -196,7 +196,7 @@ pandora.ui.folders = function(section) {
}
} else if (folder.id == 'featured') {
if (pandora.user.level != 'admin') {
extras = [infoButton(Ox._('Featured {0}', [Ox._(folderItems)]),
extras = [infoButton(Ox._('Featured ' + folderItems),
Ox._('Featured {0} are selected public {0}, picked by the {1} staff.',
[Ox._(folderItems.toLowerCase()), pandora.site.site.name]))];
} else {
@ -279,7 +279,7 @@ pandora.ui.folders = function(section) {
collapsed: !ui.showFolder.items[folder.id],
extras: extras,
size: 16,
title: folder.title
title: Ox._(folder.title)
})
.bindEvent({
// fixme: duplicated

View file

@ -82,7 +82,7 @@ pandora.ui.helpDialog = function() {
}
],
items: pandora.site.help.map(function(value, index) {
return Ox.extend({index: index}, value);
return Ox.extend({index: index}, value, {title: Ox._(value.title)});
}),
max: 1,
min: 1,

View file

@ -168,7 +168,7 @@ pandora.ui.insertEmbedDialog = function(/*[url, ]callback*/) {
.appendTo($form);
$input.item = Ox.Input({
label: pandora.site.itemName.singular,
label: Ox._(pandora.site.itemName.singular),
labelWidth: 128,
value: item,
width: formWidth

View file

@ -74,10 +74,7 @@ pandora.ui.namesDialog = function() {
.bindEvent({
init: function(data) {
numberOfNames = data.items;
$status.html(
Ox.formatNumber(numberOfNames)
+ ' name' + (numberOfNames == 1 ? '' : 's')
);
$status.html(Ox.formatCount(numberOfNames, 'name'));
},
open: function(data) {
$list.find('.OxItem.OxSelected > .OxCell.OxColumnSortname')

View file

@ -8,7 +8,10 @@ pandora.ui.siteDialog = function(section) {
dialogHeight = Math.round((window.innerHeight - 48) * 0.75),
dialogWidth = Math.round(window.innerWidth * 0.75),
isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level],
tabs = Ox.clone(pandora.site.sitePages, true).concat([{id: 'software', title: Ox._('Software')}]);
tabs = Ox.clone(pandora.site.sitePages, true).map(function(page) {
page.title = Ox._(page.title);
return page;
}).concat([{id: 'software', title: Ox._('Software')}]);
Ox.getObjectById(tabs, section).selected = true;
var $tabPanel = Ox.TabPanel({
content: function(id) {

View file

@ -63,10 +63,7 @@ pandora.ui.titlesDialog = function() {
.bindEvent({
init: function(data) {
numberOfTitles = data.items;
$status.html(
Ox.formatNumber(numberOfTitles)
+ ' title' + (numberOfTitles == 1 ? '' : 's')
);
$status.html(Ox.formatCount(numberOfTitles, 'title'));
},
open: function(data) {
$list.find('.OxItem.OxSelected > .OxCell.OxColumnSorttitle')

View file

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