-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathCLDRLocaleTypes.tsx
More file actions
71 lines (59 loc) · 2.06 KB
/
CLDRLocaleTypes.tsx
File metadata and controls
71 lines (59 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/**
* Types for CLDR locale support. These types mirror the structure of the
* objects generated by the build script in scripts/ingest/build-cldr-locales.ts.
*/
export interface CLDRLocaleSupport {
/** Full BCP-47 locale, e.g. "en_US" */
locale: string;
/** Language code, e.g. "en" */
language: string;
/** Region code, e.g. "US" (optional) */
region?: string;
/** Script code, e.g. "Latn" (optional) */
script?: string;
/**
* Tier of locale support. The Unicode CLDR defines four coverage levels
* for locales: core, basic, moderate and modern. These indicate the
* amount of locale data available and correspond to increasing levels of
* completeness in CLDR. We intentionally do not expose the “full” list
* from availableLocales.json as an explicit tier; instead, locales in
* that list are classified using their target coverage level from the
* CLDR charts (or default to modern if no chart data is present).
*/
tier: 'core' | 'basic' | 'moderate' | 'modern';
/**
* True if this locale is listed in defaultContent.json. Indicates that the
* locale is the default content locale for its language.
*/
localeIsDefaultForLanguage?: boolean;
/** Whether a corresponding XML exists in CLDR repo */
presentInCLDRDatabase?: boolean;
/** Coverage target (modern/moderate/basic/core) */
targetLevel?: string;
/** Coverage computed level */
computedLevel?: string;
/** Aggregate % confirmed */
confirmedPct?: number;
/** Breakdown percentages (optional) */
pctModern?: number;
pctModerate?: number;
pctBasic?: number;
pctCore?: number;
/** True if the locale is included in ICU datasets (per charts) */
icuIncluded?: boolean;
/** Charts’ default region column (if present) */
defaultRegion?: string;
/** Missing feature tokens from charts */
notes?: string[];
/** Counts at target level */
missingCounts?: {
found: number;
unconfirmed: number;
missing: number;
};
}
export interface CLDRLocaleIndex {
release: string;
generatedAt: string;
locales: CLDRLocaleSupport[];
}