From: Michael Dale Date: Thu, 1 Oct 2009 18:45:11 +0000 (+0000) Subject: * added -q option that disables output of the mergeJavascript php X-Git-Tag: 1.31.0-rc.0~39426 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=416902f2b92bc158472c3b6eafd7c29648e6f034;p=lhc%2Fweb%2Fwiklou.git * added -q option that disables output of the mergeJavascript php * quick add of firefogg msgs for remote testing (normally js msgs are added to php via by the localization script) --- diff --git a/js2/mwEmbed/php/languages/mwEmbed.i18n.php b/js2/mwEmbed/php/languages/mwEmbed.i18n.php index ac29a8bcc3..dd6eae882a 100644 --- a/js2/mwEmbed/php/languages/mwEmbed.i18n.php +++ b/js2/mwEmbed/php/languages/mwEmbed.i18n.php @@ -120,6 +120,8 @@ $messages['en'] = array( 'fogg-transcoding' => 'Encoding video to Ogg', 'fogg-encoding-done' => 'Encoding complete', 'fogg-badtoken' => 'Token is not valid', + 'fogg-preview' => 'Preview video', + 'fogg-hidepreview' => 'Hide preview', /* * js file: /libAddMedia/searchLibs/baseRemoteSearch.js @@ -294,7 +296,7 @@ $messages['qqq'] = array( 'mwe-loading_txt' => '{{Identical|Loading}}', 'mwe-loading_title' => '{{Identical|Loading}}', 'mwe-error_load_lib' => 'Parameters: -* $1 Corresponds to the JavaScript file that was not retrievable or does not define its class name. +* $1 Corresponds to the JavaScript file that was not retrievable or does not define its class name. * $2 Is the class name that was associated with the JavaScript file that was not found or could not be retrieved.', 'fogg-help-sticky' => 'This is the tooltip message for the help icon. Mousing over this icon displays the help message. This tooltip tells the user that when they click the icon the help message will remain displayed.', 'rsd_results_next' => '{{Identical|Next}}', diff --git a/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php b/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php index 44d9982cb0..44bf8f1a63 100644 --- a/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php +++ b/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php @@ -27,37 +27,46 @@ This script helps merge msgs between javascript and php Usage: -j merges javascript msgs into php -p merges php msgs back into javascript + -q will disable screen output and wait time $object ) { // rebuild and output to single php file if mergeToPHP is on if ( $mergeToPhp ) { if ( file_put_contents( $mwLangFilePath, trim( $preFile ) . "\n\t" . trim( $msgSet ) . "\n" . ltrim( $postFile ) ) ) { - print "updated $mwLangFilePath file\n"; + if( $showInfo ) + print "updated $mwLangFilePath file\n"; exit(); } } function doJsonMerge( $json_txt ) { - global $curFileName, $fname, $messages, $mergeToJS, $jsFileText; + global $curFileName, $fname, $messages, $mergeToJS, $jsFileText, $showInfo; $outPhp = "\n\t/*\n"; $outPhp .= "\t * js file: {$curFileName}\n"; @@ -119,7 +130,8 @@ function doJsonMerge( $json_txt ) { if ( isset( $messages['en'][$k] ) ) { if ( $messages['en'][$k] != $v ) { $doReplaceFlag = true; - print "'$k'does not match:\n" . $messages['en'][$k] . "\n!=\n" . $v . "\n"; + if( $showInfo ) + print "'$k'does not match:\n" . $messages['en'][$k] . "\n!=\n" . $v . "\n"; } // add the actual value: (replace new lines (not compatible json) // $jsMsgAry[$k] = str_replace("\n", '\\n', $messages['en'][$k]); @@ -142,7 +154,8 @@ function doJsonMerge( $json_txt ) { // print substr($str, 0, 600); if ( file_put_contents( $fname, $str ) ) { - print "\nupdated $curFileName from php\n\n"; + if( $showInfo ) + print "\nupdated $curFileName from php\n\n"; } else { die( "Could not write to: " . $fname ); } @@ -151,7 +164,8 @@ function doJsonMerge( $json_txt ) { return $outPhp; } else { - print "Could not get any json vars from: $curFileName\n"; + if($showInfo) + print "Could not get any json vars from: $curFileName\n"; return ''; } }