generated from google-gemini/aistudio-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
37 lines (34 loc) · 881 Bytes
/
types.ts
File metadata and controls
37 lines (34 loc) · 881 Bytes
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
export enum CEFRLevel {
A1_1 = 'A1.1',
A1_2 = 'A1.2',
A2_1 = 'A2.1',
A2_2 = 'A2.2',
B1_1 = 'B1.1',
B1_2 = 'B1.2',
B2_1 = 'B2.1',
B2_2 = 'B2.2',
C1 = 'C1',
C2 = 'C2',
}
export const CEFR_DESCRIPTIONS: Record<CEFRLevel, string> = {
[CEFRLevel.A1_1]: 'A1.1 - Absolute Beginner',
[CEFRLevel.A1_2]: 'A1.2 - Beginner',
[CEFRLevel.A2_1]: 'A2.1 - Elementary',
[CEFRLevel.A2_2]: 'A2.2 - Upper Elementary',
[CEFRLevel.B1_1]: 'B1.1 - Intermediate',
[CEFRLevel.B1_2]: 'B1.2 - Intermediate',
[CEFRLevel.B2_1]: 'B2.1 - Upper Intermediate',
[CEFRLevel.B2_2]: 'B2.2 - Upper Intermediate',
[CEFRLevel.C1]: 'C1 - Advanced',
[CEFRLevel.C2]: 'C2 - Proficiency',
};
export interface Language {
code: string;
name: string;
}
export interface TranslationState {
sourceText: string;
targetText: string;
isTranslating: boolean;
error: string | null;
}