r52948 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52947‎ | r52948 | r52949 >
Date:22:52, 8 July 2009
Author:dale
Status:deferred
Tags:
Comment:
add language folder to mwEmbed that fits with mediaWiki php extension conventions for localization.
set up script-loader to use this localization system in both stand alone and in mediaWiki mode.
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/example_usage/Firefogg_Make_Advanced.html (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/jsScriptLoader.php (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/php/languages (added) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/php/languages/mwEmbed.i18n.php (added) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/php/maintenance (added) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php (added) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/php/noMediaWikiConfig.php (modified) (history)
  • /branches/new-upload/phase3/mwScriptLoader.php (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/mwScriptLoader.php
@@ -24,12 +24,12 @@
2525
2626 /*
2727 * mvwScriptLoader:
28 - *
 28+ *
2929 * some documentation about script-loader:
3030 * http://www.mediawiki.org/wiki/ScriptLoader
3131 */
3232
33 -//include WebStart.php
 33+//include WebStart.php
3434 require_once('includes/WebStart.php');
3535
3636 wfProfileIn('mvwScriptLoader.php');
@@ -40,20 +40,25 @@
4141 $url = $_SERVER['PHP_SELF'];
4242 }
4343
44 -
4544 if( strpos($url, "mwScriptLoader$wgScriptExtension") === false){
4645 wfHttpError( 403, 'Forbidden',
4746 'mvwScriptLoader must be accessed through the primary script entry point.' );
4847 return ;
4948 }
50 -//Verify the script loader is on:
 49+//Verify the script loader is on:
5150 if (!$wgEnableScriptLoader) {
5251 echo '/*ScriptLoader is not enabled for this site. To enable add the following line to your LocalSettings.php';
5352 echo '<pre><b>$wgEnableScriptLoader=true;</b></pre>*/';
5453 echo 'alert(\'Script loader is disabled\');';
5554 die(1);
5655 }
57 -//run jsScriptLoader action:
 56+
 57+//load the mwEmbed language file:
 58+$wgExtensionMessagesFiles['mwEmbed'] = "{$IP}/js2/mwEmbed/php/languages/mwEmbed.i18n.php";
 59+//enable the msgs before we go on:
 60+wfLoadExtensionMessages( 'mwEmbed' );
 61+
 62+//run jsScriptLoader action:
5863 $myScriptLoader = new jsScriptLoader();
5964 $myScriptLoader->doScriptLoader();
6065
Index: branches/new-upload/phase3/js2/mwEmbed/example_usage/Firefogg_Make_Advanced.html
@@ -2,7 +2,7 @@
33 <html><head>
44 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
55 <title>Firefogg - Make Ogg Video in your Browser</title>
6 - <script type="text/javascript" src="../jsScriptLoader.php?urid=52884&class=mv_embed,window.jQuery,mvBaseUploadInterface,mvFirefogg,mvAdvFirefogg,$j.ui,$j.ui.progressbar,$j.ui.dialog,$j.cookie,$j.ui.accordion,$j.ui.slider,$j.ui.datepicker"></script>
 6+ <script type="text/javascript" src="../jsScriptLoader.php?urid=52889&class=mv_embed,window.jQuery,mvBaseUploadInterface,mvFirefogg,mvAdvFirefogg,$j.ui,$j.ui.progressbar,$j.ui.dialog,$j.cookie,$j.ui.accordion,$j.ui.slider,$j.ui.datepicker"></script>
77 <style type="text/css" media="all">body {
88 margin: 0;
99 padding: 0;
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js
@@ -42,7 +42,7 @@
4343 "cut_clip" : "Cut Clips",
4444 "expand_track" : "Expand Track",
4545 "colapse_track" : "Collapse Track",
46 - "play_clip" : "Play From Playline Position",
 46+ "play_from_position" : "Play From Playline Position",
4747 "pixle2sec" : "pixles to seconds",
4848 "rmclip" : "Remove Clip",
4949 "clip_in" : "clip in",
@@ -381,7 +381,7 @@
382382 $j('#'+this.timeline_id).html(''+
383383 '<div id="'+this.timeline_id+'_left_cnt" class="mv_tl_left_cnt">'+
384384 '<div id="'+this.timeline_id+'_head_control" style="position:absolute;top:0px;left:0px;right:0px;height:30px;">' +
385 - '<a title="'+gM('play_clip')+'" href="javascript:'+this.instance_name+'.play_jt()">'+
 385+ '<a title="'+gM('play_from_position')+'" href="javascript:'+this.instance_name+'.play_jt()">'+
386386 '<img style="width:16px;height:16px;border:0" src="' + mv_embed_path + 'images/control_play_blue.png">'+
387387 '</a>'+
388388 '<a title="'+gM('zoom_in')+'" href="javascript:'+this.instance_name+'.zoom_in()">'+
Index: branches/new-upload/phase3/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php
@@ -0,0 +1,81 @@
 2+<?
 3+//merges in javascript with mwEmbed.i18n.php
 4+
 5+# Abort if called from a web server
 6+if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
 7+ print "This script must be run from the command line\n";
 8+ exit();
 9+}
 10+define('MEDIAWIKI',true);
 11+//get the scriptLoader globals:
 12+require_once('../../jsScriptLoader.php');
 13+
 14+$mwSTART_MSG_KEY = '#<JAVASCRIPT EN REPLACE>';
 15+$mwEND_MSG_KEY = '#</JAVASCRIPT EN REPLACE>';
 16+$mwLangFilePath = '../languages/mwEmbed.i18n.php';
 17+//get options (like override JS or override php
 18+
 19+
 20+//read in mwEmbed.i18n.php
 21+$rawLangFile = file_get_contents($mwLangFilePath);
 22+
 23+$startInx = strpos($rawLangFile, $mwSTART_MSG_KEY) + strlen($mwSTART_MSG_KEY);
 24+$endInx = strpos($rawLangFile, $mwEND_MSG_KEY);
 25+if( $startInx === false || $endInx === false ){
 26+ print "Could not find $mwSTART_MSG_KEY or $mwEND_MSG_KEY in mwEmbed.i18n.php \n";
 27+ exit();
 28+}
 29+
 30+$preFile = substr( $rawLangFile, 0, $startInx);
 31+$msgSet = substr( $rawLangFile, $startInx, $endInx-$startInx);
 32+$postFile = substr($rawLangFile, $endInx);
 33+
 34+//build replacement from all javascript in mwEmbed
 35+
 36+$path = realpath('../../');
 37+
 38+$curFileName = '';
 39+//@@todo existing msgSet should be parsed (or we just "include" the file first)
 40+$msgSet = '$messages[\'en\'] = array(';
 41+
 42+$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
 43+foreach($objects as $fname => $object){
 44+ if(substr($fname, -3) == '.js'){
 45+ $jsFileText = file_get_contents( $fname );
 46+ $mwPos = strpos($fname, 'mwEmbed') + 7;
 47+ $curFileName = substr( $fname, $mwPos );
 48+ if( preg_match('/loadGM\s*\(\s*{(.*)}\s*\)\s*/siU', //@@todo fix: will break down if someone does }) in their msg text
 49+ $jsFileText,
 50+ $matches) ){
 51+ $msgSet .= doJsonMerge($matches[1]);
 52+ }
 53+ }
 54+}
 55+//close up the msgSet:
 56+$msgSet.=");\n";
 57+
 58+function doJsonMerge($json_txt){
 59+ global $curFileName;
 60+
 61+ $out = "\n\t/*
 62+\t* js file: {$curFileName}
 63+\t*/\n";
 64+ $jmsg = json_decode( '{' . $json_txt . '}', true );
 65+ if( count($jmsg) != 0 ){
 66+ foreach($jmsg as $k=>$v){
 67+ $out.="\t'{$k}' => '".str_replace('\'', '\\\'', $v) ."',\n";
 68+ }
 69+ return $out;
 70+ }else{
 71+ print "could not get any json vars\n";
 72+ return '';
 73+ }
 74+}
 75+
 76+//rebuild and output to file
 77+if( file_put_contents($mwLangFilePath, trim($preFile) . "\n" . trim($msgSet) . "\n" . trim($postFile) . "\n\n")){
 78+ print "updated $mwLangFilePath file\n";
 79+ exit();
 80+}
 81+
 82+?>
\ No newline at end of file
Index: branches/new-upload/phase3/js2/mwEmbed/php/languages/mwEmbed.i18n.php
@@ -0,0 +1,258 @@
 2+<?
 3+/* localization file for mwEmbed
 4+ * updates can be merged from javascript by running maintenance/mergeJavascriptMsg.php
 5+ * this file follows the "extension" conventions for language msgs in mediaWiki But should be "usable" stand-alone with the script-loader
 6+ *
 7+ * the following English language portion is automatically merged via the maintenance script.
 8+*/
 9+
 10+#<JAVASCRIPT EN REPLACE>
 11+$messages['en'] = array(
 12+ /*
 13+ * js file: /libTimedText/mvTextInterface.js
 14+ */
 15+ 'select_transcript_set' => 'Select Layers',
 16+ 'auto_scroll' => 'auto scroll',
 17+ 'close' => 'close',
 18+ 'improve_transcript' => 'Improve',
 19+
 20+ /*
 21+ * js file: /libAddMedia/mvBaseUploadInterface.js
 22+ */
 23+ 'upload-transcode-in-progress' => 'Doing Transcode & Upload (do not close this window)',
 24+ 'upload-in-progress' => 'Upload in Progress (do not close this window)',
 25+ 'upload-transcoded-status' => 'Transcoded',
 26+ 'uploaded-status' => 'Uploaded',
 27+ 'wgfogg_wrong_version' => 'You have firefogg installed but its outdated, <a href="http://firefogg.org">please upgrade</a> ',
 28+ 'upload-stats-fileprogres' => '$1 of $2',
 29+ 'mv_upload_completed' => 'Your upload is complete',
 30+ 'mv_upload_done' => 'Your upload <i>should be</i> accessible <a href="$1">here</a>',
 31+ 'upload-unknown-size' => 'Unknown size',
 32+ 'mv-cancel-confim' => 'Are you sure you want to cancel?',
 33+ 'successfulupload' => 'Successful Upload',
 34+ 'uploaderror' => 'Upload error',
 35+ 'uploadwarning' => 'Upload warning',
 36+ 'unknown-error' => 'Unknown Error',
 37+ 'return-to-form' => 'Return to form',
 38+ 'file-exists-duplicate' => 'This file is a duplicate of the following file',
 39+ 'fileexists' => 'A file with this name exists already, please check <b><tt>$1</tt></b> if you are not sure if you want to change it.',
 40+ 'fileexists-thumb' => '<center><b>Existing file</b></center>',
 41+ 'ignorewarning' => 'Ignore warning and save file anyway',
 42+ 'file-thumbnail-no' => 'The filename begins with <b><tt>$1</tt></b>',
 43+ 'go-to-resource' => 'Go to Resource Page',
 44+ 'wgfogg_waring_bad_extension' => 'You have selected a file with an unsuported extension (<a href="http://commons.wikimedia.org/wiki/Commons:Firefogg#Supported_File_Types">more information</a>).',
 45+ 'cancel-button' => 'Cancel',
 46+ 'ok-button' => 'OK',
 47+
 48+ /*
 49+ * js file: /libAddMedia/mvAdvFirefogg.js
 50+ */
 51+ 'help-sticky' => 'Help (Click to Keep Help on Screen)',
 52+ 'fogg-cg-preset' => 'Preset: <strong>$1</strong>',
 53+ 'fogg-cg-quality' => 'Basic Quality and Resolution Control',
 54+ 'fogg-cg-meta' => 'Meta Data for the Clip',
 55+ 'fogg-cg-advVideo' => 'Advanced Video Encoding Controls',
 56+ 'fogg-cg-advAudio' => 'Advanced Audio Encoding Controls',
 57+ 'fogg-preset-custom' => 'Custom Settings',
 58+
 59+ /*
 60+ * js file: /libAddMedia/mediaWikiUploadHelper.OFF.js
 61+ */
 62+ 'upload-enable-converter' => 'Enable video converter (to upload source video not yet converted to theora format) <a href="http://commons.wikimedia.org/wiki/Commons:Firefogg">more info</a>',
 63+ 'upload-fogg_not_installed' => 'If you want to upload video consider installing <a href="http://firefogg.org">firefogg.org</a>, <a href="http://commons.wikimedia.org/wiki/Commons:Firefogg">more info</a>',
 64+ 'upload-transcode-in-progress' => 'Doing Transcode & Upload (do not close this window)',
 65+ 'upload-in-progress' => 'Upload in Progress (do not close this window)',
 66+ 'upload-transcoded-status' => 'Transcoded',
 67+ 'uploaded-status' => 'Uploaded',
 68+ 'upload-select-file' => 'Select File...',
 69+ 'wgfogg_wrong_version' => 'You have firefogg installed but its outdated, <a href="http://firefogg.org">please upgrade</a> ',
 70+ 'wgfogg_waring_ogg_upload' => 'You have selected an ogg file for conversion to ogg (this is probably unnessesary). Maybe disable the video converter?',
 71+ 'wgfogg_waring_bad_extension' => 'You have selected a file with an unsuported extension. <a href="http://commons.wikimedia.org/wiki/Commons:Firefogg#Supported_File_Types">More help</a>',
 72+ 'upload-stats-fileprogres' => '$1 of $2',
 73+ 'mv_upload_done' => 'Your upload <i>should be</i> accessible <a href="$1">here</a>',
 74+ 'upload-unknown-size' => 'Unknown size',
 75+ 'successfulupload' => 'Successful upload',
 76+ 'uploaderror' => 'Upload error',
 77+ 'uploadwarning' => 'Upload warning',
 78+ 'unknown-error' => 'Unknown Error',
 79+ 'return-to-form' => 'Return to form',
 80+ 'file-exists-duplicate' => 'This file is a duplicate of the following file',
 81+ 'fileexists' => 'A file with this name exists already, please check <b><tt>$1</tt></b> if you are not sure if you want to change it.',
 82+ 'fileexists-thumb' => '<center><b>Existing file</b></center>',
 83+ 'ignorewarning' => 'Ignore warning and save file anyway',
 84+ 'file-thumbnail-no' => 'The filename begins with <b><tt>$1</tt></b>',
 85+
 86+ /*
 87+ * js file: /libAddMedia/searchLibs/metavidSearch.js
 88+ */
 89+ 'mv_stream_title' => '$1 $2 to $3',
 90+
 91+ /*
 92+ * js file: /libAddMedia/mvFirefogg.js
 93+ */
 94+ 'fogg-select_file' => 'Select File',
 95+ 'fogg-select_new_file' => 'Select New File',
 96+ 'fogg-save_local_file' => 'Save Ogg',
 97+ 'fogg-check_for_fogg' => 'Checking for Firefogg <blink>...</blink>',
 98+ 'fogg-installed' => 'Firefogg is Installed',
 99+ 'fogg-for_improved_uplods' => 'For Improved uploads: ',
 100+ 'fogg-please_install' => '<a href="$1">Install Firefogg</a>. More <a href="http://commons.wikimedia.org/wiki/Commons:Firefogg">about firefogg</a>',
 101+ 'fogg-use_latest_fox' => 'Please first install <a href="http://www.mozilla.com/en-US/firefox/upgrade.html?from=firefogg">Firefox 3.5</a>. <i>then revisit this page to install the <b>firefogg</b> extention</i>',
 102+ 'fogg-passthrough_mode' => 'Your selected file is already ogg or not a video file',
 103+ 'fogg-transcoding' => 'Encoding Video to Ogg',
 104+ 'fogg-encoding-done' => 'Encoding Done',
 105+
 106+ /*
 107+ * js file: /libAddMedia/remoteSearchDriver.js
 108+ */
 109+ 'add_media_wizard' => 'Add Media Wizard',
 110+ 'mv_media_search' => 'Media Search',
 111+ 'rsd_box_layout' => 'Box layout',
 112+ 'rsd_list_layout' => 'List Layout',
 113+ 'rsd_results_desc' => 'Results ',
 114+ 'rsd_results_next' => 'next ',
 115+ 'rsd_results_prev' => 'previous ',
 116+ 'rsd_no_results' => 'No search results for <b>$1</b>',
 117+ 'mv_upload' => 'Upload',
 118+ 'rsd_layout' => 'Layout:',
 119+ 'rsd_resource_edit' => 'Edit Resource: $1',
 120+ 'resource_description_page' => 'Resource Description Page',
 121+ 'rsd_local_resource_title' => 'Local Resource Title',
 122+ 'rsd_do_insert' => 'Do Insert',
 123+ 'cc_title' => 'Creative Commons',
 124+ 'cc_by_title' => 'Attribution',
 125+ 'cc_nc_title' => 'Noncommercial',
 126+ 'cc_nd_title' => 'No Derivative Works',
 127+ 'cc_sa_title' => 'Share Alike',
 128+ 'cc_pd_title' => 'Public Domain',
 129+ 'unknown_license' => 'Unknown License',
 130+ 'no_import_by_url' => 'This User or Wiki <b>can not</b> import assets from remote URLs. </p><p> Do you need to Login? </p><p> If permissions are set you may have to enable $wgAllowCopyUploads, <a href="http://www.mediawiki.org/wiki/Manual:$wgAllowCopyUploads">more info</a></p>',
 131+
 132+ /*
 133+ * js file: /libSequencer/mvSequencer.js
 134+ */
 135+ 'menu_clipedit' => 'Edit Media',
 136+ 'menu_transition' => 'Transitions & Effects',
 137+ 'menu_cliplib' => 'Add Media',
 138+ 'menu_resource_overview' => 'Resource Overview',
 139+ 'menu_options' => 'Options',
 140+ 'loading_timeline' => 'Loading TimeLine <blink>...</blink>',
 141+ 'loading_user_rights' => 'Loading user rights <blink>...</blink>',
 142+ 'no_edit_permissions' => 'You don\'t have permissions to save changes to this sequence',
 143+ 'edit_clip' => 'Edit Clip',
 144+ 'edit_save' => 'Save Sequence Changes',
 145+ 'saving_wait' => 'Save in Progress (please wait)',
 146+ 'save_done' => 'Save Done',
 147+ 'edit_cancel' => 'Cancel Sequence Edit',
 148+ 'edit_cancel_confirm' => 'Are you sure you want to cancel your edit. Changes will be lost',
 149+ 'zoom_in' => 'Zoom In',
 150+ 'zoom_out' => 'Zoom Out',
 151+ 'cut_clip' => 'Cut Clips',
 152+ 'expand_track' => 'Expand Track',
 153+ 'colapse_track' => 'Collapse Track',
 154+ 'play_from_position' => 'Play From Playline Position',
 155+ 'pixle2sec' => 'pixles to seconds',
 156+ 'rmclip' => 'Remove Clip',
 157+ 'clip_in' => 'clip in',
 158+ 'clip_out' => 'clip out',
 159+ 'mv_welcome_to_sequencer' => '<h3>Welcome to the sequencer demo</h3> very <b>limited</b> functionality right now. Not much documentation yet either',
 160+ 'no_selected_resource' => '<h3>No Resource selected</h3> Select a Clip to enable editing',
 161+ 'error_edit_multiple' => '<h3>Multiple Resources Selected</h3> Select a single clip to edit it',
 162+ 'mv_editor_options' => 'Editor options',
 163+ 'mv_editor_mode' => 'Editor mode',
 164+ 'mv_simple_editor_desc' => 'simple editor (iMovie style)',
 165+ 'mv_advanced_editor_desc' => 'advanced editor (Final Cut style)',
 166+ 'mv_other_options' => 'Other Options',
 167+ 'mv_contextmenu_opt' => 'Enable Context Menus',
 168+ 'mv_sequencer_credit_line' => 'Developed by <a href="http://kaltura.com">Kaltura, Inc.</a> in partnership with the <a href="http://wikimediafoundation.org/wiki/Home">Wikimedia Foundation</a> ( <a href="#">more info</a> )',
 169+
 170+ /*
 171+ * js file: /libSequencer/mvTimedEffectsEdit.js
 172+ */
 173+ 'transition_in' => 'Transition In',
 174+ 'transition_out' => 'Transition Out',
 175+ 'effects' => 'Effects Stack',
 176+ 'remove_transition' => 'Remove Transition',
 177+ 'edit_transin' => 'Edit Transition Into Clip',
 178+ 'edit_transout' => 'Edit Transition Out of Clip',
 179+
 180+ /*
 181+ * js file: /libEmbedVideo/embedVideo.js
 182+ */
 183+ 'loading_plugin' => 'loading plugin<blink>...</blink>',
 184+ 'select_playback' => 'Set Playback Preference',
 185+ 'link_back' => 'Link Back',
 186+ 'error_load_lib' => 'mv_embed: Unable to load required javascript libraries
 187+ insert script via DOM has failed, try reloading? ',
 188+ 'error_swap_vid' => 'Error:mv_embed was unable to swap the video tag for the mv_embed interface',
 189+ 'add_to_end_of_sequence' => 'Add to End of Sequence',
 190+ 'missing_video_stream' => 'The video file for this stream is missing',
 191+ 'play_clip' => 'Play Clip',
 192+ 'pause_clip' => 'Pause Clip',
 193+ 'volume_control' => 'Volume Control',
 194+ 'player_options' => 'Player Options',
 195+ 'closed_captions' => 'Close Captions',
 196+ 'player_fullscreen' => 'Fullscreen',
 197+ 'next_clip_msg' => 'Play Next Clip',
 198+ 'prev_clip_msg' => 'Play Previous Clip',
 199+ 'current_clip_msg' => 'Continue Playing this Clip',
 200+ 'seek_to' => 'Seek to',
 201+ 'download_segment' => 'Download Selection:',
 202+ 'download_full' => 'Download Full Video File:',
 203+ 'download_right_click' => 'To download right click and select <i>save target as</i>',
 204+ 'download_clip' => 'Download the Clip',
 205+ 'download_text' => 'Download Text (<a style="color:white" title="cmml" href="http://wiki.xiph.org/index.php/CMML">cmml</a> xml):',
 206+ 'clip_linkback' => 'Clip Source Page',
 207+ 'mv_ogg-player-vlc-mozilla' => 'VLC Plugin',
 208+ 'mv_ogg-player-videoElement' => 'Native Ogg Video Support',
 209+ 'mv_ogg-player-vlc-activex' => 'VLC ActiveX',
 210+ 'mv_ogg-player-oggPlugin' => 'Generic Ogg Plugin',
 211+ 'mv_ogg-player-quicktime-mozilla' => 'Quicktime Plugin',
 212+ 'mv_ogg-player-quicktime-activex' => 'Quicktime ActiveX',
 213+ 'mv_ogg-player-cortado' => 'Java Cortado',
 214+ 'mv_ogg-player-flowplayer' => 'Flowplayer',
 215+ 'mv_ogg-player-selected' => ' (selected)',
 216+ 'mv_ogg-player-omtkplayer' => 'OMTK Flash Vorbis',
 217+ 'mv_generic_missing_plugin' => 'You browser does not appear to support playback type: <b>$1</b><br> visit the <a href="http://commons.wikimedia.org/wiki/Commons:Media_help">Playback Methods</a> page to download a player<br>',
 218+ 'mv_for_best_experience' => 'For best video playback experience we recommend <b><a href="http://www.mozilla.com/en-US/firefox/upgrade.html?from=mv_embed">Firefox 3.5</a></b>',
 219+ 'mv_do_not_warn_again' => 'Do not warn me again.',
 220+
 221+ /*
 222+ * js file: /libClipEdit/mvClipEdit.js
 223+ */
 224+ 'mv_crop' => 'Crop Image',
 225+ 'mv_apply_crop' => 'Apply Crop to Image',
 226+ 'mv_reset_crop' => 'Rest Crop',
 227+ 'mv_insert_image_page' => 'Insert Into page',
 228+ 'mv_insert_into_sequence' => 'Insert Into Sequence',
 229+ 'mv_preview_insert' => 'Preview Insert',
 230+ 'mv_cancel_image_insert' => 'Cancel Insert',
 231+ 'sc_fileopts' => 'Clip Detail Edit',
 232+ 'sc_inoutpoints' => 'Set In-Out points',
 233+ 'sc_overlays' => 'Overlays',
 234+ 'sc_audio' => 'Audio Control',
 235+ 'sc_duration' => 'Duration',
 236+ 'mv_template_properties' => 'Template Properties',
 237+ 'mv_custom_title' => 'Custom Title',
 238+ 'mv_edit_properties' => 'Edit Properties',
 239+ 'mv_other_properties' => 'Other Properties',
 240+ 'mv_resource_page' => 'Resource Page:',
 241+ 'mv_set_in_out_points' => 'Set in-out points',
 242+ 'mv_start_time' => 'Start Time',
 243+ 'mv_end_time' => 'End Time',
 244+ 'mv_preview_inout' => 'Preview/Play In-out points',
 245+
 246+ /*
 247+ * js file: /mv_embed.js
 248+ */
 249+ 'loading_txt' => 'loading <blink>...</blink>',
 250+ 'loading_title' => 'Loading...',
 251+ 'size-gigabytes' => '$1 GB',
 252+ 'size-megabytes' => '$1 MB',
 253+ 'size-kilobytes' => '$1 K',
 254+ 'size-bytes' => '$1 B',
 255+);
 256+#</JAVASCRIPT EN REPLACE>
 257+
 258+?>
 259+
Index: branches/new-upload/phase3/js2/mwEmbed/php/noMediaWikiConfig.php
@@ -19,7 +19,11 @@
2020
2121 $wgEnableScriptLoaderJsFile = false;
2222
23 -$wgEnableScriptLocalization = false;
 23+
 24+/*Localization:*/
 25+$wgEnableScriptLocalization = true;
 26+$mwLanguageCode = 'en';
 27+
2428 $wgContLanguageCode ='';
2529
2630 $wgStyleVersion = '218';
@@ -39,6 +43,9 @@
4044 //get the autoLoadClasses
4145 require_once( realpath( dirname(__FILE__) ) . '/jsAutoloadLocalClasses.php' );
4246
 47+//get the messages file:
 48+require_once( realpath( dirname(__FILE__) ) . '/languages/mwEmbed.i18n.php' );
 49+
4350 //get the JSmin class:
4451 require_once( realpath( dirname(__FILE__) ) . '/minify/JSMin.php' );
4552
@@ -86,4 +93,13 @@
8794
8895 return @mkdir( $dir, $mode, true ); // PHP5 <3
8996 }
 97+function wfMsgNoTrans($msgKey){
 98+ global $messages, $mwLanguageCode;
 99+
 100+ if(isset($messages[$mwLanguageCode]) && isset($messages[$mwLanguageCode][$msgKey]) ){
 101+ return $messages[$mwLanguageCode][$msgKey];
 102+ }else{
 103+ return '&lt;' . $msgKey . '&gt;';
 104+ }
 105+}
90106 ?>
\ No newline at end of file
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -15,6 +15,13 @@
1616
1717 "missing_video_stream" : "The video file for this stream is missing",
1818
 19+ "play_clip" : "Play Clip",
 20+ "pause_clip": "Pause Clip",
 21+ "volume_control": "Volume Control",
 22+ "player_options": "Player Options",
 23+ "closed_captions": "Close Captions",
 24+ "player_fullscreen": "Fullscreen",
 25+
1926 "next_clip_msg" : "Play Next Clip",
2027 "prev_clip_msg" : "Play Previous Clip",
2128 "current_clip_msg" : "Continue Playing this Clip",
@@ -40,7 +47,7 @@
4148 "mv_ogg-player-omtkplayer" : "OMTK Flash Vorbis",
4249 "mv_generic_missing_plugin" : "You browser does not appear to support playback type: <b>$1</b><br> visit the <a href=\"http://commons.wikimedia.org/wiki/Commons:Media_help\">Playback Methods</a> page to download a player<br>",
4350
44 - "mv_for_best_experience": "For best video playback experience we recomend <b><a href=\"http://www.mozilla.com/en-US/firefox/upgrade.html?from=mv_embed\">Firefox 3.5</a></b>",
 51+ "mv_for_best_experience": "For best video playback experience we recommend <b><a href=\"http://www.mozilla.com/en-US/firefox/upgrade.html?from=mv_embed\">Firefox 3.5</a></b>",
4552 "mv_do_not_warn_again": "Do not warn me again."
4653
4754 });
@@ -533,31 +540,31 @@
534541 'fullscreen':{
535542 'w':20,
536543 'o':function(){
537 - return '<div id="fullscreen_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-arrow-4-diag"></span></div>'
 544+ return '<div title="' + gM('player_fullscreen') + '" id="fullscreen_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-arrow-4-diag"></span></div>'
538545 }
539546 },
540547 'options':{
541548 'w':26,
542549 'o':function(){
543 - return '<div id="options_button_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-wrench"></span></div>';
 550+ return '<div title="'+ gM('player_options') + '" id="options_button_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-wrench"></span></div>';
544551 }
545552 },
546553 'pause':{
547554 'w':24,
548555 'o':function(){
549 - return '<div id="mv_play_pause_button_' + ctrlBuilder.id + '" class="ui-state-default ui-corner-all ui-icon_link lButton"><span class="ui-icon ui-icon-play"/></div>';
 556+ return '<div title="' + gM('play_clip') + '" id="mv_play_pause_button_' + ctrlBuilder.id + '" class="ui-state-default ui-corner-all ui-icon_link lButton"><span class="ui-icon ui-icon-play"/></div>';
550557 }
551558 },
552559 'closed_captions':{
553560 'w':23,
554561 'o':function(){
555 - return '<div id="timed_text_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-comment"></span></div>'
 562+ return '<div title="' + gM('closed_captions') + '" id="timed_text_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton"><span class="ui-icon ui-icon-comment"></span></div>'
556563 }
557564 },
558565 'volume_control':{
559566 'w':23,
560567 'o':function(){
561 - return '<div id="volume_control_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton">' +
 568+ return '<div title="' + gM('volume_control') + '" id="volume_control_'+ctrlBuilder.id+'" class="ui-state-default ui-corner-all ui-icon_link rButton">' +
562569 '<span class="ui-icon ui-icon-volume-on"></span>' +
563570 '<div style="position:absolute;display:none;" id="vol_container_'+ctrlBuilder.id+'" class="vol_container ui-corner-all">' +
564571 '<div class="volume_bar" id="volume_bar_' + ctrlBuilder.id + '"></div>' +
@@ -1845,7 +1852,7 @@
18461853 },
18471854 getPlayButton:function(id){
18481855 if(!id)id=this.id;
1849 - return '<div id="big_play_link_'+id+'" class="large_play_button" '+
 1856+ return '<div title="' + gM('play_clip') + '" id="big_play_link_'+id+'" class="large_play_button" '+
18501857 'style="left:'+((this.playerPixelWidth()-130)/2)+'px;'+
18511858 'top:' + ((this.playerPixelHeight()-96)/2) + 'px;">'+
18521859 '<img src="' + mv_skin_img_path + 'player_big_play_button.png">'+
@@ -2152,7 +2159,7 @@
21532160 $j("#mv_play_pause_button_" + this_id + ' span').removeClass('ui-icon-play').addClass('ui-icon-pause');
21542161 $j("#mv_play_pause_button_" + this_id).unbind().btnBind().click(function(){
21552162 $j('#' + this_id ).get(0).pause();
2156 - });
 2163+ }).attr('title', gM('pause_clip'));
