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
|
|
@ -205,19 +205,19 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
annotationTitle = folder.options('item') + ': "' + value + '"';
|
||||
}
|
||||
}
|
||||
manageTitle = (isDefined ? 'Edit' : 'Define') + ' '
|
||||
+ (isPlace ? 'Place' : isEvent ? 'Event' : 'Place or Event') + '...'
|
||||
manageTitle = Ox._((isDefined ? 'Edit' : 'Define') + ' '
|
||||
+ (isPlace ? 'Place' : isEvent ? 'Event' : 'Place or Event') + '...');
|
||||
self.$editMenuButton && self.$editMenuButton.remove();
|
||||
self.$editMenuButton = Ox.MenuButton({
|
||||
items: [].concat(
|
||||
[
|
||||
{id: 'deselect', title: '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: 'delete', title: 'Delete Annotation', disabled: !self.options.selected || !isEditable, keyboard: 'delete'},
|
||||
{id: 'deselect', title: Ox._('Deselect Annotation'), disabled: !self.options.selected || self.editing, keyboard: 'escape'},
|
||||
{id: 'edit', title: Ox._('Edit Annotation'), disabled: !self.options.selected || !isEditable || self.editing, keyboard: 'return'},
|
||||
{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: 'undo', title: 'Undo Changes', disabled: !self.editing, keyboard: 'escape'},
|
||||
{id: 'save', title: 'Save Changes', disabled: !self.editing, keyboard: isString ? 'return' : 'shift return'},
|
||||
{id: 'insert', title: Ox._('Insert...'), disabled: isString || !self.editing, keyboard: 'control i'},
|
||||
{id: 'undo', title: Ox._('Undo Changes'), disabled: !self.editing, keyboard: 'escape'},
|
||||
{id: 'save', title: Ox._('Save Changes'), disabled: !self.editing, keyboard: isString ? 'return' : 'shift return'},
|
||||
],
|
||||
pandora.site.map == 'manual' ? [
|
||||
{},
|
||||
|
|
@ -226,14 +226,14 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
isString ? [
|
||||
{},
|
||||
{id: 'annotation', title: annotationTitle, disabled: true},
|
||||
{id: 'find', title: 'Find in This ' + pandora.site.itemName.singular},
|
||||
{id: 'findannotations', title: 'Find in All ' + pandora.site.itemName.plural}
|
||||
{id: 'find', title: Ox._('Find in This ') + pandora.site.itemName.singular},
|
||||
{id: 'findannotations', title: Ox._('Find in All {0}', pandora.site.itemName.plural)}
|
||||
] : []
|
||||
),
|
||||
maxWidth: 256,
|
||||
style: 'square',
|
||||
title: 'edit',
|
||||
tooltip: 'Editing Options',
|
||||
tooltip: Ox._('Editing Options'),
|
||||
type: 'image'
|
||||
})
|
||||
.css({float: 'right'})
|
||||
|
|
@ -388,32 +388,32 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
self.$optionsMenuButton = Ox.MenuButton({
|
||||
items: [].concat(
|
||||
[
|
||||
{id: 'showannotations', title: 'Show Annotations', disabled: true},
|
||||
{id: 'showannotations', title: Ox._('Show Annotations'), disabled: true},
|
||||
{group: 'range', min: 1, max: 1, items: [
|
||||
{id: 'all', title: 'All', checked: self.options.range == 'all'},
|
||||
{id: 'selection', title: 'In Current Selection', checked: self.options.range == 'selection'},
|
||||
{id: 'position', title: 'At Current Position', checked: self.options.range == 'position'}
|
||||
{id: 'all', title: Ox._('All'), checked: self.options.range == 'all'},
|
||||
{id: 'selection', title: Ox._('In Current Selection'), checked: self.options.range == 'selection'},
|
||||
{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: [
|
||||
{id: 'position', title: 'By Position', checked: self.options.sort == 'position'},
|
||||
{id: 'duration', title: 'By Duration', checked: self.options.sort == 'duration'},
|
||||
{id: 'text', title: 'By Text', checked: self.options.sort == 'text'}
|
||||
{id: 'position', title: Ox._('By Position'), checked: self.options.sort == 'position'},
|
||||
{id: 'duration', title: Ox._('By Duration'), checked: self.options.sort == 'duration'},
|
||||
{id: 'text', title: Ox._('By Text'), checked: self.options.sort == 'text'}
|
||||
]}
|
||||
],
|
||||
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: [
|
||||
{id: 'small', title: 'Small', checked: self.options.font == 'small'},
|
||||
{id: 'medium', title: 'Medium', checked: self.options.font == 'medium'},
|
||||
{id: 'large', title: 'Large', checked: self.options.font == 'large'}
|
||||
{id: 'small', title: Ox._('Small'), checked: self.options.font == 'small'},
|
||||
{id: 'medium', title: Ox._('Medium'), checked: self.options.font == 'medium'},
|
||||
{id: 'large', title: Ox._('Large'), checked: self.options.font == 'large'}
|
||||
]}
|
||||
] : [],
|
||||
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) {
|
||||
return {id: user, title: Ox.encodeHTMLEntities(user), checked:
|
||||
self.enabledUsers == 'all' || self.enabledUsers.indexOf(user) > -1
|
||||
|
|
@ -423,7 +423,7 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
),
|
||||
style: 'square',
|
||||
title: 'set',
|
||||
tooltip: 'Options',
|
||||
tooltip: Ox._('Options'),
|
||||
type: 'image'
|
||||
})
|
||||
.css({float: 'left'})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue