[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 

Changeset 13601


Ignore:
Timestamp:
09/01/17 09:00:48 (12 months ago)
Author:
mdavis
Message:

cldrbug 10610: Update GenerateBirths

Location:
trunk/tools/java/org/unicode/cldr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/java/org/unicode/cldr/test/OutdatedPaths.java

    r13288 r13601  
    1414import java.util.Set; 
    1515 
     16import org.unicode.cldr.util.CLDRConfig; 
    1617import org.unicode.cldr.util.CLDRFile; 
    17 import org.unicode.cldr.util.CLDRPaths; 
    1818import org.unicode.cldr.util.CldrUtility; 
    1919import org.unicode.cldr.util.Factory; 
     
    7171            Map<Long, PathHeader> id2header = new HashMap<Long, PathHeader>(); 
    7272            if (DEBUG) { 
    73                 Factory factory = Factory.make(CLDRPaths.MAIN_DIRECTORY, ".*"); 
     73                Factory factory = CLDRConfig.getInstance().getMainAndAnnotationsFactory(); 
    7474                id2header = getIdToPath(factory); 
    7575            } 
  • trunk/tools/java/org/unicode/cldr/tool/GenerateBirth.java

    r13450 r13601  
    77import java.io.PrintWriter; 
    88import java.util.ArrayList; 
     9import java.util.Arrays; 
    910import java.util.Collections; 
    1011import java.util.HashMap; 
     
    2122import org.unicode.cldr.test.OutdatedPaths; 
    2223import org.unicode.cldr.tool.Option.Options; 
     24import org.unicode.cldr.util.CLDRConfig; 
    2325import org.unicode.cldr.util.CLDRFile; 
    2426import org.unicode.cldr.util.CLDRPaths; 
     
    2628import org.unicode.cldr.util.LanguageTagParser; 
    2729import org.unicode.cldr.util.PatternCache; 
     30import org.unicode.cldr.util.SimpleFactory; 
    2831import org.unicode.cldr.util.StringId; 
    2932 
     
    6669        DEBUG = myOptions.get("debug").doesOccur(); 
    6770 
     71        final CLDRConfig config = CLDRConfig.getInstance(); 
     72 
     73 
    6874        String filePattern = myOptions.get("file").getValue(); 
    6975 
    7076        ArrayList<Factory> list = new ArrayList<Factory>(); 
    7177        for (Versions version : VERSIONS) { 
    72             Factory aFactory = Factory.make( 
    73                 (version == Versions.trunk 
     78            String base = version == Versions.trunk 
    7479                ? CLDRPaths.BASE_DIRECTORY 
    75                     : CLDRPaths.ARCHIVE_DIRECTORY + "cldr-" + version + "/") + "common/main/", 
    76                     filePattern 
    77                 ); 
     80                    : CLDRPaths.ARCHIVE_DIRECTORY + "cldr-" + version + "/"; 
     81            File[] paths = version.compareTo(Versions.v27_0) > 0 // warning, order is reversed 
     82                ? new File[] { new File(base + "common/main/") } 
     83                : new File[] { new File(base + "common/main/"), new File(base + "common/annotations/") }; 
     84            System.out.println(version + ", " + Arrays.asList(paths)); 
     85            Factory aFactory = SimpleFactory.make(paths, filePattern); 
    7886            list.add(aFactory); 
    7987        } 
  • trunk/tools/java/org/unicode/cldr/util/CLDRFile.java

    r13565 r13601  
    16841684                String formerPath = target.getFullXPath(fullXPath); 
    16851685                if (!former.equals(value) || !fullXPath.equals(formerPath)) { 
    1686                     if (!fullXPath.startsWith("//ldml/identity/version")) { 
     1686                    if (!fullXPath.startsWith("//ldml/identity/version") && !fullXPath.startsWith("//ldml/identity/generation")) { 
    16871687                        warnOnOverride(former, formerPath); 
    16881688                    } 
Note: See TracChangeset for help on using the changeset viewer.