21572164
21582165 },
21592166 load:function(){
@@ -2176,7 +2183,7 @@
21772184 $j("#mv_play_pause_button_" + this_id + ' span').removeClass('ui-icon-pause').addClass('ui-icon-play');
21782185 $j("#mv_play_pause_button_" + this_id).unbind().btnBind().click(function(){
21792186 $j('#'+this_id).get(0).play();
2180 - });
 2187+ }).attr('title', gM('play_clip'));
21812188 },
21822189 /*
21832190 * base embed stop (can be overwritten by the plugin)
Index: branches/new-upload/phase3/js2/mwEmbed/jsScriptLoader.php
@@ -7,8 +7,10 @@
88
99 //run the main action:
1010 $myScriptLoader = new jsScriptLoader();
11 - //preset request values via normal $_GET opperation:
 11+ //preset request values via normal $_GET operation:
1212 $myScriptLoader->doScriptLoader();
 13+}else{
 14+ $wgExtensionMessagesFiles['mwEmbed'] = realpath( dirname(__FILE__) ) .'/php/mwEmbed.i18n.php';
1315 }
1416
1517 //setup page output hook
@@ -359,5 +361,4 @@
360362 }
361363 }
362364 }
363 -
364365 ?>
\ No newline at end of file
Index: branches/new-upload/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js
@@ -1,9 +1,11 @@
22
33 loadGM({
 4+
45 "select_transcript_set" : "Select Layers",
56 "auto_scroll" : "auto scroll",
67 "close" : "close",
7 - "improve_transcript" : "Improve",
 8+ "improve_transcript" : "Improve"
 9+
810 })
911 // text interface object (for inline display captions)
1012 var mvTextInterface = function( parentEmbed ){

Status & tagging log