diff options
Diffstat (limited to 'common/app/l10n/extract.php')
-rwxr-xr-x | common/app/l10n/extract.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/common/app/l10n/extract.php b/common/app/l10n/extract.php index 1a04f00..1384827 100755 --- a/common/app/l10n/extract.php +++ b/common/app/l10n/extract.php @@ -13,13 +13,15 @@ * The script scans for the files in the l10n/ folder to know which locales are supported */ -// released versions of moonmoon should immediately return for security -// return; +$root = __DIR__ . '/../../'; -$root = dirname(__FILE__) . '/../../'; -$GLOBALS['english'] = array(); +require_once __DIR__ . '/../app.php'; -include_once $root . '/app/classes/Simplel10n.class.php'; +if ($conf['debug'] !== true) { + die('Please enable the debug mode to use extract.php.'); +} + +$GLOBALS['english'] = array(); /* * This is a file parser to extract localizable strings (in .php files) @@ -27,7 +29,6 @@ include_once $root . '/app/classes/Simplel10n.class.php'; * */ - function extract_l10n_strings($file) { $lines = file($file); $patterns = array('/_g\([\'"](.*?)[\'"]\)/', '/getString\([\'"](.*?)[\'"]\)/',); |