Changeset 956

Show
Ignore:
Timestamp:
05/28/08 15:13:25 (6 months ago)
Author:
julieni
Message:

Reverted ticket #569 which should only be commited in the trunk. Sorry for that.

Files:

Legend:

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

    r954 r956  
    103103  tests1.UTF-8.properties 
    104104  tests3.UTF-8.properties 
    105   tests4.UTF-8.properties 
    106105cd testapp/modules/jelix_tests/templates 
    107106  menu.tpl 
  • branches/1.0.x/build/manifests/testapp.mn

    r954 r956  
    103103  tests1.UTF-8.properties 
    104104  tests3.UTF-8.properties 
    105   tests4.UTF-8.properties 
    106105cd testapp/modules/jelix_tests/templates 
    107106  menu.tpl 
  • branches/1.0.x/build/manifests/testapp.mn

    r954 r956  
    103103  tests1.UTF-8.properties 
    104104  tests3.UTF-8.properties 
    105   tests4.UTF-8.properties 
    106105cd testapp/modules/jelix_tests/templates 
    107106  menu.tpl 
  • branches/1.0.x/build/manifests/testapp.mn

    r954 r956  
    103103  tests1.UTF-8.properties 
    104104  tests3.UTF-8.properties 
    105   tests4.UTF-8.properties 
    106105cd testapp/modules/jelix_tests/templates 
    107106  menu.tpl 
  • branches/1.0.x/lib/jelix/core/jLocale.class.php

    r954 r956  
    122122                            $sp = preg_split('/(?<!\\\\)\#/', $match[1], -1 ,PREG_SPLIT_NO_EMPTY); 
    123123                            $multiline= ($match[2] =="\\"); 
    124                             $this->_strings[$charset][$key].=' '.trim(str_replace(array('\#','\n'),array('#',"\n"),$sp[0])); 
     124                            $this->_strings[$charset][$key].=' '.trim(str_replace('\#','#',$sp[0])); 
    125125                        }else{ 
    126126                            throw new Exception('Syntaxe error in file properties '.$fichier.' line '.$linenumber,210); 
     
    140140                        } 
    141141 
    142                         $this->_strings[$charset][$key] = str_replace(array('\#','\n'),array('#',"\n"),$value)
     142                        $this->_strings[$charset][$key] =$value
    143143 
    144144                    }elseif(preg_match("/^\s*(\#.*)?$/",$line, $match)){ 
  • branches/1.0.x/lib/jelix/core/jLocale.class.php

    r954 r956  
    122122                            $sp = preg_split('/(?<!\\\\)\#/', $match[1], -1 ,PREG_SPLIT_NO_EMPTY); 
    123123                            $multiline= ($match[2] =="\\"); 
    124                             $this->_strings[$charset][$key].=' '.trim(str_replace(array('\#','\n'),array('#',"\n"),$sp[0])); 
     124                            $this->_strings[$charset][$key].=' '.trim(str_replace('\#','#',$sp[0])); 
    125125                        }else{ 
    126126                            throw new Exception('Syntaxe error in file properties '.$fichier.' line '.$linenumber,210); 
     
    140140                        } 
    141141 
    142                         $this->_strings[$charset][$key] = str_replace(array('\#','\n'),array('#',"\n"),$value)
     142                        $this->_strings[$charset][$key] =$value
    143143 
    144144                    }elseif(preg_match("/^\s*(\#.*)?$/",$line, $match)){ 
  • branches/1.0.x/lib/jelix/core/jLocale.class.php

    r954 r956  
    122122                            $sp = preg_split('/(?<!\\\\)\#/', $match[1], -1 ,PREG_SPLIT_NO_EMPTY); 
    123123                            $multiline= ($match[2] =="\\"); 
    124                             $this->_strings[$charset][$key].=' '.trim(str_replace(array('\#','\n'),array('#',"\n"),$sp[0])); 
     124                            $this->_strings[$charset][$key].=' '.trim(str_replace('\#','#',$sp[0])); 
    125125                        }else{ 
    126126                            throw new Exception('Syntaxe error in file properties '.$fichier.' line '.$linenumber,210); 
     
    140140                        } 
    141141 
    142                         $this->_strings[$charset][$key] = str_replace(array('\#','\n'),array('#',"\n"),$value)
     142                        $this->_strings[$charset][$key] =$value
    143143 
    144144                    }elseif(preg_match("/^\s*(\#.*)?$/",$line, $match)){ 
  • branches/1.0.x/lib/jelix/core/jLocale.class.php

    r954 r956  
    122122                            $sp = preg_split('/(?<!\\\\)\#/', $match[1], -1 ,PREG_SPLIT_NO_EMPTY); 
    123123                            $multiline= ($match[2] =="\\"); 
    124                             $this->_strings[$charset][$key].=' '.trim(str_replace(array('\#','\n'),array('#',"\n"),$sp[0])); 
     124                            $this->_strings[$charset][$key].=' '.trim(str_replace('\#','#',$sp[0])); 
    125125                        }else{ 
    126126                            throw new Exception('Syntaxe error in file properties '.$fichier.' line '.$linenumber,210); 
     
    140140                        } 
    141141 
    142                         $this->_strings[$charset][$key] = str_replace(array('\#','\n'),array('#',"\n"),$value)
     142                        $this->_strings[$charset][$key] =$value
    143143 
    144144                    }elseif(preg_match("/^\s*(\#.*)?$/",$line, $match)){ 
  • branches/1.0.x/lib/jelix/CREDITS

    r954 r956  
    7676 - jZipCreator : empty dirs are not included in the archive (#570) 
    7777 - jForms : fixed bugs in jforms.js based on Martus' report (#554) 
    78  - jLocale : support multiline rendering in strings (#569) 
    7978 
    8079Bastien Jaillot (aka bastnic) 
  • branches/1.0.x/lib/jelix/CREDITS

    r954 r956  
    7676 - jZipCreator : empty dirs are not included in the archive (#570) 
    7777 - jForms : fixed bugs in jforms.js based on Martus' report (#554) 
    78  - jLocale : support multiline rendering in strings (#569) 
    7978 
    8079Bastien Jaillot (aka bastnic) 
  • branches/1.0.x/lib/jelix/CREDITS

    r954 r956  
    7676 - jZipCreator : empty dirs are not included in the archive (#570) 
    7777 - jForms : fixed bugs in jforms.js based on Martus' report (#554) 
    78  - jLocale : support multiline rendering in strings (#569) 
    7978 
    8079Bastien Jaillot (aka bastnic) 
  • branches/1.0.x/lib/jelix/CREDITS

    r954 r956  
    7676 - jZipCreator : empty dirs are not included in the archive (#570) 
    7777 - jForms : fixed bugs in jforms.js based on Martus' report (#554) 
    78  - jLocale : support multiline rendering in strings (#569) 
    7978 
    8079Bastien Jaillot (aka bastnic) 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.jlocale.php

    r954 r956  
    44* @subpackage jtpl_plugin 
    55* @author     Jouanneau Laurent 
    6 * @contributor Julien Issler 
     6* @contributor 
    77* @copyright  2005-2007 Jouanneau laurent 
    8 * @copyright 2008 Julien Issler 
    98* @link        http://www.jelix.org 
    109* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2221     if(func_num_args() == 3 && is_array(func_get_arg(2))){ 
    2322         $param = func_get_arg(2); 
    24          echo nl2br(htmlspecialchars(jLocale::get($locale, $param))); 
     23         echo htmlspecialchars(jLocale::get($locale, $param)); 
    2524     }elseif(func_num_args() > 2){ 
    2625         $params = func_get_args(); 
    2726         unset($params[0]); 
    2827         unset($params[1]); 
    29          echo nl2br(htmlspecialchars(jLocale::get($locale, $params))); 
     28         echo htmlspecialchars(jLocale::get($locale, $params)); 
    3029     }else{ 
    31          echo nl2br(htmlspecialchars(jLocale::get($locale))); 
     30         echo htmlspecialchars(jLocale::get($locale)); 
    3231     } 
    3332} 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.jlocale.php

    r954 r956  
    44* @subpackage jtpl_plugin 
    55* @author     Jouanneau Laurent 
    6 * @contributor Julien Issler 
     6* @contributor 
    77* @copyright  2005-2007 Jouanneau laurent 
    8 * @copyright 2008 Julien Issler 
    98* @link        http://www.jelix.org 
    109* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2221     if(func_num_args() == 3 && is_array(func_get_arg(2))){ 
    2322         $param = func_get_arg(2); 
    24          echo nl2br(htmlspecialchars(jLocale::get($locale, $param))); 
     23         echo htmlspecialchars(jLocale::get($locale, $param)); 
    2524     }elseif(func_num_args() > 2){ 
    2625         $params = func_get_args(); 
    2726         unset($params[0]); 
    2827         unset($params[1]); 
    29          echo nl2br(htmlspecialchars(jLocale::get($locale, $params))); 
     28         echo htmlspecialchars(jLocale::get($locale, $params)); 
    3029     }else{ 
    31          echo nl2br(htmlspecialchars(jLocale::get($locale))); 
     30         echo htmlspecialchars(jLocale::get($locale)); 
    3231     } 
    3332} 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.jlocale.php

    r954 r956  
    44* @subpackage jtpl_plugin 
    55* @author     Jouanneau Laurent 
    6 * @contributor Julien Issler 
     6* @contributor 
    77* @copyright  2005-2007 Jouanneau laurent 
    8 * @copyright 2008 Julien Issler 
    98* @link        http://www.jelix.org 
    109* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2221     if(func_num_args() == 3 && is_array(func_get_arg(2))){ 
    2322         $param = func_get_arg(2); 
    24          echo nl2br(htmlspecialchars(jLocale::get($locale, $param))); 
     23         echo htmlspecialchars(jLocale::get($locale, $param)); 
    2524     }elseif(func_num_args() > 2){ 
    2625         $params = func_get_args(); 
    2726         unset($params[0]); 
    2827         unset($params[1]); 
    29          echo nl2br(htmlspecialchars(jLocale::get($locale, $params))); 
     28         echo htmlspecialchars(jLocale::get($locale, $params)); 
    3029     }else{ 
    31          echo nl2br(htmlspecialchars(jLocale::get($locale))); 
     30         echo htmlspecialchars(jLocale::get($locale)); 
    3231     } 
    3332} 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.jlocale.php

    r954 r956  
    44* @subpackage jtpl_plugin 
    55* @author     Jouanneau Laurent 
    6 * @contributor Julien Issler 
     6* @contributor 
    77* @copyright  2005-2007 Jouanneau laurent 
    8 * @copyright 2008 Julien Issler 
    98* @link        http://www.jelix.org 
    109* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2221     if(func_num_args() == 3 && is_array(func_get_arg(2))){ 
    2322         $param = func_get_arg(2); 
    24          echo nl2br(htmlspecialchars(jLocale::get($locale, $param))); 
     23         echo htmlspecialchars(jLocale::get($locale, $param)); 
    2524     }elseif(func_num_args() > 2){ 
    2625         $params = func_get_args(); 
    2726         unset($params[0]); 
    2827         unset($params[1]); 
    29          echo nl2br(htmlspecialchars(jLocale::get($locale, $params))); 
     28         echo htmlspecialchars(jLocale::get($locale, $params)); 
    3029     }else{ 
    31          echo nl2br(htmlspecialchars(jLocale::get($locale))); 
     30         echo htmlspecialchars(jLocale::get($locale)); 
    3231     } 
    3332} 
  • branches/1.0.x/testapp/modules/jelix_tests/tests/core.jlocale.html_cli.php

    r954 r956  
    177177    } 
    178178     
    179     function testLineBreak(){ 
    180         $this->assertEqual("This sentence has a line break\n after the word \"break\"",jLocale::get('tests4.string.with.line.break',null,'en_EN','UTF-8')); 
    181     } 
    182      
    183     function testLineBreakWithMultiLineString(){ 
    184         $this->assertEqual("This multiline sentence\n has two line breaks\n after the words \"sentence\" and \"breaks\"",jLocale::get('tests4.multiline.string.with.line.break',null,'en_EN','UTF-8')); 
    185     } 
    186      
    187179} 
    188180 
  • branches/1.0.x/testapp/modules/jelix_tests/tests/core.jlocale.html_cli.php

    r954 r956  
    177177    } 
    178178     
    179     function testLineBreak(){ 
    180         $this->assertEqual("This sentence has a line break\n after the word \"break\"",jLocale::get('tests4.string.with.line.break',null,'en_EN','UTF-8')); 
    181     } 
    182      
    183     function testLineBreakWithMultiLineString(){ 
    184         $this->assertEqual("This multiline sentence\n has two line breaks\n after the words \"sentence\" and \"breaks\"",jLocale::get('tests4.multiline.string.with.line.break',null,'en_EN','UTF-8')); 
    185     } 
    186      
    187179} 
    188180 
  • branches/1.0.x/testapp/modules/jelix_tests/tests/core.jlocale.html_cli.php

    r954 r956  
    177177    } 
    178178     
    179     function testLineBreak(){ 
    180         $this->assertEqual("This sentence has a line break\n after the word \"break\"",jLocale::get('tests4.string.with.line.break',null,'en_EN','UTF-8')); 
    181     } 
    182      
    183     function testLineBreakWithMultiLineString(){ 
    184         $this->assertEqual("This multiline sentence\n has two line breaks\n after the words \"sentence\" and \"breaks\"",jLocale::get('tests4.multiline.string.with.line.break',null,'en_EN','UTF-8')); 
    185     } 
    186      
    187179} 
    188180 
  • branches/1.0.x/testapp/modules/jelix_tests/tests/core.jlocale.html_cli.php

    r954 r956  
    177177    } 
    178178     
    179     function testLineBreak(){ 
    180         $this->assertEqual("This sentence has a line break\n after the word \"break\"",jLocale::get('tests4.string.with.line.break',null,'en_EN','UTF-8')); 
    181     } 
    182      
    183     function testLineBreakWithMultiLineString(){ 
    184         $this->assertEqual("This multiline sentence\n has two line breaks\n after the words \"sentence\" and \"breaks\"",jLocale::get('tests4.multiline.string.with.line.break',null,'en_EN','UTF-8')); 
    185     } 
    186      
    187179} 
    188180 
Download in other formats: Unified Diff Zip Archive