From 535c04d38639266f2e723fed9c5d751942ae03f9 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 10 May 2013 10:45:24 +0000 Subject: [PATCH] wrap more strings in Ox._ --- source/Ox.UI/js/Calendar/CalendarEditor.js | 4 +- source/Ox.UI/js/Form/Filter.js | 2 +- source/Ox.UI/js/Form/ObjectArrayInput.js | 2 +- source/Ox.UI/js/Video/VideoEditor.js | 66 +++++++++++----------- source/Ox.UI/js/Video/VideoPlayer.js | 14 ++--- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/source/Ox.UI/js/Calendar/CalendarEditor.js b/source/Ox.UI/js/Calendar/CalendarEditor.js index dd74de9e..65c32f59 100644 --- a/source/Ox.UI/js/Calendar/CalendarEditor.js +++ b/source/Ox.UI/js/Calendar/CalendarEditor.js @@ -567,9 +567,9 @@ Ox.CalendarEditor = function(options, self) { endTime = +new Date((+bounds.endTime + middle) / 2), event = {}, i = 1; - event.name = 'Untitled'; + event.name = Ox._('Untitled'); while (nameExists(event.name)) { - event.name = 'Untitled [' + (++i) + ']'; + event.name = Ox._('Untitled') + ' [' + (++i) + ']'; }; event.alternativeNames = []; event.type = 'other'; diff --git a/source/Ox.UI/js/Form/Filter.js b/source/Ox.UI/js/Form/Filter.js index ceabf951..2888070c 100644 --- a/source/Ox.UI/js/Form/Filter.js +++ b/source/Ox.UI/js/Form/Filter.js @@ -175,7 +175,7 @@ Ox.Filter = function(options, self) { }), Ox.Input({ id: 'list', - placeholder: 'Untitled', + placeholder: Ox._('Untitled'), width: 128 }) ], diff --git a/source/Ox.UI/js/Form/ObjectArrayInput.js b/source/Ox.UI/js/Form/ObjectArrayInput.js index 09a81006..423c478d 100644 --- a/source/Ox.UI/js/Form/ObjectArrayInput.js +++ b/source/Ox.UI/js/Form/ObjectArrayInput.js @@ -18,7 +18,7 @@ Ox.ObjectArrayInput = function(options, self) { self = self || {}; var that = Ox.Element({}, self) .defaults({ - buttonTitles: {add: 'Add', remove: 'Remove'}, + buttonTitles: {add: Ox._('Add'), remove: Ox._('Remove')}, inputs: [], labelWidth: 128, max: 0, diff --git a/source/Ox.UI/js/Video/VideoEditor.js b/source/Ox.UI/js/Video/VideoEditor.js index 535a42e7..f15f8d39 100644 --- a/source/Ox.UI/js/Video/VideoEditor.js +++ b/source/Ox.UI/js/Video/VideoEditor.js @@ -455,42 +455,42 @@ Ox.VideoEditor = function(options, self) { self.$keyboardShortcuts = $('
').css({margin: '16px'}); [ - {key: Ox.UI.symbols.space, action: 'Play/Pause'}, - {key: 'P', action: 'Play In to Out'}, - {key: '0', action: 'Mute/Unmute'}, - {key: '-', action: 'Turn Volume Down'}, - {key: '+', action: 'Turn Volume Up'}, - {key: Ox.UI.symbols.shift + '-', action: 'Small Player'}, - {key: Ox.UI.symbols.shift + '+', action: 'Large Player'}, - {key: Ox.UI.symbols.arrow_left, action: 'Go One Frame Back'}, - {key: Ox.UI.symbols.arrow_right, action: 'Go One Frame Forward'}, - {key: Ox.UI.symbols.shift + Ox.UI.symbols.arrow_left, action: 'Go One Second Back'}, - {key: Ox.UI.symbols.shift + Ox.UI.symbols.arrow_right, action: 'Go One Second Forward'}, - {key: Ox.UI.symbols.arrow_up, action: 'Go One Line Up'}, - {key: Ox.UI.symbols.arrow_down, action: 'Go One Line Down'}, - {key: Ox.UI.symbols.shift + Ox.UI.symbols.arrow_up, action: 'Go to First Frame'}, - {key: Ox.UI.symbols.shift + Ox.UI.symbols.arrow_down, action: 'Go to Last Frame'}, - {key: 'I', action: 'Set In Point'}, - {key: 'O', action: 'Set Out Point'}, - {key: Ox.UI.symbols.shift + 'I', action: 'Go to In Point'}, - {key: Ox.UI.symbols.shift + 'O', action: 'Go to Out Point'}, - {key: '[', action: 'Go to Previous Annotation'}, - {key: ']', action: 'Go to Next Annotation'}, - {key: '\\', action: 'Select Current Annotation'}, - {key: 'B', action: 'Select Previous Annotation'}, - {key: 'N', action: 'Select Next Annotation'}, - {key: '<', action: 'Go to Previous Cut'}, - {key: '>', action: 'Go to Next Cut'}, - {key: '/', action: 'Select Current Cut'}, - {key: 'F', action: 'Find'}, - {key: Ox.UI.symbols.shift + 'G', action: 'Go to Previous Result'}, - {key: 'G', action: 'Go to Next Result'}, - {key: Ox.UI.symbols['return'], action: 'Edit/Submit'}, - {key: Ox.UI.symbols.escape, action: 'Cancel/Deselect'} + {key: Ox.UI.symbols.space, action: Ox._('Play/Pause')}, + {key: 'P', action: Ox._('Play In to Out')}, + {key: '0', action: Ox._('Mute/Unmute')}, + {key: '-', action: Ox._('Turn Volume Down')}, + {key: '+', action: Ox._('Turn Volume Up')}, + {key: Ox.UI.symbols.shift + '-', action: Ox._('Small Player')}, + {key: Ox.UI.symbols.shift + '+', action: Ox._('Large Player')}, + {key: Ox.UI.symbols.arrow_left, action: Ox._('Go One Frame Back')}, + {key: Ox.UI.symbols.arrow_right, action: Ox._('Go One Frame Forward')}, + {key: Ox.UI.symbols.shift + Ox.UI.symbols.arrow_left, action: Ox._('Go One Second Back')}, + {key: Ox.UI.symbols.shift + Ox.UI.symbols.arrow_right, action: Ox._('Go One Second Forward')}, + {key: Ox.UI.symbols.arrow_up, action: Ox._('Go One Line Up')}, + {key: Ox.UI.symbols.arrow_down, action: Ox._('Go One Line Down')}, + {key: Ox.UI.symbols.shift + Ox.UI.symbols.arrow_up, action: Ox._('Go to First Frame')}, + {key: Ox.UI.symbols.shift + Ox.UI.symbols.arrow_down, action: Ox._('Go to Last Frame')}, + {key: 'I', action: Ox._('Set In Point')}, + {key: 'O', action: Ox._('Set Out Point')}, + {key: Ox.UI.symbols.shift + 'I', action: Ox._('Go to In Point')}, + {key: Ox.UI.symbols.shift + 'O', action: Ox._('Go to Out Point')}, + {key: '[', action: Ox._('Go to Previous Annotation')}, + {key: ']', action: Ox._('Go to Next Annotation')}, + {key: '\\', action: Ox._('Select Current Annotation')}, + {key: 'B', action: Ox._('Select Previous Annotation')}, + {key: 'N', action: Ox._('Select Next Annotation')}, + {key: '<', action: Ox._('Go to Previous Cut')}, + {key: '>', action: Ox._('Go to Next Cut')}, + {key: '/', action: Ox._('Select Current Cut')}, + {key: 'F', action: Ox._('Find')}, + {key: Ox.UI.symbols.shift + 'G', action: Ox._('Go to Previous Result')}, + {key: 'G', action: Ox._('Go to Next Result')}, + {key: Ox.UI.symbols['return'], action: Ox._('Edit/Submit')}, + {key: Ox.UI.symbols.escape, action: Ox._('Cancel/Deselect')} ].concat( Ox.filter(self.options.layers.map(function(layer, i) { return layer.editable - ? {key: i + 1, action: 'Add ' + layer.item} + ? {key: i + 1, action: Ox._('Add {0}', [layer.item])} : null; })) ).forEach(function(shortcut) { diff --git a/source/Ox.UI/js/Video/VideoPlayer.js b/source/Ox.UI/js/Video/VideoPlayer.js index 37ebc342..2a5aff6e 100644 --- a/source/Ox.UI/js/Video/VideoPlayer.js +++ b/source/Ox.UI/js/Video/VideoPlayer.js @@ -1891,9 +1891,9 @@ Ox.VideoPlayer = function(options, self) { self.$settings.hide(); if (!$target.is('.OxLine') && !$target.is('.OxSpace')) { title = $(e.target).parent().children()[0].innerHTML; - if (title == 'Download') { + if (title == Ox._('Download')) { that.triggerEvent('download'); - } else if (title == 'Subtitles') { + } else if (title == Ox._('Subtitles')) { toggleSubtitles(); } else if (isResolution(title)) { resolution = parseInt(title, 10); @@ -1916,7 +1916,7 @@ Ox.VideoPlayer = function(options, self) { var children = $(this).children(), title = children[0].innerHTML, checked = ( - title == 'Subtitles' + title == Ox.('Subtitles') && self.options.enableSubtitles ) || ( isResolution(title) @@ -1939,7 +1939,7 @@ Ox.VideoPlayer = function(options, self) { }), items = [{ disabled: true, - title: 'Resolution' + title: Ox._('Resolution') }].concat( self.resolutions.map(function(resolution) { return { @@ -1950,13 +1950,13 @@ Ox.VideoPlayer = function(options, self) { self.options.subtitles.length ? [{}, { checked: self.options.enableSubtitles, - title: 'Subtitles' + title: Ox._('Subtitles') }] : [], self.options.timelineTypes.length ? [{}, { disabled: true, - title: 'Timeline' + title: Ox._('Timeline') }] : [], self.options.timelineTypes.length ? self.options.timelineTypes.map(function(type) { @@ -1967,7 +1967,7 @@ Ox.VideoPlayer = function(options, self) { }) : [], self.options.enableDownload - ? [{}, {title: 'Download'}] + ? [{}, {title: Ox._('Download')}] : [] ), height = 0;