forked from 0x2620/oxjs
add localization to Ox
This commit is contained in:
parent
b68b827d7b
commit
4d8c716d0b
31 changed files with 499 additions and 352 deletions
|
|
@ -152,8 +152,8 @@ Ox.Calendar = function(options, self) {
|
|||
},
|
||||
name: function(i) {
|
||||
return i > -2
|
||||
? Ox.formatOrdinal(i + 2) + ' Millennium'
|
||||
: Ox.formatOrdinal(-i - 1) + ' Millennium BC'
|
||||
? Ox._('{0} Millennium', Ox.formatOrdinal(i + 2))
|
||||
: Ox._('{0} Millennium BC', Ox.formatOrdinal(-i - 1))
|
||||
},
|
||||
value: function(date) {
|
||||
return Math.floor(date.getUTCFullYear() / 1000) - 1;
|
||||
|
|
@ -167,8 +167,8 @@ Ox.Calendar = function(options, self) {
|
|||
},
|
||||
name: function(i) {
|
||||
return i > -20
|
||||
? Ox.formatOrdinal(i + 20) + ' Century'
|
||||
: Ox.formatOrdinal(-i - 19) + ' Century BC'
|
||||
? Ox._('{0} Century', Ox.formatOrdinal(i + 20))
|
||||
: Ox._('{0} Century BC', Ox.formatOrdinal(-i - 19))
|
||||
},
|
||||
value: function(date) {
|
||||
return Math.floor(date.getUTCFullYear() / 100) - 19;
|
||||
|
|
@ -334,10 +334,10 @@ Ox.Calendar = function(options, self) {
|
|||
|
||||
self.$menu = Ox.Select({
|
||||
items: [
|
||||
{id: 'date', title: 'Show Dates'},
|
||||
{id: 'place', title: 'Show Places'},
|
||||
{id: 'person', title: 'Show People'},
|
||||
{id: 'other', title: 'Show Other'}
|
||||
{id: 'date', title: Ox._('Show Dates')},
|
||||
{id: 'place', title: Ox._('Show Places')},
|
||||
{id: 'person', title: Ox._('Show People')},
|
||||
{id: 'other', title: Ox._('Show Other')}
|
||||
],
|
||||
max: -1,
|
||||
min: 1,
|
||||
|
|
@ -536,7 +536,7 @@ Ox.Calendar = function(options, self) {
|
|||
self.$eventControls = {
|
||||
name: Ox.Label({
|
||||
textAlign: 'center',
|
||||
tooltip: 'Click to pan, doubleclick to zoom'
|
||||
tooltip: Ox._('Click to pan, doubleclick to zoom')
|
||||
})
|
||||
.addClass('OxEventControl OxEventName')
|
||||
.css({bottom: 20 + (self.options.showZoombar * 16) + 'px'})
|
||||
|
|
@ -551,7 +551,7 @@ Ox.Calendar = function(options, self) {
|
|||
.appendTo(that),
|
||||
deselectButton: Ox.Button({
|
||||
title: 'close',
|
||||
tooltip: 'Deselect',
|
||||
tooltip: Ox._('Deselect'),
|
||||
type: 'image'
|
||||
})
|
||||
.addClass('OxEventControl OxEventDeselectButton')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue