MediaWiki REL1_28
|
Public Member Functions | |
__construct (array $options) | |
Constructor. | |
execute () | |
Execute the script. | |
outputWiki () | |
Output the checks results as wiki text. | |
Protected Member Functions | |
checkLanguage ( $code) | |
Check a language. | |
defaultChecks () | |
Get the default checks. | |
doChecks () | |
Execute the checks. | |
easyChecks () | |
Get the checks that can easily be treated by non-speakers of the language. | |
formatKey ( $key, $code) | |
Format a message key. | |
getCheckBlacklist () | |
Get the check blacklist. | |
getChecks () | |
Get all checks. | |
getDescriptions () | |
Get all check descriptions. | |
getTotalCount () | |
Get total count for each check non-messages check. | |
help () | |
Get help. | |
isCheckBlacklisted ( $check, $code, $message) | |
Verify whether a check is blacklisted. | |
isEmpty () | |
Check if there are any results for the checks, in any language. | |
nonMessageChecks () | |
Get the checks which check other things than messages. | |
outputText () | |
Output the checks results as plain text. | |
Protected Attributes | |
$checkAll = false | |
$checks = [] | |
$code = null | |
$doLinks = false | |
$L = null | |
$level = 2 | |
$linksPrefix = '' | |
$output = 'plain' | |
$results = [] | |
$wikiCode = 'en' | |
Private Attributes | |
$includeExif = false | |
Definition at line 27 of file checkLanguage.inc.
CheckLanguageCLI::__construct | ( | array | $options | ) |
Constructor.
array | $options | Options for script. |
Definition at line 46 of file checkLanguage.inc.
References $options, $wgLanguageCode, code, defaultChecks(), easyChecks(), global, help(), and output().
|
protected |
Check a language.
string | $code | The language code. |
MWException |
Reimplemented in CheckExtensionsCLI.
Definition at line 385 of file checkLanguage.inc.
References $code, $L, $results, as, getChecks(), and isCheckBlacklisted().
Referenced by doChecks(), and help().
|
protected |
Get the default checks.
Reimplemented in CheckExtensionsCLI.
Definition at line 99 of file checkLanguage.inc.
Referenced by __construct().
|
protected |
Execute the checks.
Definition at line 294 of file checkLanguage.inc.
References $checks, $code, $messages, $results, as, checkLanguage(), code, and isCheckBlacklisted().
Referenced by execute(), and CheckExtensionsCLI\execute().
|
protected |
Get the checks that can easily be treated by non-speakers of the language.
Reimplemented in CheckExtensionsCLI.
Definition at line 123 of file checkLanguage.inc.
Referenced by __construct().
CheckLanguageCLI::execute | ( | ) |
Execute the script.
Reimplemented in CheckExtensionsCLI.
Definition at line 275 of file checkLanguage.inc.
References doChecks(), output(), outputText(), and outputWiki().
|
protected |
Format a message key.
string | $key | The message key. |
string | $code | The language code. |
Definition at line 417 of file checkLanguage.inc.
References $code.
Referenced by outputText(), and outputWiki().
|
protected |
Get the check blacklist.
Definition at line 329 of file checkLanguage.inc.
References $checkBlacklist, and global.
Referenced by isCheckBlacklisted().
|
protected |
Get all checks.
Definition at line 134 of file checkLanguage.inc.
Referenced by checkLanguage().
|
protected |
Get all check descriptions.
Definition at line 181 of file checkLanguage.inc.
Referenced by outputText().
|
protected |
Get total count for each check non-messages check.
Definition at line 164 of file checkLanguage.inc.
Referenced by outputText().
|
protected |
Get help.
Reimplemented in CheckExtensionsCLI.
Definition at line 213 of file checkLanguage.inc.
References $1, add, and(), are, broken, by, check, checkLanguage(), code, complete, content, display, errors, file, following, form, headers, help(), in, is(), line, links, list, message, messages, names, not, of, on, or, other(), output(), page, pages, project, settings, Special, that, used, values, well, were, and wiki.
Referenced by __construct(), and help().
|
protected |
Verify whether a check is blacklisted.
string | $check | Check name |
string | $code | Language code |
string | bool | $message | Message name, or False for a whole language |
Definition at line 355 of file checkLanguage.inc.
References $code, as, and getCheckBlacklist().
Referenced by checkLanguage(), and doChecks().
|
protected |
Check if there are any results for the checks, in any language.
Definition at line 540 of file checkLanguage.inc.
References $messages, $results, and as.
Referenced by CheckExtensionsCLI\checkLanguage().
|
protected |
Get the checks which check other things than messages.
Reimplemented in CheckExtensionsCLI.
Definition at line 112 of file checkLanguage.inc.
Referenced by outputText(), and outputWiki().
|
protected |
Output the checks results as plain text.
Definition at line 433 of file checkLanguage.inc.
References $code, $count, $L, $messages, $results, $value, as, formatKey(), getDescriptions(), getTotalCount(), and nonMessageChecks().
Referenced by CheckExtensionsCLI\checkLanguage(), and execute().
CheckLanguageCLI::outputWiki | ( | ) |
Output the checks results as wiki text.
Definition at line 478 of file checkLanguage.inc.
References $code, $count, $messages, $results, are, as, code, formatKey(), SpecialVersion\getVersion(), nonMessageChecks(), and style.
Referenced by CheckExtensionsCLI\checkLanguage(), and execute().
|
protected |
Definition at line 33 of file checkLanguage.inc.
|
protected |
Definition at line 35 of file checkLanguage.inc.
Referenced by doChecks().
|
protected |
Definition at line 28 of file checkLanguage.inc.
Referenced by checkLanguage(), CheckExtensionsCLI\checkLanguage(), doChecks(), formatKey(), isCheckBlacklisted(), outputText(), and outputWiki().
|
protected |
Definition at line 30 of file checkLanguage.inc.
|
private |
Definition at line 40 of file checkLanguage.inc.
|
protected |
Definition at line 36 of file checkLanguage.inc.
Referenced by checkLanguage(), and outputText().
|
protected |
Definition at line 29 of file checkLanguage.inc.
|
protected |
Definition at line 31 of file checkLanguage.inc.
|
protected |
Definition at line 34 of file checkLanguage.inc.
|
protected |
Definition at line 38 of file checkLanguage.inc.
Referenced by checkLanguage(), doChecks(), isEmpty(), outputText(), and outputWiki().
|
protected |
Definition at line 32 of file checkLanguage.inc.