@pie-lib/translator 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/en.d.ts +104 -0
- package/dist/en.d.ts.map +1 -0
- package/dist/en.js +93 -0
- package/dist/es.d.ts +104 -0
- package/dist/es.d.ts.map +1 -0
- package/dist/es.js +93 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/package.json +32 -0
- package/src/en.ts +109 -0
- package/src/es.ts +109 -0
- package/src/index.ts +65 -0
package/dist/en.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/translator/src/en.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: {
|
|
10
|
+
translation: {
|
|
11
|
+
categorize: {
|
|
12
|
+
limitMaxChoicesPerCategory: string;
|
|
13
|
+
maxChoicesPerCategoryRestriction: string;
|
|
14
|
+
};
|
|
15
|
+
ebsr: {
|
|
16
|
+
part: string;
|
|
17
|
+
};
|
|
18
|
+
numberLine: {
|
|
19
|
+
addElementLimit_one: string;
|
|
20
|
+
addElementLimit_other: string;
|
|
21
|
+
clearAll: string;
|
|
22
|
+
};
|
|
23
|
+
imageClozeAssociation: {
|
|
24
|
+
reachedLimit_one: string;
|
|
25
|
+
reachedLimit_other: string;
|
|
26
|
+
};
|
|
27
|
+
drawingResponse: {
|
|
28
|
+
fillColor: string;
|
|
29
|
+
outlineColor: string;
|
|
30
|
+
noFill: string;
|
|
31
|
+
lightblue: string;
|
|
32
|
+
lightyellow: string;
|
|
33
|
+
red: string;
|
|
34
|
+
orange: string;
|
|
35
|
+
yellow: string;
|
|
36
|
+
violet: string;
|
|
37
|
+
blue: string;
|
|
38
|
+
green: string;
|
|
39
|
+
white: string;
|
|
40
|
+
black: string;
|
|
41
|
+
onDoubleClick: string;
|
|
42
|
+
};
|
|
43
|
+
charting: {
|
|
44
|
+
addCategory: string;
|
|
45
|
+
actions: string;
|
|
46
|
+
add: string;
|
|
47
|
+
delete: string;
|
|
48
|
+
newLabel: string;
|
|
49
|
+
reachedLimit_other: string;
|
|
50
|
+
keyLegend: {
|
|
51
|
+
incorrectAnswer: string;
|
|
52
|
+
correctAnswer: string;
|
|
53
|
+
correctKeyAnswer: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
graphing: {
|
|
57
|
+
point: string;
|
|
58
|
+
circle: string;
|
|
59
|
+
line: string;
|
|
60
|
+
parabola: string;
|
|
61
|
+
absolute: string;
|
|
62
|
+
exponential: string;
|
|
63
|
+
polygon: string;
|
|
64
|
+
ray: string;
|
|
65
|
+
segment: string;
|
|
66
|
+
sine: string;
|
|
67
|
+
vector: string;
|
|
68
|
+
label: string;
|
|
69
|
+
redo: string;
|
|
70
|
+
reset: string;
|
|
71
|
+
};
|
|
72
|
+
mathInline: {
|
|
73
|
+
primaryCorrectWithAlternates: string;
|
|
74
|
+
};
|
|
75
|
+
multipleChoice: {
|
|
76
|
+
minSelections: string;
|
|
77
|
+
maxSelections_one: string;
|
|
78
|
+
maxSelections_other: string;
|
|
79
|
+
minmaxSelections_equal: string;
|
|
80
|
+
minmaxSelections_range: string;
|
|
81
|
+
};
|
|
82
|
+
selectText: {
|
|
83
|
+
correctAnswerSelected: string;
|
|
84
|
+
correctAnswerNotSelected: string;
|
|
85
|
+
incorrectSelection: string;
|
|
86
|
+
key: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
common: {
|
|
90
|
+
undo: string;
|
|
91
|
+
clearAll: string;
|
|
92
|
+
correct: string;
|
|
93
|
+
incorrect: string;
|
|
94
|
+
showCorrectAnswer: string;
|
|
95
|
+
hideCorrectAnswer: string;
|
|
96
|
+
commonCorrectAnswerWithAlternates: string;
|
|
97
|
+
warning: string;
|
|
98
|
+
showNote: string;
|
|
99
|
+
hideNote: string;
|
|
100
|
+
cancel: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export default _default;
|
|
104
|
+
//# sourceMappingURL=en.d.ts.map
|
package/dist/en.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../src/en.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wBAkGE"}
|
package/dist/en.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
//#region src/en.ts
|
|
2
|
+
var e = {
|
|
3
|
+
translation: {
|
|
4
|
+
categorize: {
|
|
5
|
+
limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
|
|
6
|
+
maxChoicesPerCategoryRestriction: "To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s]."
|
|
7
|
+
},
|
|
8
|
+
ebsr: { part: "Part {{index}}" },
|
|
9
|
+
numberLine: {
|
|
10
|
+
addElementLimit_one: "You can only add {{count}} element",
|
|
11
|
+
addElementLimit_other: "You can only add {{count}} elements",
|
|
12
|
+
clearAll: "Clear all"
|
|
13
|
+
},
|
|
14
|
+
imageClozeAssociation: {
|
|
15
|
+
reachedLimit_one: "You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",
|
|
16
|
+
reachedLimit_other: "Full"
|
|
17
|
+
},
|
|
18
|
+
drawingResponse: {
|
|
19
|
+
fillColor: "Fill color",
|
|
20
|
+
outlineColor: "Outline color",
|
|
21
|
+
noFill: "No fill",
|
|
22
|
+
lightblue: "Light blue",
|
|
23
|
+
lightyellow: "Light yellow",
|
|
24
|
+
red: "Red",
|
|
25
|
+
orange: "Orange",
|
|
26
|
+
yellow: "Yellow",
|
|
27
|
+
violet: "Violet",
|
|
28
|
+
blue: "Blue",
|
|
29
|
+
green: "Green",
|
|
30
|
+
white: "White",
|
|
31
|
+
black: "Black",
|
|
32
|
+
onDoubleClick: "Double click to edit this text. Press Enter to submit."
|
|
33
|
+
},
|
|
34
|
+
charting: {
|
|
35
|
+
addCategory: "Add category",
|
|
36
|
+
actions: "Actions",
|
|
37
|
+
add: "Add",
|
|
38
|
+
delete: "Delete",
|
|
39
|
+
newLabel: "New label",
|
|
40
|
+
reachedLimit_other: "There can't be more than {{count}} categories.",
|
|
41
|
+
keyLegend: {
|
|
42
|
+
incorrectAnswer: "Student incorrect answer",
|
|
43
|
+
correctAnswer: "Student correct answer",
|
|
44
|
+
correctKeyAnswer: "Answer key correct"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
graphing: {
|
|
48
|
+
point: "Point",
|
|
49
|
+
circle: "Circle",
|
|
50
|
+
line: "Line",
|
|
51
|
+
parabola: "Parabola",
|
|
52
|
+
absolute: "Absolute Value",
|
|
53
|
+
exponential: "Exponential",
|
|
54
|
+
polygon: "Polygon",
|
|
55
|
+
ray: "Ray",
|
|
56
|
+
segment: "Segment",
|
|
57
|
+
sine: "Sine",
|
|
58
|
+
vector: "Vector",
|
|
59
|
+
label: "Label",
|
|
60
|
+
redo: "Redo",
|
|
61
|
+
reset: "Reset"
|
|
62
|
+
},
|
|
63
|
+
mathInline: { primaryCorrectWithAlternates: "Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct." },
|
|
64
|
+
multipleChoice: {
|
|
65
|
+
minSelections: "Select at least {{minSelections}}.",
|
|
66
|
+
maxSelections_one: "Only {{maxSelections}} answer is allowed.",
|
|
67
|
+
maxSelections_other: "Only {{maxSelections}} answers are allowed.",
|
|
68
|
+
minmaxSelections_equal: "Select {{minSelections}}.",
|
|
69
|
+
minmaxSelections_range: "Select between {{minSelections}} and {{maxSelections}}."
|
|
70
|
+
},
|
|
71
|
+
selectText: {
|
|
72
|
+
correctAnswerSelected: "Correct",
|
|
73
|
+
correctAnswerNotSelected: "Correct Answer Not Selected",
|
|
74
|
+
incorrectSelection: "Incorrect Selection",
|
|
75
|
+
key: "Key"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
common: {
|
|
79
|
+
undo: "Undo",
|
|
80
|
+
clearAll: "Clear all",
|
|
81
|
+
correct: "Correct",
|
|
82
|
+
incorrect: "Incorrect",
|
|
83
|
+
showCorrectAnswer: "Show correct answer",
|
|
84
|
+
hideCorrectAnswer: "Hide correct answer",
|
|
85
|
+
commonCorrectAnswerWithAlternates: "Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",
|
|
86
|
+
warning: "Warning",
|
|
87
|
+
showNote: "Show Note",
|
|
88
|
+
hideNote: "Hide Note",
|
|
89
|
+
cancel: "Cancel"
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { e as default };
|
package/dist/es.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/translator/src/es.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: {
|
|
10
|
+
translation: {
|
|
11
|
+
categorize: {
|
|
12
|
+
limitMaxChoicesPerCategory: string;
|
|
13
|
+
maxChoicesPerCategoryRestriction: string;
|
|
14
|
+
};
|
|
15
|
+
ebsr: {
|
|
16
|
+
part: string;
|
|
17
|
+
};
|
|
18
|
+
numberLine: {
|
|
19
|
+
addElementLimit_one: string;
|
|
20
|
+
addElementLimit_other: string;
|
|
21
|
+
clearAll: string;
|
|
22
|
+
};
|
|
23
|
+
imageClozeAssociation: {
|
|
24
|
+
reachedLimit_one: string;
|
|
25
|
+
reachedLimit_other: string;
|
|
26
|
+
};
|
|
27
|
+
drawingResponse: {
|
|
28
|
+
fillColor: string;
|
|
29
|
+
outlineColor: string;
|
|
30
|
+
noFill: string;
|
|
31
|
+
lightblue: string;
|
|
32
|
+
lightyellow: string;
|
|
33
|
+
red: string;
|
|
34
|
+
orange: string;
|
|
35
|
+
yellow: string;
|
|
36
|
+
violet: string;
|
|
37
|
+
blue: string;
|
|
38
|
+
green: string;
|
|
39
|
+
white: string;
|
|
40
|
+
black: string;
|
|
41
|
+
onDoubleClick: string;
|
|
42
|
+
};
|
|
43
|
+
charting: {
|
|
44
|
+
addCategory: string;
|
|
45
|
+
actions: string;
|
|
46
|
+
add: string;
|
|
47
|
+
delete: string;
|
|
48
|
+
newLabel: string;
|
|
49
|
+
reachedLimit_other: string;
|
|
50
|
+
keyLegend: {
|
|
51
|
+
incorrectAnswer: string;
|
|
52
|
+
correctAnswer: string;
|
|
53
|
+
correctKeyAnswer: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
graphing: {
|
|
57
|
+
point: string;
|
|
58
|
+
circle: string;
|
|
59
|
+
line: string;
|
|
60
|
+
parabola: string;
|
|
61
|
+
absolute: string;
|
|
62
|
+
exponential: string;
|
|
63
|
+
polygon: string;
|
|
64
|
+
ray: string;
|
|
65
|
+
segment: string;
|
|
66
|
+
sine: string;
|
|
67
|
+
vector: string;
|
|
68
|
+
label: string;
|
|
69
|
+
redo: string;
|
|
70
|
+
reset: string;
|
|
71
|
+
};
|
|
72
|
+
mathInline: {
|
|
73
|
+
primaryCorrectWithAlternates: string;
|
|
74
|
+
};
|
|
75
|
+
multipleChoice: {
|
|
76
|
+
minSelections: string;
|
|
77
|
+
maxSelections_one: string;
|
|
78
|
+
maxSelections_other: string;
|
|
79
|
+
minmaxSelections_equal: string;
|
|
80
|
+
minmaxSelections_range: string;
|
|
81
|
+
};
|
|
82
|
+
selectText: {
|
|
83
|
+
correctAnswerSelected: string;
|
|
84
|
+
correctAnswerNotSelected: string;
|
|
85
|
+
incorrectSelection: string;
|
|
86
|
+
key: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
common: {
|
|
90
|
+
undo: string;
|
|
91
|
+
clearAll: string;
|
|
92
|
+
correct: string;
|
|
93
|
+
incorrect: string;
|
|
94
|
+
showCorrectAnswer: string;
|
|
95
|
+
hideCorrectAnswer: string;
|
|
96
|
+
commonCorrectAnswerWithAlternates: string;
|
|
97
|
+
warning: string;
|
|
98
|
+
showNote: string;
|
|
99
|
+
hideNote: string;
|
|
100
|
+
cancel: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export default _default;
|
|
104
|
+
//# sourceMappingURL=es.d.ts.map
|
package/dist/es.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../src/es.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wBAkGE"}
|
package/dist/es.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
//#region src/es.ts
|
|
2
|
+
var e = {
|
|
3
|
+
translation: {
|
|
4
|
+
categorize: {
|
|
5
|
+
limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
|
|
6
|
+
maxChoicesPerCategoryRestriction: "Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta"
|
|
7
|
+
},
|
|
8
|
+
ebsr: { part: "Parte {{index}}" },
|
|
9
|
+
numberLine: {
|
|
10
|
+
addElementLimit_one: "Solo puedes agregar {{count}} elemento",
|
|
11
|
+
addElementLimit_other: "Solo puedes agregar {{count}} elementos",
|
|
12
|
+
clearAll: "Borrar todo"
|
|
13
|
+
},
|
|
14
|
+
imageClozeAssociation: {
|
|
15
|
+
reachedLimit_one: "Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
|
|
16
|
+
reachedLimit_other: "Lleno"
|
|
17
|
+
},
|
|
18
|
+
drawingResponse: {
|
|
19
|
+
fillColor: "Color de relleno",
|
|
20
|
+
outlineColor: "Color del contorno",
|
|
21
|
+
noFill: "Sin relleno",
|
|
22
|
+
lightblue: "Azul claro",
|
|
23
|
+
lightyellow: "Amarillo claro",
|
|
24
|
+
red: "Rojo",
|
|
25
|
+
orange: "Naranja",
|
|
26
|
+
yellow: "Amarillo",
|
|
27
|
+
violet: "Violeta",
|
|
28
|
+
blue: "Azul",
|
|
29
|
+
green: "Verde",
|
|
30
|
+
white: "Blanco",
|
|
31
|
+
black: "Negro",
|
|
32
|
+
onDoubleClick: "Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"
|
|
33
|
+
},
|
|
34
|
+
charting: {
|
|
35
|
+
addCategory: "Añadir categoría",
|
|
36
|
+
actions: "Acciones",
|
|
37
|
+
add: "Añadir",
|
|
38
|
+
delete: "Eliminar",
|
|
39
|
+
newLabel: "Nueva etiqueta",
|
|
40
|
+
reachedLimit_other: "No puede haber más de {{count}} categorías.",
|
|
41
|
+
keyLegend: {
|
|
42
|
+
incorrectAnswer: "Respuesta incorrecta del estudiante",
|
|
43
|
+
correctAnswer: "Respuesta correcta del estudiante",
|
|
44
|
+
correctKeyAnswer: "Clave de respuesta correcta"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
graphing: {
|
|
48
|
+
point: "Punto",
|
|
49
|
+
circle: "Circulo",
|
|
50
|
+
line: "Línea",
|
|
51
|
+
parabola: "Parábola",
|
|
52
|
+
absolute: "Valor absoluto",
|
|
53
|
+
exponential: "Exponencial",
|
|
54
|
+
polygon: "Polígono",
|
|
55
|
+
ray: "Semirrecta",
|
|
56
|
+
segment: "Segmento ",
|
|
57
|
+
sine: "Seno",
|
|
58
|
+
vector: "Vector",
|
|
59
|
+
label: "Etiqueta",
|
|
60
|
+
redo: "Rehacer",
|
|
61
|
+
reset: "Reiniciar"
|
|
62
|
+
},
|
|
63
|
+
mathInline: { primaryCorrectWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas." },
|
|
64
|
+
multipleChoice: {
|
|
65
|
+
minSelections: "Seleccione al menos {{minSelections}}.",
|
|
66
|
+
maxSelections_one: "Sólo se permite {{maxSelections}} respuesta.",
|
|
67
|
+
maxSelections_other: "Sólo se permiten {{maxSelections}} respuestas.",
|
|
68
|
+
minmaxSelections_equal: "Seleccione {{minSelections}}.",
|
|
69
|
+
minmaxSelections_range: "Seleccione entre {{minSelections}} y {{maxSelections}}."
|
|
70
|
+
},
|
|
71
|
+
selectText: {
|
|
72
|
+
correctAnswerSelected: "Respuesta Correcta",
|
|
73
|
+
correctAnswerNotSelected: "Respuesta Correcta No Seleccionada",
|
|
74
|
+
incorrectSelection: "Selección Incorrecta",
|
|
75
|
+
key: "Clave"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
common: {
|
|
79
|
+
undo: "Deshacer",
|
|
80
|
+
clearAll: "Borrar todo",
|
|
81
|
+
correct: "Correct",
|
|
82
|
+
incorrect: "Incorrect",
|
|
83
|
+
showCorrectAnswer: "Mostrar respuesta correcta",
|
|
84
|
+
hideCorrectAnswer: "Ocultar respuesta correcta",
|
|
85
|
+
commonCorrectAnswerWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",
|
|
86
|
+
warning: "Advertencia",
|
|
87
|
+
showNote: "Mostrar Nota",
|
|
88
|
+
hideNote: "Ocultar Nota",
|
|
89
|
+
cancel: "Cancelar"
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { e as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/translator/src/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import { type i18n, type TOptions } from 'i18next';
|
|
10
|
+
interface Translator extends i18n {
|
|
11
|
+
t: (key: string, options: TOptions) => string;
|
|
12
|
+
}
|
|
13
|
+
interface TranslatorModule {
|
|
14
|
+
translator: Translator;
|
|
15
|
+
languageOptions: Array<{
|
|
16
|
+
value: string;
|
|
17
|
+
label: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
declare const translatorModule: TranslatorModule;
|
|
21
|
+
export default translatorModule;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAgB,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAe5D,UAAU,UAAW,SAAQ,IAAI;IAC/B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,KAAK,MAAM,CAAC;CAC/C;AAED,UAAU,gBAAgB;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1D;AAED,QAAA,MAAM,gBAAgB,EAAE,gBA4BvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import e from "./en.js";
|
|
2
|
+
import t from "./es.js";
|
|
3
|
+
import n from "i18next";
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
n.init({
|
|
6
|
+
fallbackLng: "en",
|
|
7
|
+
lng: "en",
|
|
8
|
+
debug: !0,
|
|
9
|
+
resources: {
|
|
10
|
+
en: e,
|
|
11
|
+
es: t
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
var r = {
|
|
15
|
+
translator: {
|
|
16
|
+
...n,
|
|
17
|
+
t: (e, t) => {
|
|
18
|
+
let { lng: r } = t;
|
|
19
|
+
switch (r) {
|
|
20
|
+
case "en_US":
|
|
21
|
+
case "en-US":
|
|
22
|
+
t.lng = "en";
|
|
23
|
+
break;
|
|
24
|
+
case "es_ES":
|
|
25
|
+
case "es-ES":
|
|
26
|
+
case "es_MX":
|
|
27
|
+
case "es-MX":
|
|
28
|
+
t.lng = "es";
|
|
29
|
+
break;
|
|
30
|
+
default: break;
|
|
31
|
+
}
|
|
32
|
+
return n.t(e, {
|
|
33
|
+
lng: r,
|
|
34
|
+
...t
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
languageOptions: [{
|
|
39
|
+
value: "en_US",
|
|
40
|
+
label: "English (US)"
|
|
41
|
+
}, {
|
|
42
|
+
value: "es_ES",
|
|
43
|
+
label: "Spanish"
|
|
44
|
+
}]
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { r as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pie-lib/translator",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React implementation of @pie-lib/translator synced from pie-lib",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"debug": "^4.1.1",
|
|
7
|
+
"i18next": "^25.7.0",
|
|
8
|
+
"lodash-es": "^4.17.23",
|
|
9
|
+
"prop-types": "^15.7.2",
|
|
10
|
+
"react": "^18.2.0",
|
|
11
|
+
"react-dom": "^18.2.0"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"src"
|
|
25
|
+
],
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "bun x vite build && bun x tsc --emitDeclarationOnly",
|
|
29
|
+
"dev": "bun x vite",
|
|
30
|
+
"test": "bun x vitest run"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/src/en.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-lib/packages/translator/src/en.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
translation: {
|
|
13
|
+
categorize: {
|
|
14
|
+
limitMaxChoicesPerCategory:
|
|
15
|
+
'You\'ve reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.',
|
|
16
|
+
maxChoicesPerCategoryRestriction:
|
|
17
|
+
'To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].',
|
|
18
|
+
},
|
|
19
|
+
ebsr: {
|
|
20
|
+
part: 'Part {{index}}',
|
|
21
|
+
},
|
|
22
|
+
numberLine: {
|
|
23
|
+
addElementLimit_one: 'You can only add {{count}} element',
|
|
24
|
+
addElementLimit_other: 'You can only add {{count}} elements',
|
|
25
|
+
clearAll: 'Clear all',
|
|
26
|
+
},
|
|
27
|
+
imageClozeAssociation: {
|
|
28
|
+
reachedLimit_one:
|
|
29
|
+
'You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.',
|
|
30
|
+
reachedLimit_other: 'Full',
|
|
31
|
+
},
|
|
32
|
+
drawingResponse: {
|
|
33
|
+
fillColor: 'Fill color',
|
|
34
|
+
outlineColor: 'Outline color',
|
|
35
|
+
noFill: 'No fill',
|
|
36
|
+
lightblue: 'Light blue',
|
|
37
|
+
lightyellow: 'Light yellow',
|
|
38
|
+
red: 'Red',
|
|
39
|
+
orange: 'Orange',
|
|
40
|
+
yellow: 'Yellow',
|
|
41
|
+
violet: 'Violet',
|
|
42
|
+
blue: 'Blue',
|
|
43
|
+
green: 'Green',
|
|
44
|
+
white: 'White',
|
|
45
|
+
black: 'Black',
|
|
46
|
+
onDoubleClick: 'Double click to edit this text. Press Enter to submit.',
|
|
47
|
+
},
|
|
48
|
+
charting: {
|
|
49
|
+
addCategory: 'Add category',
|
|
50
|
+
actions: 'Actions',
|
|
51
|
+
add: 'Add',
|
|
52
|
+
delete: 'Delete',
|
|
53
|
+
newLabel: 'New label',
|
|
54
|
+
reachedLimit_other: "There can't be more than {{count}} categories.",
|
|
55
|
+
keyLegend: {
|
|
56
|
+
incorrectAnswer: 'Student incorrect answer',
|
|
57
|
+
correctAnswer: 'Student correct answer',
|
|
58
|
+
correctKeyAnswer: 'Answer key correct',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
graphing: {
|
|
62
|
+
point: 'Point',
|
|
63
|
+
circle: 'Circle',
|
|
64
|
+
line: 'Line',
|
|
65
|
+
parabola: 'Parabola',
|
|
66
|
+
absolute: 'Absolute Value',
|
|
67
|
+
exponential: 'Exponential',
|
|
68
|
+
polygon: 'Polygon',
|
|
69
|
+
ray: 'Ray',
|
|
70
|
+
segment: 'Segment',
|
|
71
|
+
sine: 'Sine',
|
|
72
|
+
vector: 'Vector',
|
|
73
|
+
label: 'Label',
|
|
74
|
+
redo: 'Redo',
|
|
75
|
+
reset: 'Reset',
|
|
76
|
+
},
|
|
77
|
+
mathInline: {
|
|
78
|
+
primaryCorrectWithAlternates:
|
|
79
|
+
'Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.',
|
|
80
|
+
},
|
|
81
|
+
multipleChoice: {
|
|
82
|
+
minSelections: 'Select at least {{minSelections}}.',
|
|
83
|
+
maxSelections_one: 'Only {{maxSelections}} answer is allowed.',
|
|
84
|
+
maxSelections_other: 'Only {{maxSelections}} answers are allowed.',
|
|
85
|
+
minmaxSelections_equal: 'Select {{minSelections}}.',
|
|
86
|
+
minmaxSelections_range: 'Select between {{minSelections}} and {{maxSelections}}.',
|
|
87
|
+
},
|
|
88
|
+
selectText: {
|
|
89
|
+
correctAnswerSelected: 'Correct',
|
|
90
|
+
correctAnswerNotSelected: 'Correct Answer Not Selected',
|
|
91
|
+
incorrectSelection: 'Incorrect Selection',
|
|
92
|
+
key: 'Key',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
common: {
|
|
96
|
+
undo: 'Undo',
|
|
97
|
+
clearAll: 'Clear all',
|
|
98
|
+
correct: 'Correct',
|
|
99
|
+
incorrect: 'Incorrect',
|
|
100
|
+
showCorrectAnswer: 'Show correct answer',
|
|
101
|
+
hideCorrectAnswer: 'Hide correct answer',
|
|
102
|
+
commonCorrectAnswerWithAlternates:
|
|
103
|
+
'Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.',
|
|
104
|
+
warning: 'Warning',
|
|
105
|
+
showNote: 'Show Note',
|
|
106
|
+
hideNote: 'Hide Note',
|
|
107
|
+
cancel: 'Cancel',
|
|
108
|
+
},
|
|
109
|
+
};
|
package/src/es.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-lib/packages/translator/src/es.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
translation: {
|
|
13
|
+
categorize: {
|
|
14
|
+
limitMaxChoicesPerCategory:
|
|
15
|
+
'Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.',
|
|
16
|
+
maxChoicesPerCategoryRestriction:
|
|
17
|
+
'Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta',
|
|
18
|
+
},
|
|
19
|
+
ebsr: {
|
|
20
|
+
part: 'Parte {{index}}',
|
|
21
|
+
},
|
|
22
|
+
numberLine: {
|
|
23
|
+
addElementLimit_one: 'Solo puedes agregar {{count}} elemento',
|
|
24
|
+
addElementLimit_other: 'Solo puedes agregar {{count}} elementos',
|
|
25
|
+
clearAll: 'Borrar todo',
|
|
26
|
+
},
|
|
27
|
+
imageClozeAssociation: {
|
|
28
|
+
reachedLimit_one:
|
|
29
|
+
'Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.',
|
|
30
|
+
reachedLimit_other: 'Lleno',
|
|
31
|
+
},
|
|
32
|
+
drawingResponse: {
|
|
33
|
+
fillColor: 'Color de relleno',
|
|
34
|
+
outlineColor: 'Color del contorno',
|
|
35
|
+
noFill: 'Sin relleno',
|
|
36
|
+
lightblue: 'Azul claro',
|
|
37
|
+
lightyellow: 'Amarillo claro',
|
|
38
|
+
red: 'Rojo',
|
|
39
|
+
orange: 'Naranja',
|
|
40
|
+
yellow: 'Amarillo',
|
|
41
|
+
violet: 'Violeta',
|
|
42
|
+
blue: 'Azul',
|
|
43
|
+
green: 'Verde',
|
|
44
|
+
white: 'Blanco',
|
|
45
|
+
black: 'Negro',
|
|
46
|
+
onDoubleClick: 'Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar',
|
|
47
|
+
},
|
|
48
|
+
charting: {
|
|
49
|
+
addCategory: 'Añadir categoría',
|
|
50
|
+
actions: 'Acciones',
|
|
51
|
+
add: 'Añadir',
|
|
52
|
+
delete: 'Eliminar',
|
|
53
|
+
newLabel: 'Nueva etiqueta',
|
|
54
|
+
reachedLimit_other: 'No puede haber más de {{count}} categorías.',
|
|
55
|
+
keyLegend: {
|
|
56
|
+
incorrectAnswer: 'Respuesta incorrecta del estudiante',
|
|
57
|
+
correctAnswer: 'Respuesta correcta del estudiante',
|
|
58
|
+
correctKeyAnswer: 'Clave de respuesta correcta',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
graphing: {
|
|
62
|
+
point: 'Punto',
|
|
63
|
+
circle: 'Circulo',
|
|
64
|
+
line: 'Línea',
|
|
65
|
+
parabola: 'Parábola',
|
|
66
|
+
absolute: 'Valor absoluto',
|
|
67
|
+
exponential: 'Exponencial',
|
|
68
|
+
polygon: 'Polígono',
|
|
69
|
+
ray: 'Semirrecta',
|
|
70
|
+
segment: 'Segmento ',
|
|
71
|
+
sine: 'Seno',
|
|
72
|
+
vector: 'Vector',
|
|
73
|
+
label: 'Etiqueta',
|
|
74
|
+
redo: 'Rehacer',
|
|
75
|
+
reset: 'Reiniciar',
|
|
76
|
+
},
|
|
77
|
+
mathInline: {
|
|
78
|
+
primaryCorrectWithAlternates:
|
|
79
|
+
'Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.',
|
|
80
|
+
},
|
|
81
|
+
multipleChoice: {
|
|
82
|
+
minSelections: 'Seleccione al menos {{minSelections}}.',
|
|
83
|
+
maxSelections_one: 'Sólo se permite {{maxSelections}} respuesta.',
|
|
84
|
+
maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.',
|
|
85
|
+
minmaxSelections_equal: 'Seleccione {{minSelections}}.',
|
|
86
|
+
minmaxSelections_range: 'Seleccione entre {{minSelections}} y {{maxSelections}}.',
|
|
87
|
+
},
|
|
88
|
+
selectText: {
|
|
89
|
+
correctAnswerSelected: 'Respuesta Correcta',
|
|
90
|
+
correctAnswerNotSelected: 'Respuesta Correcta No Seleccionada',
|
|
91
|
+
incorrectSelection: 'Selección Incorrecta',
|
|
92
|
+
key: 'Clave',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
common: {
|
|
96
|
+
undo: 'Deshacer',
|
|
97
|
+
clearAll: 'Borrar todo',
|
|
98
|
+
correct: 'Correct',
|
|
99
|
+
incorrect: 'Incorrect',
|
|
100
|
+
showCorrectAnswer: 'Mostrar respuesta correcta',
|
|
101
|
+
hideCorrectAnswer: 'Ocultar respuesta correcta',
|
|
102
|
+
commonCorrectAnswerWithAlternates:
|
|
103
|
+
'Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.',
|
|
104
|
+
warning: 'Advertencia',
|
|
105
|
+
showNote: 'Mostrar Nota',
|
|
106
|
+
hideNote: 'Ocultar Nota',
|
|
107
|
+
cancel: 'Cancelar',
|
|
108
|
+
},
|
|
109
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-lib/packages/translator/src/index.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import i18next, { type i18n, type TOptions } from 'i18next';
|
|
12
|
+
import en from './en.js';
|
|
13
|
+
import es from './es.js';
|
|
14
|
+
|
|
15
|
+
i18next.init({
|
|
16
|
+
fallbackLng: 'en',
|
|
17
|
+
lng: 'en',
|
|
18
|
+
debug: true,
|
|
19
|
+
resources: {
|
|
20
|
+
en: en,
|
|
21
|
+
es: es,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
interface Translator extends i18n {
|
|
27
|
+
t: (key: string, options: TOptions) => string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface TranslatorModule {
|
|
31
|
+
translator: Translator;
|
|
32
|
+
languageOptions: Array<{ value: string; label: string }>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const translatorModule: TranslatorModule = {
|
|
36
|
+
translator: {
|
|
37
|
+
...i18next,
|
|
38
|
+
t: (key, options) => {
|
|
39
|
+
const { lng } = options;
|
|
40
|
+
|
|
41
|
+
switch (lng) {
|
|
42
|
+
// these keys don't work with plurals, don't know why, so I added a workaround to convert them to the correct lng
|
|
43
|
+
case 'en_US':
|
|
44
|
+
case 'en-US':
|
|
45
|
+
options.lng = 'en';
|
|
46
|
+
break;
|
|
47
|
+
case 'es_ES':
|
|
48
|
+
case 'es-ES':
|
|
49
|
+
case 'es_MX':
|
|
50
|
+
case 'es-MX':
|
|
51
|
+
options.lng = 'es';
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
return i18next.t(key, { lng, ...options });
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
languageOptions: [
|
|
60
|
+
{ value: 'en_US', label: 'English (US)' },
|
|
61
|
+
{ value: 'es_ES', label: 'Spanish' },
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default translatorModule;
|