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