diff options
author | Filip Komar <filip@mageia.org> | 2013-05-21 19:36:05 +0000 |
---|---|---|
committer | Filip Komar <filip@mageia.org> | 2013-05-21 19:36:05 +0000 |
commit | e8945d58b7c4794bd994abdd9b036d6ec3baa76a (patch) | |
tree | 4064e0a3fc83b832ae5aac7a76d43299d4bca888 | |
parent | bbef676b92ddad558000db6c112d26c67fcc79be (diff) | |
download | www-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.php | 4 |
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; } } |