Development

Changeset 28606

You must first sign up to be able to contribute.

Changeset 28606

Show
Ignore:
Timestamp:
03/18/10 15:31:23 (5 years ago)
Author:
FabianLange
Message:

[tools] adjustments for icu 4.4/cldr 1.8

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/i18n-icu2dat/icu-converter.php

    r28046 r28606  
    1313 * How to use: 
    1414 *  - put this file and sfYaml classes in a directory 
    15  *  - use spec version 1.2 for sfYaml to parse 'no' correctly as norwegian (not as false) (default for up2dte sfYaml) 
    1615 *  - download ICU files in subdirectory called "data" 
    1716 *  - preprocess some ICU files. 
     17 *  - run 
    1818 */ 
    1919/** 
     
    2121 * due to line wrappings in icu files: 
    2222 * region/es.txt line 141 HK{"Región Administrativa Especial de Hong Kong de la República Popular China"} 
    23  * locales/he.txt line 1788 fix date time patterns 
     23 * locales/he.txt line 337 fix date time patterns 
    2424 * region/it.txt line 140 HK{"Regione Amministrativa Speciale di Hong Kong della Repubblica Popolare Cinese"} 
    25  * region/it.txt line 193 MO{"Regione Amministrativa Speciale di Macao della Repubblica Popolare Cinese"} 
     25 * region/it.txt line 198 MO{"Regione Amministrativa Speciale di Macao della Repubblica Popolare Cinese"} 
    2626 * 
    2727 * Note: feel free to supply a patch that eliminates the need of preprocessing 
    2828 */ 
    2929 
    30 // Include the symfony YAML library (can be obtained from symfony 1.3 +) 
     30// Include the symfony YAML library (can be obtained from symfony components) 
     31// http://svn.symfony-project.com/components/yaml/branches/1.0/lib 
    3132include_once('sfYaml.php'); 
    3233 
     
    6162 
    6263// dirty hack to avoid special handling of the metazone input data 
    63 copy('data/misc/metazoneInfo.txt', 'data/locales/metazoneInfo.txt'); 
     64copy('data/misc/metaZones.txt', 'data/locales/metaZones.txt'); 
    6465 
    6566// since newer icu releases the data is split n multiple files 
     
    195196} 
    196197 
    197 // postprocess the metazoneInfo.dat into root.dat 
    198 $metazoneInfo = unserialize(file_get_contents('data/metazoneInfo.dat')); 
     198// postprocess the metaZones.dat into root.dat 
     199$metazoneInfo = unserialize(file_get_contents('data/metaZones.dat')); 
    199200$zones = array(); 
    200201foreach ($metazoneInfo['metazoneMappings'] as $key => $value) 
     
    208209$rootData['TimeZones'] = $zones; 
    209210file_put_contents('data/root.dat',serialize($rootData)); 
    210 unlink('data/metazoneInfo.dat'); 
     211unlink('data/metaZones.dat');