|
MediaWiki
REL1_23
|
Maintenance script to generate JSON i18n files from a PHP i18n file. More...


Public Member Functions | |
| __construct () | |
| execute () | |
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 144 of file generateJsonI18n.php.
References $cache, $GLOBALS, $key, $messages, array(), as, FormatJson\decode(), PHP, php, and wfRandomString().
Referenced by execute(), and shimOnly().
Reimplemented from Maintenance.
Definition at line 47 of file generateJsonI18n.php.
References $messages, $success, FormatJson\ALL_OK, array(), as, doShim(), FormatJson\encode(), Maintenance\error(), findCommentBefore(), Maintenance\getArg(), getAuthorsFromComment(), Maintenance\getOption(), Maintenance\hasOption(), Maintenance\maybeHelp(), Maintenance\output(), and shimOnly().
| 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 196 of file generateJsonI18n.php.
Referenced by execute().
| GenerateJsonI18n::getAuthorsFromComment | ( | $ | comment | ) | [protected] |
Get an array of author names from a documentation comment containing.
| string | $comment | Documentation comment |
Definition at line 216 of file generateJsonI18n.php.
Referenced by execute().
| GenerateJsonI18n::shimOnly | ( | $ | phpfile, |
| $ | jsondir | ||
| ) | [protected] |
Definition at line 115 of file generateJsonI18n.php.
References array(), doShim(), Maintenance\error(), and Maintenance\output().
Referenced by execute().