-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
67 lines (60 loc) · 1.95 KB
/
types.ts
File metadata and controls
67 lines (60 loc) · 1.95 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
export interface StringUnit {
state?: 'translated' | 'needs_review' | 'new';
value: string;
}
export interface LocalizationEntry {
stringUnit: StringUnit;
}
export interface XCStringEntry {
comment?: string;
localizations?: Record<string, LocalizationEntry>;
extractionState?: string;
}
export interface XCStringsData {
sourceLanguage: string;
strings: Record<string, XCStringEntry>;
version: string;
}
export interface TranslationRequestItem {
key: string;
sourceText: string;
comment?: string;
missingLanguages?: string[];
}
export interface TranslationResultItem {
key: string;
translations: Record<string, string>;
}
export interface ProcessingStatus {
totalKeys: number;
processedKeys: number;
currentBatch: number;
totalBatches: number;
isProcessing: boolean;
error?: string;
logs: string[];
}
export const TARGET_LANGUAGES = [
{ code: 'en', name: '英语 (English)' },
{ code: 'de', name: '德语 (German)' },
{ code: 'zh-Hans', name: '简体中文 (Simplified)' },
{ code: 'zh-Hant', name: '繁体中文 (Traditional)' },
{ code: 'zh-HK', name: '中文-香港 (Hong Kong)' },
{ code: 'zh-TW', name: '中文-台湾 (Taiwan)' },
{ code: 'ja', name: '日语 (Japanese)' },
{ code: 'ko', name: '韩语 (Korean)' },
{ code: 'fr', name: '法语 (French)' },
{ code: 'es', name: '西班牙语 (Spanish)' },
{ code: 'it', name: '意大利语 (Italian)' },
{ code: 'pt-BR', name: '葡萄牙语-巴西 (Portuguese-Brazil)' },
{ code: 'pt-PT', name: '葡萄牙语-葡萄牙 (Portuguese-Portugal)' },
{ code: 'ru', name: '俄语 (Russian)' },
{ code: 'nl', name: '荷兰语 (Dutch)' },
{ code: 'tr', name: '土耳其语 (Turkish)' },
{ code: 'th', name: '泰语 (Thai)' },
{ code: 'vi', name: '越南语 (Vietnamese)' },
{ code: 'ar', name: '阿拉伯语 (Arabic)' },
{ code: 'hi', name: '印地语 (Hindi)' },
{ code: 'id', name: '印尼语 (Indonesian)' },
{ code: 'ms', name: '马来语 (Malay)' },
];