add localization to Ox
This commit is contained in:
parent
b68b827d7b
commit
4d8c716d0b
31 changed files with 499 additions and 352 deletions
|
@ -105,13 +105,13 @@ Ox.AudioPlayer = function(options, self) {
|
||||||
{
|
{
|
||||||
id: 'current',
|
id: 'current',
|
||||||
title: 'playPrevious',
|
title: 'playPrevious',
|
||||||
tooltip: 'Play Current Track'
|
tooltip: Ox._('Play Current Track')
|
||||||
},
|
},
|
||||||
Ox.extend({id: 'play'}, getButtonOptions('play')),
|
Ox.extend({id: 'play'}, getButtonOptions('play')),
|
||||||
{
|
{
|
||||||
id: 'next',
|
id: 'next',
|
||||||
title: 'playNext',
|
title: 'playNext',
|
||||||
tooltip: 'Play Next Track'
|
tooltip: Ox._('Play Next Track')
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
overlap: 'right',
|
overlap: 'right',
|
||||||
|
@ -134,7 +134,7 @@ Ox.AudioPlayer = function(options, self) {
|
||||||
self.$positionLabel = Ox.Label({
|
self.$positionLabel = Ox.Label({
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
title: '00:00:00',
|
title: '00:00:00',
|
||||||
tooltip: 'Show Remaining Time',
|
tooltip: Ox._('Show Remaining Time'),
|
||||||
width: 80
|
width: 80
|
||||||
})
|
})
|
||||||
.addClass('OxPositionLabel')
|
.addClass('OxPositionLabel')
|
||||||
|
@ -160,7 +160,7 @@ Ox.AudioPlayer = function(options, self) {
|
||||||
self.$muteButton = Ox.Button({
|
self.$muteButton = Ox.Button({
|
||||||
overlap: 'right',
|
overlap: 'right',
|
||||||
title: 'mute',
|
title: 'mute',
|
||||||
tooltip: 'Mute',
|
tooltip: Ox._('Mute'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.addClass('OxMuteButton')
|
.addClass('OxMuteButton')
|
||||||
|
@ -217,26 +217,26 @@ Ox.AudioPlayer = function(options, self) {
|
||||||
var options;
|
var options;
|
||||||
if (id == 'mute') {
|
if (id == 'mute') {
|
||||||
options = self.options.muted || self.options.volume == 0
|
options = self.options.muted || self.options.volume == 0
|
||||||
? {title: 'unmute', tooltip: 'Unmute'}
|
? {title: 'unmute', tooltip: Ox._('Unmute')}
|
||||||
: self.options.volume < 1/3
|
: self.options.volume < 1/3
|
||||||
? {title: 'volumeUp', tooltip: 'Mute'}
|
? {title: 'volumeUp', tooltip: Ox._('Mute')}
|
||||||
: self.options.volume < 2/3
|
: self.options.volume < 2/3
|
||||||
? {title: 'volumeDown', tooltip: 'Mute'}
|
? {title: 'volumeDown', tooltip: Ox._('Mute')}
|
||||||
: {title: 'mute', tooltip: 'Mute'};
|
: {title: 'mute', tooltip: Ox._('Mute')};
|
||||||
} else if (id == 'play') {
|
} else if (id == 'play') {
|
||||||
options = self.options.paused
|
options = self.options.paused
|
||||||
? {title: 'play', tooltip: 'Play'}
|
? {title: 'play', tooltip: Ox._('Play')}
|
||||||
: {title: 'pause', tooltip: 'Pause'};
|
: {title: 'pause', tooltip: Ox._('Pause')};
|
||||||
} else if (id == 'repeat') {
|
} else if (id == 'repeat') {
|
||||||
options = self.options.repeat == 0
|
options = self.options.repeat == 0
|
||||||
? {title: 'repeatNone', tooltip: 'Repeat All'}
|
? {title: 'repeatNone', tooltip: Ox._('Repeat All')}
|
||||||
: self.options.repeat == -1
|
: self.options.repeat == -1
|
||||||
? {title: 'repeatAll', tooltip: 'Repeat One'}
|
? {title: 'repeatAll', tooltip: Ox._('Repeat One')}
|
||||||
: {title: 'repeatOne', tooltip: 'Repeat None'};
|
: {title: 'repeatOne', tooltip: Ox._('Repeat None')};
|
||||||
} else if (id == 'shuffle') {
|
} else if (id == 'shuffle') {
|
||||||
options = self.options.shuffle
|
options = self.options.shuffle
|
||||||
? {title: 'shuffleAll', tooltip: 'Don\'t Shuffle'}
|
? {title: 'shuffleAll', tooltip: Ox._('Don\'t Shuffle')}
|
||||||
: {title: 'shuffleNone', tooltip: 'Shuffle'};
|
: {title: 'shuffleNone', tooltip: Ox._('Shuffle')};
|
||||||
}
|
}
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
@ -355,4 +355,4 @@ Ox.AudioPlayer = function(options, self) {
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -86,7 +86,7 @@ Ox.Progressbar = function(options, self) {
|
||||||
if (self.options.showPauseButton) {
|
if (self.options.showPauseButton) {
|
||||||
self.$pauseButton = Ox.Button({
|
self.$pauseButton = Ox.Button({
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
tooltip: self.options.showTooltips ? ['Pause', 'Resume'] : '',
|
tooltip: self.options.showTooltips ? [Ox._('Pause'), Ox._('Resume')] : '',
|
||||||
type: 'image',
|
type: 'image',
|
||||||
value: !self.options.paused ? 'pause' : 'redo',
|
value: !self.options.paused ? 'pause' : 'redo',
|
||||||
values: ['pause', 'redo']
|
values: ['pause', 'redo']
|
||||||
|
@ -102,12 +102,12 @@ Ox.Progressbar = function(options, self) {
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
type: 'image'
|
type: 'image'
|
||||||
}, self.options.showRestartButton ? {
|
}, self.options.showRestartButton ? {
|
||||||
tooltip: self.options.showTooltips ? ['Cancel', 'Restart'] : '',
|
tooltip: self.options.showTooltips ? [Ox._('Cancel'), Ox._('Restart')] : '',
|
||||||
value: 'close',
|
value: 'close',
|
||||||
values: ['close', 'redo']
|
values: ['close', 'redo']
|
||||||
} : {
|
} : {
|
||||||
title: 'close',
|
title: 'close',
|
||||||
tooltip: self.options.showTooltips ? 'Cancel' : ''
|
tooltip: self.options.showTooltips ? Ox._('Cancel') : ''
|
||||||
}))
|
}))
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: toggleCancelled
|
click: toggleCancelled
|
||||||
|
@ -141,7 +141,7 @@ Ox.Progressbar = function(options, self) {
|
||||||
self.$progress.removeClass('OxAnimate');
|
self.$progress.removeClass('OxAnimate');
|
||||||
($.browser.mozilla || $.browser.opera) && clearInterval(self.interval);
|
($.browser.mozilla || $.browser.opera) && clearInterval(self.interval);
|
||||||
self.$time && self.$time.html(
|
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);
|
}, 1000 / 32);
|
||||||
}
|
}
|
||||||
self.$time && self.$time.html(
|
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) + '%'
|
Math.floor(self.options.progress * 100) + '%'
|
||||||
);
|
);
|
||||||
self.$time && self.$time.html(
|
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({
|
self.$progress.stop().animate({
|
||||||
width: Math.round(14 + Math.abs(self.options.progress) * (self.trackWidth - 16)) + 'px'
|
width: Math.round(14 + Math.abs(self.options.progress) * (self.trackWidth - 16)) + 'px'
|
||||||
|
@ -190,7 +190,7 @@ Ox.Progressbar = function(options, self) {
|
||||||
function stop() {
|
function stop() {
|
||||||
pause();
|
pause();
|
||||||
self.$time && self.$time.html(
|
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)) {
|
if (self.$pauseButton && (self.options.cancelled || self.complete)) {
|
||||||
self.$pauseButton.options({disabled: true});
|
self.$pauseButton.options({disabled: true});
|
||||||
|
|
|
@ -147,13 +147,13 @@ Ox.Resizebar = function(options, self) {
|
||||||
function getTitle() {
|
function getTitle() {
|
||||||
var title = '';
|
var title = '';
|
||||||
if (self.options.collapsed) {
|
if (self.options.collapsed) {
|
||||||
title = 'Click to show';
|
title = Ox._('Click to show');
|
||||||
} else {
|
} else {
|
||||||
if (self.options.resizable) {
|
if (self.options.resizable) {
|
||||||
title = 'Drag to resize'
|
title = Ox._('Drag to resize');
|
||||||
}
|
}
|
||||||
if (self.options.collapsible) {
|
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)) {
|
if (title && Ox.isString(self.options.tooltip)) {
|
||||||
|
|
|
@ -152,8 +152,8 @@ Ox.Calendar = function(options, self) {
|
||||||
},
|
},
|
||||||
name: function(i) {
|
name: function(i) {
|
||||||
return i > -2
|
return i > -2
|
||||||
? Ox.formatOrdinal(i + 2) + ' Millennium'
|
? Ox._('{0} Millennium', Ox.formatOrdinal(i + 2))
|
||||||
: Ox.formatOrdinal(-i - 1) + ' Millennium BC'
|
: Ox._('{0} Millennium BC', Ox.formatOrdinal(-i - 1))
|
||||||
},
|
},
|
||||||
value: function(date) {
|
value: function(date) {
|
||||||
return Math.floor(date.getUTCFullYear() / 1000) - 1;
|
return Math.floor(date.getUTCFullYear() / 1000) - 1;
|
||||||
|
@ -167,8 +167,8 @@ Ox.Calendar = function(options, self) {
|
||||||
},
|
},
|
||||||
name: function(i) {
|
name: function(i) {
|
||||||
return i > -20
|
return i > -20
|
||||||
? Ox.formatOrdinal(i + 20) + ' Century'
|
? Ox._('{0} Century', Ox.formatOrdinal(i + 20))
|
||||||
: Ox.formatOrdinal(-i - 19) + ' Century BC'
|
: Ox._('{0} Century BC', Ox.formatOrdinal(-i - 19))
|
||||||
},
|
},
|
||||||
value: function(date) {
|
value: function(date) {
|
||||||
return Math.floor(date.getUTCFullYear() / 100) - 19;
|
return Math.floor(date.getUTCFullYear() / 100) - 19;
|
||||||
|
@ -334,10 +334,10 @@ Ox.Calendar = function(options, self) {
|
||||||
|
|
||||||
self.$menu = Ox.Select({
|
self.$menu = Ox.Select({
|
||||||
items: [
|
items: [
|
||||||
{id: 'date', title: 'Show Dates'},
|
{id: 'date', title: Ox._('Show Dates')},
|
||||||
{id: 'place', title: 'Show Places'},
|
{id: 'place', title: Ox._('Show Places')},
|
||||||
{id: 'person', title: 'Show People'},
|
{id: 'person', title: Ox._('Show People')},
|
||||||
{id: 'other', title: 'Show Other'}
|
{id: 'other', title: Ox._('Show Other')}
|
||||||
],
|
],
|
||||||
max: -1,
|
max: -1,
|
||||||
min: 1,
|
min: 1,
|
||||||
|
@ -536,7 +536,7 @@ Ox.Calendar = function(options, self) {
|
||||||
self.$eventControls = {
|
self.$eventControls = {
|
||||||
name: Ox.Label({
|
name: Ox.Label({
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
tooltip: 'Click to pan, doubleclick to zoom'
|
tooltip: Ox._('Click to pan, doubleclick to zoom')
|
||||||
})
|
})
|
||||||
.addClass('OxEventControl OxEventName')
|
.addClass('OxEventControl OxEventName')
|
||||||
.css({bottom: 20 + (self.options.showZoombar * 16) + 'px'})
|
.css({bottom: 20 + (self.options.showZoombar * 16) + 'px'})
|
||||||
|
@ -551,7 +551,7 @@ Ox.Calendar = function(options, self) {
|
||||||
.appendTo(that),
|
.appendTo(that),
|
||||||
deselectButton: Ox.Button({
|
deselectButton: Ox.Button({
|
||||||
title: 'close',
|
title: 'close',
|
||||||
tooltip: 'Deselect',
|
tooltip: Ox._('Deselect'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.addClass('OxEventControl OxEventDeselectButton')
|
.addClass('OxEventControl OxEventDeselectButton')
|
||||||
|
|
|
@ -76,7 +76,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'type',
|
id: 'type',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'Type',
|
title: Ox._('Type'),
|
||||||
titleImage: 'icon',
|
titleImage: 'icon',
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 16
|
width: 16
|
||||||
|
@ -90,7 +90,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
id: 'name',
|
id: 'name',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
removable: false,
|
removable: false,
|
||||||
title: 'Name',
|
title: Ox._('Name'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 144
|
width: 144
|
||||||
},
|
},
|
||||||
|
@ -101,7 +101,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'alternativeNames',
|
id: 'alternativeNames',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'Alternative Names',
|
title: Ox._('Alternative Names'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 144
|
width: 144
|
||||||
},
|
},
|
||||||
|
@ -111,7 +111,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
sort: function(value) {
|
sort: function(value) {
|
||||||
return Ox.parseDate(value);
|
return Ox.parseDate(value);
|
||||||
},
|
},
|
||||||
title: 'Start',
|
title: Ox._('Start'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 144
|
width: 144
|
||||||
},
|
},
|
||||||
|
@ -121,7 +121,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
sort: function(value) {
|
sort: function(value) {
|
||||||
return Ox.parseDate(value);
|
return Ox.parseDate(value);
|
||||||
},
|
},
|
||||||
title: 'End',
|
title: Ox._('End'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 144
|
width: 144
|
||||||
},
|
},
|
||||||
|
@ -140,7 +140,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
sort: function(value, data) {
|
sort: function(value, data) {
|
||||||
return Ox.parseDate(data.end) - Ox.parseDate(data.start);
|
return Ox.parseDate(data.end) - Ox.parseDate(data.start);
|
||||||
},
|
},
|
||||||
title: 'Duration',
|
title: Ox._('Duration'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 256
|
width: 256
|
||||||
},
|
},
|
||||||
|
@ -150,7 +150,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'user',
|
id: 'user',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'User',
|
title: Ox._('User'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 96
|
width: 96
|
||||||
},
|
},
|
||||||
|
@ -160,7 +160,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'created',
|
id: 'created',
|
||||||
operator: '-',
|
operator: '-',
|
||||||
title: 'Date Created',
|
title: Ox._('Date Created'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 128
|
width: 128
|
||||||
},
|
},
|
||||||
|
@ -170,7 +170,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'modified',
|
id: 'modified',
|
||||||
operator: '-',
|
operator: '-',
|
||||||
title: 'Date Modified',
|
title: Ox._('Date Modified'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 128
|
width: 128
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
align: 'right',
|
align: 'right',
|
||||||
id: 'matches',
|
id: 'matches',
|
||||||
operator: '-',
|
operator: '-',
|
||||||
title: 'Matches',
|
title: Ox._('Matches'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 64
|
width: 64
|
||||||
});
|
});
|
||||||
|
@ -193,9 +193,9 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
elements: [
|
elements: [
|
||||||
self.$findSelect = Ox.Select({
|
self.$findSelect = Ox.Select({
|
||||||
items: [
|
items: [
|
||||||
{id: 'all', title: 'Find: All'},
|
{id: 'all', title: Ox._('Find: All')},
|
||||||
{id: 'name', title: 'Find: Name'},
|
{id: 'name', title: Ox._('Find: Name')},
|
||||||
{id: 'alternativeNames', title: 'Find: Alternative Names'},
|
{id: 'alternativeNames', title: Ox._('Find: Alternative Names')},
|
||||||
],
|
],
|
||||||
overlap: 'right',
|
overlap: 'right',
|
||||||
type: 'image'
|
type: 'image'
|
||||||
|
@ -209,7 +209,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
}),
|
}),
|
||||||
self.$findInput = Ox.Input({
|
self.$findInput = Ox.Input({
|
||||||
clear: true,
|
clear: true,
|
||||||
placeholder: 'Find in List',
|
placeholder: Ox._('Find in List'),
|
||||||
width: 234
|
width: 234
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -271,9 +271,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
self.$status = Ox.Element()
|
self.$status = Ox.Element()
|
||||||
.css({paddingTop: '2px', margin: 'auto', fontSize: '9px', textAlign: 'center'})
|
.css({paddingTop: '2px', margin: 'auto', fontSize: '9px', textAlign: 'center'})
|
||||||
.html(
|
.html(
|
||||||
Ox.formatNumber(self.options.events.length) + ' Event' + (
|
Ox.formatCount(self.options.events, Ox._('Event'), Ox._('Events'))
|
||||||
self.options.events.length == 1 ? '' : 's'
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
.appendTo(self.$listStatusbar);
|
.appendTo(self.$listStatusbar);
|
||||||
|
|
||||||
|
@ -320,7 +318,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
.appendTo(self.$eventTitle);
|
.appendTo(self.$eventTitle);
|
||||||
self.$deselectEventButton = Ox.Button({
|
self.$deselectEventButton = Ox.Button({
|
||||||
title: 'close',
|
title: 'close',
|
||||||
tooltip: 'Done',
|
tooltip: Ox._('Done'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left', margin: '4px 4px 4px 0'})
|
.css({float: 'left', margin: '4px 4px 4px 0'})
|
||||||
|
@ -339,13 +337,13 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
items: [
|
items: [
|
||||||
self.$nameInput = Ox.Input({
|
self.$nameInput = Ox.Input({
|
||||||
id: 'name',
|
id: 'name',
|
||||||
label: 'Name',
|
label: Ox._('Name'),
|
||||||
labelWidth: 64,
|
labelWidth: 64,
|
||||||
width: 240
|
width: 240
|
||||||
}),
|
}),
|
||||||
self.$alternativeNamesInput = Ox.ArrayInput({
|
self.$alternativeNamesInput = Ox.ArrayInput({
|
||||||
id: 'alternativeNames',
|
id: 'alternativeNames',
|
||||||
label: 'Alternative Names',
|
label: Ox._('Alternative Names'),
|
||||||
max: 10,
|
max: 10,
|
||||||
values: [],
|
values: [],
|
||||||
width: 240
|
width: 240
|
||||||
|
@ -353,31 +351,31 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
Ox.Select({
|
Ox.Select({
|
||||||
id: 'type',
|
id: 'type',
|
||||||
items: [
|
items: [
|
||||||
{id: 'date', title: 'Date'},
|
{id: 'date', title: Ox._('Date')},
|
||||||
{id: 'place', title: 'Place'},
|
{id: 'place', title: Ox._('Place')},
|
||||||
{id: 'person', title: 'Person'},
|
{id: 'person', title: Ox._('Person')},
|
||||||
{id: 'other', title: 'Other'}
|
{id: 'other', title: Ox._('Other')}
|
||||||
],
|
],
|
||||||
label: 'Type',
|
label: Ox._('Type'),
|
||||||
labelWidth: 64,
|
labelWidth: 64,
|
||||||
width: 240
|
width: 240
|
||||||
}),
|
}),
|
||||||
self.$startInput = Ox.Input({
|
self.$startInput = Ox.Input({
|
||||||
id: 'start',
|
id: 'start',
|
||||||
label: 'Start',
|
label: Ox._('Start'),
|
||||||
labelWidth: 64,
|
labelWidth: 64,
|
||||||
width: 240
|
width: 240
|
||||||
}),
|
}),
|
||||||
self.$endInput = Ox.Input({
|
self.$endInput = Ox.Input({
|
||||||
id: 'end',
|
id: 'end',
|
||||||
label: 'End',
|
label: Ox._('End'),
|
||||||
labelWidth: 64,
|
labelWidth: 64,
|
||||||
width: 240
|
width: 240
|
||||||
}),
|
}),
|
||||||
self.$durationInput = Ox.Input({
|
self.$durationInput = Ox.Input({
|
||||||
disabled: true,
|
disabled: true,
|
||||||
id: 'durationText',
|
id: 'durationText',
|
||||||
label: 'Duration',
|
label: Ox._('Duration'),
|
||||||
labelWidth: 64,
|
labelWidth: 64,
|
||||||
width: 240
|
width: 240
|
||||||
})
|
})
|
||||||
|
@ -435,7 +433,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
self.$matchesInput = Ox.Input({
|
self.$matchesInput = Ox.Input({
|
||||||
disabled: true,
|
disabled: true,
|
||||||
id: 'matches',
|
id: 'matches',
|
||||||
label: 'Matches',
|
label: Ox._('Matches'),
|
||||||
labelWidth: 64,
|
labelWidth: 64,
|
||||||
type: 'int',
|
type: 'int',
|
||||||
width: 240
|
width: 240
|
||||||
|
@ -450,7 +448,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
});
|
});
|
||||||
|
|
||||||
self.$removeEventButton = Ox.Button({
|
self.$removeEventButton = Ox.Button({
|
||||||
title: 'Remove Event',
|
title: Ox._('Remove Event'),
|
||||||
width: 90
|
width: 90
|
||||||
})
|
})
|
||||||
.css({float: 'left', margin: '4px'})
|
.css({float: 'left', margin: '4px'})
|
||||||
|
@ -461,7 +459,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
.appendTo(self.$eventStatusbar);
|
.appendTo(self.$eventStatusbar);
|
||||||
|
|
||||||
self.$newEventButton = Ox.Button({
|
self.$newEventButton = Ox.Button({
|
||||||
title: 'New Event',
|
title: Ox._('New Event'),
|
||||||
width: 70
|
width: 70
|
||||||
})
|
})
|
||||||
.css({float: 'right', margin: '4px'})
|
.css({float: 'right', margin: '4px'})
|
||||||
|
@ -472,13 +470,13 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
|
|
||||||
if (self.options.mode == 'define') {
|
if (self.options.mode == 'define') {
|
||||||
self.$defineEventButton = Ox.Button({
|
self.$defineEventButton = Ox.Button({
|
||||||
title: 'Define Event',
|
title: Ox._('Define Event'),
|
||||||
width: 80
|
width: 80
|
||||||
})
|
})
|
||||||
.css({float: 'right', margin: '4px 0 4px 0'})
|
.css({float: 'right', margin: '4px 0 4px 0'})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
if (this.options('title') == 'Define Event') {
|
if (this.options('title') == Ox._('Define Event')) {
|
||||||
defineEvent();
|
defineEvent();
|
||||||
} else {
|
} else {
|
||||||
clearEvent();
|
clearEvent();
|
||||||
|
@ -611,7 +609,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
alternativeNames: [], type: '',
|
alternativeNames: [], type: '',
|
||||||
start: '', end: ''
|
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() {
|
self.options.editEvent(encodeValues(values), function() {
|
||||||
Ox.forEach(values, function(value, key) {
|
Ox.forEach(values, function(value, key) {
|
||||||
self.$list.value(self.options.selected, key, value);
|
self.$list.value(self.options.selected, key, value);
|
||||||
|
@ -619,7 +617,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
self.$list.reloadList();
|
self.$list.reloadList();
|
||||||
self.$calendar.removeEvent();
|
self.$calendar.removeEvent();
|
||||||
self.$eventForm.hide();
|
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);
|
event.end = Ox.formatDate(endTime, '%Y-%m-%d %H:%M:%S', true);
|
||||||
self.$list.options({items: Ox.clone(self.options.events, true)});
|
self.$list.options({items: Ox.clone(self.options.events, true)});
|
||||||
self.$calendar.addEvent(event);
|
self.$calendar.addEvent(event);
|
||||||
self.$defineEventButton.options({title: 'Clear Event'});
|
self.$defineEventButton.options({title: Ox._('Clear Event')});
|
||||||
}
|
}
|
||||||
|
|
||||||
function editEvent(key, value) {
|
function editEvent(key, value) {
|
||||||
|
@ -698,9 +696,7 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
|
|
||||||
function initList(data) {
|
function initList(data) {
|
||||||
self.$status.html(
|
self.$status.html(
|
||||||
Ox.formatNumber(data.items) + ' Event' + (
|
Ox.formatCount(data.items, Ox._('Event'), Ox._('Events'))
|
||||||
data.items == 1 ? '' : 's'
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ Ox.DocPage = function(options, self) {
|
||||||
|
|
||||||
self.$homeButton = Ox.Button({
|
self.$homeButton = Ox.Button({
|
||||||
title: 'home',
|
title: 'home',
|
||||||
tooltip: 'Home',
|
tooltip: Ox._('Home'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left', margin: '4px 2px 4px 4px'})
|
.css({float: 'left', margin: '4px 2px 4px 4px'})
|
||||||
|
@ -56,7 +56,7 @@ Ox.DocPage = function(options, self) {
|
||||||
if (self.options.item.examples) {
|
if (self.options.item.examples) {
|
||||||
self.$examplesMenu = Ox.MenuButton({
|
self.$examplesMenu = Ox.MenuButton({
|
||||||
items: self.options.item.examples,
|
items: self.options.item.examples,
|
||||||
title: 'Examples...',
|
title: Ox._('Examples...'),
|
||||||
})
|
})
|
||||||
.css({float: 'right', margin: '4px 4px 4px 2px'})
|
.css({float: 'right', margin: '4px 4px 4px 2px'})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
|
|
@ -86,7 +86,7 @@ Ox.DocPanel = function(options, self) {
|
||||||
.appendTo(self.$toolbar);
|
.appendTo(self.$toolbar);
|
||||||
if (!self.options.results) {
|
if (!self.options.results) {
|
||||||
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'})
|
.css({margin: '4px auto'})
|
||||||
.bindEvent({click: runTests})
|
.bindEvent({click: runTests})
|
||||||
.appendTo(self.$toolbar);
|
.appendTo(self.$toolbar);
|
||||||
|
@ -152,7 +152,7 @@ Ox.DocPanel = function(options, self) {
|
||||||
var path = self.options.examplesPath + example;
|
var path = self.options.examplesPath + example;
|
||||||
Ox.get(path + '/index.html', function(html) {
|
Ox.get(path + '/index.html', function(html) {
|
||||||
var match = html.match(/<title>(.+)<\/title>/),
|
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) {
|
Ox.get(path + '/js/example.js', function(js) {
|
||||||
var references = js.match(self.options.references);
|
var references = js.match(self.options.references);
|
||||||
if (references) {
|
if (references) {
|
||||||
|
@ -386,7 +386,7 @@ Ox.DocPanel = function(options, self) {
|
||||||
width: 256,
|
width: 256,
|
||||||
textAlign: 'center'
|
textAlign: 'center'
|
||||||
})
|
})
|
||||||
.html('Generating Documentation...')
|
.html(Ox._('Generating Documentation...'))
|
||||||
.appendTo(self.$page);
|
.appendTo(self.$page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ Ox.ExamplePage = function(options, self) {
|
||||||
|
|
||||||
self.$homeButton = Ox.Button({
|
self.$homeButton = Ox.Button({
|
||||||
title: 'home',
|
title: 'home',
|
||||||
tooltip: 'Home',
|
tooltip: Ox._('Home'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left', margin: '4px 2px 4px 4px'})
|
.css({float: 'left', margin: '4px 2px 4px 4px'})
|
||||||
|
@ -54,7 +54,7 @@ Ox.ExamplePage = function(options, self) {
|
||||||
self.$openButton = Ox.Button({
|
self.$openButton = Ox.Button({
|
||||||
disabled: self.options.selected == 'source',
|
disabled: self.options.selected == 'source',
|
||||||
title: 'open',
|
title: 'open',
|
||||||
tooltip: 'Open in New Tab',
|
tooltip: Ox._('Open in New Tab'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'right', margin: '4px 4px 4px 2px'})
|
.css({float: 'right', margin: '4px 4px 4px 2px'})
|
||||||
|
@ -68,7 +68,7 @@ Ox.ExamplePage = function(options, self) {
|
||||||
self.$reloadButton = Ox.Button({
|
self.$reloadButton = Ox.Button({
|
||||||
disabled: self.options.selected == 'source',
|
disabled: self.options.selected == 'source',
|
||||||
title: 'redo',
|
title: 'redo',
|
||||||
tooltip: 'Reload',
|
tooltip: Ox._('Reload'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'right', margin: '4px 2px 4px 2px'})
|
.css({float: 'right', margin: '4px 2px 4px 2px'})
|
||||||
|
@ -82,7 +82,7 @@ Ox.ExamplePage = function(options, self) {
|
||||||
self.$switchButton = Ox.Button({
|
self.$switchButton = Ox.Button({
|
||||||
disabled: self.options.selected == 'source',
|
disabled: self.options.selected == 'source',
|
||||||
title: 'switch',
|
title: 'switch',
|
||||||
tooltip: 'Switch Theme',
|
tooltip: Ox._('Switch Theme'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'right', margin: '4px 2px 4px 2px'})
|
.css({float: 'right', margin: '4px 2px 4px 2px'})
|
||||||
|
@ -104,12 +104,12 @@ Ox.ExamplePage = function(options, self) {
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
id: 'source',
|
id: 'source',
|
||||||
title: 'View Source',
|
title: Ox._('View Source'),
|
||||||
width: 80
|
width: 80
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'live',
|
id: 'live',
|
||||||
title: 'View Live',
|
title: Ox._('View Live'),
|
||||||
width: 80
|
width: 80
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -119,7 +119,7 @@ Ox.ExamplePanel = function(options, self) {
|
||||||
var match = html.match(/<title>(.+)<\/title>/);
|
var match = html.match(/<title>(.+)<\/title>/);
|
||||||
item.title = match ? match[1] : 'Untitled';
|
item.title = match ? match[1] : 'Untitled';
|
||||||
match = html.match(/<meta http-equiv="Keywords" content="(.+)"\/>/);
|
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) {
|
Ox.get(item.js, function(js) {
|
||||||
var references = js.match(self.options.references);
|
var references = js.match(self.options.references);
|
||||||
item.references = references ? Ox.unique(references).sort(function(a, b) {
|
item.references = references ? Ox.unique(references).sort(function(a, b) {
|
||||||
|
|
|
@ -172,8 +172,8 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
: ''
|
: ''
|
||||||
) + (
|
) + (
|
||||||
self.options.editable
|
self.options.editable
|
||||||
? 'Click to select' + (
|
? Ox._('Click to select') + (
|
||||||
item.editable ? ', doubleclick to edit' : ''
|
item.editable ? Ox._(', doubleclick to edit') : ''
|
||||||
)
|
)
|
||||||
: ''
|
: ''
|
||||||
),
|
),
|
||||||
|
|
|
@ -131,7 +131,7 @@ Ox.FileInput = function(options, self) {
|
||||||
title: 'close',
|
title: 'close',
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.attr({title: 'Remove File'})
|
.attr({title: Ox._('Remove File')})
|
||||||
.css({margin: '-1px -4px 0 0'})
|
.css({margin: '-1px -4px 0 0'})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
|
@ -206,7 +206,7 @@ Ox.FileInput = function(options, self) {
|
||||||
}
|
}
|
||||||
self.$input = renderInput();
|
self.$input = renderInput();
|
||||||
} else {
|
} else {
|
||||||
self.$button.options({title: 'close'}).attr({title: 'Clear'});
|
self.$button.options({title: 'close'}).attr({title: Ox._('Clear')});
|
||||||
self.$input.remove();
|
self.$input.remove();
|
||||||
}
|
}
|
||||||
that.triggerEvent('change', {value: self.options.value});
|
that.triggerEvent('change', {value: self.options.value});
|
||||||
|
@ -257,9 +257,9 @@ Ox.FileInput = function(options, self) {
|
||||||
function getTitleText() {
|
function getTitleText() {
|
||||||
var length = self.options.value.length
|
var length = self.options.value.length
|
||||||
return length == 0
|
return length == 0
|
||||||
? 'No file' + (self.multiple ? 's' : '') + ' selected'
|
? Ox._('No file' + (self.multiple ? 's' : '') + ' selected')
|
||||||
: self.multiple
|
: self.multiple
|
||||||
? length + ' file' + (length == 1 ? '' : 's')
|
? Ox.formatCount(length, Ox._('file'), Ox._('files'))
|
||||||
: self.options.value[0].name;
|
: self.options.value[0].name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ Ox.FileInput = function(options, self) {
|
||||||
return $('<input>')
|
return $('<input>')
|
||||||
.attr(
|
.attr(
|
||||||
Ox.extend({
|
Ox.extend({
|
||||||
title: self.multiple ? 'Add Files' : 'Select File',
|
title: self.multiple ? Ox._('Add Files') : Ox._('Select File'),
|
||||||
type: 'file'
|
type: 'file'
|
||||||
}, self.multiple ? {
|
}, self.multiple ? {
|
||||||
multiple: true
|
multiple: true
|
||||||
|
|
|
@ -48,66 +48,66 @@ Ox.Filter = function(options, self) {
|
||||||
|
|
||||||
self.conditionOperators = {
|
self.conditionOperators = {
|
||||||
boolean: [
|
boolean: [
|
||||||
{id: '=', title: 'is'},
|
{id: '=', title: Ox._('is')},
|
||||||
{id: '!=', title: 'is not'}
|
{id: '!=', title: Ox._('is not')}
|
||||||
],
|
],
|
||||||
date: [
|
date: [
|
||||||
{id: '=', title: 'is'},
|
{id: '=', title: Ox._('is')},
|
||||||
{id: '!=', title: 'is not'},
|
{id: '!=', title: Ox._('is not')},
|
||||||
{id: '<', title: 'is before'},
|
{id: '<', title: Ox._('is before')},
|
||||||
{id: '!<', title: 'is not before'},
|
{id: '!<', title: Ox._('is not before')},
|
||||||
{id: '>', title: 'is after'},
|
{id: '>', title: Ox._('is after')},
|
||||||
{id: '!>', title: 'is not after'},
|
{id: '!>', title: Ox._('is not after')},
|
||||||
{id: '=,', title: 'is between'},
|
{id: '=,', title: Ox._('is between')},
|
||||||
{id: '!=,', title: 'is not between'}
|
{id: '!=,', title: Ox._('is not between')}
|
||||||
],
|
],
|
||||||
'enum': [
|
'enum': [
|
||||||
{id: '=', title: 'is'},
|
{id: '=', title: Ox._('is')},
|
||||||
{id: '!=', title: 'is not'},
|
{id: '!=', title: Ox._('is not')},
|
||||||
{id: '<', title: 'is less than'},
|
{id: '<', title: Ox._('is less than')},
|
||||||
{id: '!<', title: 'is not less than'},
|
{id: '!<', title: Ox._('is not less than')},
|
||||||
{id: '>', title: 'is greater than'},
|
{id: '>', title: Ox._('is greater than')},
|
||||||
{id: '!>', title: 'is not greater than'},
|
{id: '!>', title: Ox._('is not greater than')},
|
||||||
{id: '=,', title: 'is between'},
|
{id: '=,', title: Ox._('is between')},
|
||||||
{id: '!=,', title: 'is not between'}
|
{id: '!=,', title: Ox._('is not between')}
|
||||||
],
|
],
|
||||||
list: [
|
list: [
|
||||||
{id: '==', title: 'is'},
|
{id: '==', title: Ox._('is')},
|
||||||
{id: '!==', title: 'is not'}
|
{id: '!==', title: Ox._('is not')}
|
||||||
],
|
],
|
||||||
number: [
|
number: [
|
||||||
{id: '=', title: 'is'},
|
{id: '=', title: Ox._('is')},
|
||||||
{id: '!=', title: 'is not'},
|
{id: '!=', title: Ox._('is not')},
|
||||||
{id: '<', title: 'is less than'},
|
{id: '<', title: Ox._('is less than')},
|
||||||
{id: '!<', title: 'is not less than'},
|
{id: '!<', title: Ox._('is not less than')},
|
||||||
{id: '>', title: 'is greater than'},
|
{id: '>', title: Ox._('is greater than')},
|
||||||
{id: '!>', title: 'is not greater than'},
|
{id: '!>', title: Ox._('is not greater than')},
|
||||||
{id: '=,', title: 'is between'},
|
{id: '=,', title: Ox._('is between')},
|
||||||
{id: '!=,', title: 'is not between'}
|
{id: '!=,', title: Ox._('is not between')}
|
||||||
],
|
],
|
||||||
string: [
|
string: [
|
||||||
{id: '==', title: 'is'},
|
{id: '==', title: Ox._('is')},
|
||||||
{id: '!==', title: 'is not'},
|
{id: '!==', title: Ox._('is not')},
|
||||||
{id: '=', title: 'contains'},
|
{id: '=', title: Ox._('contains')},
|
||||||
{id: '!=', title: 'does not contain'},
|
{id: '!=', title: Ox._('does not contain')},
|
||||||
{id: '^', title: 'starts with'},
|
{id: '^', title: Ox._('starts with')},
|
||||||
{id: '!^', title: 'does not start with'},
|
{id: '!^', title: Ox._('does not start with')},
|
||||||
{id: '$', title: 'ends with'},
|
{id: '$', title: Ox._('ends with')},
|
||||||
{id: '!$', title: 'does not end with'}
|
{id: '!$', title: Ox._('does not end with')}
|
||||||
],
|
],
|
||||||
text: [
|
text: [
|
||||||
{id: '=', title: 'contains'},
|
{id: '=', title: Ox._('contains')},
|
||||||
{id: '!=', title: 'does not contain'}
|
{id: '!=', title: Ox._('does not contain')}
|
||||||
],
|
],
|
||||||
year: [
|
year: [
|
||||||
{id: '==', title: 'is'},
|
{id: '==', title: Ox._('is')},
|
||||||
{id: '!==', title: 'is not'},
|
{id: '!==', title: Ox._('is not')},
|
||||||
{id: '<', title: 'is before'},
|
{id: '<', title: Ox._('is before')},
|
||||||
{id: '!<', title: 'is not before'},
|
{id: '!<', title: Ox._('is not before')},
|
||||||
{id: '>', title: 'is after'},
|
{id: '>', title: Ox._('is after')},
|
||||||
{id: '!>', title: 'is not after'},
|
{id: '!>', title: Ox._('is not after')},
|
||||||
{id: '=,', title: 'is between'},
|
{id: '=,', title: Ox._('is between')},
|
||||||
{id: '!=,', title: 'is not between'}
|
{id: '!=,', title: Ox._('is not between')}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
self.defaultValue = {
|
self.defaultValue = {
|
||||||
|
@ -124,8 +124,8 @@ Ox.Filter = function(options, self) {
|
||||||
year: new Date().getFullYear().toString()
|
year: new Date().getFullYear().toString()
|
||||||
};
|
};
|
||||||
self.operators = [
|
self.operators = [
|
||||||
{id: '&', title: 'all'},
|
{id: '&', title: Ox._('all')},
|
||||||
{id: '|', title: 'any'}
|
{id: '|', title: Ox._('any')}
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!self.options.query.conditions.length) {
|
if (!self.options.query.conditions.length) {
|
||||||
|
@ -141,7 +141,7 @@ Ox.Filter = function(options, self) {
|
||||||
self.$operator = Ox.FormElementGroup({
|
self.$operator = Ox.FormElementGroup({
|
||||||
elements: [
|
elements: [
|
||||||
Ox.Label({
|
Ox.Label({
|
||||||
title: 'Match',
|
title: Ox._('Match'),
|
||||||
overlap: 'right',
|
overlap: 'right',
|
||||||
width: 48
|
width: 48
|
||||||
}),
|
}),
|
||||||
|
@ -157,7 +157,7 @@ Ox.Filter = function(options, self) {
|
||||||
}),
|
}),
|
||||||
Ox.Label({
|
Ox.Label({
|
||||||
overlap: 'left',
|
overlap: 'left',
|
||||||
title: 'of the following conditions',
|
title: Ox._('of the following conditions'),
|
||||||
width: 160
|
width: 160
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
@ -180,7 +180,7 @@ Ox.Filter = function(options, self) {
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
separators: [
|
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({
|
Ox.Select({
|
||||||
items: [
|
items: [
|
||||||
{id: 'items', title: 'items'},
|
{id: 'items', title: Ox._('items')},
|
||||||
{},
|
{},
|
||||||
{id: 'hours', title: 'hours'},
|
{id: 'hours', title: Ox._('hours')},
|
||||||
{id: 'days', title: 'days'},
|
{id: 'days', title: Ox._('days')},
|
||||||
{},
|
{},
|
||||||
{id: 'GB', title: 'GB'}
|
{id: 'GB', title: 'GB'}
|
||||||
],
|
],
|
||||||
|
@ -219,14 +219,14 @@ Ox.Filter = function(options, self) {
|
||||||
elements: [
|
elements: [
|
||||||
Ox.Select({
|
Ox.Select({
|
||||||
items: [
|
items: [
|
||||||
{id: 'ascending', title: 'ascending'},
|
{id: 'ascending', title: Ox._('ascending')},
|
||||||
{id: 'descending', title: 'descending'}
|
{id: 'descending', title: Ox._('descending')}
|
||||||
],
|
],
|
||||||
width: 128
|
width: 128
|
||||||
}),
|
}),
|
||||||
Ox.Label({
|
Ox.Label({
|
||||||
overlap: 'left',
|
overlap: 'left',
|
||||||
title: 'order',
|
title: Ox._('order'),
|
||||||
width: 72
|
width: 72
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
@ -235,9 +235,9 @@ Ox.Filter = function(options, self) {
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
separators: [
|
separators: [
|
||||||
{title: 'Limit to', width: 56},
|
{title: Ox._('Limit to'), width: 56},
|
||||||
{title: 'sorted by', width: 60}, // fixme: this is odd, should be 64
|
{title: Ox._('sorted by'), width: 60}, // fixme: this is odd, should be 64
|
||||||
{title: 'in', width: 32}
|
{title: Ox._('in'), width: 32}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -258,14 +258,14 @@ Ox.Filter = function(options, self) {
|
||||||
elements: [
|
elements: [
|
||||||
Ox.Select({
|
Ox.Select({
|
||||||
items: [
|
items: [
|
||||||
{id: 'ascending', title: 'ascending'},
|
{id: 'ascending', title: Ox._('ascending')},
|
||||||
{id: 'descending', title: 'descending'}
|
{id: 'descending', title: Ox._('descending')}
|
||||||
],
|
],
|
||||||
width: 128
|
width: 128
|
||||||
}),
|
}),
|
||||||
Ox.Label({
|
Ox.Label({
|
||||||
overlap: 'left',
|
overlap: 'left',
|
||||||
title: 'order',
|
title: Ox._('order'),
|
||||||
width: 72
|
width: 72
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
@ -274,9 +274,9 @@ Ox.Filter = function(options, self) {
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
separators: [
|
separators: [
|
||||||
{title: 'View', width: 48},
|
{title: Ox._('View'), width: 48},
|
||||||
{title: 'sorted by', width: 60},
|
{title: Ox._('sorted by'), width: 60},
|
||||||
{title: 'in', width: 32}
|
{title: Ox._('in'), width: 32}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -453,9 +453,9 @@ Ox.Filter = function(options, self) {
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
id: 'remove',
|
id: 'remove',
|
||||||
title: self.options.query.conditions.length == 1 ? 'close' : 'remove',
|
title: self.options.query.conditions.length == 1 ? 'close' : 'remove',
|
||||||
tooltip: self.options.query.conditions.length == 1 ? 'Reset this condition'
|
tooltip: self.options.query.conditions.length == 1 ? Ox._('Reset this condition')
|
||||||
: isGroup ? 'Remove this group of conditions'
|
: isGroup ? Ox._('Remove this group of conditions')
|
||||||
: 'Remove this condition',
|
: Ox._('Remove this condition'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({margin: '0 4px 0 ' + (isGroup ? '292px' : '8px')}) // fixme: 296 is probably correct, but labels seem to be too wide
|
.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({
|
Ox.Button({
|
||||||
id: 'add',
|
id: 'add',
|
||||||
title: 'add',
|
title: Ox._('add'),
|
||||||
tooltip: 'Add a condition',
|
tooltip: Ox._('Add a condition'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({margin: '0 ' + (subpos == -1 ? '4px' : '0') + ' 0 4px'})
|
.css({margin: '0 ' + (subpos == -1 ? '4px' : '0') + ' 0 4px'})
|
||||||
|
@ -504,8 +504,8 @@ Ox.Filter = function(options, self) {
|
||||||
], subpos == -1 ? [
|
], subpos == -1 ? [
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
id: 'addgroup',
|
id: 'addgroup',
|
||||||
title: 'bracket',
|
title: Ox._('bracket'),
|
||||||
tooltip: 'Add a group of conditions',
|
tooltip: Ox._('Add a group of conditions'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({margin: '0 0 0 4px'})
|
.css({margin: '0 0 0 4px'})
|
||||||
|
@ -587,7 +587,7 @@ Ox.Filter = function(options, self) {
|
||||||
renderInput(condition, 1).options({id: 'end'})
|
renderInput(condition, 1).options({id: 'end'})
|
||||||
],
|
],
|
||||||
separators: [
|
separators: [
|
||||||
{title: 'and', width: 32}
|
{title: Ox._('and'), width: 32}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
).bindEvent({
|
).bindEvent({
|
||||||
|
@ -654,7 +654,7 @@ Ox.Filter = function(options, self) {
|
||||||
}),
|
}),
|
||||||
Ox.Label({
|
Ox.Label({
|
||||||
overlap: 'left',
|
overlap: 'left',
|
||||||
title: 'of the following conditions',
|
title: Ox._('of the following conditions'),
|
||||||
width: 160
|
width: 160
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
|
|
@ -40,7 +40,7 @@ Ox.FormPanel = function(options, self) {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
id: 'valid',
|
id: 'valid',
|
||||||
title: 'Valid',
|
title: Ox._('Valid'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 16
|
width: 16
|
||||||
},
|
},
|
||||||
|
@ -51,7 +51,7 @@ Ox.FormPanel = function(options, self) {
|
||||||
}) + 1) + '. ' + value;
|
}) + 1) + '. ' + value;
|
||||||
},
|
},
|
||||||
id: 'title',
|
id: 'title',
|
||||||
title: 'Title',
|
title: Ox._('Title'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 240
|
width: 240
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,24 +22,24 @@ Ox.InsertHTMLDialog = function(options, self) {
|
||||||
? 'textarea' : 'input';
|
? 'textarea' : 'input';
|
||||||
|
|
||||||
self.items = [
|
self.items = [
|
||||||
{id: 'img', title: 'Image'},
|
{id: 'img', title: Ox._('Image')},
|
||||||
{id: 'a', title: 'Link'},
|
{id: 'a', title: Ox._('Link')},
|
||||||
{id: 'li', title: 'List'},
|
{id: 'li', title: Ox._('List')},
|
||||||
{},
|
{},
|
||||||
{id: 'blockquote', title: 'Blockquote'},
|
{id: 'blockquote', title: Ox._('Blockquote')},
|
||||||
{id: 'h1', title: 'Headline'},
|
{id: 'h1', title: Ox._('Headline')},
|
||||||
{id: 'p', title: 'Paragraph'},
|
{id: 'p', title: Ox._('Paragraph')},
|
||||||
{id: 'div', title: 'Right-to-Left'},
|
{id: 'div', title: Ox._('Right-to-Left')},
|
||||||
{},
|
{},
|
||||||
{id: 'b', title: 'Bold'},
|
{id: 'b', title: Ox._('Bold')},
|
||||||
{id: 'i', title: 'Italic'},
|
{id: 'i', title: Ox._('Italic')},
|
||||||
{id: 'code', title: 'Monospace'},
|
{id: 'code', title: Ox._('Monospace')},
|
||||||
{id: 's', title: 'Strike'},
|
{id: 's', title: Ox._('Strike')},
|
||||||
{id: 'sub', title: 'Subscript'},
|
{id: 'sub', title: Ox._('Subscript')},
|
||||||
{id: 'sup', title: 'Superscript'},
|
{id: 'sup', title: Ox._('Superscript')},
|
||||||
{id: 'u', title: 'Underline'},
|
{id: 'u', title: Ox._('Underline')},
|
||||||
{},
|
{},
|
||||||
{id: 'br', title: 'Linebreak'}
|
{id: 'br', title: Ox._('Linebreak')}
|
||||||
].map(function(item, i) {
|
].map(function(item, i) {
|
||||||
var form, format;
|
var form, format;
|
||||||
if (item.id == 'img') {
|
if (item.id == 'img') {
|
||||||
|
@ -81,8 +81,8 @@ Ox.InsertHTMLDialog = function(options, self) {
|
||||||
Ox.Select({
|
Ox.Select({
|
||||||
id: 'style',
|
id: 'style',
|
||||||
items: [
|
items: [
|
||||||
{id: 'ul', title: 'Bullets'},
|
{id: 'ul', title: Ox._('Bullets')},
|
||||||
{id: 'ol', title: 'Numbers'}
|
{id: 'ol', title: Ox._('Numbers')}
|
||||||
],
|
],
|
||||||
label: 'Style',
|
label: 'Style',
|
||||||
labelWidth: 128,
|
labelWidth: 128,
|
||||||
|
@ -168,7 +168,7 @@ Ox.InsertHTMLDialog = function(options, self) {
|
||||||
buttons: [
|
buttons: [
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
id: 'cancel',
|
id: 'cancel',
|
||||||
title: 'Cancel',
|
title: Ox._('Cancel'),
|
||||||
width: 64
|
width: 64
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -178,7 +178,7 @@ Ox.InsertHTMLDialog = function(options, self) {
|
||||||
}),
|
}),
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
id: 'insert',
|
id: 'insert',
|
||||||
title: 'Insert',
|
title: Ox._('Insert'),
|
||||||
width: 64
|
width: 64
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -201,7 +201,7 @@ Ox.InsertHTMLDialog = function(options, self) {
|
||||||
content: self.$content,
|
content: self.$content,
|
||||||
height: 184,
|
height: 184,
|
||||||
keys: {enter: 'insert', escape: 'cancel'},
|
keys: {enter: 'insert', escape: 'cancel'},
|
||||||
title: 'Insert HTML',
|
title: Ox._('Insert HTML'),
|
||||||
width: 416 + Ox.UI.SCROLLBAR_SIZE
|
width: 416 + Ox.UI.SCROLLBAR_SIZE
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ Ox.Picker = function(options, self) {
|
||||||
.appendTo(self.$bar);
|
.appendTo(self.$bar);
|
||||||
|
|
||||||
self.$doneButton = Ox.Button({
|
self.$doneButton = Ox.Button({
|
||||||
title: 'Done',
|
title: Ox._('Done'),
|
||||||
width: 48
|
width: 48
|
||||||
})
|
})
|
||||||
.click(hideMenu)
|
.click(hideMenu)
|
||||||
|
|
|
@ -36,7 +36,7 @@ Ox.PlacePicker = function(options, self) {
|
||||||
self.$input = Ox.Input({
|
self.$input = Ox.Input({
|
||||||
clear: true,
|
clear: true,
|
||||||
id: self.options.id + 'Input',
|
id: self.options.id + 'Input',
|
||||||
placeholder: 'Find',
|
placeholder: Ox._('Find'),
|
||||||
width: 256
|
width: 256
|
||||||
})
|
})
|
||||||
.bindEvent('submit', findPlace)
|
.bindEvent('submit', findPlace)
|
||||||
|
|
|
@ -128,9 +128,9 @@ Ox.Spreadsheet = function(options, self) {
|
||||||
style: 'square',
|
style: 'square',
|
||||||
type: 'image',
|
type: 'image',
|
||||||
items: [
|
items: [
|
||||||
{id: 'before', title: 'Add column before'},
|
{id: 'before', title: Ox._('Add column before')},
|
||||||
{id: 'after', title: 'Add column after'},
|
{id: 'after', title: Ox._('Add column after')},
|
||||||
{id: 'remove', title: 'Remove this column', disabled: self.columns == 1}
|
{id: 'remove', title: Ox._('Remove this column'), disabled: self.columns == 1}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -166,9 +166,9 @@ Ox.Spreadsheet = function(options, self) {
|
||||||
style: 'square',
|
style: 'square',
|
||||||
type: 'image',
|
type: 'image',
|
||||||
items: [
|
items: [
|
||||||
{id: 'before', title: 'Add row above'},
|
{id: 'before', title: Ox._('Add row above')},
|
||||||
{id: 'after', title: 'Add row below'},
|
{id: 'after', title: Ox._('Add row below')},
|
||||||
{id: 'remove', title: 'Remove this row', disabled: self.rows == 1}
|
{id: 'remove', title: Ox._('Remove this row'), disabled: self.rows == 1}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
|
|
@ -290,20 +290,20 @@ Ox.Map = function(options, self) {
|
||||||
{
|
{
|
||||||
id: 'toggleLabels',
|
id: 'toggleLabels',
|
||||||
title: self.options.showLabels
|
title: self.options.showLabels
|
||||||
? ['Hide Labels', 'Show Labels']
|
? [Ox._('Hide Labels'), Ox._('Show Labels')]
|
||||||
: ['Show Labels', 'Hide Labels'],
|
: [Ox._('Show Labels'), Ox._('Hide Labels')],
|
||||||
keyboard: 'l'
|
keyboard: 'l'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'toggleControls',
|
id: 'toggleControls',
|
||||||
title: self.options.showControls
|
title: self.options.showControls
|
||||||
? ['Hide Controls', 'Show Controls']
|
? [Ox._('Hide Controls'), Ox._('Show Controls')]
|
||||||
: ['Show Controls', 'Hide Controls'],
|
: [Ox._('Show Controls'), Ox._('Hide Controls')],
|
||||||
keyboard: 'c'
|
keyboard: 'c'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
title: 'set',
|
title: 'set',
|
||||||
tooltip: 'Map Options',
|
tooltip: Ox._('Map Options'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left', margin: '4px'})
|
.css({float: 'left', margin: '4px'})
|
||||||
|
@ -482,7 +482,7 @@ Ox.Map = function(options, self) {
|
||||||
}),
|
}),
|
||||||
name: Ox.Label({
|
name: Ox.Label({
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
tooltip: 'Click to pan, doubleclick to zoom'
|
tooltip: Ox._('Click to pan, doubleclick to zoom')
|
||||||
})
|
})
|
||||||
.addClass('OxPlaceControl OxPlaceName')
|
.addClass('OxPlaceControl OxPlaceName')
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -495,7 +495,7 @@ Ox.Map = function(options, self) {
|
||||||
}),
|
}),
|
||||||
deselectButton: Ox.Button({
|
deselectButton: Ox.Button({
|
||||||
title: 'close',
|
title: 'close',
|
||||||
tooltip: 'Deselect',
|
tooltip: Ox._('Deselect'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.addClass('OxPlaceControl OxPlaceDeselectButton')
|
.addClass('OxPlaceControl OxPlaceDeselectButton')
|
||||||
|
@ -626,9 +626,9 @@ Ox.Map = function(options, self) {
|
||||||
function clickPlaceButton() {
|
function clickPlaceButton() {
|
||||||
var place = getSelectedPlace(),
|
var place = getSelectedPlace(),
|
||||||
title = self.$placeButton.options('title');
|
title = self.$placeButton.options('title');
|
||||||
if (title == 'New Place') {
|
if (title == Ox._('New Place')) {
|
||||||
addPlaceToMap();
|
addPlaceToMap();
|
||||||
} else if (title == 'Add Place') {
|
} else if (title == Ox._('Add Place')) {
|
||||||
addPlaceToPlaces();
|
addPlaceToPlaces();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1279,9 +1279,9 @@ Ox.Map = function(options, self) {
|
||||||
code = country ? country.code : 'NTHH';
|
code = country ? country.code : 'NTHH';
|
||||||
disabled = place && !place.editable;
|
disabled = place && !place.editable;
|
||||||
if (place) {
|
if (place) {
|
||||||
title = place.id[0] == '_' ? 'Add Place' : 'Remove Place';
|
title = place.id[0] == '_' ? Ox._('Add Place') : Ox._('Remove Place');
|
||||||
} else {
|
} else {
|
||||||
title = 'New Place';
|
title = Ox._('New Place');
|
||||||
}
|
}
|
||||||
self.$placeFlag.attr({
|
self.$placeFlag.attr({
|
||||||
src: Ox.PATH + 'Ox.Geo/png/icons/16/' + code + '.png'
|
src: Ox.PATH + 'Ox.Geo/png/icons/16/' + code + '.png'
|
||||||
|
|
|
@ -102,7 +102,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
}
|
}
|
||||||
return names.reverse().join(', ');
|
return names.reverse().join(', ');
|
||||||
},
|
},
|
||||||
title: 'Flag',
|
title: Ox._('Flag'),
|
||||||
titleImage: 'flag',
|
titleImage: 'flag',
|
||||||
tooltip: function(data) {
|
tooltip: function(data) {
|
||||||
return Ox.toTitleCase(data.geoname || '')
|
return Ox.toTitleCase(data.geoname || '')
|
||||||
|
@ -136,7 +136,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'type',
|
id: 'type',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'Type',
|
title: Ox._('Type'),
|
||||||
titleImage: 'icon',
|
titleImage: 'icon',
|
||||||
tooltip: function(data) {
|
tooltip: function(data) {
|
||||||
return Ox.toTitleCase(data.type || '');
|
return Ox.toTitleCase(data.type || '');
|
||||||
|
@ -153,7 +153,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
id: 'name',
|
id: 'name',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
removable: false,
|
removable: false,
|
||||||
title: 'Name',
|
title: Ox._('Name'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 144
|
width: 144
|
||||||
},
|
},
|
||||||
|
@ -163,7 +163,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'alternativeNames',
|
id: 'alternativeNames',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'Alternative Names',
|
title: Ox._('Alternative Names'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 144
|
width: 144
|
||||||
},
|
},
|
||||||
|
@ -177,7 +177,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
}
|
}
|
||||||
return names.reverse().join(', ');
|
return names.reverse().join(', ');
|
||||||
},
|
},
|
||||||
title: 'Geoname',
|
title: Ox._('Geoname'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 192
|
width: 192
|
||||||
},
|
},
|
||||||
|
@ -186,7 +186,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
format: toFixed,
|
format: toFixed,
|
||||||
id: 'lat',
|
id: 'lat',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'Latitude',
|
title: Ox._('Latitude'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 64
|
width: 64
|
||||||
},
|
},
|
||||||
|
@ -195,7 +195,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
format: toFixed,
|
format: toFixed,
|
||||||
id: 'lng',
|
id: 'lng',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'Longitude',
|
title: Ox._('Longitude'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 64
|
width: 64
|
||||||
},
|
},
|
||||||
|
@ -204,7 +204,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
format: toFixed,
|
format: toFixed,
|
||||||
id: 'south',
|
id: 'south',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'South',
|
title: Ox._('South'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 64
|
width: 64
|
||||||
},
|
},
|
||||||
|
@ -212,7 +212,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
align: 'right',
|
align: 'right',
|
||||||
id: 'west',
|
id: 'west',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'West',
|
title: Ox._('West'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 64
|
width: 64
|
||||||
},
|
},
|
||||||
|
@ -221,7 +221,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
format: toFixed,
|
format: toFixed,
|
||||||
id: 'north',
|
id: 'north',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'North',
|
title: Ox._('North'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 64
|
width: 64
|
||||||
},
|
},
|
||||||
|
@ -230,7 +230,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
format: toFixed,
|
format: toFixed,
|
||||||
id: 'east',
|
id: 'east',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'East',
|
title: Ox._('East'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 64
|
width: 64
|
||||||
},
|
},
|
||||||
|
@ -239,7 +239,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
format: {type: 'area', args: []},
|
format: {type: 'area', args: []},
|
||||||
id: 'area',
|
id: 'area',
|
||||||
operator: '-',
|
operator: '-',
|
||||||
title: 'Area',
|
title: Ox._('Area'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 128
|
width: 128
|
||||||
},
|
},
|
||||||
|
@ -249,7 +249,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'user',
|
id: 'user',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: 'User',
|
title: Ox._('User'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 96
|
width: 96
|
||||||
},
|
},
|
||||||
|
@ -259,7 +259,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'created',
|
id: 'created',
|
||||||
operator: '-',
|
operator: '-',
|
||||||
title: 'Date Created',
|
title: Ox._('Date Created'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 128
|
width: 128
|
||||||
},
|
},
|
||||||
|
@ -269,7 +269,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
},
|
},
|
||||||
id: 'modified',
|
id: 'modified',
|
||||||
operator: '-',
|
operator: '-',
|
||||||
title: 'Date Modified',
|
title: Ox._('Date Modified'),
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 128
|
width: 128
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
align: 'right',
|
align: 'right',
|
||||||
id: 'matches',
|
id: 'matches',
|
||||||
operator: '-',
|
operator: '-',
|
||||||
title: 'Matches',
|
title: Ox._('Matches'),
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 64
|
width: 64
|
||||||
});
|
});
|
||||||
|
@ -292,10 +292,10 @@ Ox.MapEditor = function(options, self) {
|
||||||
elements: [
|
elements: [
|
||||||
self.$findSelect = Ox.Select({
|
self.$findSelect = Ox.Select({
|
||||||
items: [
|
items: [
|
||||||
{id: 'all', title: 'Find: All'},
|
{id: 'all', title: Ox._('Find: All')},
|
||||||
{id: 'name', title: 'Find: Name'},
|
{id: 'name', title: Ox._('Find: Name')},
|
||||||
{id: 'alternativeNames', title: 'Find: Alternative Names'},
|
{id: 'alternativeNames', title: Ox._('Find: Alternative Names')},
|
||||||
{id: 'geoname', title: 'Find: Geoname'}
|
{id: 'geoname', title: Ox._('Find: Geoname')}
|
||||||
],
|
],
|
||||||
overlap: 'right',
|
overlap: 'right',
|
||||||
type: 'image'
|
type: 'image'
|
||||||
|
@ -433,7 +433,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
if (self.options.mode == 'define') {
|
if (self.options.mode == 'define') {
|
||||||
self.$findPlaceButton = Ox.Button({
|
self.$findPlaceButton = Ox.Button({
|
||||||
title: 'find',
|
title: 'find',
|
||||||
tooltip: 'Find',
|
tooltip: Ox._('Find'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left', margin: '4px'})
|
.css({float: 'left', margin: '4px'})
|
||||||
|
@ -466,7 +466,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
.appendTo(self.$placeTitle);
|
.appendTo(self.$placeTitle);
|
||||||
self.$deselectPlaceButton = Ox.Button({
|
self.$deselectPlaceButton = Ox.Button({
|
||||||
title: 'close',
|
title: 'close',
|
||||||
tooltip: 'Done',
|
tooltip: Ox._('Done'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left', margin: '4px'})
|
.css({float: 'left', margin: '4px'})
|
||||||
|
@ -485,13 +485,13 @@ Ox.MapEditor = function(options, self) {
|
||||||
items: [].concat([
|
items: [].concat([
|
||||||
self.$nameInput = Ox.Input({
|
self.$nameInput = Ox.Input({
|
||||||
id: 'name',
|
id: 'name',
|
||||||
label: 'Name',
|
label: Ox._('Name'),
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
width: 240
|
width: 240
|
||||||
}),
|
}),
|
||||||
self.$alternativeNamesInput = Ox.ArrayInput({
|
self.$alternativeNamesInput = Ox.ArrayInput({
|
||||||
id: 'alternativeNames',
|
id: 'alternativeNames',
|
||||||
label: 'Alternative Names',
|
label: Ox._('Alternative Names'),
|
||||||
max: 10,
|
max: 10,
|
||||||
//sort: true,
|
//sort: true,
|
||||||
values: [],
|
values: [],
|
||||||
|
@ -499,7 +499,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
}),
|
}),
|
||||||
self.$geonameInput = Ox.Input({
|
self.$geonameInput = Ox.Input({
|
||||||
id: 'geoname',
|
id: 'geoname',
|
||||||
label: 'Geoname',
|
label: Ox._('Geoname'),
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
width: 240
|
width: 240
|
||||||
}),
|
}),
|
||||||
|
@ -509,15 +509,15 @@ Ox.MapEditor = function(options, self) {
|
||||||
Ox.Select({
|
Ox.Select({
|
||||||
id: 'type',
|
id: 'type',
|
||||||
items: [
|
items: [
|
||||||
{id: 'country', title: 'Country'},
|
{id: 'country', title: Ox._('Country')},
|
||||||
{id: 'region', title: 'Region'}, // administative (Kansas) or colloquial (Midwest)
|
{id: 'region', title: Ox._('Region')}, // administative (Kansas) or colloquial (Midwest)
|
||||||
{id: 'city', title: 'City'},
|
{id: 'city', title: Ox._('City')},
|
||||||
{id: 'borough', title: 'Borough'},
|
{id: 'borough', title: Ox._('Borough')},
|
||||||
{id: 'street', title: 'Street'}, // streets, squares, bridges, tunnels, ...
|
{id: 'street', title: Ox._('Street')}, // streets, squares, bridges, tunnels, ...
|
||||||
{id: 'building', title: 'Building'}, // airports, stations, stadiums, military installations, ...
|
{id: 'building', title: Ox._('Building')}, // airports, stations, stadiums, military installations, ...
|
||||||
{id: 'feature', title: 'Feature'} // continents, islands, rivers, lakes, seas, oceans, mountains...
|
{id: 'feature', title: Ox._('Feature')} // continents, islands, rivers, lakes, seas, oceans, mountains...
|
||||||
],
|
],
|
||||||
label: 'Type',
|
label: Ox._('Type'),
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
width: 240
|
width: 240
|
||||||
})
|
})
|
||||||
|
@ -531,7 +531,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
decimals: 8,
|
decimals: 8,
|
||||||
disabled: ['lat', 'lng'].indexOf(id) > -1,
|
disabled: ['lat', 'lng'].indexOf(id) > -1,
|
||||||
id: id,
|
id: id,
|
||||||
label: v,
|
label: Ox._(v),
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
min: -max,
|
min: -max,
|
||||||
max: max,
|
max: max,
|
||||||
|
@ -615,7 +615,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
self.$areaKmInput = Ox.Input({
|
self.$areaKmInput = Ox.Input({
|
||||||
disabled: true,
|
disabled: true,
|
||||||
id: 'areaKm',
|
id: 'areaKm',
|
||||||
label: 'Area',
|
label: Ox._('Area'),
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
width: 240
|
width: 240
|
||||||
|
@ -628,7 +628,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
self.$matchesInput = Ox.Input({
|
self.$matchesInput = Ox.Input({
|
||||||
disabled: true,
|
disabled: true,
|
||||||
id: 'matches',
|
id: 'matches',
|
||||||
label: 'Matches',
|
label: Ox._('Matches'),
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
type: 'int',
|
type: 'int',
|
||||||
width: 240
|
width: 240
|
||||||
|
@ -643,13 +643,13 @@ Ox.MapEditor = function(options, self) {
|
||||||
});
|
});
|
||||||
|
|
||||||
self.$addPlaceButton = Ox.Button({
|
self.$addPlaceButton = Ox.Button({
|
||||||
title: 'Add Place',
|
title: Ox._('Add Place'),
|
||||||
width: 90
|
width: 90
|
||||||
})
|
})
|
||||||
.css({float: 'left', margin: '4px'})
|
.css({float: 'left', margin: '4px'})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
if (this.options('title') == 'Add Place') {
|
if (this.options('title') == Ox._('Add Place')) {
|
||||||
addPlace();
|
addPlace();
|
||||||
} else {
|
} else {
|
||||||
removePlace();
|
removePlace();
|
||||||
|
@ -660,7 +660,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
.appendTo(self.$placeStatusbar);
|
.appendTo(self.$placeStatusbar);
|
||||||
|
|
||||||
self.$newPlaceButton = Ox.Button({
|
self.$newPlaceButton = Ox.Button({
|
||||||
title: 'New Place',
|
title: Ox._('New Place'),
|
||||||
width: 70
|
width: 70
|
||||||
})
|
})
|
||||||
.css({float: 'right', margin: '4px'})
|
.css({float: 'right', margin: '4px'})
|
||||||
|
@ -673,13 +673,13 @@ Ox.MapEditor = function(options, self) {
|
||||||
|
|
||||||
if (self.options.mode == 'define') {
|
if (self.options.mode == 'define') {
|
||||||
self.$definePlaceButton = Ox.Button({
|
self.$definePlaceButton = Ox.Button({
|
||||||
title: 'Define Place',
|
title: Ox._('Define Place'),
|
||||||
width: 80
|
width: 80
|
||||||
})
|
})
|
||||||
.css({float: 'right', margin: '4px 0 4px 0'})
|
.css({float: 'right', margin: '4px 0 4px 0'})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
if (this.options('title') == 'Define Place') {
|
if (this.options('title') == Ox._('Define Place')) {
|
||||||
definePlace();
|
definePlace();
|
||||||
} else {
|
} else {
|
||||||
clearPlace();
|
clearPlace();
|
||||||
|
@ -797,10 +797,10 @@ Ox.MapEditor = function(options, self) {
|
||||||
selected: [place.id]
|
selected: [place.id]
|
||||||
});
|
});
|
||||||
self.$map.addPlace(place);
|
self.$map.addPlace(place);
|
||||||
self.$addPlaceButton.options({title: 'Remove Place'});
|
self.$addPlaceButton.options({title: Ox._('Remove Place')});
|
||||||
//setStatus();
|
//setStatus();
|
||||||
} else {
|
} else {
|
||||||
self.$addPlaceButton.options({disabled: true, title: 'Adding...'});
|
self.$addPlaceButton.options({disabled: true, title: Ox._('Adding...')});
|
||||||
self.options.addPlace(encodeValues(place), function(result) {
|
self.options.addPlace(encodeValues(place), function(result) {
|
||||||
if (result.status.code == 200) {
|
if (result.status.code == 200) {
|
||||||
place.id = result.data.id;
|
place.id = result.data.id;
|
||||||
|
@ -813,18 +813,18 @@ Ox.MapEditor = function(options, self) {
|
||||||
).show();
|
).show();
|
||||||
self.options.mode == 'define' && self.$definePlaceButton.options({
|
self.options.mode == 'define' && self.$definePlaceButton.options({
|
||||||
disabled: !result.data.matches,
|
disabled: !result.data.matches,
|
||||||
title: 'Clear Place'
|
title: Ox._('Clear Place')
|
||||||
}).show();
|
}).show();
|
||||||
self.$addPlaceButton.options({
|
self.$addPlaceButton.options({
|
||||||
disabled: false,
|
disabled: false,
|
||||||
title: 'Remove Place'
|
title: Ox._('Remove Place')
|
||||||
}).show();
|
}).show();
|
||||||
} else if (result.status.code == 409) {
|
} else if (result.status.code == 409) {
|
||||||
if (result.data.names.indexOf(self.$nameInput.value()) > -1) {
|
if (result.data.names.indexOf(self.$nameInput.value()) > -1) {
|
||||||
self.$nameInput.addClass('OxError');
|
self.$nameInput.addClass('OxError');
|
||||||
}
|
}
|
||||||
self.$alternativeNamesInput.setErrors(result.data.names);
|
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,
|
lat: null, lng: null,
|
||||||
south: null, west: null, north: null, east: null, area: 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.options.editPlace(values, function() {
|
||||||
self.$map.removePlace();
|
self.$map.removePlace();
|
||||||
self.$list.reloadList();
|
self.$list.reloadList();
|
||||||
self.$findPlaceButton.show();
|
self.$findPlaceButton.show();
|
||||||
self.$placeFlag.hide();
|
self.$placeFlag.hide();
|
||||||
hideForm();
|
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() {
|
function definePlace() {
|
||||||
self.$map.newPlace(); // this will call selectPlace, then editPlace
|
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) {
|
function encodeValues(place) {
|
||||||
|
@ -912,7 +912,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
if (self.options.mode == 'define') {
|
if (self.options.mode == 'define') {
|
||||||
self.$definePlaceButton.options({
|
self.$definePlaceButton.options({
|
||||||
disabled: !result.data.matches,
|
disabled: !result.data.matches,
|
||||||
title: 'Clear Place'
|
title: Ox._('Clear Place')
|
||||||
});
|
});
|
||||||
self.$addPlaceButton.options({
|
self.$addPlaceButton.options({
|
||||||
disabled: !!result.data.matches
|
disabled: !!result.data.matches
|
||||||
|
@ -979,12 +979,12 @@ Ox.MapEditor = function(options, self) {
|
||||||
self.options.selected = '';
|
self.options.selected = '';
|
||||||
self.options.places.splice(index, 1);
|
self.options.places.splice(index, 1);
|
||||||
self.$list.options({items: Ox.clone(self.options.places)});
|
self.$list.options({items: Ox.clone(self.options.places)});
|
||||||
self.$addPlaceButton.options({title: 'Add Place'});
|
self.$addPlaceButton.options({title: Ox._('Add Place')});
|
||||||
//setStatus();
|
//setStatus();
|
||||||
}
|
}
|
||||||
// fixme: what is this? both options.removePlace and event removeplace??
|
// fixme: what is this? both options.removePlace and event removeplace??
|
||||||
if (self.isAsync) {
|
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.removePlace({id: self.selectedPlace}, function() {
|
||||||
self.options.selected = '';
|
self.options.selected = '';
|
||||||
self.$list.options({selected: []}).reloadList(true);
|
self.$list.options({selected: []}).reloadList(true);
|
||||||
|
@ -992,7 +992,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
self.options.mode == 'define' && self.$definePlaceButton.options({
|
self.options.mode == 'define' && self.$definePlaceButton.options({
|
||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
self.$addPlaceButton.options({disabled: false, title: 'Add Place'});
|
self.$addPlaceButton.options({disabled: false, title: Ox._('Add Place')});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
self.$map.removePlace();
|
self.$map.removePlace();
|
||||||
|
@ -1029,7 +1029,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
}).show();
|
}).show();
|
||||||
self.$addPlaceButton.options({
|
self.$addPlaceButton.options({
|
||||||
disabled: self.options.mode == 'define' && !!place.matches,
|
disabled: self.options.mode == 'define' && !!place.matches,
|
||||||
title: 'Remove Place'
|
title: Ox._('Remove Place')
|
||||||
}).show();
|
}).show();
|
||||||
} else {
|
} else {
|
||||||
self.$placeTitle.hide();
|
self.$placeTitle.hide();
|
||||||
|
@ -1077,7 +1077,7 @@ Ox.MapEditor = function(options, self) {
|
||||||
getMatches(place);
|
getMatches(place);
|
||||||
}
|
}
|
||||||
self.options.mode == 'define' && self.$definePlaceButton.hide();
|
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) {
|
} else if (!self.selectedPlace && !self.options.selected) {
|
||||||
// deselect result place
|
// deselect result place
|
||||||
self.$placeFlag.hide();
|
self.$placeFlag.hide();
|
||||||
|
|
|
@ -122,7 +122,7 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
id: 'add',
|
id: 'add',
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'add',
|
title: 'add',
|
||||||
tooltip: 'Add ' + self.options.item,
|
tooltip: Ox._('Add {0}', self.options.item),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -238,7 +238,7 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
.appendTo(self.$inner);
|
.appendTo(self.$inner);
|
||||||
}
|
}
|
||||||
self.$resizebar = Ox.Element({
|
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')
|
.addClass('OxResizebar OxHorizontal')
|
||||||
.css({
|
.css({
|
||||||
|
|
|
@ -205,19 +205,19 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
annotationTitle = folder.options('item') + ': "' + value + '"';
|
annotationTitle = folder.options('item') + ': "' + value + '"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
manageTitle = (isDefined ? 'Edit' : 'Define') + ' '
|
manageTitle = Ox._((isDefined ? 'Edit' : 'Define') + ' '
|
||||||
+ (isPlace ? 'Place' : isEvent ? 'Event' : 'Place or Event') + '...'
|
+ (isPlace ? 'Place' : isEvent ? 'Event' : 'Place or Event') + '...');
|
||||||
self.$editMenuButton && self.$editMenuButton.remove();
|
self.$editMenuButton && self.$editMenuButton.remove();
|
||||||
self.$editMenuButton = Ox.MenuButton({
|
self.$editMenuButton = Ox.MenuButton({
|
||||||
items: [].concat(
|
items: [].concat(
|
||||||
[
|
[
|
||||||
{id: 'deselect', title: 'Deselect Annotation', disabled: !self.options.selected || self.editing, keyboard: 'escape'},
|
{id: 'deselect', title: Ox._('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: 'edit', title: Ox._('Edit Annotation'), disabled: !self.options.selected || !isEditable || self.editing, keyboard: 'return'},
|
||||||
{id: 'delete', title: 'Delete Annotation', disabled: !self.options.selected || !isEditable, keyboard: 'delete'},
|
{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: 'insert', title: Ox._('Insert...'), disabled: isString || !self.editing, keyboard: 'control i'},
|
||||||
{id: 'undo', title: 'Undo Changes', disabled: !self.editing, keyboard: 'escape'},
|
{id: 'undo', title: Ox._('Undo Changes'), disabled: !self.editing, keyboard: 'escape'},
|
||||||
{id: 'save', title: 'Save Changes', disabled: !self.editing, keyboard: isString ? 'return' : 'shift return'},
|
{id: 'save', title: Ox._('Save Changes'), disabled: !self.editing, keyboard: isString ? 'return' : 'shift return'},
|
||||||
],
|
],
|
||||||
pandora.site.map == 'manual' ? [
|
pandora.site.map == 'manual' ? [
|
||||||
{},
|
{},
|
||||||
|
@ -226,14 +226,14 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
isString ? [
|
isString ? [
|
||||||
{},
|
{},
|
||||||
{id: 'annotation', title: annotationTitle, disabled: true},
|
{id: 'annotation', title: annotationTitle, disabled: true},
|
||||||
{id: 'find', title: 'Find in This ' + pandora.site.itemName.singular},
|
{id: 'find', title: Ox._('Find in This ') + pandora.site.itemName.singular},
|
||||||
{id: 'findannotations', title: 'Find in All ' + pandora.site.itemName.plural}
|
{id: 'findannotations', title: Ox._('Find in All {0}', pandora.site.itemName.plural)}
|
||||||
] : []
|
] : []
|
||||||
),
|
),
|
||||||
maxWidth: 256,
|
maxWidth: 256,
|
||||||
style: 'square',
|
style: 'square',
|
||||||
title: 'edit',
|
title: 'edit',
|
||||||
tooltip: 'Editing Options',
|
tooltip: Ox._('Editing Options'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'right'})
|
.css({float: 'right'})
|
||||||
|
@ -388,32 +388,32 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
self.$optionsMenuButton = Ox.MenuButton({
|
self.$optionsMenuButton = Ox.MenuButton({
|
||||||
items: [].concat(
|
items: [].concat(
|
||||||
[
|
[
|
||||||
{id: 'showannotations', title: 'Show Annotations', disabled: true},
|
{id: 'showannotations', title: Ox._('Show Annotations'), disabled: true},
|
||||||
{group: 'range', min: 1, max: 1, items: [
|
{group: 'range', min: 1, max: 1, items: [
|
||||||
{id: 'all', title: 'All', checked: self.options.range == 'all'},
|
{id: 'all', title: Ox._('All'), checked: self.options.range == 'all'},
|
||||||
{id: 'selection', title: 'In Current Selection', checked: self.options.range == 'selection'},
|
{id: 'selection', title: Ox._('In Current Selection'), checked: self.options.range == 'selection'},
|
||||||
{id: 'position', title: 'At Current Position', checked: self.options.range == 'position'}
|
{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: [
|
{group: 'sort', min: 1, max: 1, items: [
|
||||||
{id: 'position', title: 'By Position', checked: self.options.sort == 'position'},
|
{id: 'position', title: Ox._('By Position'), checked: self.options.sort == 'position'},
|
||||||
{id: 'duration', title: 'By Duration', checked: self.options.sort == 'duration'},
|
{id: 'duration', title: Ox._('By Duration'), checked: self.options.sort == 'duration'},
|
||||||
{id: 'text', title: 'By Text', checked: self.options.sort == 'text'}
|
{id: 'text', title: Ox._('By Text'), checked: self.options.sort == 'text'}
|
||||||
]}
|
]}
|
||||||
],
|
],
|
||||||
self.options.showFonts ? [
|
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: [
|
{group: 'font', min: 1, max: 1, items: [
|
||||||
{id: 'small', title: 'Small', checked: self.options.font == 'small'},
|
{id: 'small', title: Ox._('Small'), checked: self.options.font == 'small'},
|
||||||
{id: 'medium', title: 'Medium', checked: self.options.font == 'medium'},
|
{id: 'medium', title: Ox._('Medium'), checked: self.options.font == 'medium'},
|
||||||
{id: 'large', title: 'Large', checked: self.options.font == 'large'}
|
{id: 'large', title: Ox._('Large'), checked: self.options.font == 'large'}
|
||||||
]}
|
]}
|
||||||
] : [],
|
] : [],
|
||||||
self.options.showUsers && self.users.length ? [
|
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) {
|
{group: 'users', min: 1, max: -1, items: self.users.map(function(user) {
|
||||||
return {id: user, title: Ox.encodeHTMLEntities(user), checked:
|
return {id: user, title: Ox.encodeHTMLEntities(user), checked:
|
||||||
self.enabledUsers == 'all' || self.enabledUsers.indexOf(user) > -1
|
self.enabledUsers == 'all' || self.enabledUsers.indexOf(user) > -1
|
||||||
|
@ -423,7 +423,7 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
),
|
),
|
||||||
style: 'square',
|
style: 'square',
|
||||||
title: 'set',
|
title: 'set',
|
||||||
tooltip: 'Options',
|
tooltip: Ox._('Options'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left'})
|
.css({float: 'left'})
|
||||||
|
|
|
@ -53,7 +53,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
annotationsRange: 'all',
|
annotationsRange: 'all',
|
||||||
annotationsSize: 256,
|
annotationsSize: 256,
|
||||||
annotationsSort: 'position',
|
annotationsSort: 'position',
|
||||||
annotationsTooltip: 'annotations',
|
annotationstooltip: Ox._('annotations'),
|
||||||
censored: [],
|
censored: [],
|
||||||
censoredIcon: '',
|
censoredIcon: '',
|
||||||
censoredTooltip: '',
|
censoredTooltip: '',
|
||||||
|
@ -516,17 +516,17 @@ Ox.VideoEditor = function(options, self) {
|
||||||
self.$menuButton = Ox.MenuButton({
|
self.$menuButton = Ox.MenuButton({
|
||||||
items: [].concat(
|
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}
|
{group: 'resolution', min: 1, max: 1, items: self.resolutions}
|
||||||
],
|
],
|
||||||
self.options.subtitles.length ? [
|
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(
|
{group: 'timeline', min: 1, max: 1, items: Ox.map(
|
||||||
self.options.timelines,
|
self.options.timelines,
|
||||||
function(timeline) {
|
function(timeline) {
|
||||||
|
@ -536,25 +536,25 @@ Ox.VideoEditor = function(options, self) {
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
{},
|
{},
|
||||||
{id: 'downloadVideo', title: 'Download Video...', disabled: !self.options.enableDownload },
|
{id: 'downloadVideo', title: Ox._('Download Video...'), disabled: !self.options.enableDownload },
|
||||||
{id: 'downloadSelection', title: 'Download Selection...', disabled: !self.options.enableDownload},
|
{id: 'downloadSelection', title: Ox._('Download Selection...'), disabled: !self.options.enableDownload},
|
||||||
{id: 'embedSelection', title: 'Embed Selection...'}
|
{id: 'embedSelection', title: Ox._('Embed Selection...')}
|
||||||
],
|
],
|
||||||
self.options.enableImport ? [
|
self.options.enableImport ? [
|
||||||
{},
|
{},
|
||||||
{id: 'importAnnotations', title: 'Import Annotations...'}
|
{id: 'importAnnotations', title: Ox._('Import Annotations...')}
|
||||||
] : [],
|
] : [],
|
||||||
[
|
[
|
||||||
{},
|
{},
|
||||||
{id: 'gotoPosterFrame', title: 'Go to Poster Frame'},
|
{id: 'gotoPosterFrame', title: Ox._('Go to Poster Frame')},
|
||||||
{id: 'setPosterFrame', title: 'Set Poster Frame', disabled: !self.options.enableSetPosterFrame},
|
{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',
|
style: 'square',
|
||||||
title: 'set',
|
title: 'set',
|
||||||
tooltip: 'Options',
|
tooltip: Ox._('Options'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left'})
|
.css({float: 'left'})
|
||||||
|
@ -616,7 +616,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
disabled: self.options.find === '',
|
disabled: self.options.find === '',
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'close',
|
title: 'close',
|
||||||
tooltip: 'Clear',
|
tooltip: Ox._('Clear'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'right'})
|
.css({float: 'right'})
|
||||||
|
@ -638,7 +638,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
autocompleteSelectMax: 10,
|
autocompleteSelectMax: 10,
|
||||||
autocompleteSelectSubmit: true,
|
autocompleteSelectSubmit: true,
|
||||||
changeOnKeypress: true,
|
changeOnKeypress: true,
|
||||||
placeholder: 'Find...',
|
placeholder: Ox._('Find...'),
|
||||||
value: self.options.find,
|
value: self.options.find,
|
||||||
width: 128
|
width: 128
|
||||||
})
|
})
|
||||||
|
@ -657,7 +657,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'arrowRight',
|
title: 'arrowRight',
|
||||||
tooltip: 'Next Result',
|
tooltip: Ox._('Next Result'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'right'})
|
.css({float: 'right'})
|
||||||
|
@ -672,7 +672,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'arrowLeft',
|
title: 'arrowLeft',
|
||||||
tooltip: 'Previous Result',
|
tooltip: Ox._('Previous Result'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'right'})
|
.css({float: 'right'})
|
||||||
|
@ -1265,13 +1265,13 @@ Ox.VideoEditor = function(options, self) {
|
||||||
function showKeyboardShortcuts() {
|
function showKeyboardShortcuts() {
|
||||||
var dialog = Ox.Dialog({
|
var dialog = Ox.Dialog({
|
||||||
buttons: [
|
buttons: [
|
||||||
Ox.Button({id: 'close', title: 'Close'})
|
Ox.Button({id: 'close', title: Ox._('Close')})
|
||||||
.bindEvent({click: function() { dialog.close(); }})
|
.bindEvent({click: function() { dialog.close(); }})
|
||||||
],
|
],
|
||||||
content: self.$keyboardShortcuts,
|
content: self.$keyboardShortcuts,
|
||||||
height: 384,
|
height: 384,
|
||||||
keys: {enter: 'close', escape: 'close'},
|
keys: {enter: 'close', escape: 'close'},
|
||||||
title: 'Keyboard Shortcuts',
|
title: Ox._('Keyboard Shortcuts'),
|
||||||
width: 256
|
width: 256
|
||||||
}).open();
|
}).open();
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ Ox.VideoEditorPlayer = function(options, self) {
|
||||||
self.$playInToOutButton = Ox.Button({
|
self.$playInToOutButton = Ox.Button({
|
||||||
id: self.options.id + 'PlayInToOut',
|
id: self.options.id + 'PlayInToOut',
|
||||||
title: 'PlayInToOut',
|
title: 'PlayInToOut',
|
||||||
tooltip: 'Play In to Out',
|
tooltip: Ox._('Play In to Out'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent('click', function() {
|
.bindEvent('click', function() {
|
||||||
|
@ -173,7 +173,7 @@ Ox.VideoEditorPlayer = function(options, self) {
|
||||||
self.$goToPointButton = Ox.Button({
|
self.$goToPointButton = Ox.Button({
|
||||||
id: self.options.id + 'GoTo' + Ox.toTitleCase(self.options.type),
|
id: self.options.id + 'GoTo' + Ox.toTitleCase(self.options.type),
|
||||||
title: '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'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent('click', goToPoint)
|
.bindEvent('click', goToPoint)
|
||||||
|
@ -181,7 +181,7 @@ Ox.VideoEditorPlayer = function(options, self) {
|
||||||
self.$setPointButton = Ox.Button({
|
self.$setPointButton = Ox.Button({
|
||||||
id: self.options.id + 'Set' + Ox.toTitleCase(self.options.type),
|
id: self.options.id + 'Set' + Ox.toTitleCase(self.options.type),
|
||||||
title: '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'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent('click', setPoint)
|
.bindEvent('click', setPoint)
|
||||||
|
|
|
@ -625,7 +625,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$closeButton = Ox.Button({
|
self.$closeButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: 'close',
|
title: 'close',
|
||||||
tooltip: 'Close',
|
tooltip: Ox._('Close'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -640,7 +640,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$findButton = Ox.Button({
|
self.$findButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: 'find',
|
title: 'find',
|
||||||
tooltip: 'Find',
|
tooltip: Ox._('Find'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -652,7 +652,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
|
|
||||||
self.$fullscreenButton = Ox.Button({
|
self.$fullscreenButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
tooltip: ['Enter Fullscreen', 'Exit Fullscreen'],
|
tooltip: [Ox._('Enter Fullscreen'), Ox._('Exit Fullscreen')],
|
||||||
type: 'image',
|
type: 'image',
|
||||||
value: self.options.fullscreen ? 'shrink' : 'grow',
|
value: self.options.fullscreen ? 'shrink' : 'grow',
|
||||||
values: ['grow', 'shrink']
|
values: ['grow', 'shrink']
|
||||||
|
@ -669,7 +669,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$setButton = Ox.Button({
|
self.$setButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: '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'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -681,7 +681,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
|
|
||||||
self.$muteButton = Ox.Button({
|
self.$muteButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
tooltip: ['Mute', 'Unmute'],
|
tooltip: [Ox._('Mute'), Ox._('Unmute')],
|
||||||
type: 'image',
|
type: 'image',
|
||||||
value: self.options.muted ? 'unmute' : 'mute',
|
value: self.options.muted ? 'unmute' : 'mute',
|
||||||
values: ['mute', 'unmute']
|
values: ['mute', 'unmute']
|
||||||
|
@ -698,7 +698,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$nextClipButton = Ox.Button({
|
self.$nextClipButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: 'arrowRight',
|
title: 'arrowRight',
|
||||||
tooltip: 'Next',
|
tooltip: Ox._('Next'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -728,7 +728,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$playButton = Ox.Button({
|
self.$playButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
// FIXME: this is retarded, fix Ox.Button
|
// FIXME: this is retarded, fix Ox.Button
|
||||||
tooltip: ['Play', 'Pause'],
|
tooltip: [Ox._('Play'), Ox._('Pause')],
|
||||||
type: 'image',
|
type: 'image',
|
||||||
value: self.options.paused ? 'play' : 'pause',
|
value: self.options.paused ? 'play' : 'pause',
|
||||||
values: ['play', 'pause']
|
values: ['play', 'pause']
|
||||||
|
@ -745,7 +745,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$playInToOutButton = Ox.Button({
|
self.$playInToOutButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: 'playInToOut',
|
title: 'playInToOut',
|
||||||
tooltip: 'Play In to Out',
|
tooltip: Ox._('Play In to Out'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -821,7 +821,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$previousClipButton = Ox.Button({
|
self.$previousClipButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: 'arrowLeft',
|
title: 'arrowLeft',
|
||||||
tooltip: 'Previous',
|
tooltip: Ox._('Previous'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -835,7 +835,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
|
|
||||||
self.$scaleButton = Ox.Button({
|
self.$scaleButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
tooltip: ['Scale to Fill', 'Scale to Fit'],
|
tooltip: [Ox._('Scale to Fill'), Ox._('Scale to Fit')],
|
||||||
type: 'image',
|
type: 'image',
|
||||||
value: self.options.scaleToFill ? 'fit' : 'fill',
|
value: self.options.scaleToFill ? 'fit' : 'fill',
|
||||||
values: ['fill', 'fit']
|
values: ['fill', 'fit']
|
||||||
|
@ -850,7 +850,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$setButton = Ox.Button({
|
self.$setButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: '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'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -863,7 +863,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$settingsButton = Ox.Button({
|
self.$settingsButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: 'set',
|
title: 'set',
|
||||||
tooltip: 'Settings',
|
tooltip: Ox._('Settings'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -879,7 +879,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
|
|
||||||
self.$sizeButton = Ox.Button({
|
self.$sizeButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
tooltip: ['Larger', 'Smaller'],
|
tooltip: [Ox._('Larger'), Ox._('Smaller')],
|
||||||
type: 'image',
|
type: 'image',
|
||||||
value: self.options.sizeIsLarge ? 'shrink' : 'grow',
|
value: self.options.sizeIsLarge ? 'shrink' : 'grow',
|
||||||
values: ['grow', 'shrink']
|
values: ['grow', 'shrink']
|
||||||
|
@ -938,7 +938,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$volumeButton = Ox.Button({
|
self.$volumeButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: getVolumeImage(),
|
title: getVolumeImage(),
|
||||||
tooltip: 'Volume',
|
tooltip: Ox._('Volume'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -951,7 +951,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$zapHomeButton = Ox.Button({
|
self.$zapHomeButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: 'up',
|
title: 'up',
|
||||||
tooltip: 'Home Channel',
|
tooltip: Ox._('Home Channel'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -966,7 +966,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$zapNextButton = Ox.Button({
|
self.$zapNextButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: 'right',
|
title: 'right',
|
||||||
tooltip: 'Next Channel',
|
tooltip: Ox._('Next Channel'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -981,7 +981,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$zapPreviousButton = Ox.Button({
|
self.$zapPreviousButton = Ox.Button({
|
||||||
style: 'video',
|
style: 'video',
|
||||||
title: 'left',
|
title: 'left',
|
||||||
tooltip: 'Previous Channel',
|
tooltip: Ox._('Previous Channel'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -1015,7 +1015,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
|
|
||||||
self.$results = Ox.Element({
|
self.$results = Ox.Element({
|
||||||
tooltip: 'Results'
|
tooltip: Ox._('Results')
|
||||||
})
|
})
|
||||||
.addClass('OxResults')
|
.addClass('OxResults')
|
||||||
.html('0')
|
.html('0')
|
||||||
|
@ -1025,7 +1025,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'arrowLeft',
|
title: 'arrowLeft',
|
||||||
tooltip: 'Previous',
|
tooltip: Ox._('Previous'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -1039,7 +1039,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'arrowRight',
|
title: 'arrowRight',
|
||||||
tooltip: 'Next',
|
tooltip: Ox._('Next'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -1074,7 +1074,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
disabled: !self.options.find,
|
disabled: !self.options.find,
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'delete',
|
title: 'delete',
|
||||||
tooltip: 'Clear',
|
tooltip: Ox._('Clear'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -1096,7 +1096,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$hideFindButton = Ox.Button({
|
self.$hideFindButton = Ox.Button({
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'close',
|
title: 'close',
|
||||||
tooltip: 'Hide',
|
tooltip: Ox._('Hide'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -1124,7 +1124,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$hideVolumeButton = Ox.Button({
|
self.$hideVolumeButton = Ox.Button({
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'close',
|
title: 'close',
|
||||||
tooltip: 'Hide',
|
tooltip: Ox._('Hide'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -1134,7 +1134,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
|
|
||||||
self.$muteButton = Ox.Button({
|
self.$muteButton = Ox.Button({
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
tooltip: ['Mute', 'Unmute'],
|
tooltip: [Ox._('Mute'), Ox._('Unmute')],
|
||||||
type: 'image',
|
type: 'image',
|
||||||
value: self.options.muted ? 'unmute' : 'mute',
|
value: self.options.muted ? 'unmute' : 'mute',
|
||||||
values: ['mute', 'unmute']
|
values: ['mute', 'unmute']
|
||||||
|
|
|
@ -97,7 +97,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
||||||
],
|
],
|
||||||
style: 'square',
|
style: 'square',
|
||||||
title: 'set',
|
title: 'set',
|
||||||
tooltip: 'Options',
|
tooltip: Ox._('Options'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left'})
|
.css({float: 'left'})
|
||||||
|
@ -127,7 +127,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
||||||
self.$scrollButton = Ox.Button({
|
self.$scrollButton = Ox.Button({
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'arrowDown',
|
title: 'arrowDown',
|
||||||
tooltip: 'Scroll to Player',
|
tooltip: Ox._('Scroll to Player'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'right'})
|
.css({float: 'right'})
|
||||||
|
@ -197,7 +197,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
||||||
self.$playButton = Ox.Button({
|
self.$playButton = Ox.Button({
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: 'play',
|
title: 'play',
|
||||||
tooltip: 'Play',
|
tooltip: Ox._('Play'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
|
@ -213,7 +213,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
||||||
self.$muteButton = Ox.Button({
|
self.$muteButton = Ox.Button({
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
title: self.options.muted ? 'unmute' : 'mute',
|
title: self.options.muted ? 'unmute' : 'mute',
|
||||||
tooltip: self.options.muted ? 'Unmute' : 'Mute',
|
tooltip: self.options.muted ? Ox._('Unmute') : Ox._('Mute'),
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({float: 'left'})
|
.css({float: 'left'})
|
||||||
|
@ -787,7 +787,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
||||||
self.$video.options({muted: self.options.muted});
|
self.$video.options({muted: self.options.muted});
|
||||||
self.$muteButton.options({
|
self.$muteButton.options({
|
||||||
title: self.options.muted ? 'unmute' : 'mute',
|
title: self.options.muted ? 'unmute' : 'mute',
|
||||||
tooltip: self.options.muted ? 'Unmute' : 'Mute'
|
tooltip: self.options.muted ? Ox._('Unmute') : Ox._('Mute')
|
||||||
});
|
});
|
||||||
that.triggerEvent('muted', {
|
that.triggerEvent('muted', {
|
||||||
muted: self.options.muted
|
muted: self.options.muted
|
||||||
|
|
|
@ -44,7 +44,7 @@ Ox.SortDialog = function(options, self) {
|
||||||
|
|
||||||
if (self.hasDefaults) {
|
if (self.hasDefaults) {
|
||||||
self.$defaultsButton = Ox.Button({
|
self.$defaultsButton = Ox.Button({
|
||||||
title: 'Restore Defaults'
|
title: Ox._('Restore Defaults')
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
|
@ -55,7 +55,7 @@ Ox.SortDialog = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.$doneButton = Ox.Button({
|
self.$doneButton = Ox.Button({
|
||||||
title: 'Done'
|
title: Ox._('Done')
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
|
@ -95,4 +95,4 @@ Ox.SortDialog = function(options, self) {
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -53,7 +53,15 @@ Ox.KEYS = {
|
||||||
190: 'dot', 191: 'slash', 192: 'backtick', 219: 'openbracket',
|
190: 'dot', 191: 'slash', 192: 'backtick', 219: 'openbracket',
|
||||||
220: 'backslash', 221: 'closebracket', 222: 'quote', 224: 'meta'
|
220: 'backslash', 221: 'closebracket', 222: 'quote', 224: 'meta'
|
||||||
// see dojo, for ex.
|
// 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 <n> Maximum latitude of a Mercator projection
|
||||||
Ox.MAX_LATITUDE = Ox.deg(Math.atan(Ox.sinh(Math.PI)));
|
Ox.MAX_LATITUDE = Ox.deg(Math.atan(Ox.sinh(Math.PI)));
|
||||||
//@ Ox.MIN_LATITUDE <n> Minimum latitude of a Mercator projection
|
//@ Ox.MIN_LATITUDE <n> Minimum latitude of a Mercator projection
|
||||||
|
@ -66,7 +74,7 @@ Ox.MODIFIER_KEYS = {
|
||||||
ctrlKey: 'control',
|
ctrlKey: 'control',
|
||||||
shiftKey: 'shift',
|
shiftKey: 'shift',
|
||||||
metaKey: 'meta' // Mac: command
|
metaKey: 'meta' // Mac: command
|
||||||
}
|
};
|
||||||
//@ Ox.MONTHS <[s]> Names of months
|
//@ Ox.MONTHS <[s]> Names of months
|
||||||
Ox.MONTHS = [
|
Ox.MONTHS = [
|
||||||
'January', 'February', 'March', 'April', 'May', 'June',
|
'January', 'February', 'March', 'April', 'May', 'June',
|
||||||
|
|
|
@ -54,9 +54,7 @@
|
||||||
var translation = translations[value];
|
var translation = translations[value];
|
||||||
log && log(value, translation);
|
log && log(value, translation);
|
||||||
translation = translation || value;
|
translation = translation || value;
|
||||||
return options
|
return Ox.formatString(translation, options, true);
|
||||||
? Ox.formatString(translation, options, true)
|
|
||||||
: translation
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
@ -70,4 +68,4 @@
|
||||||
log = callback;
|
log = callback;
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
56
source/Ox/json/locale.ar.json
Normal file
56
source/Ox/json/locale.ar.json
Normal 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": ""
|
||||||
|
}
|
89
source/Ox/json/locale.de.json
Normal file
89
source/Ox/json/locale.de.json
Normal 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"
|
||||||
|
}
|
|
@ -101,7 +101,7 @@ def build_oxjs(downloads=False, geo=False):
|
||||||
if is_jquery_plugin:
|
if is_jquery_plugin:
|
||||||
ui_files['build'].append(target.replace(build_path, ''))
|
ui_files['build'].append(target.replace(build_path, ''))
|
||||||
ui_files['dev'].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:
|
if re.match('^Ox\..+\.js$', filename) or is_jsonc:
|
||||||
js = read_file(source)
|
js = read_file(source)
|
||||||
write_file(target, ox.js.minify(js, '' if is_jsonc else comment))
|
write_file(target, ox.js.minify(js, '' if is_jsonc else comment))
|
||||||
|
|
Loading…
Reference in a new issue