-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
54 lines (45 loc) · 1.17 KB
/
types.ts
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
export type LocaleDirection = "ltr" | "rtl";
export type GettextTranslation = {
msgid?: string;
msgid_plural?: string;
msgctxt?: string;
msgstr: string[];
comments?: {
reference: string;
};
};
export type PotHeaders = {
"project-id-version"?: string;
"content-type"?: string;
"pot-creation-date"?: string;
"content-transfer-encoding"?: string;
"plural-forms"?: string;
"po-revision-date"?: string;
"language-team"?: string;
"mime-version"?: string;
"x-generator"?: string;
"last-translator"?: string;
language?: string;
};
export type ParsedPot = {
charset?: string;
headers: PotHeaders;
translations: { [msgctxt: string]: { [msgid: string]: GettextTranslation } };
};
export type TranslationsMap = {
[locale: string]: ParsedPot;
};
export type PluralFunction = (n: number) => boolean | number;
export type GettextCatalog = ParsedPot & {
pluralFunction: PluralFunction;
};
export type GettextCatalogs = {
[locale: string]: GettextCatalog;
};
export type InterpolationScope = {
[key: string]: string | number | boolean | undefined;
};
export type NumberFormatter = (
num: number,
options?: Intl.NumberFormatOptions,
) => string;