summaryrefslogtreecommitdiffstats
path: root/common/app/l10n/extract.php
diff options
context:
space:
mode:
authorNicolas Lécureuil <neoclust@mageia.org>2020-05-17 14:46:00 +0200
committerNicolas Lécureuil <neoclust@mageia.org>2020-05-17 14:46:00 +0200
commite3de9d7dd1331f9718e04cc98e9ca7cfa27cf4aa (patch)
tree336981502f93ceb9fa5ed33ea3b47dcefc5a8402 /common/app/l10n/extract.php
parentff32e499745367b816d10f25e63ff3328214c32f (diff)
downloadplanet-user/wally/upstream-10-dev.tar
planet-user/wally/upstream-10-dev.tar.gz
planet-user/wally/upstream-10-dev.tar.bz2
planet-user/wally/upstream-10-dev.tar.xz
planet-user/wally/upstream-10-dev.zip
Sync with master of moonmoon ( version 9.0.0-rc)HEADuser/wally/upstream-10-devmaster
Source from https://github.com/Emmafrs/moonmoon/
Diffstat (limited to 'common/app/l10n/extract.php')
-rwxr-xr-xcommon/app/l10n/extract.php13
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\([\'"](.*?)[\'"]\)/',);