Changeset 1039 for branches

Show
Ignore:
Timestamp:
07/23/08 21:33:00 (4 months ago)
Author:
laurentj
Message:

ticket #639 : a notice appeared in some case during the parsing of properties files. p=torgan

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/build/manifests/testapp.mn

    r1006 r1039  
    9292  test_H.properties 
    9393  test_I.properties 
     94  test_J.properties 
    9495cd testapp/modules/jelix_tests/locales/fr_FR 
    9596  testunit.ISO-8859-1.properties 
  • branches/1.0.x/lib/jelix/core/jLocale.class.php

    r956 r1039  
    55* @author     Laurent Jouanneau 
    66* @author     Gerald Croes 
    7 * @contributor Julien Issler 
    8 * @copyright  2001-2005 CopixTeam, 2005-2007 Laurent Jouanneau 
     7* @contributor Julien Issler, Yannick Le Guédart 
     8* @copyright  2001-2005 CopixTeam, 2005-2008 Laurent Jouanneau 
    99* Some parts of this file are took from Copix Framework v2.3dev20050901, CopixI18N.class.php, http://www.copix.org. 
    1010* copyrighted by CopixTeam and released under GNU Lesser General Public Licence. 
    1111* initial authors : Gerald Croes, Laurent Jouanneau. 
    1212* enhancement by Laurent Jouanneau for Jelix. 
    13 * @copyright 2008 Julien Issler 
     13* @copyright 2008 Julien Issler, 2008 Yannick Le Guédart 
    1414* @link        http://www.jelix.org 
    1515* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    120120                    if($multiline){ 
    121121                        if(preg_match("/^\s*(.*)\s*(\\\\?)$/U", $line, $match)){ 
    122                             $sp = preg_split('/(?<!\\\\)\#/', $match[1], -1 ,PREG_SPLIT_NO_EMPTY); 
    123122                            $multiline= ($match[2] =="\\"); 
    124                             $this->_strings[$charset][$key].=' '.trim(str_replace('\#','#',$sp[0])); 
     123                            if (strlen ($match[1])) { 
     124                                $sp = preg_split('/(?<!\\\\)\#/', $match[1], -1 ,PREG_SPLIT_NO_EMPTY); 
     125                                $this->_strings[$charset][$key].=' '.trim(str_replace('\#','#',$sp[0])); 
     126                            } else { 
     127                                $this->_strings[$charset][$key].=' '; 
     128                            } 
    125129                        }else{ 
    126130                            throw new Exception('Syntaxe error in file properties '.$fichier.' line '.$linenumber,210); 
  • branches/1.0.x/lib/jelix/CREDITS

    r1020 r1039  
    103103 - jdb driver for Intuition 
    104104 - resolved memory exhausted errors in truncate modifier (#511) 
     105 - fixed bug on jBundle (#639) 
    105106 
    106107Kévin Lepeltier (aka Lipki) 
  • branches/1.0.x/testapp/modules/jelix_tests/tests/core.jlocale.html_cli.php

    r956 r1039  
    5555        'test_H.properties' => '<array><string key="module.description" value="Tests unitaires # jelix" /><string key="ooo" value="bbbb" /></array>', 
    5656        'test_I.properties' => '<array><string key="module.description" value="Tests unitaires # jelix" /><string key="ooo" value="bbbb" /></array>', 
     57        'test_J.properties' => '<array> 
     58                <string key="text.key" value="bug 639 there shouldn\'t have a notice during the parsing of this property " /> 
     59                <string key="text.key2" value="same problem but with spaces at the end of the last line " /> 
     60                <string key="text.key3" value="youpa" /></array>', 
    5761        ); 
    5862 
Download in other formats: Unified Diff Zip Archive