1
0
Fork 0
forked from 0x2620/oxjs

add localization to Ox

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

View file

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