r75140 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75139‎ | r75140 | r75141 >
Date:12:07, 21 October 2010
Author:hartman
Status:deferred
Tags:
Comment:
mw.Language.names are not stored as escaped text, thus does not require unescaping. It is stored as plain unicode strings.
Modified paths:
  • /branches/MwEmbedStandAlone/modules/TimedText/mw.TimedText.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/TimedText/mw.TimedTextEdit.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/TimedText/mw.TimedText.js
@@ -285,7 +285,7 @@
286286
287287 // Add a title
288288 $j( textElm ).attr('title',
289 - gM('mwe-timedtext-key-language', [textSource.srclang, unescape( mw.Language.names[ textSource.srclang ] ) ] )
 289+ gM('mwe-timedtext-key-language', [textSource.srclang, mw.Language.names[ textSource.srclang ] ] )
290290 );
291291
292292 // Add the sources to the parent embedPlayer
@@ -636,7 +636,7 @@
637637 var langKey = source.srclang.toLowerCase();
638638 _this.getLanguageName ( langKey );
639639 return $j.getLineItem(
640 - gM('mwe-timedtext-key-language', [langKey, unescape( mw.Language.names[ source.srclang ] ) ] ),
 640+ gM('mwe-timedtext-key-language', [langKey, mw.Language.names[ source.srclang ] ] ),
641641 source_icon,
642642 function() {
643643 _this.selectTextSource( source );
Index: branches/MwEmbedStandAlone/modules/TimedText/mw.TimedTextEdit.js
@@ -219,7 +219,7 @@
220220 var langKey = $j(this).val();
221221 if( mw.Language.names[ langKey ] ) {
222222 $buttonTarget.find('.btnText').text(
223 - unescape( mw.Language.names[ langKey ] )
 223+ mw.Language.names[ langKey ]
224224 );
225225 }
226226 }),
@@ -287,7 +287,7 @@
288288 langKey = langKey.pop();
289289 if( mw.Language.names[ langKey ] ) {
290290 $buttonTarget.find('.btnText').text(
291 - unescape( mw.Language.names[ langKey ] )
 291+ mw.Language.names[ langKey ]
292292 );
293293 // Update the key code
294294 $j('#timed-text-langKey-input').val( langKey );
@@ -406,14 +406,14 @@
407407 },
408408 getLangMenuItem: function( langKey , source_icon) {
409409 return $j.getLineItem(
410 - langKey + ' - ' + unescape( mw.Language.names[ langKey ] ),
 410+ langKey + ' - ' + mw.Language.names[ langKey ],
411411 source_icon,
412412 function() {
413413 mw.log( "Selected: " + langKey );
414414 // Update the input box text
415415 $j('#timed-text-langKey-input').val( langKey );
416416 // Update the menu item:
417 - $j('#language-select').find('.btnText').text( unescape( mw.Language.names[ langKey ] ) )
 417+ $j('#language-select').find('.btnText').text( mw.Language.names[ langKey ] )
418418 }
419419 );
420420 },

Follow-up revisions

RevisionCommit summaryAuthorDate
r75149Follow up to r75140, missed one usage of unescape in mw.Language.nameshartman13:16, 21 October 2010

Status & tagging log