expo-backend-types 0.3.0-EXPO-245.9 → 0.3.0-EXPO-245.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,97 @@
1
+ {
2
+ "model": {
3
+ "comment": {
4
+ "id": {
5
+ "uuid": "El ID debe ser un UUID"
6
+ },
7
+ "content": {
8
+ "min": "El contenido debe tener al menos 1 caracter"
9
+ }
10
+ },
11
+ "account": {
12
+ "id": {
13
+ "required": "El ID es requerido",
14
+ "uuid": "El ID debe ser un UUID"
15
+ },
16
+ "username": {
17
+ "required": "El nombre de usuario es requerido"
18
+ },
19
+ "email": {
20
+ "required": "El email es requerido",
21
+ "email": "El email debe ser un email válido"
22
+ },
23
+ "password": {
24
+ "required": "La contraseña es requerida",
25
+ "min": "La contraseña debe tener al menos 6 caracteres"
26
+ },
27
+ "role": {
28
+ "invalid": "El rol es inválido"
29
+ }
30
+ },
31
+ "tag": {
32
+ "id": {
33
+ "uuid": "El ID debe ser un UUID"
34
+ },
35
+ "name": {
36
+ "required": "El nombre es requerido",
37
+ "min": "El nombre debe tener al menos 1 caracter"
38
+ },
39
+ "type": {
40
+ "invalid": "El tipo de etiqueta es inválido"
41
+ }
42
+ },
43
+ "event": {
44
+ "id": {
45
+ "uuid": "El ID debe ser un UUID"
46
+ },
47
+ "name": {
48
+ "required": "El nombre es requerido"
49
+ },
50
+ "date": {
51
+ "required": "La fecha es requerida",
52
+ "invalid": "La fecha debe ser una fecha válida"
53
+ },
54
+ "location": {
55
+ "required": "La ubicación es requerida"
56
+ }
57
+ },
58
+ "tagGroup": {
59
+ "id": {
60
+ "uuid": "El ID debe ser un UUID"
61
+ },
62
+ "name": {
63
+ "required": "El nombre es requerido"
64
+ },
65
+ "color": {
66
+ "invalid": "El color debe tener el formato hexadecimal (#ABCDEF)"
67
+ }
68
+ },
69
+ "eventFolder": {
70
+ "id": {
71
+ "uuid": "El ID debe ser un UUID"
72
+ },
73
+ "color": {
74
+ "invalid": "El color debe tener el formato hexadecimal (#ABCDEF)"
75
+ }
76
+ }
77
+ },
78
+ "route": {
79
+ "account": {
80
+ "create": {
81
+ "success": "Cuenta creada con éxito",
82
+ "conflict": "Cuenta ya existente"
83
+ },
84
+ "global-filter-patch": {
85
+ "success": "Filtro base actualizado",
86
+ "conflict": "Etiquetas Inválidas"
87
+ },
88
+ "global-filter-get": {
89
+ "success": "Filtro base obtenido",
90
+ "not-found": "Cuenta no encontrada"
91
+ },
92
+ "me": {
93
+ "success": "Cuenta obtenida"
94
+ }
95
+ }
96
+ }
97
+ }
@@ -0,0 +1,8 @@
1
+ import { I18n, TranslateOptions } from 'i18n-js';
2
+ import esJson from '@/i18n/es.json';
3
+ import { Paths } from '@/shared/errors/dotType';
4
+ declare const translations: Record<string, typeof esJson>;
5
+ export declare const i18n: I18n;
6
+ type Translations = Paths<(typeof translations)['es']>;
7
+ export declare function translate<Keys extends Translations>(key: Keys extends `${string}.${string}` ? Keys : never, params?: TranslateOptions): string;
8
+ export {};
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.translate = exports.i18n = void 0;
7
+ const i18n_js_1 = require("i18n-js");
8
+ const es_json_1 = __importDefault(require("./es.json"));
9
+ const translations = {
10
+ es: es_json_1.default,
11
+ };
12
+ exports.i18n = new i18n_js_1.I18n(translations, {
13
+ defaultLocale: 'es',
14
+ locale: 'es',
15
+ missingTranslationPrefix: 'TRANSLATION MISSING: ',
16
+ });
17
+ function translate(key, params = {}) {
18
+ return exports.i18n.t(key, params);
19
+ }
20
+ exports.translate = translate;
21
+ //# sourceMappingURL=translate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translate.js","sourceRoot":"","sources":["../../../src/i18n/translate.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAwD;AAExD,wDAAoC;AAGpC,MAAM,YAAY,GAAkC;IAClD,EAAE,EAAE,iBAAM;CACX,CAAC;AAEW,QAAA,IAAI,GAAG,IAAI,cAAI,CAAC,YAAY,EAAE;IACzC,aAAa,EAAE,IAAI;IACnB,MAAM,EAAE,IAAI;IACZ,wBAAwB,EAAE,uBAAuB;CAClD,CAAC,CAAC;AAIH,SAAgB,SAAS,CACvB,GAAsD,EACtD,SAA2B,EAAE;IAE7B,OAAO,YAAI,CAAC,CAAC,CAAC,GAAY,EAAE,MAAM,CAAC,CAAC;AACtC,CAAC;AALD,8BAKC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-backend-types",
3
- "version": "0.3.0-EXPO-245.9",
3
+ "version": "0.3.0-EXPO-245.10",
4
4
  "description": "",
5
5
  "author": "Expo",
6
6
  "private": false,
@@ -8,7 +8,8 @@
8
8
  "files": [
9
9
  "dist/types",
10
10
  "dist/src/**/*.dto.{js,d.ts,ts}",
11
- "dist/src/**/exports.{js,d.ts,ts}"
11
+ "dist/src/**/exports.{js,d.ts,ts}",
12
+ "dist/src/i18n"
12
13
  ],
13
14
  "scripts": {
14
15
  "ci": "npm install && npx prisma generate && npm run generate-ts-schema && npm run build && npx prisma generate && npm run format && npm run lint && npm run check-exports",