@pie-lib/translator 1.0.1-next.3884
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/CHANGELOG.json +1 -0
- package/CHANGELOG.md +4 -0
- package/LICENSE.md +5 -0
- package/lib/en.js +70 -0
- package/lib/en.js.map +1 -0
- package/lib/es.js +70 -0
- package/lib/es.js.map +1 -0
- package/lib/index.js +58 -0
- package/lib/index.js.map +1 -0
- package/package.json +18 -0
- package/src/en.js +62 -0
- package/src/es.js +62 -0
- package/src/index.js +36 -0
package/CHANGELOG.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
package/CHANGELOG.md
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Copyright 2019 CoreSpring Inc
|
|
2
|
+
|
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
4
|
+
|
|
5
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/lib/en.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _default = {
|
|
8
|
+
translation: {
|
|
9
|
+
ebsr: {
|
|
10
|
+
part: "Part {{index}}"
|
|
11
|
+
},
|
|
12
|
+
numberLine: {
|
|
13
|
+
addElementLimit_one: "You can only add {{count}} element",
|
|
14
|
+
addElementLimit_other: "You can only add {{count}} elements",
|
|
15
|
+
clearAll: "Clear all"
|
|
16
|
+
},
|
|
17
|
+
imageClozeAssociation: {
|
|
18
|
+
reachedLimit_one: "You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",
|
|
19
|
+
reachedLimit_other: "You’ve reached the limit of {{count}} responses per area. To add another response, one must first be removed."
|
|
20
|
+
},
|
|
21
|
+
drawingResponse: {
|
|
22
|
+
fillColor: "Fill color",
|
|
23
|
+
outlineColor: "Outline color",
|
|
24
|
+
noFill: "No fill",
|
|
25
|
+
lightblue: "Light blue",
|
|
26
|
+
lightyellow: "Light yellow",
|
|
27
|
+
red: "Red",
|
|
28
|
+
orange: "Orange",
|
|
29
|
+
yellow: "Yellow",
|
|
30
|
+
violet: "Violet",
|
|
31
|
+
blue: "Blue",
|
|
32
|
+
green: "Green",
|
|
33
|
+
white: "White",
|
|
34
|
+
black: "Black",
|
|
35
|
+
onDoubleClick: "Double click to edit this text. Press Enter to submit."
|
|
36
|
+
},
|
|
37
|
+
charting: {
|
|
38
|
+
addCategory: "Add category",
|
|
39
|
+
newLabel: "New label"
|
|
40
|
+
},
|
|
41
|
+
graphing: {
|
|
42
|
+
point: "Point",
|
|
43
|
+
circle: "Circle",
|
|
44
|
+
line: "Line",
|
|
45
|
+
parabola: "Parabola",
|
|
46
|
+
polygon: "Polygon",
|
|
47
|
+
ray: "Ray",
|
|
48
|
+
segment: "Segment",
|
|
49
|
+
sine: "Sine",
|
|
50
|
+
vector: "Vector",
|
|
51
|
+
label: "Label",
|
|
52
|
+
redo: "Redo",
|
|
53
|
+
reset: "Reset"
|
|
54
|
+
},
|
|
55
|
+
mathInline: {
|
|
56
|
+
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."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
common: {
|
|
60
|
+
undo: "Undo",
|
|
61
|
+
clearAll: "Clear all",
|
|
62
|
+
correct: "Correct",
|
|
63
|
+
incorrect: "Incorrect",
|
|
64
|
+
showCorrectAnswer: "Show correct answer",
|
|
65
|
+
hideCorrectAnswer: "Hide correct answer",
|
|
66
|
+
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."
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports["default"] = _default;
|
|
70
|
+
//# sourceMappingURL=en.js.map
|
package/lib/en.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/en.js"],"names":["translation","ebsr","part","numberLine","addElementLimit_one","addElementLimit_other","clearAll","imageClozeAssociation","reachedLimit_one","reachedLimit_other","drawingResponse","fillColor","outlineColor","noFill","lightblue","lightyellow","red","orange","yellow","violet","blue","green","white","black","onDoubleClick","charting","addCategory","newLabel","graphing","point","circle","line","parabola","polygon","ray","segment","sine","vector","label","redo","reset","mathInline","primaryCorrectWithAlternates","common","undo","correct","incorrect","showCorrectAnswer","hideCorrectAnswer","commonCorrectAnswerWithAlternates"],"mappings":";;;;;;eAAe;AACbA,EAAAA,WAAW,EAAE;AACXC,IAAAA,IAAI,EAAE;AACJC,MAAAA,IAAI,EAAE;AADF,KADK;AAIXC,IAAAA,UAAU,EAAE;AACVC,MAAAA,mBAAmB,EAAE,oCADX;AAEVC,MAAAA,qBAAqB,EAAE,qCAFb;AAGVC,MAAAA,QAAQ,EAAE;AAHA,KAJD;AASXC,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,gBAAgB,EAAE,8GADG;AAErBC,MAAAA,kBAAkB,EAAE;AAFC,KATZ;AAaXC,IAAAA,eAAe,EAAE;AACfC,MAAAA,SAAS,EAAE,YADI;AAEfC,MAAAA,YAAY,EAAE,eAFC;AAG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AP7B;AApDK,C","sourcesContent":["export default {\n translation: {\n ebsr: {\n part: \"Part {{index}}\"\n },\n numberLine: {\n addElementLimit_one: \"You can only add {{count}} element\",\n addElementLimit_other: \"You can only add {{count}} elements\",\n clearAll: \"Clear all\"\n },\n imageClozeAssociation: {\n reachedLimit_one: \"You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.\",\n reachedLimit_other: \"You’ve reached the limit of {{count}} responses per area. To add another response, one must first be removed.\"\n },\n drawingResponse: {\n fillColor: \"Fill color\",\n outlineColor: \"Outline color\",\n noFill: \"No fill\",\n lightblue: \"Light blue\",\n lightyellow: \"Light yellow\",\n red: \"Red\",\n orange: \"Orange\",\n yellow: \"Yellow\",\n violet: \"Violet\",\n blue: \"Blue\",\n green: \"Green\",\n white: \"White\",\n black: \"Black\",\n onDoubleClick: \"Double click to edit this text. Press Enter to submit.\"\n },\n charting: {\n addCategory: \"Add category\",\n newLabel: \"New label\",\n },\n graphing: {\n point: \"Point\",\n circle: \"Circle\",\n line: \"Line\",\n parabola: \"Parabola\",\n polygon: \"Polygon\",\n ray: \"Ray\",\n segment: \"Segment\",\n sine: \"Sine\",\n vector: \"Vector\",\n label: \"Label\",\n redo: \"Redo\",\n reset: \"Reset\",\n },\n mathInline: {\n 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.\"\n },\n },\n common: {\n undo: \"Undo\",\n clearAll: \"Clear all\",\n correct: \"Correct\",\n incorrect: \"Incorrect\",\n showCorrectAnswer: \"Show correct answer\",\n hideCorrectAnswer: \"Hide correct answer\",\n 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.\"\n },\n};\n"],"file":"en.js"}
|
package/lib/es.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _default = {
|
|
8
|
+
translation: {
|
|
9
|
+
ebsr: {
|
|
10
|
+
part: "Parte {{index}}"
|
|
11
|
+
},
|
|
12
|
+
numberLine: {
|
|
13
|
+
addElementLimit_one: "Solo puedes agregar {{count}} elemento",
|
|
14
|
+
addElementLimit_other: "Solo puedes agregar {{count}} elementos",
|
|
15
|
+
clearAll: "Borrar todo"
|
|
16
|
+
},
|
|
17
|
+
imageClozeAssociation: {
|
|
18
|
+
reachedLimit_one: "Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
|
|
19
|
+
reachedLimit_other: "Has alcanzado el límite de {{count}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta."
|
|
20
|
+
},
|
|
21
|
+
drawingResponse: {
|
|
22
|
+
fillColor: "Color de relleno",
|
|
23
|
+
outlineColor: "Color del contorno",
|
|
24
|
+
noFill: "Sin relleno",
|
|
25
|
+
lightblue: "Azul claro",
|
|
26
|
+
lightyellow: "Amarillo claro",
|
|
27
|
+
red: "Rojo",
|
|
28
|
+
orange: "Naranja",
|
|
29
|
+
yellow: "Amarillo",
|
|
30
|
+
violet: "Violeta",
|
|
31
|
+
blue: "Azul",
|
|
32
|
+
green: "Verde",
|
|
33
|
+
white: "Blanco",
|
|
34
|
+
black: "Negro",
|
|
35
|
+
onDoubleClick: "Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"
|
|
36
|
+
},
|
|
37
|
+
charting: {
|
|
38
|
+
addCategory: "Añadir categoría",
|
|
39
|
+
newLabel: "Nueva etiqueta"
|
|
40
|
+
},
|
|
41
|
+
graphing: {
|
|
42
|
+
point: "Punto",
|
|
43
|
+
circle: "Circulo",
|
|
44
|
+
line: "Línea",
|
|
45
|
+
parabola: "Parábola",
|
|
46
|
+
polygon: "Polígono",
|
|
47
|
+
ray: "Semirrecta",
|
|
48
|
+
segment: "Segmento ",
|
|
49
|
+
sine: "Seno",
|
|
50
|
+
vector: "Vector",
|
|
51
|
+
label: "Etiqueta",
|
|
52
|
+
redo: "Rehacer",
|
|
53
|
+
reset: "Reiniciar"
|
|
54
|
+
},
|
|
55
|
+
mathInline: {
|
|
56
|
+
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."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
common: {
|
|
60
|
+
undo: "Deshacer",
|
|
61
|
+
clearAll: "Borrar todo",
|
|
62
|
+
correct: "Correct",
|
|
63
|
+
incorrect: "Incorrect",
|
|
64
|
+
showCorrectAnswer: "Mostrar respuesta correcta",
|
|
65
|
+
hideCorrectAnswer: "Ocultar respuesta correcta",
|
|
66
|
+
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."
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports["default"] = _default;
|
|
70
|
+
//# sourceMappingURL=es.js.map
|
package/lib/es.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/es.js"],"names":["translation","ebsr","part","numberLine","addElementLimit_one","addElementLimit_other","clearAll","imageClozeAssociation","reachedLimit_one","reachedLimit_other","drawingResponse","fillColor","outlineColor","noFill","lightblue","lightyellow","red","orange","yellow","violet","blue","green","white","black","onDoubleClick","charting","addCategory","newLabel","graphing","point","circle","line","parabola","polygon","ray","segment","sine","vector","label","redo","reset","mathInline","primaryCorrectWithAlternates","common","undo","correct","incorrect","showCorrectAnswer","hideCorrectAnswer","commonCorrectAnswerWithAlternates"],"mappings":";;;;;;eAAe;AACbA,EAAAA,WAAW,EAAE;AACXC,IAAAA,IAAI,EAAE;AACJC,MAAAA,IAAI,EAAE;AADF,KADK;AAIXC,IAAAA,UAAU,EAAE;AACVC,MAAAA,mBAAmB,EAAE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4B,EAAE;AADpB;AA/CD,GADA;AAoDbC,EAAAA,MAAM,EAAE;AACNC,IAAAA,IAAI,EAAE,UADA;AAENtC,IAAAA,QAAQ,EAAE,aAFJ;AAGNuC,IAAAA,OAAO,EAAE,SAHH;AAINC,IAAAA,SAAS,EAAE,WAJL;AAKNC,IAAAA,iBAAiB,EAAE,4BALb;AAMNC,IAAAA,iBAAiB,EAAE,4BANb;AAONC,IAAAA,iCAAiC,EAAE;AAP7B;AApDK,C","sourcesContent":["export default {\n translation: {\n ebsr: {\n part: \"Parte {{index}}\"\n },\n numberLine: {\n addElementLimit_one: \"Solo puedes agregar {{count}} elemento\",\n addElementLimit_other: \"Solo puedes agregar {{count}} elementos\",\n clearAll: \"Borrar todo\"\n },\n imageClozeAssociation: {\n reachedLimit_one: \"Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.\",\n reachedLimit_other: \"Has alcanzado el límite de {{count}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.\"\n },\n drawingResponse: {\n fillColor: \"Color de relleno\",\n outlineColor: \"Color del contorno\",\n noFill: \"Sin relleno\",\n lightblue: \"Azul claro\",\n lightyellow: \"Amarillo claro\",\n red: \"Rojo\",\n orange: \"Naranja\",\n yellow: \"Amarillo\",\n violet: \"Violeta\",\n blue: \"Azul\",\n green: \"Verde\",\n white: \"Blanco\",\n black: \"Negro\",\n onDoubleClick: \"Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar\"\n },\n charting: {\n addCategory: \"Añadir categoría\",\n newLabel: \"Nueva etiqueta\"\n },\n graphing: {\n point: \"Punto\",\n circle: \"Circulo\",\n line: \"Línea\",\n parabola: \"Parábola\",\n polygon: \"Polígono\",\n ray: \"Semirrecta\",\n segment: \"Segmento \",\n sine: \"Seno\",\n vector: \"Vector\",\n label: \"Etiqueta\",\n redo: \"Rehacer\",\n reset: \"Reiniciar\",\n },\n mathInline: {\n 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.\"\n },\n },\n common: {\n undo: \"Deshacer\",\n clearAll: \"Borrar todo\",\n correct: \"Correct\",\n incorrect: \"Incorrect\",\n showCorrectAnswer: \"Mostrar respuesta correcta\",\n hideCorrectAnswer: \"Ocultar respuesta correcta\",\n 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.\"\n },\n};\n"],"file":"es.js"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
12
|
+
var _i18next = _interopRequireDefault(require("i18next"));
|
|
13
|
+
|
|
14
|
+
var _en = _interopRequireDefault(require("./en"));
|
|
15
|
+
|
|
16
|
+
var _es = _interopRequireDefault(require("./es"));
|
|
17
|
+
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
+
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
+
|
|
22
|
+
_i18next["default"].init({
|
|
23
|
+
fallbackLng: "en",
|
|
24
|
+
lng: "en",
|
|
25
|
+
debug: true,
|
|
26
|
+
resources: {
|
|
27
|
+
en: _en["default"],
|
|
28
|
+
es: _es["default"]
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
var _default = _objectSpread(_objectSpread({}, _i18next["default"]), {}, {
|
|
33
|
+
t: function t(key, options) {
|
|
34
|
+
var lng = options.lng;
|
|
35
|
+
|
|
36
|
+
switch (lng) {
|
|
37
|
+
// these keys don't work with plurals, don't know why, so I added a workaround to convert them to the correct lng
|
|
38
|
+
case "en_US":
|
|
39
|
+
options.lng = "en";
|
|
40
|
+
break;
|
|
41
|
+
|
|
42
|
+
case "es_ES":
|
|
43
|
+
case "es_MX":
|
|
44
|
+
options.lng = "es";
|
|
45
|
+
break;
|
|
46
|
+
|
|
47
|
+
default:
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return _i18next["default"].t(key, _objectSpread({
|
|
52
|
+
lng: lng
|
|
53
|
+
}, options));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
exports["default"] = _default;
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["i18next","init","fallbackLng","lng","debug","resources","en","es","t","key","options"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;AAEAA,oBAAQC,IAAR,CACE;AACEC,EAAAA,WAAW,EAAE,IADf;AAEEC,EAAAA,GAAG,EAAE,IAFP;AAGEC,EAAAA,KAAK,EAAE,IAHT;AAIEC,EAAAA,SAAS,EAAE;AACTC,IAAAA,EAAE,EAAEA,cADK;AAETC,IAAAA,EAAE,EAAEA;AAFK;AAJb,CADF;;+CAaKP,mB;AACHQ,EAAAA,CAAC,EAAE,WAACC,GAAD,EAAMC,OAAN,EAAkB;AACnB,QAAQP,GAAR,GAAgBO,OAAhB,CAAQP,GAAR;;AAEA,YAAQA,GAAR;AACE;AACA,WAAK,OAAL;AACEO,QAAAA,OAAO,CAACP,GAAR,GAAc,IAAd;AACA;;AACF,WAAK,OAAL;AACA,WAAK,OAAL;AACEO,QAAAA,OAAO,CAACP,GAAR,GAAc,IAAd;AACA;;AACF;AACE;AAVJ;;AAYA,WAAOH,oBAAQQ,CAAR,CAAUC,GAAV;AAAiBN,MAAAA,GAAG,EAAHA;AAAjB,OAAyBO,OAAzB,EAAP;AACD","sourcesContent":["import i18next from \"i18next\";\nimport en from \"./en\";\nimport es from \"./es\";\n\ni18next.init(\n {\n fallbackLng: \"en\",\n lng: \"en\",\n debug: true,\n resources: {\n en: en,\n es: es\n }\n }\n);\n\nexport default {\n ...i18next,\n t: (key, options) => {\n const { lng } = options;\n\n switch (lng) {\n // these keys don't work with plurals, don't know why, so I added a workaround to convert them to the correct lng\n case \"en_US\":\n options.lng = \"en\";\n break;\n case \"es_ES\":\n case \"es_MX\":\n options.lng = \"es\";\n break;\n default:\n break;\n }\n return i18next.t(key, { lng, ...options });\n }\n};\n"],"file":"index.js"}
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pie-lib/translator",
|
|
3
|
+
"version": "1.0.1-next.3884+7c948492",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"main": "lib/index.js",
|
|
8
|
+
"module": "src/index.js",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"debug": "^4.1.1",
|
|
11
|
+
"i18next": "^22.5.0",
|
|
12
|
+
"lodash": "^4.17.11",
|
|
13
|
+
"prop-types": "^15.7.2",
|
|
14
|
+
"react": "^16.8.1",
|
|
15
|
+
"react-dom": "^16.9.0"
|
|
16
|
+
},
|
|
17
|
+
"gitHead": "7c9484926e90b867482758e5672d9909636bc63e"
|
|
18
|
+
}
|
package/src/en.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
translation: {
|
|
3
|
+
ebsr: {
|
|
4
|
+
part: "Part {{index}}"
|
|
5
|
+
},
|
|
6
|
+
numberLine: {
|
|
7
|
+
addElementLimit_one: "You can only add {{count}} element",
|
|
8
|
+
addElementLimit_other: "You can only add {{count}} elements",
|
|
9
|
+
clearAll: "Clear all"
|
|
10
|
+
},
|
|
11
|
+
imageClozeAssociation: {
|
|
12
|
+
reachedLimit_one: "You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",
|
|
13
|
+
reachedLimit_other: "You’ve reached the limit of {{count}} responses per area. To add another response, one must first be removed."
|
|
14
|
+
},
|
|
15
|
+
drawingResponse: {
|
|
16
|
+
fillColor: "Fill color",
|
|
17
|
+
outlineColor: "Outline color",
|
|
18
|
+
noFill: "No fill",
|
|
19
|
+
lightblue: "Light blue",
|
|
20
|
+
lightyellow: "Light yellow",
|
|
21
|
+
red: "Red",
|
|
22
|
+
orange: "Orange",
|
|
23
|
+
yellow: "Yellow",
|
|
24
|
+
violet: "Violet",
|
|
25
|
+
blue: "Blue",
|
|
26
|
+
green: "Green",
|
|
27
|
+
white: "White",
|
|
28
|
+
black: "Black",
|
|
29
|
+
onDoubleClick: "Double click to edit this text. Press Enter to submit."
|
|
30
|
+
},
|
|
31
|
+
charting: {
|
|
32
|
+
addCategory: "Add category",
|
|
33
|
+
newLabel: "New label",
|
|
34
|
+
},
|
|
35
|
+
graphing: {
|
|
36
|
+
point: "Point",
|
|
37
|
+
circle: "Circle",
|
|
38
|
+
line: "Line",
|
|
39
|
+
parabola: "Parabola",
|
|
40
|
+
polygon: "Polygon",
|
|
41
|
+
ray: "Ray",
|
|
42
|
+
segment: "Segment",
|
|
43
|
+
sine: "Sine",
|
|
44
|
+
vector: "Vector",
|
|
45
|
+
label: "Label",
|
|
46
|
+
redo: "Redo",
|
|
47
|
+
reset: "Reset",
|
|
48
|
+
},
|
|
49
|
+
mathInline: {
|
|
50
|
+
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."
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
common: {
|
|
54
|
+
undo: "Undo",
|
|
55
|
+
clearAll: "Clear all",
|
|
56
|
+
correct: "Correct",
|
|
57
|
+
incorrect: "Incorrect",
|
|
58
|
+
showCorrectAnswer: "Show correct answer",
|
|
59
|
+
hideCorrectAnswer: "Hide correct answer",
|
|
60
|
+
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."
|
|
61
|
+
},
|
|
62
|
+
};
|
package/src/es.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
translation: {
|
|
3
|
+
ebsr: {
|
|
4
|
+
part: "Parte {{index}}"
|
|
5
|
+
},
|
|
6
|
+
numberLine: {
|
|
7
|
+
addElementLimit_one: "Solo puedes agregar {{count}} elemento",
|
|
8
|
+
addElementLimit_other: "Solo puedes agregar {{count}} elementos",
|
|
9
|
+
clearAll: "Borrar todo"
|
|
10
|
+
},
|
|
11
|
+
imageClozeAssociation: {
|
|
12
|
+
reachedLimit_one: "Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
|
|
13
|
+
reachedLimit_other: "Has alcanzado el límite de {{count}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta."
|
|
14
|
+
},
|
|
15
|
+
drawingResponse: {
|
|
16
|
+
fillColor: "Color de relleno",
|
|
17
|
+
outlineColor: "Color del contorno",
|
|
18
|
+
noFill: "Sin relleno",
|
|
19
|
+
lightblue: "Azul claro",
|
|
20
|
+
lightyellow: "Amarillo claro",
|
|
21
|
+
red: "Rojo",
|
|
22
|
+
orange: "Naranja",
|
|
23
|
+
yellow: "Amarillo",
|
|
24
|
+
violet: "Violeta",
|
|
25
|
+
blue: "Azul",
|
|
26
|
+
green: "Verde",
|
|
27
|
+
white: "Blanco",
|
|
28
|
+
black: "Negro",
|
|
29
|
+
onDoubleClick: "Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"
|
|
30
|
+
},
|
|
31
|
+
charting: {
|
|
32
|
+
addCategory: "Añadir categoría",
|
|
33
|
+
newLabel: "Nueva etiqueta"
|
|
34
|
+
},
|
|
35
|
+
graphing: {
|
|
36
|
+
point: "Punto",
|
|
37
|
+
circle: "Circulo",
|
|
38
|
+
line: "Línea",
|
|
39
|
+
parabola: "Parábola",
|
|
40
|
+
polygon: "Polígono",
|
|
41
|
+
ray: "Semirrecta",
|
|
42
|
+
segment: "Segmento ",
|
|
43
|
+
sine: "Seno",
|
|
44
|
+
vector: "Vector",
|
|
45
|
+
label: "Etiqueta",
|
|
46
|
+
redo: "Rehacer",
|
|
47
|
+
reset: "Reiniciar",
|
|
48
|
+
},
|
|
49
|
+
mathInline: {
|
|
50
|
+
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."
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
common: {
|
|
54
|
+
undo: "Deshacer",
|
|
55
|
+
clearAll: "Borrar todo",
|
|
56
|
+
correct: "Correct",
|
|
57
|
+
incorrect: "Incorrect",
|
|
58
|
+
showCorrectAnswer: "Mostrar respuesta correcta",
|
|
59
|
+
hideCorrectAnswer: "Ocultar respuesta correcta",
|
|
60
|
+
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."
|
|
61
|
+
},
|
|
62
|
+
};
|
package/src/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import i18next from "i18next";
|
|
2
|
+
import en from "./en";
|
|
3
|
+
import es from "./es";
|
|
4
|
+
|
|
5
|
+
i18next.init(
|
|
6
|
+
{
|
|
7
|
+
fallbackLng: "en",
|
|
8
|
+
lng: "en",
|
|
9
|
+
debug: true,
|
|
10
|
+
resources: {
|
|
11
|
+
en: en,
|
|
12
|
+
es: es
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
...i18next,
|
|
19
|
+
t: (key, options) => {
|
|
20
|
+
const { lng } = options;
|
|
21
|
+
|
|
22
|
+
switch (lng) {
|
|
23
|
+
// these keys don't work with plurals, don't know why, so I added a workaround to convert them to the correct lng
|
|
24
|
+
case "en_US":
|
|
25
|
+
options.lng = "en";
|
|
26
|
+
break;
|
|
27
|
+
case "es_ES":
|
|
28
|
+
case "es_MX":
|
|
29
|
+
options.lng = "es";
|
|
30
|
+
break;
|
|
31
|
+
default:
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
return i18next.t(key, { lng, ...options });
|
|
35
|
+
}
|
|
36
|
+
};
|