Home
last modified time | relevance | path

Searched refs:icuData (Results 1 – 15 of 15) sorted by relevance

/external/cldr/tools/java/org/unicode/cldr/icu/
DPluralsMapper.java45 IcuData icuData = new IcuData("plurals.xml, ordinals.xml", "plurals", false); in fillFromCldr() local
46 fillType(PluralType.cardinal, icuData); in fillFromCldr()
47 fillType(PluralType.ordinal, icuData); in fillFromCldr()
48 return icuData; in fillFromCldr()
51 private void fillType(PluralType type, IcuData icuData) { in fillType() argument
52 PluralsHandler handler = new PluralsHandler(type, icuData); in fillType()
64 private IcuData icuData; field in PluralsMapper.PluralsHandler
67 public PluralsHandler(PluralType type, IcuData icuData) { in PluralsHandler() argument
68 this.icuData = icuData; in PluralsHandler()
103 icuData.add("/rules/set" + numRuleSets + '/' + rule.get0(), rule.get1()); in endElement()
[all …]
DNewLdml2IcuConverter.java266 IcuData[] icuData = mapper.fillFromCldr(); in processBcp47Data() local
267 for (IcuData data : icuData) { in processBcp47Data()
273 IcuData icuData; in processSupplemental() local
279 icuData = mapper.fillFromCldr(); in processSupplemental()
284 icuData = mapper.fillFromCldr(); in processSupplemental()
289 icuData = mapper.fillFromCldr(); in processSupplemental()
297 icuData = mapper.fillFromCldr(type.toString()); in processSupplemental()
300 writeIcuData(icuData, destinationDir); in processSupplemental()
311 private void writeIcuData(IcuData icuData, String outputDir) { in writeIcuData() argument
312 if (icuData.keySet().size() == 0) { in writeIcuData()
[all …]
DDayPeriodsMapper.java26 IcuData icuData = new IcuData("dayPeriods.xml", "dayPeriods", false); in fillFromCldr() local
27 DayPeriodsHandler handler = new DayPeriodsHandler(icuData); in fillFromCldr()
30 return icuData; in fillFromCldr()
34 private IcuData icuData; field in DayPeriodsMapper.DayPeriodsHandler
38 public DayPeriodsHandler(IcuData icuData) { in DayPeriodsHandler() argument
39 this.icuData = icuData; in DayPeriodsHandler()
57 icuData.add("/locales" + selection + "/" + locale, "set" + setNum); in startElement()
66 icuData.add(prefix + attrName, attr.getValue(i)); in startElement()
DRbnfMapper.java27 IcuData icuData = new IcuData("common/rbnf/" + locale + ".xml", locale, true); in fillFromCldr() local
28 RbnfHandler handler = new RbnfHandler(icuData); in fillFromCldr()
32 icuData.setFileComment("ICU <specials> source: <path>/xml/rbnf/" + locale + ".xml"); in fillFromCldr()
44 icuData.add("/%%Parent", parent); in fillFromCldr()
46 return new IcuData[] { icuData }; in fillFromCldr()
63 private IcuData icuData; field in RbnfMapper.RbnfHandler
69 public RbnfHandler(IcuData icuData) { in RbnfHandler() argument
70 this.icuData = icuData; in RbnfHandler()
82 icuData.add(rbPath, value); in startElement()
93icuData.replace("/Version", new String[] { MapperUtils.formatVersion(attr.getValue("number")) }); in startElement()
[all …]
DBcp47Mapper.java68 private void fillFromFile(String filename, IcuData icuData, Map<String, String> keyMap) { in fillFromFile() argument
69 KeywordHandler handler = new KeywordHandler(icuData, keyMap); in fillFromFile()
86 private IcuData icuData; field in Bcp47Mapper.KeywordHandler
98 public KeywordHandler(IcuData icuData, Map<String, String> keyMap) { in KeywordHandler() argument
99 this.icuData = icuData; in KeywordHandler()
144 icuData.add(bcpTypeAliasPrefix + typeName, preferredTypeName); in startElement()
153 icuData.add(typeMapPrefix + typeName, ""); in startElement()
157 icuData.add(typeMapPrefix + formatName(mainAlias), typeName); in startElement()
159 icuData.add(typeAliasPrefix + formatName(aliases[i]), mainAlias); in startElement()
DBreakIteratorMapper.java40 …IcuData icuData = new IcuData("common/segments/" + locale + ".xml ../../xml/brkitr/" + locale + ".… in fillFromCldr() local
42 BreakIteratorHandler handler = new BreakIteratorHandler(icuData); in fillFromCldr()
87 icuData.add( in fillFromCldr()
93 return new IcuData[] { icuData }; in fillFromCldr()
100 private IcuData icuData; field in BreakIteratorMapper.BreakIteratorHandler
105 public BreakIteratorHandler(IcuData icuData) { in BreakIteratorHandler() argument
106 this.icuData = icuData; in BreakIteratorHandler()
114icuData.add("/Version", new String[] { MapperUtils.formatVersion(attr.getValue("number")) }); in startElement()
123 icuData.add(segPath, value.toString()); in endElement()
DCollationMapper.java104 IcuData icuData = new IcuData("icu-config.xml & build.xml", subLocale, true); in fillSubLocale() local
105 icuData.setFileComment("validSubLocale of \"" + locale + "\""); in fillSubLocale()
106 icuData.add("/___", ""); in fillSubLocale()
107 return icuData; in fillSubLocale()
122 private IcuData icuData; field in CollationMapper.CollationHandler
130 public CollationHandler(IcuData icuData) { in CollationHandler() argument
131 this.icuData = icuData; in CollationHandler()
148 icuData.add("/Version", MapperUtils.formatVersion(attr.getValue("number"))); in startElement()
178 icuData.add("/collations/default", currentText.toString());
218 if (isShort || !icuData.containsKey(rbPath)) {
[all …]
DCompareIcuOutput.java100 IcuData icuData = new IcuData(locale + ".xml", locale, true); in loadDataFromTextfiles() local
103 parseRB(filename, icuData, comments); in loadDataFromTextfiles()
107 return icuData; in loadDataFromTextfiles()
155 private static void printAllInSet(IcuData icuData, Set<String> paths, StringBuffer buffer) { in printAllInSet() argument
158 printValues(icuData.get(path), buffer); in printAllInSet()
212 … static void parseRB(String filename, IcuData icuData, List<R2<MyTokenizer.Type, String>> comments) in parseRB() argument
293 addPath(path, lastLabel, icuData); in parseRB()
303 addPath(path, arrayValues.toArray(array), icuData); in parseRB()
318 addPath(path, lastLabel, icuData); in parseRB()
330 private static void addPath(String path, String value, IcuData icuData) { in addPath() argument
[all …]
DIcuDataSplitter.java88 public Map<String, IcuData> split(IcuData icuData, String fallbackDir) { in split() argument
90 String sourceFile = icuData.getSourceFile(); in split()
91 String name = icuData.getName(); in split()
92 boolean hasFallback = icuData.hasFallback(); in split()
99 for (Entry<String, List<String[]>> entry : icuData.entrySet()) { in split()
126 String comment = icuData.getFileComment(); in split()
DPluralRangesMapper.java42 IcuData icuData = new IcuData("pluralRanges.xml", "pluralRanges", false); in fillFromCldr() local
51 icuData.add("/locales/" + locale, format(number)); in fillFromCldr()
64 icuData.add("/rules/" + format(setNumber) + intStyle, in fillFromCldr()
72 return icuData; in fillFromCldr()
DLocaleMapper.java285 IcuData icuData = new IcuData("common/main/" + locale + ".xml", locale, true, enumMap); in fillFromCldr() local
287 icuData.setFileComment("ICU <specials> source: <path>/common/main/" + locale + ".xml"); in fillFromCldr()
289 fillIcuData(pathValueMap, comparator, icuData); in fillFromCldr()
292 hackAddExtras(resolvedCldr, locale, icuData); in fillFromCldr()
293 return new IcuData[] { icuData }; in fillFromCldr()
297 Comparator<String> comparator, IcuData icuData) { in fillIcuData() argument
300 icuData.addAll(rbPath, pathValueMap.get(rbPath).sortValues(comparator)); in fillIcuData()
395 private void hackAddExtras(CLDRFile cldrResolved, String locale, IcuData icuData) { in hackAddExtras() argument
399 icuData.add("/%%Parent", parent); in hackAddExtras()
404 icuData.add("/Version", MapperUtils.formatVersion(version)); in hackAddExtras()
[all …]
DIcuTextWriter.java96 public static void writeToFile(IcuData icuData, String dirPath) throws IOException { in writeToFile() argument
97 String name = icuData.getName(); in writeToFile()
101 String header = getHeader().replace("%source%", icuData.getSourceFile()); in writeToFile()
103 if (icuData.getFileComment() != null) { in writeToFile()
105 out.append(" * ").append(icuData.getFileComment()).println(); in writeToFile()
111 if (!icuData.hasFallback()) out.append(":table(nofallback)"); in writeToFile()
112 List<String> sortedPaths = new ArrayList<String>(icuData.keySet()); in writeToFile()
140 List<String[]> values = icuData.get(path); in writeToFile()
DMapper.java56 IcuData icuData = curArray[curIndex]; in next() local
57 sources.add(icuData.getName()); in next()
60 return icuData; in next()
DSupplementalMapper.java252 IcuData icuData = new IcuData(category + ".xml", outputName, false, enumMap); in fillFromCldr() local
255 icuData.addAll(rbPath, values.sortValues(supplementalComparator)); in fillFromCldr()
260 for (String rbPath : icuData) { in fillFromCldr()
261 List<String[]> values = icuData.get(rbPath); in fillFromCldr()
269 List<String[]> replaceValues = icuData.get(replacePath); in fillFromCldr()
282 icuData.add("/cldrVersion", CLDRFile.GEN_VERSION); in fillFromCldr()
284 return icuData; in fillFromCldr()
/external/cldr/tools/java/org/unicode/cldr/tool/
DGenerateCldrCollationTests.java116 IcuData icuData = dataList[0]; in getCollationRules() local
117 for (String rbPath : icuData.keySet()) { in getCollationRules()
121 for (String line : icuData.get(rbPath).get(0)) { in getCollationRules()