Index: branches/MwEmbedStandAlone/modules/AddMedia/tests/Firefogg_GUI.html |
— | — | @@ -2,8 +2,35 @@ |
3 | 3 | <html><head> |
4 | 4 | <meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
5 | 5 | <title>Firefogg - Make Ogg/Webm Video in your Browser</title> |
6 | | - <!--<script type="text/javascript" src="../../../ResourceLoader.php?class=window.jQuery,mwEmbed"></script> --> |
7 | | - <script type="text/javascript" src="../../../mwEmbed.js?debug=true"></script> |
| 6 | + <script type="text/javascript"> |
| 7 | + // list of language with high percentage of messages translated: |
| 8 | + var langSupported = ['en','mk','dsb','gsw','ru','be-tarask','hsb','es','gl','fr','ia','de','nl','pt','ja','hu','tr']; |
| 9 | + function getUrlParam( name ){ |
| 10 | + name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); |
| 11 | + var regexS = "[\\?&]"+name+"=([^&#]*)"; |
| 12 | + var regex = new RegExp( regexS ); |
| 13 | + var results = regex.exec( window.location.href ); |
| 14 | + if( results == null ) |
| 15 | + return ""; |
| 16 | + else |
| 17 | + return results[1]; |
| 18 | + } |
| 19 | + var langKey = ( getUrlParam( 'uselang' ) == '' ) ? 'en' : getUrlParam( 'uselang' ); |
| 20 | + |
| 21 | + var keyOky = false; |
| 22 | + for(var i in langSupported){ |
| 23 | + if( langKey == langSupported[i]){ |
| 24 | + keyOky = true; |
| 25 | + break; |
| 26 | + } |
| 27 | + } |
| 28 | + if( !keyOky ){ |
| 29 | + langKey = 'en'; |
| 30 | + } |
| 31 | + |
| 32 | + document.write( '<script type="text/javascript" src="../../../ResourceLoader.php?class=window.jQuery,mwEmbed,mw.style.mwCommon&uselang=' + langKey + '"><\/script>' ); |
| 33 | + </script> |
| 34 | + <!-- <script type="text/javascript" src="../../../mwEmbed.js?debug=true"></script> --> |
8 | 35 | <style type="text/css" media="all"> |
9 | 36 | body { |
10 | 37 | margin: 0; |
— | — | @@ -73,7 +100,26 @@ |
74 | 101 | 'encoder_interface' : true, |
75 | 102 | 'encode_local' : true |
76 | 103 | }); |
77 | | - }); |
| 104 | + $j( '#fogg-status' ).append( |
| 105 | + gM('fogg-wont-upload-to-server' ), |
| 106 | + $j('<br />' ) |
| 107 | + ); |
| 108 | + |
| 109 | + for( var i = 0; i < langSupported.length; i++ ){ |
| 110 | + var urlParts = mw.parseUri( document.URL ); |
| 111 | + $j( '#fogg-status' ).append( |
| 112 | + $j('<a />').text( |
| 113 | + mw.Language.names[ langSupported[i] ] |
| 114 | + ) |
| 115 | + .attr( { |
| 116 | + 'href': urlParts.protocol + '://' + urlParts.host + |
| 117 | + urlParts.path + '?uselang=' + langSupported[i] |
| 118 | + } ), |
| 119 | + $j('<span />').text( ' | ' ) |
| 120 | + ) |
| 121 | + } |
| 122 | + }); |
| 123 | + |
78 | 124 | }); |
79 | 125 | </script> |
80 | 126 | </head><body> |
— | — | @@ -84,8 +130,8 @@ |
85 | 131 | </a><br> |
86 | 132 | Make Ogg/Webm Video</h1> |
87 | 133 | <br> |
88 | | -<div style="margin-right:auto;margin-left:auto;width:500px;"> |
89 | | -Note: Your video file will be locally encoded and not upload to any server |
| 134 | +<div id="fogg-status" style="margin-right:auto;margin-left:auto;width:500px;"> |
| 135 | + |
90 | 136 | </div> |
91 | 137 | <br> |
92 | 138 | |
Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.FirefoggGUI.js |
— | — | @@ -3,6 +3,7 @@ |
4 | 4 | */ |
5 | 5 | |
6 | 6 | mw.addMessages({ |
| 7 | + "fogg-wont-upload-to-server" : "Note: Your video file will be locally encoded and not upload to any server", |
7 | 8 | "fogg-save_local_file" : "Encode to File", |
8 | 9 | "fogg-help-sticky" : "Help (click to stick)", |
9 | 10 | "fogg-cg-preset" : "Preset: <strong>$1<\/strong>", |
Index: branches/MwEmbedStandAlone/modules/AddMedia/AddMedia.i18n.php |
— | — | @@ -31,6 +31,7 @@ |
32 | 32 | 'mwe-filesource' => 'Source:', |
33 | 33 | 'mwe-filestatus' => 'Copyright status:', |
34 | 34 | 'mwe-loading-add-media-wiz' => 'Loading add media wizard', |
| 35 | + 'fogg-wont-upload-to-server' => 'Note: Your video file will be locally encoded and not upload to any server', |
35 | 36 | 'fogg-save_local_file' => 'Encode to File', |
36 | 37 | 'fogg-help-sticky' => 'Help (click to stick)', |
37 | 38 | 'fogg-cg-preset' => 'Preset: <strong>$1</strong>', |