MediaWiki
REL1_24
|
Maintenance script to generate JSON i18n files from a PHP i18n file. More...
Public Member Functions | |
__construct () | |
execute () | |
transformI18nFile ($phpfile, $jsondir=null) | |
Protected Member Functions | |
doShim ($jsondir) | |
findCommentBefore ($needle, $haystack) | |
Find the documentation comment immediately before a given search string. | |
getAuthorsFromComment ($comment) | |
Get an array of author names from a documentation comment containing. | |
shimOnly ($phpfile, $jsondir) |
Maintenance script to generate JSON i18n files from a PHP i18n file.
Definition at line 35 of file generateJsonI18n.php.
Reimplemented from Maintenance.
Definition at line 36 of file generateJsonI18n.php.
References Maintenance\addArg(), and Maintenance\addOption().
GenerateJsonI18n::doShim | ( | $ | jsondir | ) | [protected] |
Definition at line 205 of file generateJsonI18n.php.
References $cache, $GLOBALS, $key, $messages, array(), as, FormatJson\decode(), PHP, php, and wfRandomString().
Referenced by shimOnly(), and transformI18nFile().
Reimplemented from Maintenance.
Definition at line 51 of file generateJsonI18n.php.
References $IP, $path, as, Maintenance\error(), Maintenance\getArg(), Maintenance\getOption(), global, Maintenance\hasOption(), Maintenance\maybeHelp(), Maintenance\output(), and transformI18nFile().
GenerateJsonI18n::findCommentBefore | ( | $ | needle, |
$ | haystack | ||
) | [protected] |
Find the documentation comment immediately before a given search string.
string | $needle | String to search for |
string | $haystack | String to search in |
Definition at line 258 of file generateJsonI18n.php.
Referenced by transformI18nFile().
GenerateJsonI18n::getAuthorsFromComment | ( | $ | comment | ) | [protected] |
Get an array of author names from a documentation comment containing.
string | $comment | Documentation comment |
Definition at line 278 of file generateJsonI18n.php.
Referenced by transformI18nFile().
GenerateJsonI18n::shimOnly | ( | $ | phpfile, |
$ | jsondir | ||
) | [protected] |
Definition at line 176 of file generateJsonI18n.php.
References array(), doShim(), Maintenance\error(), and Maintenance\output().
Referenced by transformI18nFile().
GenerateJsonI18n::transformI18nFile | ( | $ | phpfile, |
$ | jsondir = null |
||
) |
Definition at line 97 of file generateJsonI18n.php.
References $messages, $success, FormatJson\ALL_OK, array(), as, doShim(), FormatJson\encode(), Maintenance\error(), findCommentBefore(), getAuthorsFromComment(), Maintenance\getOption(), Maintenance\hasOption(), Maintenance\maybeHelp(), Maintenance\output(), and shimOnly().
Referenced by execute().