Home
last modified time | relevance | path

Searched refs:localeId (Results 1 – 25 of 64) sorted by relevance

123

/external/icu/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/
DSupplementalData.java179 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 …]
DPseudoLocales.java85 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()
DAlternateLocaleData.java92 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()
DDependencyGraph.java27 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/
DFakeDataSupplier.java34 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/java/org/unicode/cldr/tool/
DLanguageCodeConverter.java195 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 …]
DCopySubdivisionsIntoMain.java88 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 …]
DGenerateProductionData.java273 String localeId = file.substring(0, file.length()-4); in copyFilesAndReturnIsEmpty() local
275 if (!FILE_MATCH.reset(localeId).matches()) { in copyFilesAndReturnIsEmpty()
279 boolean isRoot = localeId.equals("root"); in copyFilesAndReturnIsEmpty()
283 CLDRFile cldrFileUnresolved = factory.make(localeId, false); in copyFilesAndReturnIsEmpty()
284 CLDRFile cldrFileResolved = factory.make(localeId, true); in copyFilesAndReturnIsEmpty()
291 boolean isArabicSpecial = localeId.equals("ar") || localeId.startsWith("ar_"); in copyFilesAndReturnIsEmpty()
300 if (debugPath != null && localeId.equals(debugLocale) && xpath.equals(debugPath)) { in copyFilesAndReturnIsEmpty()
339 localeToSubdivisionsToMigrate.put(localeId, Pair.of(xpath, value)); in copyFilesAndReturnIsEmpty()
346 Level coverage = SDI.getCoverageLevel(xpath, localeId); in copyFilesAndReturnIsEmpty()
383 … Collection<Pair<String, String>> path_values = localeToSubdivisionsToMigrate.get(localeId); in copyFilesAndReturnIsEmpty()
[all …]
DFindHardInheritance.java87 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()
DRemoveEmptyCldrFiles.java16 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-unittest/src/org/unicode/cldr/unittest/
DTestExampleDependencies.java87 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 …]
DCheckYear.java73 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 …]
DTestCoverage.java68 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()
DTestKeyboard.java156 String localeId = keyboard.getLocaleId(); in testVerifyKeyboardLoad() local
157 if (!localeId.equals(keyboardId.replace(".xml", ""))) { in testVerifyKeyboardLoad()
158 …add(new IllegalArgumentException("filename and id don't match:\t" + keyboardId + "\t" + localeId)); in testVerifyKeyboardLoad()
/external/cldr/tools/java/org/unicode/cldr/api/
DLocaleIds.java77 public static void checkCldrLocaleId(String localeId) { in checkCldrLocaleId() argument
80 checkArgument(LOCALE_ID.matcher(localeId).matches() || localeId.equals("root"), in checkCldrLocaleId()
81 "bad locale ID: %s", localeId); in checkCldrLocaleId()
DCldrDataSupplier.java167 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/icu4c/source/common/
Dlocresdata.cpp152 _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()
Dlocdspnm.cpp176 virtual UnicodeString& localeDisplayName(const char* localeId,
219 DefaultLocaleDisplayNames::localeDisplayName(const char* localeId,
221 return result = UnicodeString(localeId, -1, US_INV);
322 virtual UnicodeString& localeDisplayName(const char* localeId,
340 UnicodeString& localeIdName(const char* localeId,
711 LocaleDisplayNamesImpl::localeDisplayName(const char* localeId, in localeDisplayName() argument
713 return localeDisplayName(Locale(localeId), result); in localeDisplayName()
718 LocaleDisplayNamesImpl::localeIdName(const char* localeId, in localeIdName() argument
721 langData.getNoFallback("Languages%short", localeId, result); in localeIdName()
727 return langData.get("Languages", localeId, result); in localeIdName()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DPluralRulesLoader.java65 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/
DPluralRulesLoader.java63 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/cldr/tools/java/org/unicode/cldr/util/
DXMLNormalizingLoader.java61 private final String localeId; field in XMLNormalizingLoader.XMLSourceCacheKey
65 public XMLSourceCacheKey(String localeId, List<File> dirs, DraftStatus minimalDraftStatus) { in XMLSourceCacheKey() argument
66 this.localeId = localeId; in XMLSourceCacheKey()
80 this.hashCode = Objects.hash(this.localeId, this.dirs, this.minimalDraftStatus); in XMLSourceCacheKey()
109 if (!Objects.equals(localeId, other.localeId)) { in equals()
116 …public static XMLSource getFrozenInstance(String localeId, List<File> dirs, DraftStatus minimalDra… in getFrozenInstance() argument
117 XMLSourceCacheKey key = new XMLSourceCacheKey(localeId, dirs, minimalDraftStatus); in getFrozenInstance()
124 File file = new File(key.dirs.iterator().next(), key.localeId + ".xml"); in makeXMLSource()
125 source = loadXMLFile(file, key.localeId, key.minimalDraftStatus); in makeXMLSource()
137 …XMLSourceCacheKey singleKey = new XMLSourceCacheKey(key.localeId, dirList, key.minimalDraftStatus); in makeXMLSource()
[all …]
/external/icu/tools/cldr/cldr-to-icu/src/test/java/org/unicode/icu/tool/cldrtoicu/mapper/
DLocaleMapperTest.java357 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()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DLocaleDisplayNames.java199 public abstract String localeDisplayName(String localeId); in localeDisplayName() argument
511 public String localeDisplayName(String localeId) { in localeDisplayName() argument
512 return new ULocale(localeId).getName(); in localeDisplayName()
/external/icu/android_icu4j/src/main/java/android/icu/text/
DLocaleDisplayNames.java185 public abstract String localeDisplayName(String localeId); in localeDisplayName() argument
477 public String localeDisplayName(String localeId) { in localeDisplayName() argument
478 return new ULocale(localeId).getName(); in localeDisplayName()
/external/icu/icu4c/source/i18n/
Dmeasfmt.cpp245 const char *localeId = fLoc.getName(); in createObject() local
246 LocalUResourceBundlePointer unitsBundle(ures_open(U_ICUDATA_UNIT, localeId, &status)); in createObject()
264 localeId, currencyStyles[i], localStatus)); in createObject()
273 localeId, UNUM_DECIMAL, status); in createObject()
450 const char *localeId = getLocaleID(status); in operator ==() local
456 if (uprv_strcmp(localeId, rhsLocaleId) != 0) { in operator ==()

123