add localization to Ox

This commit is contained in:
j 2013-05-09 13:03:33 +00:00
parent b68b827d7b
commit 4d8c716d0b
31 changed files with 499 additions and 352 deletions

View file

@ -105,13 +105,13 @@ Ox.AudioPlayer = function(options, self) {
{
id: 'current',
title: 'playPrevious',
tooltip: 'Play Current Track'
tooltip: Ox._('Play Current Track')
},
Ox.extend({id: 'play'}, getButtonOptions('play')),
{
id: 'next',
title: 'playNext',
tooltip: 'Play Next Track'
tooltip: Ox._('Play Next Track')
}
],
overlap: 'right',
@ -134,7 +134,7 @@ Ox.AudioPlayer = function(options, self) {
self.$positionLabel = Ox.Label({
textAlign: 'center',
title: '00:00:00',
tooltip: 'Show Remaining Time',
tooltip: Ox._('Show Remaining Time'),
width: 80
})
.addClass('OxPositionLabel')
@ -160,7 +160,7 @@ Ox.AudioPlayer = function(options, self) {
self.$muteButton = Ox.Button({
overlap: 'right',
title: 'mute',
tooltip: 'Mute',
tooltip: Ox._('Mute'),
type: 'image'
})
.addClass('OxMuteButton')
@ -217,26 +217,26 @@ Ox.AudioPlayer = function(options, self) {
var options;
if (id == 'mute') {
options = self.options.muted || self.options.volume == 0
? {title: 'unmute', tooltip: 'Unmute'}
? {title: 'unmute', tooltip: Ox._('Unmute')}
: self.options.volume < 1/3
? {title: 'volumeUp', tooltip: 'Mute'}
? {title: 'volumeUp', tooltip: Ox._('Mute')}
: self.options.volume < 2/3
? {title: 'volumeDown', tooltip: 'Mute'}
: {title: 'mute', tooltip: 'Mute'};
? {title: 'volumeDown', tooltip: Ox._('Mute')}
: {title: 'mute', tooltip: Ox._('Mute')};
} else if (id == 'play') {
options = self.options.paused
? {title: 'play', tooltip: 'Play'}
: {title: 'pause', tooltip: 'Pause'};
? {title: 'play', tooltip: Ox._('Play')}
: {title: 'pause', tooltip: Ox._('Pause')};
} else if (id == 'repeat') {
options = self.options.repeat == 0
? {title: 'repeatNone', tooltip: 'Repeat All'}
? {title: 'repeatNone', tooltip: Ox._('Repeat All')}
: self.options.repeat == -1
? {title: 'repeatAll', tooltip: 'Repeat One'}
: {title: 'repeatOne', tooltip: 'Repeat None'};
? {title: 'repeatAll', tooltip: Ox._('Repeat One')}
: {title: 'repeatOne', tooltip: Ox._('Repeat None')};
} else if (id == 'shuffle') {
options = self.options.shuffle
? {title: 'shuffleAll', tooltip: 'Don\'t Shuffle'}
: {title: 'shuffleNone', tooltip: 'Shuffle'};
? {title: 'shuffleAll', tooltip: Ox._('Don\'t Shuffle')}
: {title: 'shuffleNone', tooltip: Ox._('Shuffle')};
}
return options;
}
@ -355,4 +355,4 @@ Ox.AudioPlayer = function(options, self) {
return that;
};
};

View file

@ -86,7 +86,7 @@ Ox.Progressbar = function(options, self) {
if (self.options.showPauseButton) {
self.$pauseButton = Ox.Button({
style: 'symbol',
tooltip: self.options.showTooltips ? ['Pause', 'Resume'] : '',
tooltip: self.options.showTooltips ? [Ox._('Pause'), Ox._('Resume')] : '',
type: 'image',
value: !self.options.paused ? 'pause' : 'redo',
values: ['pause', 'redo']
@ -102,12 +102,12 @@ Ox.Progressbar = function(options, self) {
style: 'symbol',
type: 'image'
}, self.options.showRestartButton ? {
tooltip: self.options.showTooltips ? ['Cancel', 'Restart'] : '',
tooltip: self.options.showTooltips ? [Ox._('Cancel'), Ox._('Restart')] : '',
value: 'close',
values: ['close', 'redo']
} : {
title: 'close',
tooltip: self.options.showTooltips ? 'Cancel' : ''
tooltip: self.options.showTooltips ? Ox._('Cancel') : ''
}))
.bindEvent({
click: toggleCancelled
@ -141,7 +141,7 @@ Ox.Progressbar = function(options, self) {
self.$progress.removeClass('OxAnimate');
($.browser.mozilla || $.browser.opera) && clearInterval(self.interval);
self.$time && self.$time.html(
self.options.cancelled ? 'Cancelled' : 'Paused'
self.options.cancelled ? Ox._('Cancelled') : Ox._('Paused')
);
}
@ -169,7 +169,7 @@ Ox.Progressbar = function(options, self) {
}, 1000 / 32);
}
self.$time && self.$time.html(
self.options.progress ? Ox.formatDuration(that.status().remaining) : 'unknown'
self.options.progress ? Ox.formatDuration(that.status().remaining) : Ox._('unknown')
);
}
@ -178,7 +178,7 @@ Ox.Progressbar = function(options, self) {
Math.floor(self.options.progress * 100) + '%'
);
self.$time && self.$time.html(
self.options.progress ? Ox.formatDuration(that.status().remaining) : 'unknown'
self.options.progress ? Ox.formatDuration(that.status().remaining) : Ox._('unknown')
);
self.$progress.stop().animate({
width: Math.round(14 + Math.abs(self.options.progress) * (self.trackWidth - 16)) + 'px'
@ -190,7 +190,7 @@ Ox.Progressbar = function(options, self) {
function stop() {
pause();
self.$time && self.$time.html(
self.options.cancelled ? 'Cancelled' : 'Complete'
self.options.cancelled ? Ox._('Cancelled') : Ox._('Complete')
);
if (self.$pauseButton && (self.options.cancelled || self.complete)) {
self.$pauseButton.options({disabled: true});

View file

@ -147,13 +147,13 @@ Ox.Resizebar = function(options, self) {
function getTitle() {
var title = '';
if (self.options.collapsed) {
title = 'Click to show';
title = Ox._('Click to show');
} else {
if (self.options.resizable) {
title = 'Drag to resize'
title = Ox._('Drag to resize');
}
if (self.options.collapsible) {
title = (title ? title + ' or c' : 'C') + 'lick to hide'
title = Ox._((title ? title + ' or c' : 'C') + 'lick to hide');
}
}
if (title && Ox.isString(self.options.tooltip)) {

View file

@ -152,8 +152,8 @@ Ox.Calendar = function(options, self) {
},
name: function(i) {
return i > -2
? Ox.formatOrdinal(i + 2) + ' Millennium'
: Ox.formatOrdinal(-i - 1) + ' Millennium BC'
? Ox._('{0} Millennium', Ox.formatOrdinal(i + 2))
: Ox._('{0} Millennium BC', Ox.formatOrdinal(-i - 1))
},
value: function(date) {
return Math.floor(date.getUTCFullYear() / 1000) - 1;
@ -167,8 +167,8 @@ Ox.Calendar = function(options, self) {
},
name: function(i) {
return i > -20
? Ox.formatOrdinal(i + 20) + ' Century'
: Ox.formatOrdinal(-i - 19) + ' Century BC'
? Ox._('{0} Century', Ox.formatOrdinal(i + 20))
: Ox._('{0} Century BC', Ox.formatOrdinal(-i - 19))
},
value: function(date) {
return Math.floor(date.getUTCFullYear() / 100) - 19;
@ -334,10 +334,10 @@ Ox.Calendar = function(options, self) {
self.$menu = Ox.Select({
items: [
{id: 'date', title: 'Show Dates'},
{id: 'place', title: 'Show Places'},
{id: 'person', title: 'Show People'},
{id: 'other', title: 'Show Other'}
{id: 'date', title: Ox._('Show Dates')},
{id: 'place', title: Ox._('Show Places')},
{id: 'person', title: Ox._('Show People')},
{id: 'other', title: Ox._('Show Other')}
],
max: -1,
min: 1,
@ -536,7 +536,7 @@ Ox.Calendar = function(options, self) {
self.$eventControls = {
name: Ox.Label({
textAlign: 'center',
tooltip: 'Click to pan, doubleclick to zoom'
tooltip: Ox._('Click to pan, doubleclick to zoom')
})
.addClass('OxEventControl OxEventName')
.css({bottom: 20 + (self.options.showZoombar * 16) + 'px'})
@ -551,7 +551,7 @@ Ox.Calendar = function(options, self) {
.appendTo(that),
deselectButton: Ox.Button({
title: 'close',
tooltip: 'Deselect',
tooltip: Ox._('Deselect'),
type: 'image'
})
.addClass('OxEventControl OxEventDeselectButton')

View file

@ -76,7 +76,7 @@ Ox.CalendarEditor = function(options, self) {
},
id: 'type',
operator: '+',
title: 'Type',
title: Ox._('Type'),
titleImage: 'icon',
visible: true,
width: 16
@ -90,7 +90,7 @@ Ox.CalendarEditor = function(options, self) {
id: 'name',
operator: '+',
removable: false,
title: 'Name',
title: Ox._('Name'),
visible: true,
width: 144
},
@ -101,7 +101,7 @@ Ox.CalendarEditor = function(options, self) {
},
id: 'alternativeNames',
operator: '+',
title: 'Alternative Names',
title: Ox._('Alternative Names'),
visible: true,
width: 144
},
@ -111,7 +111,7 @@ Ox.CalendarEditor = function(options, self) {
sort: function(value) {
return Ox.parseDate(value);
},
title: 'Start',
title: Ox._('Start'),
visible: true,
width: 144
},
@ -121,7 +121,7 @@ Ox.CalendarEditor = function(options, self) {
sort: function(value) {
return Ox.parseDate(value);
},
title: 'End',
title: Ox._('End'),
visible: true,
width: 144
},
@ -140,7 +140,7 @@ Ox.CalendarEditor = function(options, self) {
sort: function(value, data) {
return Ox.parseDate(data.end) - Ox.parseDate(data.start);
},
title: 'Duration',
title: Ox._('Duration'),
visible: true,
width: 256
},
@ -150,7 +150,7 @@ Ox.CalendarEditor = function(options, self) {
},
id: 'user',
operator: '+',
title: 'User',
title: Ox._('User'),
visible: false,
width: 96
},
@ -160,7 +160,7 @@ Ox.CalendarEditor = function(options, self) {
},
id: 'created',
operator: '-',
title: 'Date Created',
title: Ox._('Date Created'),
visible: false,
width: 128
},
@ -170,7 +170,7 @@ Ox.CalendarEditor = function(options, self) {
},
id: 'modified',
operator: '-',
title: 'Date Modified',
title: Ox._('Date Modified'),
visible: false,
width: 128
}
@ -180,7 +180,7 @@ Ox.CalendarEditor = function(options, self) {
align: 'right',
id: 'matches',
operator: '-',
title: 'Matches',
title: Ox._('Matches'),
visible: true,
width: 64
});
@ -193,9 +193,9 @@ Ox.CalendarEditor = function(options, self) {
elements: [
self.$findSelect = Ox.Select({
items: [
{id: 'all', title: 'Find: All'},
{id: 'name', title: 'Find: Name'},
{id: 'alternativeNames', title: 'Find: Alternative Names'},
{id: 'all', title: Ox._('Find: All')},
{id: 'name', title: Ox._('Find: Name')},
{id: 'alternativeNames', title: Ox._('Find: Alternative Names')},
],
overlap: 'right',
type: 'image'
@ -209,7 +209,7 @@ Ox.CalendarEditor = function(options, self) {
}),
self.$findInput = Ox.Input({
clear: true,
placeholder: 'Find in List',
placeholder: Ox._('Find in List'),
width: 234
})
.bindEvent({
@ -271,9 +271,7 @@ Ox.CalendarEditor = function(options, self) {
self.$status = Ox.Element()
.css({paddingTop: '2px', margin: 'auto', fontSize: '9px', textAlign: 'center'})
.html(
Ox.formatNumber(self.options.events.length) + ' Event' + (
self.options.events.length == 1 ? '' : 's'
)
Ox.formatCount(self.options.events, Ox._('Event'), Ox._('Events'))
)
.appendTo(self.$listStatusbar);
@ -320,7 +318,7 @@ Ox.CalendarEditor = function(options, self) {
.appendTo(self.$eventTitle);
self.$deselectEventButton = Ox.Button({
title: 'close',
tooltip: 'Done',
tooltip: Ox._('Done'),
type: 'image'
})
.css({float: 'left', margin: '4px 4px 4px 0'})
@ -339,13 +337,13 @@ Ox.CalendarEditor = function(options, self) {
items: [
self.$nameInput = Ox.Input({
id: 'name',
label: 'Name',
label: Ox._('Name'),
labelWidth: 64,
width: 240
}),
self.$alternativeNamesInput = Ox.ArrayInput({
id: 'alternativeNames',
label: 'Alternative Names',
label: Ox._('Alternative Names'),
max: 10,
values: [],
width: 240
@ -353,31 +351,31 @@ Ox.CalendarEditor = function(options, self) {
Ox.Select({
id: 'type',
items: [
{id: 'date', title: 'Date'},
{id: 'place', title: 'Place'},
{id: 'person', title: 'Person'},
{id: 'other', title: 'Other'}
{id: 'date', title: Ox._('Date')},
{id: 'place', title: Ox._('Place')},
{id: 'person', title: Ox._('Person')},
{id: 'other', title: Ox._('Other')}
],
label: 'Type',
label: Ox._('Type'),
labelWidth: 64,
width: 240
}),
self.$startInput = Ox.Input({
id: 'start',
label: 'Start',
label: Ox._('Start'),
labelWidth: 64,
width: 240
}),
self.$endInput = Ox.Input({
id: 'end',
label: 'End',
label: Ox._('End'),
labelWidth: 64,
width: 240
}),
self.$durationInput = Ox.Input({
disabled: true,
id: 'durationText',
label: 'Duration',
label: Ox._('Duration'),
labelWidth: 64,
width: 240
})
@ -435,7 +433,7 @@ Ox.CalendarEditor = function(options, self) {
self.$matchesInput = Ox.Input({
disabled: true,
id: 'matches',
label: 'Matches',
label: Ox._('Matches'),
labelWidth: 64,
type: 'int',
width: 240
@ -450,7 +448,7 @@ Ox.CalendarEditor = function(options, self) {
});
self.$removeEventButton = Ox.Button({
title: 'Remove Event',
title: Ox._('Remove Event'),
width: 90
})
.css({float: 'left', margin: '4px'})
@ -461,7 +459,7 @@ Ox.CalendarEditor = function(options, self) {
.appendTo(self.$eventStatusbar);
self.$newEventButton = Ox.Button({
title: 'New Event',
title: Ox._('New Event'),
width: 70
})
.css({float: 'right', margin: '4px'})
@ -472,13 +470,13 @@ Ox.CalendarEditor = function(options, self) {
if (self.options.mode == 'define') {
self.$defineEventButton = Ox.Button({
title: 'Define Event',
title: Ox._('Define Event'),
width: 80
})
.css({float: 'right', margin: '4px 0 4px 0'})
.bindEvent({
click: function() {
if (this.options('title') == 'Define Event') {
if (this.options('title') == Ox._('Define Event')) {
defineEvent();
} else {
clearEvent();
@ -611,7 +609,7 @@ Ox.CalendarEditor = function(options, self) {
alternativeNames: [], type: '',
start: '', end: ''
};
self.$defineEventButton.options({disabled: true, title: 'Clear Event'});
self.$defineEventButton.options({disabled: true, title: Ox._('Clear Event')});
self.options.editEvent(encodeValues(values), function() {
Ox.forEach(values, function(value, key) {
self.$list.value(self.options.selected, key, value);
@ -619,7 +617,7 @@ Ox.CalendarEditor = function(options, self) {
self.$list.reloadList();
self.$calendar.removeEvent();
self.$eventForm.hide();
self.$defineEventButton.options({disabled: false, title: 'Define Event'});
self.$defineEventButton.options({disabled: false, title: Ox._('Define Event')});
});
}
@ -647,7 +645,7 @@ Ox.CalendarEditor = function(options, self) {
event.end = Ox.formatDate(endTime, '%Y-%m-%d %H:%M:%S', true);
self.$list.options({items: Ox.clone(self.options.events, true)});
self.$calendar.addEvent(event);
self.$defineEventButton.options({title: 'Clear Event'});
self.$defineEventButton.options({title: Ox._('Clear Event')});
}
function editEvent(key, value) {
@ -698,9 +696,7 @@ Ox.CalendarEditor = function(options, self) {
function initList(data) {
self.$status.html(
Ox.formatNumber(data.items) + ' Event' + (
data.items == 1 ? '' : 's'
)
Ox.formatCount(data.items, Ox._('Event'), Ox._('Events'))
);
}

View file

@ -28,7 +28,7 @@ Ox.DocPage = function(options, self) {
self.$homeButton = Ox.Button({
title: 'home',
tooltip: 'Home',
tooltip: Ox._('Home'),
type: 'image'
})
.css({float: 'left', margin: '4px 2px 4px 4px'})
@ -56,7 +56,7 @@ Ox.DocPage = function(options, self) {
if (self.options.item.examples) {
self.$examplesMenu = Ox.MenuButton({
items: self.options.item.examples,
title: 'Examples...',
title: Ox._('Examples...'),
})
.css({float: 'right', margin: '4px 4px 4px 2px'})
.bindEvent({

View file

@ -86,7 +86,7 @@ Ox.DocPanel = function(options, self) {
.appendTo(self.$toolbar);
if (!self.options.results) {
self.options.results = {};
self.$testsButton = Ox.Button({title: 'Run Tests'})
self.$testsButton = Ox.Button({title: Ox._('Run Tests')})
.css({margin: '4px auto'})
.bindEvent({click: runTests})
.appendTo(self.$toolbar);
@ -152,7 +152,7 @@ Ox.DocPanel = function(options, self) {
var path = self.options.examplesPath + example;
Ox.get(path + '/index.html', function(html) {
var match = html.match(/<title>(.+)<\/title>/),
title = match ? match[1] : 'Untitled';
title = match ? match[1] : Ox._('Untitled');
Ox.get(path + '/js/example.js', function(js) {
var references = js.match(self.options.references);
if (references) {
@ -386,7 +386,7 @@ Ox.DocPanel = function(options, self) {
width: 256,
textAlign: 'center'
})
.html('Generating Documentation...')
.html(Ox._('Generating Documentation...'))
.appendTo(self.$page);
}

View file

@ -33,7 +33,7 @@ Ox.ExamplePage = function(options, self) {
self.$homeButton = Ox.Button({
title: 'home',
tooltip: 'Home',
tooltip: Ox._('Home'),
type: 'image'
})
.css({float: 'left', margin: '4px 2px 4px 4px'})
@ -54,7 +54,7 @@ Ox.ExamplePage = function(options, self) {
self.$openButton = Ox.Button({
disabled: self.options.selected == 'source',
title: 'open',
tooltip: 'Open in New Tab',
tooltip: Ox._('Open in New Tab'),
type: 'image'
})
.css({float: 'right', margin: '4px 4px 4px 2px'})
@ -68,7 +68,7 @@ Ox.ExamplePage = function(options, self) {
self.$reloadButton = Ox.Button({
disabled: self.options.selected == 'source',
title: 'redo',
tooltip: 'Reload',
tooltip: Ox._('Reload'),
type: 'image'
})
.css({float: 'right', margin: '4px 2px 4px 2px'})
@ -82,7 +82,7 @@ Ox.ExamplePage = function(options, self) {
self.$switchButton = Ox.Button({
disabled: self.options.selected == 'source',
title: 'switch',
tooltip: 'Switch Theme',
tooltip: Ox._('Switch Theme'),
type: 'image'
})
.css({float: 'right', margin: '4px 2px 4px 2px'})
@ -104,12 +104,12 @@ Ox.ExamplePage = function(options, self) {
buttons: [
{
id: 'source',
title: 'View Source',
title: Ox._('View Source'),
width: 80
},
{
id: 'live',
title: 'View Live',
title: Ox._('View Live'),
width: 80
}
],

View file

@ -119,7 +119,7 @@ Ox.ExamplePanel = function(options, self) {
var match = html.match(/<title>(.+)<\/title>/);
item.title = match ? match[1] : 'Untitled';
match = html.match(/<meta http-equiv="Keywords" content="(.+)"\/>/);
item.sectionTitle = match ? match[1] : 'Untitled';
item.sectionTitle = match ? match[1] : Ox._('Untitled');
Ox.get(item.js, function(js) {
var references = js.match(self.options.references);
item.references = references ? Ox.unique(references).sort(function(a, b) {

View file

@ -172,8 +172,8 @@ Ox.ArrayEditable = function(options, self) {
: ''
) + (
self.options.editable
? 'Click to select' + (
item.editable ? ', doubleclick to edit' : ''
? Ox._('Click to select') + (
item.editable ? Ox._(', doubleclick to edit') : ''
)
: ''
),

View file

@ -131,7 +131,7 @@ Ox.FileInput = function(options, self) {
title: 'close',
type: 'image'
})
.attr({title: 'Remove File'})
.attr({title: Ox._('Remove File')})
.css({margin: '-1px -4px 0 0'})
.bindEvent({
click: function() {
@ -206,7 +206,7 @@ Ox.FileInput = function(options, self) {
}
self.$input = renderInput();
} else {
self.$button.options({title: 'close'}).attr({title: 'Clear'});
self.$button.options({title: 'close'}).attr({title: Ox._('Clear')});
self.$input.remove();
}
that.triggerEvent('change', {value: self.options.value});
@ -257,9 +257,9 @@ Ox.FileInput = function(options, self) {
function getTitleText() {
var length = self.options.value.length
return length == 0
? 'No file' + (self.multiple ? 's' : '') + ' selected'
? Ox._('No file' + (self.multiple ? 's' : '') + ' selected')
: self.multiple
? length + ' file' + (length == 1 ? '' : 's')
? Ox.formatCount(length, Ox._('file'), Ox._('files'))
: self.options.value[0].name;
}
@ -287,7 +287,7 @@ Ox.FileInput = function(options, self) {
return $('<input>')
.attr(
Ox.extend({
title: self.multiple ? 'Add Files' : 'Select File',
title: self.multiple ? Ox._('Add Files') : Ox._('Select File'),
type: 'file'
}, self.multiple ? {
multiple: true

View file

@ -48,66 +48,66 @@ Ox.Filter = function(options, self) {
self.conditionOperators = {
boolean: [
{id: '=', title: 'is'},
{id: '!=', title: 'is not'}
{id: '=', title: Ox._('is')},
{id: '!=', title: Ox._('is not')}
],
date: [
{id: '=', title: 'is'},
{id: '!=', title: 'is not'},
{id: '<', title: 'is before'},
{id: '!<', title: 'is not before'},
{id: '>', title: 'is after'},
{id: '!>', title: 'is not after'},
{id: '=,', title: 'is between'},
{id: '!=,', title: 'is not between'}
{id: '=', title: Ox._('is')},
{id: '!=', title: Ox._('is not')},
{id: '<', title: Ox._('is before')},
{id: '!<', title: Ox._('is not before')},
{id: '>', title: Ox._('is after')},
{id: '!>', title: Ox._('is not after')},
{id: '=,', title: Ox._('is between')},
{id: '!=,', title: Ox._('is not between')}
],
'enum': [
{id: '=', title: 'is'},
{id: '!=', title: 'is not'},
{id: '<', title: 'is less than'},
{id: '!<', title: 'is not less than'},
{id: '>', title: 'is greater than'},
{id: '!>', title: 'is not greater than'},
{id: '=,', title: 'is between'},
{id: '!=,', title: 'is not between'}
{id: '=', title: Ox._('is')},
{id: '!=', title: Ox._('is not')},
{id: '<', title: Ox._('is less than')},
{id: '!<', title: Ox._('is not less than')},
{id: '>', title: Ox._('is greater than')},
{id: '!>', title: Ox._('is not greater than')},
{id: '=,', title: Ox._('is between')},
{id: '!=,', title: Ox._('is not between')}
],
list: [
{id: '==', title: 'is'},
{id: '!==', title: 'is not'}
{id: '==', title: Ox._('is')},
{id: '!==', title: Ox._('is not')}
],
number: [
{id: '=', title: 'is'},
{id: '!=', title: 'is not'},
{id: '<', title: 'is less than'},
{id: '!<', title: 'is not less than'},
{id: '>', title: 'is greater than'},
{id: '!>', title: 'is not greater than'},
{id: '=,', title: 'is between'},
{id: '!=,', title: 'is not between'}
{id: '=', title: Ox._('is')},
{id: '!=', title: Ox._('is not')},
{id: '<', title: Ox._('is less than')},
{id: '!<', title: Ox._('is not less than')},
{id: '>', title: Ox._('is greater than')},
{id: '!>', title: Ox._('is not greater than')},
{id: '=,', title: Ox._('is between')},
{id: '!=,', title: Ox._('is not between')}
],
string: [
{id: '==', title: 'is'},
{id: '!==', title: 'is not'},
{id: '=', title: 'contains'},
{id: '!=', title: 'does not contain'},
{id: '^', title: 'starts with'},
{id: '!^', title: 'does not start with'},
{id: '$', title: 'ends with'},
{id: '!$', title: 'does not end with'}
{id: '==', title: Ox._('is')},
{id: '!==', title: Ox._('is not')},
{id: '=', title: Ox._('contains')},
{id: '!=', title: Ox._('does not contain')},
{id: '^', title: Ox._('starts with')},
{id: '!^', title: Ox._('does not start with')},
{id: '$', title: Ox._('ends with')},
{id: '!$', title: Ox._('does not end with')}
],
text: [
{id: '=', title: 'contains'},
{id: '!=', title: 'does not contain'}
{id: '=', title: Ox._('contains')},
{id: '!=', title: Ox._('does not contain')}
],
year: [
{id: '==', title: 'is'},
{id: '!==', title: 'is not'},
{id: '<', title: 'is before'},
{id: '!<', title: 'is not before'},
{id: '>', title: 'is after'},
{id: '!>', title: 'is not after'},
{id: '=,', title: 'is between'},
{id: '!=,', title: 'is not between'}
{id: '==', title: Ox._('is')},
{id: '!==', title: Ox._('is not')},
{id: '<', title: Ox._('is before')},
{id: '!<', title: Ox._('is not before')},
{id: '>', title: Ox._('is after')},
{id: '!>', title: Ox._('is not after')},
{id: '=,', title: Ox._('is between')},
{id: '!=,', title: Ox._('is not between')}
]
};
self.defaultValue = {
@ -124,8 +124,8 @@ Ox.Filter = function(options, self) {
year: new Date().getFullYear().toString()
};
self.operators = [
{id: '&', title: 'all'},
{id: '|', title: 'any'}
{id: '&', title: Ox._('all')},
{id: '|', title: Ox._('any')}
];
if (!self.options.query.conditions.length) {
@ -141,7 +141,7 @@ Ox.Filter = function(options, self) {
self.$operator = Ox.FormElementGroup({
elements: [
Ox.Label({
title: 'Match',
title: Ox._('Match'),
overlap: 'right',
width: 48
}),
@ -157,7 +157,7 @@ Ox.Filter = function(options, self) {
}),
Ox.Label({
overlap: 'left',
title: 'of the following conditions',
title: Ox._('of the following conditions'),
width: 160
})
],
@ -180,7 +180,7 @@ Ox.Filter = function(options, self) {
})
],
separators: [
{title: 'Save as Smart List', width: 112}
{title: Ox._('Save as Smart List'), width: 112}
]
});
@ -197,10 +197,10 @@ Ox.Filter = function(options, self) {
}),
Ox.Select({
items: [
{id: 'items', title: 'items'},
{id: 'items', title: Ox._('items')},
{},
{id: 'hours', title: 'hours'},
{id: 'days', title: 'days'},
{id: 'hours', title: Ox._('hours')},
{id: 'days', title: Ox._('days')},
{},
{id: 'GB', title: 'GB'}
],
@ -219,14 +219,14 @@ Ox.Filter = function(options, self) {
elements: [
Ox.Select({
items: [
{id: 'ascending', title: 'ascending'},
{id: 'descending', title: 'descending'}
{id: 'ascending', title: Ox._('ascending')},
{id: 'descending', title: Ox._('descending')}
],
width: 128
}),
Ox.Label({
overlap: 'left',
title: 'order',
title: Ox._('order'),
width: 72
})
],
@ -235,9 +235,9 @@ Ox.Filter = function(options, self) {
})
],
separators: [
{title: 'Limit to', width: 56},
{title: 'sorted by', width: 60}, // fixme: this is odd, should be 64
{title: 'in', width: 32}
{title: Ox._('Limit to'), width: 56},
{title: Ox._('sorted by'), width: 60}, // fixme: this is odd, should be 64
{title: Ox._('in'), width: 32}
]
});
@ -258,14 +258,14 @@ Ox.Filter = function(options, self) {
elements: [
Ox.Select({
items: [
{id: 'ascending', title: 'ascending'},
{id: 'descending', title: 'descending'}
{id: 'ascending', title: Ox._('ascending')},
{id: 'descending', title: Ox._('descending')}
],
width: 128
}),
Ox.Label({
overlap: 'left',
title: 'order',
title: Ox._('order'),
width: 72
})
],
@ -274,9 +274,9 @@ Ox.Filter = function(options, self) {
})
],
separators: [
{title: 'View', width: 48},
{title: 'sorted by', width: 60},
{title: 'in', width: 32}
{title: Ox._('View'), width: 48},
{title: Ox._('sorted by'), width: 60},
{title: Ox._('in'), width: 32}
]
});
@ -453,9 +453,9 @@ Ox.Filter = function(options, self) {
Ox.Button({
id: 'remove',
title: self.options.query.conditions.length == 1 ? 'close' : 'remove',
tooltip: self.options.query.conditions.length == 1 ? 'Reset this condition'
: isGroup ? 'Remove this group of conditions'
: 'Remove this condition',
tooltip: self.options.query.conditions.length == 1 ? Ox._('Reset this condition')
: isGroup ? Ox._('Remove this group of conditions')
: Ox._('Remove this condition'),
type: 'image'
})
.css({margin: '0 4px 0 ' + (isGroup ? '292px' : '8px')}) // fixme: 296 is probably correct, but labels seem to be too wide
@ -483,8 +483,8 @@ Ox.Filter = function(options, self) {
}),
Ox.Button({
id: 'add',
title: 'add',
tooltip: 'Add a condition',
title: Ox._('add'),
tooltip: Ox._('Add a condition'),
type: 'image'
})
.css({margin: '0 ' + (subpos == -1 ? '4px' : '0') + ' 0 4px'})
@ -504,8 +504,8 @@ Ox.Filter = function(options, self) {
], subpos == -1 ? [
Ox.Button({
id: 'addgroup',
title: 'bracket',
tooltip: 'Add a group of conditions',
title: Ox._('bracket'),
tooltip: Ox._('Add a group of conditions'),
type: 'image'
})
.css({margin: '0 0 0 4px'})
@ -587,7 +587,7 @@ Ox.Filter = function(options, self) {
renderInput(condition, 1).options({id: 'end'})
],
separators: [
{title: 'and', width: 32}
{title: Ox._('and'), width: 32}
]
})
).bindEvent({
@ -654,7 +654,7 @@ Ox.Filter = function(options, self) {
}),
Ox.Label({
overlap: 'left',
title: 'of the following conditions',
title: Ox._('of the following conditions'),
width: 160
})
],

View file

@ -40,7 +40,7 @@ Ox.FormPanel = function(options, self) {
})
},
id: 'valid',
title: 'Valid',
title: Ox._('Valid'),
visible: true,
width: 16
},
@ -51,7 +51,7 @@ Ox.FormPanel = function(options, self) {
}) + 1) + '. ' + value;
},
id: 'title',
title: 'Title',
title: Ox._('Title'),
visible: true,
width: 240
}

View file

@ -22,24 +22,24 @@ Ox.InsertHTMLDialog = function(options, self) {
? 'textarea' : 'input';
self.items = [
{id: 'img', title: 'Image'},
{id: 'a', title: 'Link'},
{id: 'li', title: 'List'},
{id: 'img', title: Ox._('Image')},
{id: 'a', title: Ox._('Link')},
{id: 'li', title: Ox._('List')},
{},
{id: 'blockquote', title: 'Blockquote'},
{id: 'h1', title: 'Headline'},
{id: 'p', title: 'Paragraph'},
{id: 'div', title: 'Right-to-Left'},
{id: 'blockquote', title: Ox._('Blockquote')},
{id: 'h1', title: Ox._('Headline')},
{id: 'p', title: Ox._('Paragraph')},
{id: 'div', title: Ox._('Right-to-Left')},
{},
{id: 'b', title: 'Bold'},
{id: 'i', title: 'Italic'},
{id: 'code', title: 'Monospace'},
{id: 's', title: 'Strike'},
{id: 'sub', title: 'Subscript'},
{id: 'sup', title: 'Superscript'},
{id: 'u', title: 'Underline'},
{id: 'b', title: Ox._('Bold')},
{id: 'i', title: Ox._('Italic')},
{id: 'code', title: Ox._('Monospace')},
{id: 's', title: Ox._('Strike')},
{id: 'sub', title: Ox._('Subscript')},
{id: 'sup', title: Ox._('Superscript')},
{id: 'u', title: Ox._('Underline')},
{},
{id: 'br', title: 'Linebreak'}
{id: 'br', title: Ox._('Linebreak')}
].map(function(item, i) {
var form, format;
if (item.id == 'img') {
@ -81,8 +81,8 @@ Ox.InsertHTMLDialog = function(options, self) {
Ox.Select({
id: 'style',
items: [
{id: 'ul', title: 'Bullets'},
{id: 'ol', title: 'Numbers'}
{id: 'ul', title: Ox._('Bullets')},
{id: 'ol', title: Ox._('Numbers')}
],
label: 'Style',
labelWidth: 128,
@ -168,7 +168,7 @@ Ox.InsertHTMLDialog = function(options, self) {
buttons: [
Ox.Button({
id: 'cancel',
title: 'Cancel',
title: Ox._('Cancel'),
width: 64
})
.bindEvent({
@ -178,7 +178,7 @@ Ox.InsertHTMLDialog = function(options, self) {
}),
Ox.Button({
id: 'insert',
title: 'Insert',
title: Ox._('Insert'),
width: 64
})
.bindEvent({
@ -201,7 +201,7 @@ Ox.InsertHTMLDialog = function(options, self) {
content: self.$content,
height: 184,
keys: {enter: 'insert', escape: 'cancel'},
title: 'Insert HTML',
title: Ox._('Insert HTML'),
width: 416 + Ox.UI.SCROLLBAR_SIZE
});

View file

@ -62,7 +62,7 @@ Ox.Picker = function(options, self) {
.appendTo(self.$bar);
self.$doneButton = Ox.Button({
title: 'Done',
title: Ox._('Done'),
width: 48
})
.click(hideMenu)

View file

@ -36,7 +36,7 @@ Ox.PlacePicker = function(options, self) {
self.$input = Ox.Input({
clear: true,
id: self.options.id + 'Input',
placeholder: 'Find',
placeholder: Ox._('Find'),
width: 256
})
.bindEvent('submit', findPlace)

View file

@ -128,9 +128,9 @@ Ox.Spreadsheet = function(options, self) {
style: 'square',
type: 'image',
items: [
{id: 'before', title: 'Add column before'},
{id: 'after', title: 'Add column after'},
{id: 'remove', title: 'Remove this column', disabled: self.columns == 1}
{id: 'before', title: Ox._('Add column before')},
{id: 'after', title: Ox._('Add column after')},
{id: 'remove', title: Ox._('Remove this column'), disabled: self.columns == 1}
]
})
.bindEvent({
@ -166,9 +166,9 @@ Ox.Spreadsheet = function(options, self) {
style: 'square',
type: 'image',
items: [
{id: 'before', title: 'Add row above'},
{id: 'after', title: 'Add row below'},
{id: 'remove', title: 'Remove this row', disabled: self.rows == 1}
{id: 'before', title: Ox._('Add row above')},
{id: 'after', title: Ox._('Add row below')},
{id: 'remove', title: Ox._('Remove this row'), disabled: self.rows == 1}
]
})
.bindEvent({

View file

@ -290,20 +290,20 @@ Ox.Map = function(options, self) {
{
id: 'toggleLabels',
title: self.options.showLabels
? ['Hide Labels', 'Show Labels']
: ['Show Labels', 'Hide Labels'],
? [Ox._('Hide Labels'), Ox._('Show Labels')]
: [Ox._('Show Labels'), Ox._('Hide Labels')],
keyboard: 'l'
},
{
id: 'toggleControls',
title: self.options.showControls
? ['Hide Controls', 'Show Controls']
: ['Show Controls', 'Hide Controls'],
? [Ox._('Hide Controls'), Ox._('Show Controls')]
: [Ox._('Show Controls'), Ox._('Hide Controls')],
keyboard: 'c'
}
],
title: 'set',
tooltip: 'Map Options',
tooltip: Ox._('Map Options'),
type: 'image'
})
.css({float: 'left', margin: '4px'})
@ -482,7 +482,7 @@ Ox.Map = function(options, self) {
}),
name: Ox.Label({
textAlign: 'center',
tooltip: 'Click to pan, doubleclick to zoom'
tooltip: Ox._('Click to pan, doubleclick to zoom')
})
.addClass('OxPlaceControl OxPlaceName')
.bindEvent({
@ -495,7 +495,7 @@ Ox.Map = function(options, self) {
}),
deselectButton: Ox.Button({
title: 'close',
tooltip: 'Deselect',
tooltip: Ox._('Deselect'),
type: 'image'
})
.addClass('OxPlaceControl OxPlaceDeselectButton')
@ -626,9 +626,9 @@ Ox.Map = function(options, self) {
function clickPlaceButton() {
var place = getSelectedPlace(),
title = self.$placeButton.options('title');
if (title == 'New Place') {
if (title == Ox._('New Place')) {
addPlaceToMap();
} else if (title == 'Add Place') {
} else if (title == Ox._('Add Place')) {
addPlaceToPlaces();
}
}
@ -1279,9 +1279,9 @@ Ox.Map = function(options, self) {
code = country ? country.code : 'NTHH';
disabled = place && !place.editable;
if (place) {
title = place.id[0] == '_' ? 'Add Place' : 'Remove Place';
title = place.id[0] == '_' ? Ox._('Add Place') : Ox._('Remove Place');
} else {
title = 'New Place';
title = Ox._('New Place');
}
self.$placeFlag.attr({
src: Ox.PATH + 'Ox.Geo/png/icons/16/' + code + '.png'

View file

@ -102,7 +102,7 @@ Ox.MapEditor = function(options, self) {
}
return names.reverse().join(', ');
},
title: 'Flag',
title: Ox._('Flag'),
titleImage: 'flag',
tooltip: function(data) {
return Ox.toTitleCase(data.geoname || '')
@ -136,7 +136,7 @@ Ox.MapEditor = function(options, self) {
},
id: 'type',
operator: '+',
title: 'Type',
title: Ox._('Type'),
titleImage: 'icon',
tooltip: function(data) {
return Ox.toTitleCase(data.type || '');
@ -153,7 +153,7 @@ Ox.MapEditor = function(options, self) {
id: 'name',
operator: '+',
removable: false,
title: 'Name',
title: Ox._('Name'),
visible: true,
width: 144
},
@ -163,7 +163,7 @@ Ox.MapEditor = function(options, self) {
},
id: 'alternativeNames',
operator: '+',
title: 'Alternative Names',
title: Ox._('Alternative Names'),
visible: true,
width: 144
},
@ -177,7 +177,7 @@ Ox.MapEditor = function(options, self) {
}
return names.reverse().join(', ');
},
title: 'Geoname',
title: Ox._('Geoname'),
visible: false,
width: 192
},
@ -186,7 +186,7 @@ Ox.MapEditor = function(options, self) {
format: toFixed,
id: 'lat',
operator: '+',
title: 'Latitude',
title: Ox._('Latitude'),
visible: true,
width: 64
},
@ -195,7 +195,7 @@ Ox.MapEditor = function(options, self) {
format: toFixed,
id: 'lng',
operator: '+',
title: 'Longitude',
title: Ox._('Longitude'),
visible: true,
width: 64
},
@ -204,7 +204,7 @@ Ox.MapEditor = function(options, self) {
format: toFixed,
id: 'south',
operator: '+',
title: 'South',
title: Ox._('South'),
visible: false,
width: 64
},
@ -212,7 +212,7 @@ Ox.MapEditor = function(options, self) {
align: 'right',
id: 'west',
operator: '+',
title: 'West',
title: Ox._('West'),
visible: false,
width: 64
},
@ -221,7 +221,7 @@ Ox.MapEditor = function(options, self) {
format: toFixed,
id: 'north',
operator: '+',
title: 'North',
title: Ox._('North'),
visible: false,
width: 64
},
@ -230,7 +230,7 @@ Ox.MapEditor = function(options, self) {
format: toFixed,
id: 'east',
operator: '+',
title: 'East',
title: Ox._('East'),
visible: false,
width: 64
},
@ -239,7 +239,7 @@ Ox.MapEditor = function(options, self) {
format: {type: 'area', args: []},
id: 'area',
operator: '-',
title: 'Area',
title: Ox._('Area'),
visible: true,
width: 128
},
@ -249,7 +249,7 @@ Ox.MapEditor = function(options, self) {
},
id: 'user',
operator: '+',
title: 'User',
title: Ox._('User'),
visible: false,
width: 96
},
@ -259,7 +259,7 @@ Ox.MapEditor = function(options, self) {
},
id: 'created',
operator: '-',
title: 'Date Created',
title: Ox._('Date Created'),
visible: false,
width: 128
},
@ -269,7 +269,7 @@ Ox.MapEditor = function(options, self) {
},
id: 'modified',
operator: '-',
title: 'Date Modified',
title: Ox._('Date Modified'),
visible: false,
width: 128
}
@ -279,7 +279,7 @@ Ox.MapEditor = function(options, self) {
align: 'right',
id: 'matches',
operator: '-',
title: 'Matches',
title: Ox._('Matches'),
visible: true,
width: 64
});
@ -292,10 +292,10 @@ Ox.MapEditor = function(options, self) {
elements: [
self.$findSelect = Ox.Select({
items: [
{id: 'all', title: 'Find: All'},
{id: 'name', title: 'Find: Name'},
{id: 'alternativeNames', title: 'Find: Alternative Names'},
{id: 'geoname', title: 'Find: Geoname'}
{id: 'all', title: Ox._('Find: All')},
{id: 'name', title: Ox._('Find: Name')},
{id: 'alternativeNames', title: Ox._('Find: Alternative Names')},
{id: 'geoname', title: Ox._('Find: Geoname')}
],
overlap: 'right',
type: 'image'
@ -433,7 +433,7 @@ Ox.MapEditor = function(options, self) {
if (self.options.mode == 'define') {
self.$findPlaceButton = Ox.Button({
title: 'find',
tooltip: 'Find',
tooltip: Ox._('Find'),
type: 'image'
})
.css({float: 'left', margin: '4px'})
@ -466,7 +466,7 @@ Ox.MapEditor = function(options, self) {
.appendTo(self.$placeTitle);
self.$deselectPlaceButton = Ox.Button({
title: 'close',
tooltip: 'Done',
tooltip: Ox._('Done'),
type: 'image'
})
.css({float: 'left', margin: '4px'})
@ -485,13 +485,13 @@ Ox.MapEditor = function(options, self) {
items: [].concat([
self.$nameInput = Ox.Input({
id: 'name',
label: 'Name',
label: Ox._('Name'),
labelWidth: 80,
width: 240
}),
self.$alternativeNamesInput = Ox.ArrayInput({
id: 'alternativeNames',
label: 'Alternative Names',
label: Ox._('Alternative Names'),
max: 10,
//sort: true,
values: [],
@ -499,7 +499,7 @@ Ox.MapEditor = function(options, self) {
}),
self.$geonameInput = Ox.Input({
id: 'geoname',
label: 'Geoname',
label: Ox._('Geoname'),
labelWidth: 80,
width: 240
}),
@ -509,15 +509,15 @@ Ox.MapEditor = function(options, self) {
Ox.Select({
id: 'type',
items: [
{id: 'country', title: 'Country'},
{id: 'region', title: 'Region'}, // administative (Kansas) or colloquial (Midwest)
{id: 'city', title: 'City'},
{id: 'borough', title: 'Borough'},
{id: 'street', title: 'Street'}, // streets, squares, bridges, tunnels, ...
{id: 'building', title: 'Building'}, // airports, stations, stadiums, military installations, ...
{id: 'feature', title: 'Feature'} // continents, islands, rivers, lakes, seas, oceans, mountains...
{id: 'country', title: Ox._('Country')},
{id: 'region', title: Ox._('Region')}, // administative (Kansas) or colloquial (Midwest)
{id: 'city', title: Ox._('City')},
{id: 'borough', title: Ox._('Borough')},
{id: 'street', title: Ox._('Street')}, // streets, squares, bridges, tunnels, ...
{id: 'building', title: Ox._('Building')}, // airports, stations, stadiums, military installations, ...
{id: 'feature', title: Ox._('Feature')} // continents, islands, rivers, lakes, seas, oceans, mountains...
],
label: 'Type',
label: Ox._('Type'),
labelWidth: 80,
width: 240
})
@ -531,7 +531,7 @@ Ox.MapEditor = function(options, self) {
decimals: 8,
disabled: ['lat', 'lng'].indexOf(id) > -1,
id: id,
label: v,
label: Ox._(v),
labelWidth: 80,
min: -max,
max: max,
@ -615,7 +615,7 @@ Ox.MapEditor = function(options, self) {
self.$areaKmInput = Ox.Input({
disabled: true,
id: 'areaKm',
label: 'Area',
label: Ox._('Area'),
labelWidth: 80,
textAlign: 'right',
width: 240
@ -628,7 +628,7 @@ Ox.MapEditor = function(options, self) {
self.$matchesInput = Ox.Input({
disabled: true,
id: 'matches',
label: 'Matches',
label: Ox._('Matches'),
labelWidth: 80,
type: 'int',
width: 240
@ -643,13 +643,13 @@ Ox.MapEditor = function(options, self) {
});
self.$addPlaceButton = Ox.Button({
title: 'Add Place',
title: Ox._('Add Place'),
width: 90
})
.css({float: 'left', margin: '4px'})
.bindEvent({
click: function() {
if (this.options('title') == 'Add Place') {
if (this.options('title') == Ox._('Add Place')) {
addPlace();
} else {
removePlace();
@ -660,7 +660,7 @@ Ox.MapEditor = function(options, self) {
.appendTo(self.$placeStatusbar);
self.$newPlaceButton = Ox.Button({
title: 'New Place',
title: Ox._('New Place'),
width: 70
})
.css({float: 'right', margin: '4px'})
@ -673,13 +673,13 @@ Ox.MapEditor = function(options, self) {
if (self.options.mode == 'define') {
self.$definePlaceButton = Ox.Button({
title: 'Define Place',
title: Ox._('Define Place'),
width: 80
})
.css({float: 'right', margin: '4px 0 4px 0'})
.bindEvent({
click: function() {
if (this.options('title') == 'Define Place') {
if (this.options('title') == Ox._('Define Place')) {
definePlace();
} else {
clearPlace();
@ -797,10 +797,10 @@ Ox.MapEditor = function(options, self) {
selected: [place.id]
});
self.$map.addPlace(place);
self.$addPlaceButton.options({title: 'Remove Place'});
self.$addPlaceButton.options({title: Ox._('Remove Place')});
//setStatus();
} else {
self.$addPlaceButton.options({disabled: true, title: 'Adding...'});
self.$addPlaceButton.options({disabled: true, title: Ox._('Adding...')});
self.options.addPlace(encodeValues(place), function(result) {
if (result.status.code == 200) {
place.id = result.data.id;
@ -813,18 +813,18 @@ Ox.MapEditor = function(options, self) {
).show();
self.options.mode == 'define' && self.$definePlaceButton.options({
disabled: !result.data.matches,
title: 'Clear Place'
title: Ox._('Clear Place')
}).show();
self.$addPlaceButton.options({
disabled: false,
title: 'Remove Place'
title: Ox._('Remove Place')
}).show();
} else if (result.status.code == 409) {
if (result.data.names.indexOf(self.$nameInput.value()) > -1) {
self.$nameInput.addClass('OxError');
}
self.$alternativeNamesInput.setErrors(result.data.names);
self.$addPlaceButton.options({disabled: false, title: 'Add Place'});
self.$addPlaceButton.options({disabled: false, title: Ox._('Add Place')});
}
});
}
@ -837,14 +837,14 @@ Ox.MapEditor = function(options, self) {
lat: null, lng: null,
south: null, west: null, north: null, east: null, area: null
};
self.$definePlaceButton.options({disabled: true, title: 'Clearing...'});
self.$definePlaceButton.options({disabled: true, title: Ox._('Clearing...')});
self.options.editPlace(values, function() {
self.$map.removePlace();
self.$list.reloadList();
self.$findPlaceButton.show();
self.$placeFlag.hide();
hideForm();
self.$definePlaceButton.options({disabled: false, title: 'Define Place'})
self.$definePlaceButton.options({disabled: false, title: Ox._('Define Place')})
});
}
@ -861,7 +861,7 @@ Ox.MapEditor = function(options, self) {
function definePlace() {
self.$map.newPlace(); // this will call selectPlace, then editPlace
self.$definePlaceButton.options({title: 'Clear Place'});
self.$definePlaceButton.options({title: Ox._('Clear Place')});
}
function encodeValues(place) {
@ -912,7 +912,7 @@ Ox.MapEditor = function(options, self) {
if (self.options.mode == 'define') {
self.$definePlaceButton.options({
disabled: !result.data.matches,
title: 'Clear Place'
title: Ox._('Clear Place')
});
self.$addPlaceButton.options({
disabled: !!result.data.matches
@ -979,12 +979,12 @@ Ox.MapEditor = function(options, self) {
self.options.selected = '';
self.options.places.splice(index, 1);
self.$list.options({items: Ox.clone(self.options.places)});
self.$addPlaceButton.options({title: 'Add Place'});
self.$addPlaceButton.options({title: Ox._('Add Place')});
//setStatus();
}
// fixme: what is this? both options.removePlace and event removeplace??
if (self.isAsync) {
self.$addPlaceButton.options({disabled: true, title: 'Removing...'})
self.$addPlaceButton.options({disabled: true, title: Ox._('Removing...')})
self.options.removePlace({id: self.selectedPlace}, function() {
self.options.selected = '';
self.$list.options({selected: []}).reloadList(true);
@ -992,7 +992,7 @@ Ox.MapEditor = function(options, self) {
self.options.mode == 'define' && self.$definePlaceButton.options({
disabled: true
});
self.$addPlaceButton.options({disabled: false, title: 'Add Place'});
self.$addPlaceButton.options({disabled: false, title: Ox._('Add Place')});
});
}
self.$map.removePlace();
@ -1029,7 +1029,7 @@ Ox.MapEditor = function(options, self) {
}).show();
self.$addPlaceButton.options({
disabled: self.options.mode == 'define' && !!place.matches,
title: 'Remove Place'
title: Ox._('Remove Place')
}).show();
} else {
self.$placeTitle.hide();
@ -1077,7 +1077,7 @@ Ox.MapEditor = function(options, self) {
getMatches(place);
}
self.options.mode == 'define' && self.$definePlaceButton.hide();
self.$addPlaceButton.options({disabled: false, title: 'Add Place'}).show();
self.$addPlaceButton.options({disabled: false, title: Ox._('Add Place')}).show();
} else if (!self.selectedPlace && !self.options.selected) {
// deselect result place
self.$placeFlag.hide();

View file

@ -122,7 +122,7 @@ Ox.AnnotationFolder = function(options, self) {
id: 'add',
style: 'symbol',
title: 'add',
tooltip: 'Add ' + self.options.item,
tooltip: Ox._('Add {0}', self.options.item),
type: 'image'
})
.bindEvent({
@ -238,7 +238,7 @@ Ox.AnnotationFolder = function(options, self) {
.appendTo(self.$inner);
}
self.$resizebar = Ox.Element({
tooltip: 'Drag to resize or click to toggle map' // fixme: update as w/ splitpanels
tooltip: Ox._('Drag to resize or click to toggle map') // fixme: update as w/ splitpanels
})
.addClass('OxResizebar OxHorizontal')
.css({

View file

@ -205,19 +205,19 @@ Ox.AnnotationPanel = function(options, self) {
annotationTitle = folder.options('item') + ': "' + value + '"';
}
}
manageTitle = (isDefined ? 'Edit' : 'Define') + ' '
+ (isPlace ? 'Place' : isEvent ? 'Event' : 'Place or Event') + '...'
manageTitle = Ox._((isDefined ? 'Edit' : 'Define') + ' '
+ (isPlace ? 'Place' : isEvent ? 'Event' : 'Place or Event') + '...');
self.$editMenuButton && self.$editMenuButton.remove();
self.$editMenuButton = Ox.MenuButton({
items: [].concat(
[
{id: 'deselect', title: 'Deselect Annotation', disabled: !self.options.selected || self.editing, keyboard: 'escape'},
{id: 'edit', title: 'Edit Annotation', disabled: !self.options.selected || !isEditable || self.editing, keyboard: 'return'},
{id: 'delete', title: 'Delete Annotation', disabled: !self.options.selected || !isEditable, keyboard: 'delete'},
{id: 'deselect', title: Ox._('Deselect Annotation'), disabled: !self.options.selected || self.editing, keyboard: 'escape'},
{id: 'edit', title: Ox._('Edit Annotation'), disabled: !self.options.selected || !isEditable || self.editing, keyboard: 'return'},
{id: 'delete', title: Ox._('Delete Annotation'), disabled: !self.options.selected || !isEditable, keyboard: 'delete'},
{},
{id: 'insert', title: 'Insert...', disabled: isString || !self.editing, keyboard: 'control i'},
{id: 'undo', title: 'Undo Changes', disabled: !self.editing, keyboard: 'escape'},
{id: 'save', title: 'Save Changes', disabled: !self.editing, keyboard: isString ? 'return' : 'shift return'},
{id: 'insert', title: Ox._('Insert...'), disabled: isString || !self.editing, keyboard: 'control i'},
{id: 'undo', title: Ox._('Undo Changes'), disabled: !self.editing, keyboard: 'escape'},
{id: 'save', title: Ox._('Save Changes'), disabled: !self.editing, keyboard: isString ? 'return' : 'shift return'},
],
pandora.site.map == 'manual' ? [
{},
@ -226,14 +226,14 @@ Ox.AnnotationPanel = function(options, self) {
isString ? [
{},
{id: 'annotation', title: annotationTitle, disabled: true},
{id: 'find', title: 'Find in This ' + pandora.site.itemName.singular},
{id: 'findannotations', title: 'Find in All ' + pandora.site.itemName.plural}
{id: 'find', title: Ox._('Find in This ') + pandora.site.itemName.singular},
{id: 'findannotations', title: Ox._('Find in All {0}', pandora.site.itemName.plural)}
] : []
),
maxWidth: 256,
style: 'square',
title: 'edit',
tooltip: 'Editing Options',
tooltip: Ox._('Editing Options'),
type: 'image'
})
.css({float: 'right'})
@ -388,32 +388,32 @@ Ox.AnnotationPanel = function(options, self) {
self.$optionsMenuButton = Ox.MenuButton({
items: [].concat(
[
{id: 'showannotations', title: 'Show Annotations', disabled: true},
{id: 'showannotations', title: Ox._('Show Annotations'), disabled: true},
{group: 'range', min: 1, max: 1, items: [
{id: 'all', title: 'All', checked: self.options.range == 'all'},
{id: 'selection', title: 'In Current Selection', checked: self.options.range == 'selection'},
{id: 'position', title: 'At Current Position', checked: self.options.range == 'position'}
{id: 'all', title: Ox._('All'), checked: self.options.range == 'all'},
{id: 'selection', title: Ox._('In Current Selection'), checked: self.options.range == 'selection'},
{id: 'position', title: Ox._('At Current Position'), checked: self.options.range == 'position'}
]},
{},
{id: 'sortannotations', title: 'Sort Annotations', disabled: true},
{id: 'sortannotations', title: Ox._('Sort Annotations'), disabled: true},
{group: 'sort', min: 1, max: 1, items: [
{id: 'position', title: 'By Position', checked: self.options.sort == 'position'},
{id: 'duration', title: 'By Duration', checked: self.options.sort == 'duration'},
{id: 'text', title: 'By Text', checked: self.options.sort == 'text'}
{id: 'position', title: Ox._('By Position'), checked: self.options.sort == 'position'},
{id: 'duration', title: Ox._('By Duration'), checked: self.options.sort == 'duration'},
{id: 'text', title: Ox._('By Text'), checked: self.options.sort == 'text'}
]}
],
self.options.showFonts ? [
{},
{id: 'fontsize', title: 'Font Size', disabled: true},
{id: 'fontsize', title: Ox._('Font Size'), disabled: true},
{group: 'font', min: 1, max: 1, items: [
{id: 'small', title: 'Small', checked: self.options.font == 'small'},
{id: 'medium', title: 'Medium', checked: self.options.font == 'medium'},
{id: 'large', title: 'Large', checked: self.options.font == 'large'}
{id: 'small', title: Ox._('Small'), checked: self.options.font == 'small'},
{id: 'medium', title: Ox._('Medium'), checked: self.options.font == 'medium'},
{id: 'large', title: Ox._('Large'), checked: self.options.font == 'large'}
]}
] : [],
self.options.showUsers && self.users.length ? [
{},
{id: 'users', title: 'Show Users', disabled: true},
{id: 'users', title: Ox._('Show Users'), disabled: true},
{group: 'users', min: 1, max: -1, items: self.users.map(function(user) {
return {id: user, title: Ox.encodeHTMLEntities(user), checked:
self.enabledUsers == 'all' || self.enabledUsers.indexOf(user) > -1
@ -423,7 +423,7 @@ Ox.AnnotationPanel = function(options, self) {
),
style: 'square',
title: 'set',
tooltip: 'Options',
tooltip: Ox._('Options'),
type: 'image'
})
.css({float: 'left'})

View file

@ -53,7 +53,7 @@ Ox.VideoEditor = function(options, self) {
annotationsRange: 'all',
annotationsSize: 256,
annotationsSort: 'position',
annotationsTooltip: 'annotations',
annotationstooltip: Ox._('annotations'),
censored: [],
censoredIcon: '',
censoredTooltip: '',
@ -516,17 +516,17 @@ Ox.VideoEditor = function(options, self) {
self.$menuButton = Ox.MenuButton({
items: [].concat(
[
{id: 'size', title: 'Large Player', checked: self.options.videoSize == 'large'},
{id: 'size', title: Ox._('Large Player'), checked: self.options.videoSize == 'large'},
{},
{group: 'resolution', min: 1, max: 1, items: self.resolutions}
],
self.options.subtitles.length ? [
{},
{id: 'subtitles', title: 'Show Subtitles', checked: self.options.enableSubtitles}
{id: 'subtitles', title: Ox._('Show Subtitles'), checked: self.options.enableSubtitles}
] : [],
[
{},
{id: 'timelines', title: 'Timeline', disabled: true},
{id: 'timelines', title: Ox._('Timeline'), disabled: true},
{group: 'timeline', min: 1, max: 1, items: Ox.map(
self.options.timelines,
function(timeline) {
@ -536,25 +536,25 @@ Ox.VideoEditor = function(options, self) {
}
)},
{},
{id: 'downloadVideo', title: 'Download Video...', disabled: !self.options.enableDownload },
{id: 'downloadSelection', title: 'Download Selection...', disabled: !self.options.enableDownload},
{id: 'embedSelection', title: 'Embed Selection...'}
{id: 'downloadVideo', title: Ox._('Download Video...'), disabled: !self.options.enableDownload },
{id: 'downloadSelection', title: Ox._('Download Selection...'), disabled: !self.options.enableDownload},
{id: 'embedSelection', title: Ox._('Embed Selection...')}
],
self.options.enableImport ? [
{},
{id: 'importAnnotations', title: 'Import Annotations...'}
{id: 'importAnnotations', title: Ox._('Import Annotations...')}
] : [],
[
{},
{id: 'gotoPosterFrame', title: 'Go to Poster Frame'},
{id: 'setPosterFrame', title: 'Set Poster Frame', disabled: !self.options.enableSetPosterFrame},
{id: 'gotoPosterFrame', title: Ox._('Go to Poster Frame')},
{id: 'setPosterFrame', title: Ox._('Set Poster Frame'), disabled: !self.options.enableSetPosterFrame},
{},
{id: 'keyboard', title: 'Keyboard Shortcuts...', keyboard: 'h'}
{id: 'keyboard', title: Ox._('Keyboard Shortcuts...'), keyboard: 'h'}
]
),
style: 'square',
title: 'set',
tooltip: 'Options',
tooltip: Ox._('Options'),
type: 'image'
})
.css({float: 'left'})
@ -616,7 +616,7 @@ Ox.VideoEditor = function(options, self) {
disabled: self.options.find === '',
style: 'symbol',
title: 'close',
tooltip: 'Clear',
tooltip: Ox._('Clear'),
type: 'image'
})
.css({float: 'right'})
@ -638,7 +638,7 @@ Ox.VideoEditor = function(options, self) {
autocompleteSelectMax: 10,
autocompleteSelectSubmit: true,
changeOnKeypress: true,
placeholder: 'Find...',
placeholder: Ox._('Find...'),
value: self.options.find,
width: 128
})
@ -657,7 +657,7 @@ Ox.VideoEditor = function(options, self) {
disabled: true,
style: 'symbol',
title: 'arrowRight',
tooltip: 'Next Result',
tooltip: Ox._('Next Result'),
type: 'image'
})
.css({float: 'right'})
@ -672,7 +672,7 @@ Ox.VideoEditor = function(options, self) {
disabled: true,
style: 'symbol',
title: 'arrowLeft',
tooltip: 'Previous Result',
tooltip: Ox._('Previous Result'),
type: 'image'
})
.css({float: 'right'})
@ -1265,13 +1265,13 @@ Ox.VideoEditor = function(options, self) {
function showKeyboardShortcuts() {
var dialog = Ox.Dialog({
buttons: [
Ox.Button({id: 'close', title: 'Close'})
Ox.Button({id: 'close', title: Ox._('Close')})
.bindEvent({click: function() { dialog.close(); }})
],
content: self.$keyboardShortcuts,
height: 384,
keys: {enter: 'close', escape: 'close'},
title: 'Keyboard Shortcuts',
title: Ox._('Keyboard Shortcuts'),
width: 256
}).open();
}

View file

@ -142,7 +142,7 @@ Ox.VideoEditorPlayer = function(options, self) {
self.$playInToOutButton = Ox.Button({
id: self.options.id + 'PlayInToOut',
title: 'PlayInToOut',
tooltip: 'Play In to Out',
tooltip: Ox._('Play In to Out'),
type: 'image'
})
.bindEvent('click', function() {
@ -173,7 +173,7 @@ Ox.VideoEditorPlayer = function(options, self) {
self.$goToPointButton = Ox.Button({
id: self.options.id + 'GoTo' + Ox.toTitleCase(self.options.type),
title: 'GoTo' + Ox.toTitleCase(self.options.type),
tooltip: 'Go to ' + Ox.toTitleCase(self.options.type) + ' Point',
tooltip: Ox._('Go to ' + Ox.toTitleCase(self.options.type) + ' Point'),
type: 'image'
})
.bindEvent('click', goToPoint)
@ -181,7 +181,7 @@ Ox.VideoEditorPlayer = function(options, self) {
self.$setPointButton = Ox.Button({
id: self.options.id + 'Set' + Ox.toTitleCase(self.options.type),
title: 'Set' + Ox.toTitleCase(self.options.type),
tooltip: 'Set ' + Ox.toTitleCase(self.options.type) + ' Point',
tooltip: Ox._('Set ' + Ox.toTitleCase(self.options.type) + ' Point'),
type: 'image'
})
.bindEvent('click', setPoint)

View file

@ -625,7 +625,7 @@ Ox.VideoPlayer = function(options, self) {
self.$closeButton = Ox.Button({
style: 'video',
title: 'close',
tooltip: 'Close',
tooltip: Ox._('Close'),
type: 'image'
})
.bindEvent({
@ -640,7 +640,7 @@ Ox.VideoPlayer = function(options, self) {
self.$findButton = Ox.Button({
style: 'video',
title: 'find',
tooltip: 'Find',
tooltip: Ox._('Find'),
type: 'image'
})
.bindEvent({
@ -652,7 +652,7 @@ Ox.VideoPlayer = function(options, self) {
self.$fullscreenButton = Ox.Button({
style: 'video',
tooltip: ['Enter Fullscreen', 'Exit Fullscreen'],
tooltip: [Ox._('Enter Fullscreen'), Ox._('Exit Fullscreen')],
type: 'image',
value: self.options.fullscreen ? 'shrink' : 'grow',
values: ['grow', 'shrink']
@ -669,7 +669,7 @@ Ox.VideoPlayer = function(options, self) {
self.$setButton = Ox.Button({
style: 'video',
title: 'goTo' + Ox.toTitleCase(self.options.type),
tooltip: 'Go to ' + Ox.toTitleCase(self.options.type) + ' Point',
tooltip: Ox._('Go to ' + Ox.toTitleCase(self.options.type) + ' Point'),
type: 'image'
})
.bindEvent({
@ -681,7 +681,7 @@ Ox.VideoPlayer = function(options, self) {
self.$muteButton = Ox.Button({
style: 'video',
tooltip: ['Mute', 'Unmute'],
tooltip: [Ox._('Mute'), Ox._('Unmute')],
type: 'image',
value: self.options.muted ? 'unmute' : 'mute',
values: ['mute', 'unmute']
@ -698,7 +698,7 @@ Ox.VideoPlayer = function(options, self) {
self.$nextClipButton = Ox.Button({
style: 'video',
title: 'arrowRight',
tooltip: 'Next',
tooltip: Ox._('Next'),
type: 'image'
})
.bindEvent({
@ -728,7 +728,7 @@ Ox.VideoPlayer = function(options, self) {
self.$playButton = Ox.Button({
style: 'video',
// FIXME: this is retarded, fix Ox.Button
tooltip: ['Play', 'Pause'],
tooltip: [Ox._('Play'), Ox._('Pause')],
type: 'image',
value: self.options.paused ? 'play' : 'pause',
values: ['play', 'pause']
@ -745,7 +745,7 @@ Ox.VideoPlayer = function(options, self) {
self.$playInToOutButton = Ox.Button({
style: 'video',
title: 'playInToOut',
tooltip: 'Play In to Out',
tooltip: Ox._('Play In to Out'),
type: 'image'
})
.bindEvent({
@ -821,7 +821,7 @@ Ox.VideoPlayer = function(options, self) {
self.$previousClipButton = Ox.Button({
style: 'video',
title: 'arrowLeft',
tooltip: 'Previous',
tooltip: Ox._('Previous'),
type: 'image'
})
.bindEvent({
@ -835,7 +835,7 @@ Ox.VideoPlayer = function(options, self) {
self.$scaleButton = Ox.Button({
style: 'video',
tooltip: ['Scale to Fill', 'Scale to Fit'],
tooltip: [Ox._('Scale to Fill'), Ox._('Scale to Fit')],
type: 'image',
value: self.options.scaleToFill ? 'fit' : 'fill',
values: ['fill', 'fit']
@ -850,7 +850,7 @@ Ox.VideoPlayer = function(options, self) {
self.$setButton = Ox.Button({
style: 'video',
title: 'set' + Ox.toTitleCase(self.options.type),
tooltip: 'Set ' + Ox.toTitleCase(self.options.type) + ' Point',
tooltip: Ox._('Set ' + Ox.toTitleCase(self.options.type) + ' Point'),
type: 'image'
})
.bindEvent({
@ -863,7 +863,7 @@ Ox.VideoPlayer = function(options, self) {
self.$settingsButton = Ox.Button({
style: 'video',
title: 'set',
tooltip: 'Settings',
tooltip: Ox._('Settings'),
type: 'image'
})
.bindEvent({
@ -879,7 +879,7 @@ Ox.VideoPlayer = function(options, self) {
self.$sizeButton = Ox.Button({
style: 'video',
tooltip: ['Larger', 'Smaller'],
tooltip: [Ox._('Larger'), Ox._('Smaller')],
type: 'image',
value: self.options.sizeIsLarge ? 'shrink' : 'grow',
values: ['grow', 'shrink']
@ -938,7 +938,7 @@ Ox.VideoPlayer = function(options, self) {
self.$volumeButton = Ox.Button({
style: 'video',
title: getVolumeImage(),
tooltip: 'Volume',
tooltip: Ox._('Volume'),
type: 'image'
})
.bindEvent({
@ -951,7 +951,7 @@ Ox.VideoPlayer = function(options, self) {
self.$zapHomeButton = Ox.Button({
style: 'video',
title: 'up',
tooltip: 'Home Channel',
tooltip: Ox._('Home Channel'),
type: 'image'
})
.bindEvent({
@ -966,7 +966,7 @@ Ox.VideoPlayer = function(options, self) {
self.$zapNextButton = Ox.Button({
style: 'video',
title: 'right',
tooltip: 'Next Channel',
tooltip: Ox._('Next Channel'),
type: 'image'
})
.bindEvent({
@ -981,7 +981,7 @@ Ox.VideoPlayer = function(options, self) {
self.$zapPreviousButton = Ox.Button({
style: 'video',
title: 'left',
tooltip: 'Previous Channel',
tooltip: Ox._('Previous Channel'),
type: 'image'
})
.bindEvent({
@ -1015,7 +1015,7 @@ Ox.VideoPlayer = function(options, self) {
.appendTo(that);
self.$results = Ox.Element({
tooltip: 'Results'
tooltip: Ox._('Results')
})
.addClass('OxResults')
.html('0')
@ -1025,7 +1025,7 @@ Ox.VideoPlayer = function(options, self) {
disabled: true,
style: 'symbol',
title: 'arrowLeft',
tooltip: 'Previous',
tooltip: Ox._('Previous'),
type: 'image'
})
.bindEvent({
@ -1039,7 +1039,7 @@ Ox.VideoPlayer = function(options, self) {
disabled: true,
style: 'symbol',
title: 'arrowRight',
tooltip: 'Next',
tooltip: Ox._('Next'),
type: 'image'
})
.bindEvent({
@ -1074,7 +1074,7 @@ Ox.VideoPlayer = function(options, self) {
disabled: !self.options.find,
style: 'symbol',
title: 'delete',
tooltip: 'Clear',
tooltip: Ox._('Clear'),
type: 'image'
})
.bindEvent({
@ -1096,7 +1096,7 @@ Ox.VideoPlayer = function(options, self) {
self.$hideFindButton = Ox.Button({
style: 'symbol',
title: 'close',
tooltip: 'Hide',
tooltip: Ox._('Hide'),
type: 'image'
})
.bindEvent({
@ -1124,7 +1124,7 @@ Ox.VideoPlayer = function(options, self) {
self.$hideVolumeButton = Ox.Button({
style: 'symbol',
title: 'close',
tooltip: 'Hide',
tooltip: Ox._('Hide'),
type: 'image'
})
.bindEvent({
@ -1134,7 +1134,7 @@ Ox.VideoPlayer = function(options, self) {
self.$muteButton = Ox.Button({
style: 'symbol',
tooltip: ['Mute', 'Unmute'],
tooltip: [Ox._('Mute'), Ox._('Unmute')],
type: 'image',
value: self.options.muted ? 'unmute' : 'mute',
values: ['mute', 'unmute']

View file

@ -97,7 +97,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
],
style: 'square',
title: 'set',
tooltip: 'Options',
tooltip: Ox._('Options'),
type: 'image'
})
.css({float: 'left'})
@ -127,7 +127,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
self.$scrollButton = Ox.Button({
style: 'symbol',
title: 'arrowDown',
tooltip: 'Scroll to Player',
tooltip: Ox._('Scroll to Player'),
type: 'image'
})
.css({float: 'right'})
@ -197,7 +197,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
self.$playButton = Ox.Button({
style: 'symbol',
title: 'play',
tooltip: 'Play',
tooltip: Ox._('Play'),
type: 'image'
})
.css({
@ -213,7 +213,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
self.$muteButton = Ox.Button({
style: 'symbol',
title: self.options.muted ? 'unmute' : 'mute',
tooltip: self.options.muted ? 'Unmute' : 'Mute',
tooltip: self.options.muted ? Ox._('Unmute') : Ox._('Mute'),
type: 'image'
})
.css({float: 'left'})
@ -787,7 +787,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
self.$video.options({muted: self.options.muted});
self.$muteButton.options({
title: self.options.muted ? 'unmute' : 'mute',
tooltip: self.options.muted ? 'Unmute' : 'Mute'
tooltip: self.options.muted ? Ox._('Unmute') : Ox._('Mute')
});
that.triggerEvent('muted', {
muted: self.options.muted

View file

@ -44,7 +44,7 @@ Ox.SortDialog = function(options, self) {
if (self.hasDefaults) {
self.$defaultsButton = Ox.Button({
title: 'Restore Defaults'
title: Ox._('Restore Defaults')
})
.bindEvent({
click: function() {
@ -55,7 +55,7 @@ Ox.SortDialog = function(options, self) {
}
self.$doneButton = Ox.Button({
title: 'Done'
title: Ox._('Done')
})
.bindEvent({
click: function() {
@ -95,4 +95,4 @@ Ox.SortDialog = function(options, self) {
return that;
};
};

View file

@ -53,7 +53,15 @@ Ox.KEYS = {
190: 'dot', 191: 'slash', 192: 'backtick', 219: 'openbracket',
220: 'backslash', 221: 'closebracket', 222: 'quote', 224: 'meta'
// see dojo, for ex.
},
};
//@ Ox.LOCALE <s> current locale
Ox.LOCALE = 'en';
//@ Ox.LOCALE <[s]> array of available locales
Ox.LOCALES = {
'ar': 'العربية',
'de': 'Deutsch',
'en': 'English'
};
//@ Ox.MAX_LATITUDE <n> Maximum latitude of a Mercator projection
Ox.MAX_LATITUDE = Ox.deg(Math.atan(Ox.sinh(Math.PI)));
//@ Ox.MIN_LATITUDE <n> Minimum latitude of a Mercator projection
@ -66,7 +74,7 @@ Ox.MODIFIER_KEYS = {
ctrlKey: 'control',
shiftKey: 'shift',
metaKey: 'meta' // Mac: command
}
};
//@ Ox.MONTHS <[s]> Names of months
Ox.MONTHS = [
'January', 'February', 'March', 'April', 'May', 'June',

View file

@ -54,9 +54,7 @@
var translation = translations[value];
log && log(value, translation);
translation = translation || value;
return options
? Ox.formatString(translation, options, true)
: translation
return Ox.formatString(translation, options, true);
};
/*@
@ -70,4 +68,4 @@
log = callback;
};
})();
})();

View file

@ -0,0 +1,56 @@
{
"AD": "",
"AM": "",
"Apr": "",
"April": "",
"Aug": "",
"August": "",
"BC": "",
"Dec": "",
"December": "",
"Fall": "",
"Feb": "",
"February": "",
"Fri": "",
"Friday": "",
"Jan": "",
"January": "",
"Jun": "",
"June": "",
"Jul": "",
"July": "",
"Mar": "",
"March": "",
"May": "",
"Mon": "",
"Monday": "",
"no": "",
"Nov": "",
"November": "",
"Oct": "",
"October": "",
"PM": "",
"Sat": "",
"Saturday": "",
"Sep": "",
"September": "",
"Spring": "",
"Summer": "",
"Sun": "",
"Sunday": "",
"Thu": "",
"Thursday": "",
"Tue": "",
"Tuesday": "",
"Wed": "",
"Wednesday": "",
"Winter": "",
"%A, %B %e, %Y": "",
"%a, %b %e, %Y": "",
"%B %e, %Y": "",
"%b %e, %Y": "",
"%I:%M:%S %p": "",
"%I:%M %p": "",
"%m/%d/%Y": "",
"%m/%d/%y": ""
}

View file

@ -0,0 +1,89 @@
{
"AD": "n. Chr.",
"AM": "AM",
"Apr": "Apr",
"April": "April",
"Aug": "Aug",
"August": "August",
"BC": "v. Chr.",
"d": " Tg.",
"day": "Tag",
"days": "Tage",
"days{2}": "Tage",
"Dec": "Dez",
"December": "Dezember",
"Fall": "Herbst",
"Feb": "Feb",
"February": "Februar",
"Fri": "Fr",
"Friday": "Friday",
"h": " Std.",
"hour": "Stunde",
"hours": "Stunden",
"hours{2}": "Stunden",
"Jan": "Jan",
"January": "Januar",
"Jun": "Jun",
"June": "Juni",
"Jul": "Jul",
"July": "Juli",
"m": " Min.",
"Mar": "Mär",
"March": "März",
"May": "Mai",
"Mon": "Mo",
"Monday": "Montag",
"minute": "Minute",
"minutes": "Minuten",
"minutes{2}": "Minuten",
"nd": ".",
"nd{22}": ".",
"no": "keine",
"Nov": "Nov",
"November": "November",
"Oct": "Okt",
"October": "Oktober",
"PM": "PM",
"rd": ".",
"rd{23}": ".",
"s": " Sek.",
"Sat": "Sa",
"Saturday": "Samstag",
"second": "Sekunde",
"seconds": "Sekunden",
"seconds{2}": "Sekunden",
"Sep": "Sep",
"September": "September",
"Spring": "Frühjahr",
"st": ".",
"st{21}": ".",
"Summer": "Sommer",
"Sun": "So",
"Sunday": "Sonntag",
"th": ".",
"th{11}": ".",
"th{12}": ".",
"th{13}": ".",
"Thu": "Do",
"Thursday": "Donnerstag",
"Tue": "Di",
"Tuesday": "Dienstag",
"Wed": "Mi",
"Wednesday": "Mittwoch",
"Winter": "Winter",
"y": " Jhr.",
"year": "Jahr",
"years": "Jahre",
"years{2}": "Jahre",
".": ",",
",": ".",
"%": "%",
"%A, %B %e, %Y": "%A, %e. %B %Y",
"%a, %b %e, %Y": "%a, %e. %b %Y",
"%B %e, %Y": "%e. %B %Y",
"%b %e, %Y": "%e. %b %Y",
"%I:%M %p": "%H:%M",
"%I:%M:%S %p": "%H:%M:%S",
"%m/%d/%Y": "%d.%m.%Y",
"%m/%d/%y": "%d.%m.%y"
}

View file

@ -101,7 +101,7 @@ def build_oxjs(downloads=False, geo=False):
if is_jquery_plugin:
ui_files['build'].append(target.replace(build_path, ''))
ui_files['dev'].append(target.replace(build_path, ''))
if not '/Ox/js' in source and not '/Ox.UI/js/' in source and not is_jquery:
if not '/Ox/js/' in source and not '/Ox.UI/js/' in source and not is_jquery:
if re.match('^Ox\..+\.js$', filename) or is_jsonc:
js = read_file(source)
write_file(target, ox.js.minify(js, '' if is_jsonc else comment))