/external/icu/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/ |
D | SupplementalData.java | 179 static LocaleId parse(String localeId) { in parse() argument 180 Matcher m = LOCALE_ID.matcher(checkNotNull(localeId, "locale ID cannot be null")); in parse() 181 checkArgument(m.matches(), "invalid locale ID: %s", localeId); in parse() local 290 public Optional<String> maximize(String localeId) { in maximize() argument 291 return addLikelySubtags(localeId).map(Object::toString); in maximize() 301 public String replaceDeprecatedTags(String localeId) { in replaceDeprecatedTags() argument 302 if (localeId.equals("root")) { in replaceDeprecatedTags() 303 return localeId; in replaceDeprecatedTags() 305 LocaleId id = LocaleId.parse(localeId); in replaceDeprecatedTags() 334 checkArgument(!regions.isEmpty(), "invalid empty region list for %s", localeId); in replaceDeprecatedTags() [all …]
|
D | PseudoLocales.java | 85 private static PseudoType fromId(String localeId) { in fromId() argument 86 return checkNotNull(ID_MAP.get(localeId), "unknown pseduo locale: %s", localeId); in fromId() 93 private final String localeId; field in PseudoLocales.PseudoType 98 PseudoType(String localeId, Function<Boolean, PseudoText> textSupplier, String exemplars) { in PseudoType() argument 99 this.localeId = localeId; in PseudoType() 105 return localeId; in getLocaleId() 162 @Override public CldrData getDataForLocale(String localeId, CldrResolution resolution) { in getDataForLocale() argument 163 if (PseudoType.getLocaleIds().contains(localeId)) { in getDataForLocale() 165 enData, pathsToProcess, resolution, PseudoType.fromId(localeId)); in getDataForLocale() 167 return src.getDataForLocale(localeId, resolution); in getDataForLocale()
|
D | AlternateLocaleData.java | 92 public CldrData getDataForLocale(String localeId, CldrResolution resolution) { in getDataForLocale() argument 93 return new AltData(src.getDataForLocale(localeId, resolution), localeId); in getDataForLocale() 115 AltData(CldrData srcData, String localeId) { in AltData() argument 118 if (!localeAltPaths.row(localeId).isEmpty()) { in AltData() 122 combinedPaths.putAll(localeAltPaths.row(localeId)); in AltData()
|
D | DependencyGraph.java | 27 void addParent(String localeId, String parentId) { in addParent() argument 32 if (!aliasMap.containsKey(localeId)) { in addParent() 33 parentMap.put(localeId, parentId); in addParent()
|
/external/icu/tools/cldr/cldr-to-icu/src/test/java/org/unicode/icu/tool/cldrtoicu/testing/ |
D | FakeDataSupplier.java | 34 public FakeDataSupplier addLocaleData(String localeId, CldrValue... values) { in addLocaleData() argument 36 unresolvedData.put(localeId, v.getPath(), v); in addLocaleData() 41 public FakeDataSupplier setLocaleParent(String localeId, String parentId) { in setLocaleParent() argument 42 parentLocales.put(localeId, parentId); in setLocaleParent() 51 @Override public CldrData getDataForLocale(String localeId, CldrResolution resolution) { in getDataForLocale() argument 54 values = unresolvedData.row(localeId).values(); in getDataForLocale() 60 unresolvedData.row(localeId).forEach((p, v) -> { in getDataForLocale() 65 if (localeId.equals("root")) { in getDataForLocale() 68 localeId = parentLocales.getOrDefault(localeId, "root"); in getDataForLocale()
|
/external/cldr/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ |
D | LanguageCodeConverter.java | 195 public static String toGoogleLocaleId(String localeId) { in toGoogleLocaleId() argument 197 localeId = localeId.replace("-", "_"); in toGoogleLocaleId() 198 String result = CLDR_GOOGLE.get(localeId); in toGoogleLocaleId() 199 result = result == null ? localeId : result; in toGoogleLocaleId() 203 public static String fromGoogleLocaleId(String localeId) { in fromGoogleLocaleId() argument 204 localeId = localeId.replace("_", "-"); in fromGoogleLocaleId() 206 String result = GOOGLE_CLDR.get(localeId); in fromGoogleLocaleId() 207 result = result == null ? localeId : result; in fromGoogleLocaleId() 211 public static String toUnderbarLocale(String localeId) { in toUnderbarLocale() argument 212 return localeId.replace("-", "_"); in toUnderbarLocale() [all …]
|
D | CopySubdivisionsIntoMain.java | 88 for (String localeId : mainFactory.getAvailable()) { in doAfter() 90 boolean isRoot = "root".equals(localeId); in doAfter() 91 CLDRFile mainFile = mainFactory.make(localeId, false); in doAfter() 115 subdivisionFile = subdivisionFactory.make(localeId, false); // lazy open in doAfter() 117 … System.out.println("No existing /subdivisions/ file, so creating one: " + localeId); in doAfter() 118 subdivisionFile = new CLDRFile(new SimpleXMLSource(localeId)); in doAfter() 127 …System.out.println(localeId + " — ERROR: Value == ID! for " + value + ". See https://unicode.org/c… in doAfter() 137 writeFile(MAIN_TARGET_DIR, localeId, mainFileOut); in doAfter() 139 System.out.println("Removing /main/ subdivisions: " + localeId); in doAfter() 143 writeFile(SUBDIVISION_TARGET_DIR, localeId, subdivisionFile); in doAfter() [all …]
|
D | GenerateProductionData.java | 271 String localeId = file.substring(0, file.length()-4); in copyFilesAndReturnIsEmpty() local 273 if (!FILE_MATCH.reset(localeId).matches()) { in copyFilesAndReturnIsEmpty() 277 boolean isRoot = localeId.equals("root"); in copyFilesAndReturnIsEmpty() 281 CLDRFile cldrFileUnresolved = factory.make(localeId, false); in copyFilesAndReturnIsEmpty() 282 CLDRFile cldrFileResolved = factory.make(localeId, true); in copyFilesAndReturnIsEmpty() 289 boolean isArabicSpecial = localeId.equals("ar") || localeId.startsWith("ar_"); in copyFilesAndReturnIsEmpty() 298 if (debugPath != null && localeId.equals(debugLocale) && xpath.equals(debugPath)) { in copyFilesAndReturnIsEmpty() 338 localeToSubdivisionsToMigrate.put(localeId, Pair.of(xpath, value)); in copyFilesAndReturnIsEmpty() 346 Level coverage = SDI.getCoverageLevel(xpath, localeId); in copyFilesAndReturnIsEmpty() 384 … Collection<Pair<String, String>> path_values = localeToSubdivisionsToMigrate.get(localeId); in copyFilesAndReturnIsEmpty() [all …]
|
D | FindHardInheritance.java | 87 for (String localeId : factory.getAvailable()) { in main() 88 Info info = getCounts(dir, factory, localeId, output); in main() 90 + "\t" + localeId in main() 97 …private static Info getCounts(String dir, Factory factory, String localeId, Output<Info> cpsInfo) { in getCounts() argument 111 CoverageLevel2 coverage = CoverageLevel2.getInstance(localeId); in getCounts() 112 CLDRFile cldrFile = factory.make(localeId, true, DraftStatus.contributed); in getCounts() 113 CLDRFile unresolvedCldrFile = factory.make(localeId, false, DraftStatus.contributed); in getCounts()
|
D | RemoveEmptyCldrFiles.java | 16 for (String localeId : factory.getAvailable()) { in main() 17 CLDRFile cldrFile = factory.make(localeId, false); in main() 18 File file = new File(CLDRPaths.ANNOTATIONS_DIRECTORY, localeId + ".xml"); in main()
|
/external/cldr/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/ |
D | TestExampleDependencies.java | 87 for (String localeId : locales) { in useRecording() 88 System.out.println(localeId); in useRecording() 89 addDependenciesForLocale(dependencies, localeId); in useRecording() 96 private void addDependenciesForLocale(Multimap<String, String> dependencies, String localeId) { in addDependenciesForLocale() argument 97 RecordingCLDRFile cldrFile = makeRecordingCldrFile(localeId); in addDependenciesForLocale() 130 private RecordingCLDRFile makeRecordingCldrFile(String localeId) { in makeRecordingCldrFile() argument 131 XMLSource topSource = factory.makeSource(localeId); in makeRecordingCldrFile() 132 List<XMLSource> parents = getParentSources(factory, localeId); in makeRecordingCldrFile() 138 for (String localeId : locales) { in useModifying() 140 + localeId in useModifying() [all …]
|
D | CheckYear.java | 73 public void recordStockTime(String localeId, String stock, in recordStockTime() argument 77 stock2skeleton2locales.get("time-" + stock).put(skeleton, localeId); in recordStockTime() 81 public void recordStock(String localeId, String stock, in recordStock() argument 86 skeleton.replace("yyyy", "y"), localeId); in recordStock() 322 String localeId = entry.getValue(); 323 CLDRFile file = factory.make(localeId, true); 324 LocaleInfo localeInfo = data.get(localeId); 332 localeInfo.recordStock(localeId, stock, dateTimePattern); 339 localeInfo.recordStockTime(localeId, stock, dateTimePattern); 370 String localeId = entry.getValue(); [all …]
|
D | TestCoverage.java | 68 String localeId = (String) test[0]; in TestSelected() local 72 CoverageLevel2 coverageLevel = CoverageLevel2.getInstance(sdi, localeId); in TestSelected() 75 assertEquals(localeId + " : " + path + " : ", expectedLevel, level); in TestSelected() 76 CLDRLocale loc = CLDRLocale.getInstance(localeId); in TestSelected() 78 assertEquals(localeId + " : " + path + " : ", expectedVotes, actualVotes); in TestSelected()
|
/external/cldr/tools/cldr-code/src/test/java/org/unicode/cldr/test/ |
D | TestCheckLogicalGroupings.java | 86 for (String localeId : locales) { in testSameCoverageLevel() 87 sameLevel(localeId); in testSameCoverageLevel() 91 void sameLevel(String localeId) { in sameLevel() argument 93 final CLDRFile cldrFile = config.getCLDRFile(localeId, true); in sameLevel() 95 final CoverageLevel2 coverageLevel = CoverageLevel2.getInstance(sdi, localeId); in sameLevel() 101 testGrouping(grouping, coverageLevel, localeId); in sameLevel() 107 private void testGrouping(Set<String> grouping, CoverageLevel2 coverageLevel, String localeId) { in testGrouping() argument 111 assertNotEquals(level, Level.UNDETERMINED, localeId + " " + path); in testGrouping() 115 … assertEquals(firstLevel, level, groupingDescription(grouping, coverageLevel, localeId)); in testGrouping() 120 …e String groupingDescription(Set<String> grouping, CoverageLevel2 coverageLevel, String localeId) { in groupingDescription() argument [all …]
|
/external/cldr/tools/cldr-code/src/main/java/org/unicode/cldr/util/ |
D | VettingParameters.java | 35 final String localeId = locale.getBaseName(); in setFiles() local 36 final CLDRFile sourceFile = sourceFactory.make(localeId, true/* resolved */); in setFiles() 37 final CLDRFile baselineFile = baselineFactory.make(localeId, true); in setFiles() 48 final String localeId = locale.getBaseName(); in setFilesForBaseline() local 49 final CLDRFile baselineFile = baselineFactory.make(localeId, true); in setFilesForBaseline() 57 final CLDRFile sourceFile = baselineFactory.make(localeId, true/* resolved */); in setFilesForBaseline()
|
D | XMLNormalizingLoader.java | 59 private final String localeId; field in XMLNormalizingLoader.XMLSourceCacheKey 63 public XMLSourceCacheKey(String localeId, List<File> dirs, DraftStatus minimalDraftStatus) { in XMLSourceCacheKey() argument 64 this.localeId = localeId; in XMLSourceCacheKey() 78 this.hashCode = Objects.hash(this.localeId, this.dirs, this.minimalDraftStatus); in XMLSourceCacheKey() 107 if (!Objects.equals(localeId, other.localeId)) { in equals() 114 …public static XMLSource getFrozenInstance(String localeId, List<File> dirs, DraftStatus minimalDra… in getFrozenInstance() argument 115 XMLSourceCacheKey key = new XMLSourceCacheKey(localeId, dirs, minimalDraftStatus); in getFrozenInstance() 122 File file = new File(key.dirs.iterator().next(), key.localeId + ".xml"); in makeXMLSource() 123 source = loadXMLFile(file, key.localeId, key.minimalDraftStatus); in makeXMLSource() 135 …XMLSourceCacheKey singleKey = new XMLSourceCacheKey(key.localeId, dirList, key.minimalDraftStatus); in makeXMLSource() [all …]
|
/external/cldr/tools/cldr-code/src/main/java/org/unicode/cldr/api/ |
D | LocaleIds.java | 80 public static void checkCldrLocaleId(String localeId) { in checkCldrLocaleId() argument 83 checkArgument(LOCALE_ID.matcher(localeId).matches() || localeId.equals("root"), in checkCldrLocaleId() 84 "bad locale ID: %s", localeId); in checkCldrLocaleId()
|
D | CldrDataSupplier.java | 167 public abstract CldrData getDataForLocale(String localeId, CldrResolution resolution); in getDataForLocale() argument 219 public CldrData getDataForLocale(String localeId, CldrResolution resolution) { in getDataForLocale() argument 220 LocaleIds.checkCldrLocaleId(localeId); in getDataForLocale() 222 if (factory.getAvailable().contains(localeId)) { in getDataForLocale() 224 factory.make(localeId, resolution == CldrResolution.RESOLVED)); in getDataForLocale()
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/message2/ |
D | TestCase.java | 40 this.locale = (builder.localeId == null) in TestCase() 42 : Locale.forLanguageTag(builder.localeId); in TestCase() 51 private String localeId; field in TestCase.Builder 88 public TestCase.Builder locale(String localeId) { in locale() argument 89 this.localeId = localeId; in locale()
|
/external/icu/icu4c/source/common/ |
D | locresdata.cpp | 152 _uloc_getOrientationHelper(const char* localeId, in _uloc_getOrientationHelper() argument 162 uloc_canonicalize(localeId, localeBuffer, sizeof(localeBuffer), status); in _uloc_getOrientationHelper() 202 uloc_getCharacterOrientation(const char* localeId, in uloc_getCharacterOrientation() argument 205 return _uloc_getOrientationHelper(localeId, "characters", status); in uloc_getCharacterOrientation() 216 uloc_getLineOrientation(const char* localeId, in uloc_getLineOrientation() argument 219 return _uloc_getOrientationHelper(localeId, "lines", status); in uloc_getLineOrientation()
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/message2/ |
D | TestCase.java | 41 this.locale = (builder.localeId == null) in TestCase() 43 : Locale.forLanguageTag(builder.localeId); in TestCase() 52 private String localeId; field in TestCase.Builder 89 public TestCase.Builder locale(String localeId) { in locale() argument 90 this.localeId = localeId; in locale()
|
/external/cronet/third_party/icu/source/common/ |
D | locresdata.cpp | 152 _uloc_getOrientationHelper(const char* localeId, in _uloc_getOrientationHelper() argument 162 uloc_canonicalize(localeId, localeBuffer, sizeof(localeBuffer), status); in _uloc_getOrientationHelper() 202 uloc_getCharacterOrientation(const char* localeId, in uloc_getCharacterOrientation() argument 205 return _uloc_getOrientationHelper(localeId, "characters", status); in uloc_getCharacterOrientation() 216 uloc_getLineOrientation(const char* localeId, in uloc_getLineOrientation() argument 219 return _uloc_getOrientationHelper(localeId, "lines", status); in uloc_getLineOrientation()
|
/external/icu/android_icu4j/src/main/java/android/icu/impl/ |
D | PluralRulesLoader.java | 65 String localeId = ULocale.canonicalize(locale.getBaseName()); in getFunctionalEquivalent() local 67 isAvailable[0] = idMap.containsKey(localeId); in getFunctionalEquivalent() 168 String localeId = ULocale.canonicalize(locale.getBaseName()); in getRulesIdForLocale() local 170 while (null == (rulesId = idMap.get(localeId))) { in getRulesIdForLocale() 171 int ix = localeId.lastIndexOf("_"); in getRulesIdForLocale() 175 localeId = localeId.substring(0, ix); in getRulesIdForLocale()
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
D | PluralRulesLoader.java | 63 String localeId = ULocale.canonicalize(locale.getBaseName()); in getFunctionalEquivalent() local 65 isAvailable[0] = idMap.containsKey(localeId); in getFunctionalEquivalent() 166 String localeId = ULocale.canonicalize(locale.getBaseName()); in getRulesIdForLocale() local 168 while (null == (rulesId = idMap.get(localeId))) { in getRulesIdForLocale() 169 int ix = localeId.lastIndexOf("_"); in getRulesIdForLocale() 173 localeId = localeId.substring(0, ix); in getRulesIdForLocale()
|
/external/icu/tools/cldr/cldr-to-icu/src/test/java/org/unicode/icu/tool/cldrtoicu/mapper/ |
D | LocaleMapperTest.java | 357 IcuData process(String localeId) { in process() argument 358 return process(localeId, empty()); in process() 361 IcuData process(String localeId, Optional<String> defCalendar) { in process() argument 362 IcuData icuData = new IcuData(localeId, true); in process() 365 src.getDataForLocale(localeId, UNRESOLVED), in process() 366 src.getDataForLocale(localeId, RESOLVED), in process()
|