29 Wikimedia\suppressWarnings();
30 $return = sprintf(
'%.' . $accuracy .
'f%%', 100 * $subset / $total );
31 Wikimedia\restoreWarnings();
36 # Override the following methods
49 function element( $in, $heading =
false ) {
58 echo
"'''Statistics are based on:''' <code>" . $version .
"</code>\n\n";
59 echo
"'''Note:''' These statistics can be generated by running " .
60 "<code>php maintenance/language/transstat.php</code>.\n\n";
61 echo
"For additional information on specific languages (the message names, the actual " .
62 "problems, etc.), run <code>php maintenance/language/checkLanguage.php --lang=foo</code>.\n\n";
63 echo
'English (en) is excluded because it is the default localization';
67 $dummyCodes[] = Language::fetchLanguageName( $dummyCode ) .
' (' . $dummyCode .
')';
69 echo
', as well as the following languages that are not intended for ' .
70 'system message translations, usually because they redirect to other ' .
71 'language codes: ' . implode(
', ', $dummyCodes );
73 echo
".\n\n"; # dot to end sentence
74 echo
'{| class="sortable wikitable" border="2" style="background-color: #F9F9F9; ' .
75 'border: 1px #AAAAAA solid; border-collapse: collapse; clear:both; width:100%;"' .
"\n";
90 function element( $in, $heading =
false ) {
91 echo ( $heading ?
'!' :
'|' ) .
"$in\n";
95 Wikimedia\suppressWarnings();
96 $v = round( 255 * $subset / $total );
97 Wikimedia\restoreWarnings();
100 # Weigh reverse with factor 20 so coloring takes effect more quickly as
101 # this option is used solely for reporting 'bad' percentages.
111 $green = sprintf(
'%02X', 2 * $v );
114 $red = sprintf(
'%02X', 2 * ( 255 - $v ) );
118 $color = $red . $green . $blue;
120 $percent = parent::formatPercent( $subset, $total,
$revert, $accuracy );
122 return 'style="background-color:#' . $color .
';"|' . $percent;
$wgDummyLanguageCodes
Functionally the same as $wgExtraLanguageCodes, but deprecated.
element( $in, $heading=false)
static getVersion( $flags='', $lang=null)
Return a string of the MediaWiki version with Git revision if available.
formatPercent( $subset, $total, $revert=false, $accuracy=2)
element( $in, $heading=false)
element( $in, $heading=false)
element( $in, $heading=false)
formatPercent( $subset, $total, $revert=false, $accuracy=2)
returning false will NOT prevent logging a wrapping ErrorException instead of letting the login form give the generic error message that the account does not exist For when the account has been renamed or deleted or an array to pass a message key and parameters create2 Corresponds to logging log_action database field and which is displayed in the UI & $revert