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