Implements includable special page Special:LanguageStats which provides translation statistics for all defined message groups. More...
Public Member Functions | |
__construct () | |
element ($in, $bgcolor= '', $sort= '') | |
Statistics table element (heading or regular cell). | |
getBackgroundColor ($subset, $total, $fuzzy=false) | |
getMainColumnHeader () | |
setMainColumnHeader (Message $msg) | |
createColumnHeader (Message $msg) | |
addExtraColumn (Message $column) | |
getOtherColumnHeaders () | |
createHeader () | |
makeTotalRow (Message $message, $stats) | |
Makes a row with aggregate numbers. | |
makeNumberColumns ($stats) | |
Makes partial row from completion numbers. | |
formatPercentage ($num, $to= 'floor') | |
Makes a nice print from plain float. | |
getGroupLabel (MessageGroup $group) | |
Gets the name of group with some extra formatting. | |
makeGroupLink (MessageGroup $group, $code, $params) | |
Gets the name of group linked to translation tool. | |
getGroupDescription (MessageGroup $group) | |
Gets the description of a group. | |
isBlacklisted ($groupId, $code) | |
Check whether translations in given group in given language has been disabled. | |
Static Public Member Functions | |
static | formatTooltip ($text) |
Used to circumvent ugly tooltips when newlines are used in the message content ("x\ny" becomes "x y"). | |
Protected Attributes | |
$lang | |
$translate | |
$mainColumnHeader | |
$extraColumns = array() |
Implements includable special page Special:LanguageStats which provides translation statistics for all defined message groups.
Loosely based on the statistics code in phase3/maintenance/language
Use {{Special:LanguageStats/nl/1}} to show for 'nl' and suppres completely translated groups.
Definition at line 23 of file StatsTable.php.
StatsTable::__construct | ( | ) |
Definition at line 33 of file StatsTable.php.
StatsTable::addExtraColumn | ( | Message $ | column | ) |
Definition at line 105 of file StatsTable.php.
StatsTable::createColumnHeader | ( | Message $ | msg | ) |
Definition at line 101 of file StatsTable.php.
Referenced by createHeader(), and setMainColumnHeader().
StatsTable::createHeader | ( | ) |
StatsTable::element | ( | $ | in, | |
$ | bgcolor = '' , |
|||
$ | sort = '' | |||
) |
Statistics table element (heading or regular cell).
$in | String Element contents. | |
$bgcolor | String Backround color in ABABAB format. | |
$sort | String Value used for sorting. |
Definition at line 46 of file StatsTable.php.
Referenced by createColumnHeader(), makeNumberColumns(), and makeTotalRow().
StatsTable::formatPercentage | ( | $ | num, | |
$ | to = 'floor' | |||
) |
Makes a nice print from plain float.
$num | float | |
$to | string floor or ceil |
Definition at line 205 of file StatsTable.php.
Referenced by makeNumberColumns().
static StatsTable::formatTooltip | ( | $ | text | ) | [static] |
Used to circumvent ugly tooltips when newlines are used in the message content ("x\ny" becomes "x y").
$text |
Definition at line 333 of file StatsTable.php.
StatsTable::getBackgroundColor | ( | $ | subset, | |
$ | total, | |||
$ | fuzzy = false | |||
) |
Definition at line 63 of file StatsTable.php.
Referenced by makeNumberColumns().
StatsTable::getGroupDescription | ( | MessageGroup $ | group | ) |
Gets the description of a group.
This is a bit slow thing to do for thousand+ groups, so some caching is involved.
$group | MessageGroup |
Definition at line 258 of file StatsTable.php.
Referenced by makeGroupLink().
StatsTable::getGroupLabel | ( | MessageGroup $ | group | ) |
Gets the name of group with some extra formatting.
$group | MessageGroup |
Definition at line 217 of file StatsTable.php.
Referenced by makeGroupLink().
StatsTable::getMainColumnHeader | ( | ) |
Definition at line 93 of file StatsTable.php.
Referenced by createHeader().
StatsTable::getOtherColumnHeaders | ( | ) |
Definition at line 109 of file StatsTable.php.
Referenced by createHeader().
StatsTable::isBlacklisted | ( | $ | groupId, | |
$ | code | |||
) |
Check whether translations in given group in given language has been disabled.
$groupId | string Message group id | |
$code | string Language code |
Definition at line 292 of file StatsTable.php.
StatsTable::makeGroupLink | ( | MessageGroup $ | group, | |
$ | code, | |||
$ | params | |||
) |
Gets the name of group linked to translation tool.
$group | MessageGroup | |
$code | string Language code | |
$params | array Any extra query parameters. |
Definition at line 235 of file StatsTable.php.
StatsTable::makeNumberColumns | ( | $ | stats | ) |
Makes partial row from completion numbers.
array | $stats |
Definition at line 159 of file StatsTable.php.
Referenced by makeTotalRow().
StatsTable::makeTotalRow | ( | Message $ | message, | |
$ | stats | |||
) |
Makes a row with aggregate numbers.
Message | $message | |
array | $stats ( total, translate, fuzzy ) |
Definition at line 145 of file StatsTable.php.
StatsTable::setMainColumnHeader | ( | Message $ | msg | ) |
StatsTable::$extraColumns = array() [protected] |
Definition at line 31 of file StatsTable.php.
StatsTable::$lang [protected] |
Definition at line 25 of file StatsTable.php.
StatsTable::$mainColumnHeader [protected] |
Definition at line 29 of file StatsTable.php.
StatsTable::$translate [protected] |
Definition at line 27 of file StatsTable.php.