Changeset 378

Show
Ignore:
Timestamp:
03/06/07 15:21:40 (2 years ago)
Author:
laurentj
Message:

fix notice (regression) when a locale is empty in a properties file; remove BUILD_DATE and LIB_VERSION parameter from the generated BUILD file, so we can use it to build jelix again

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/buildjelix.php

    r357 r378  
    173173 
    174174// creation du fichier d'infos sur le build 
    175 $view = array('PHP_VERSION_TARGET', 'LIB_VERSION', 'SVN_REVISION', 'ENABLE_PHP_FILTER', 
     175$view = array('PHP_VERSION_TARGET', 'SVN_REVISION', 'ENABLE_PHP_FILTER', 
    176176    'ENABLE_PHP_JSON', 'ENABLE_PHP_XMLRPC', 'WITH_BYTECODE_CACHE', 'ENABLE_DEVELOPER', 
    177177    'ENABLE_OPTIMIZED_SOURCE', 'STRIP_COMMENT', 'ENABLE_OLD_CLASS_NAMING' ); 
    178178 
    179 $infos = 'BUILD_DATE= "'.date('Y-m-d H:i')."\"\n".ENV::getIniContent($view); 
     179$infos = '; --- build date:  '.date('Y-m-d H:i')."\n; --- lib version: ".$LIB_VERSION."\n".ENV::getIniContent($view); 
    180180 
    181181file_put_contents($BUILD_TARGET_PATH.'lib/jelix/BUILD', $infos); 
  • trunk/lib/jelix/core/jLocale.class.php

    r372 r378  
    130130                        $multiline= ($match[3] =="\\"); 
    131131                        $sp = preg_split('/(?<!\\\\)\#/', $match[2], -1 ,PREG_SPLIT_NO_EMPTY); 
    132                         $value=trim(str_replace('\#','#',$sp[0])); 
    133                         if($value == '\w'){ 
    134                             $value = ' '; 
     132                        if(count($sp)){ 
     133                            $value=trim(str_replace('\#','#',$sp[0])); 
     134                            if($value == '\w'){ 
     135                                $value = ' '; 
     136                            } 
     137                        }else{ 
     138                            $value=''; 
    135139                        } 
    136140 
  • trunk/testapp/modules/unittest/classes/utjlocale.class.php

    r372 r378  
    4444    protected $firstlist = array( 
    4545        'test_A.properties' => '<null> </null>', 
    46         'test_B.properties' => '<array>array("aaa"=>"bbb")</array>', 
     46        'test_B.properties' => '<array>array("aaa"=>"bbb","ccc"=>"")</array>', 
    4747        'test_C.properties' => '<array>array("aaa"=>"bbb","ccc"=>"ddd")</array>', 
    4848        'test_D.properties' => '<array>array("module.description"=&gt;"Tests unitaires jelix")</array>', 
  • trunk/testapp/modules/unittest/locales/test_B.properties

    r371 r378  
    11aaa = bbb 
     2ccc = 
Download in other formats: Unified Diff Zip Archive