aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2013-05-21 19:36:05 +0000
committerFilip Komar <filip@mageia.org>2013-05-21 19:36:05 +0000
commite8945d58b7c4794bd994abdd9b036d6ec3baa76a (patch)
tree4064e0a3fc83b832ae5aac7a76d43299d4bca888
parentbbef676b92ddad558000db6c112d26c67fcc79be (diff)
downloadwww-e8945d58b7c4794bd994abdd9b036d6ec3baa76a.tar
www-e8945d58b7c4794bd994abdd9b036d6ec3baa76a.tar.gz
www-e8945d58b7c4794bd994abdd9b036d6ec3baa76a.tar.bz2
www-e8945d58b7c4794bd994abdd9b036d6ec3baa76a.tar.xz
www-e8945d58b7c4794bd994abdd9b036d6ec3baa76a.zip
bug for apostrophe in extract2lang.php fixed
-rw-r--r--tools/extract2lang.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/extract2lang.php b/tools/extract2lang.php
index eac652a0c..2d71cb102 100644
--- a/tools/extract2lang.php
+++ b/tools/extract2lang.php
@@ -30,7 +30,7 @@ Usage:
php tools/extract2lang.php path/to/source.php domain_name
Example:
- php tools/extract2lang.php en/index.php index_f
+ php tools/extract2lang.php en/index.php index
You can join multiple sources with apostrophe - single quote (') like this:
'en/3/download_index.php en/for-pc/index.php en/for-server/index.php en/3/index.php en/3/nav.php'
@@ -64,9 +64,11 @@ foreach ($out as $str) {
$file = str_replace(APP_ROOT, '', $file);
$line = array_shift($arr);
$arr = implode(':', $arr);
+ $arr = str_replace('\\\'', '_apostrophe_', $arr);
if (preg_match_all('/\_(e|t|h|d)\(\'(.+)\'/imU', $arr, $reg)) {
foreach ($reg[2] as $found) {
+ $found = str_replace('_apostrophe_', '\'', $found);
$strings[$domain][$found][] = $file . ' +' . $line;
}
}