Fixed a translation bug in gettext php, that could create huge session files left.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 25 Jan 2012 12:00:18 +0000 (13:00 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 25 Jan 2012 12:00:18 +0000 (13:00 +0100)
includes/lang/gettext.php

index a8ddcfc90ce9307121482dcb469600e91b7504dd..b5ab6130acec097f64f1d9b0a881337b27b67804 100644 (file)
@@ -474,6 +474,7 @@ class gettext_php_support_parser
      */
     function _parse_line($line, $nbr)
     {
+        $line = str_replace("\\\"", "'", $line);
         if (preg_match('/^\s*?#/', $line)) { return; }
         if (preg_match('/^\s*?msgid \"(.*?)(?!<\\\)\"/', $line, $m)) {
             $this->_store_key();
@@ -559,8 +560,6 @@ function set_ext_domain($path='') {
                array_shift($domain_stack);
                $path = $domain_stack[0];
        }
-       $lang_path = $path_to_root . ($path ? '/' : '') .$path.'/lang';
-
 
        $lang_path = $path_to_root . ($path ? '/' : '') .$path.'/lang';
        // ignore change when extension does not provide translation structure