@pithy-sh/i18n 0.8.0 → 0.10.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/catalogs/es/errors.d.ts.map +1 -1
- package/dist/catalogs/es/errors.js +3 -0
- package/dist/http/middleware.d.ts +1 -1
- package/dist/http/middleware.js +1 -1
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.d.ts.map +1 -1
- package/dist/version.generated.js +1 -1
- package/package.json +4 -4
- package/src/catalogs/es/errors.ts +3 -0
- package/src/http/middleware.ts +1 -1
- package/src/version.generated.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/catalogs/es/errors.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/catalogs/es/errors.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,QAAQ,EAAE,cA+KtB,CAAC"}
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
*/
|
|
37
37
|
const esErrors = {
|
|
38
38
|
"validation/invalid_input": "Los datos enviados no son válidos.",
|
|
39
|
+
"input/required": "Falta una respuesta obligatoria y no se puede preguntar por ella.",
|
|
40
|
+
"core/precondition_failed": "Falta algo que esto necesita. Prepáralo primero.",
|
|
41
|
+
"core/person_required": "Solo una persona puede dar este paso.",
|
|
39
42
|
"auth/invalid_token": "Tu sesión no es válida o ha caducado. Vuelve a iniciar sesión.",
|
|
40
43
|
"auth/forbidden": "No tienes permiso para hacer esto.",
|
|
41
44
|
"auth/provider_unavailable": "Este método de acceso no está disponible ahora. Prueba con otro.",
|
|
@@ -20,7 +20,7 @@ export type LayersFor = (locale: string) => readonly (MessageCatalog | undefined
|
|
|
20
20
|
* formatters are held on the translator — which lives and dies with one request — rather than in a
|
|
21
21
|
* module-level cache.
|
|
22
22
|
*
|
|
23
|
-
* ## Why the query string is read off the URL here, and not through `
|
|
23
|
+
* ## Why the query string is read off the URL here, and not through `validate`
|
|
24
24
|
*
|
|
25
25
|
* §HTTP's rule is that a route declares its request contract on the route line and a handler reads
|
|
26
26
|
* `c.req.valid(target)`; `plugins/no-raw-request-input.grit` enforces it by making the raw accessors
|
package/dist/http/middleware.js
CHANGED
|
@@ -19,7 +19,7 @@ import { getCookie } from "hono/cookie";
|
|
|
19
19
|
* formatters are held on the translator — which lives and dies with one request — rather than in a
|
|
20
20
|
* module-level cache.
|
|
21
21
|
*
|
|
22
|
-
* ## Why the query string is read off the URL here, and not through `
|
|
22
|
+
* ## Why the query string is read off the URL here, and not through `validate`
|
|
23
23
|
*
|
|
24
24
|
* §HTTP's rule is that a route declares its request contract on the route line and a handler reads
|
|
25
25
|
* `c.req.valid(target)`; `plugins/no-raw-request-input.grit` enforces it by making the raw accessors
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
/** This package's npm name — the join key against a release feed. */
|
|
4
4
|
export declare const PACKAGE_NAME = "@pithy-sh/i18n";
|
|
5
5
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
6
|
-
export declare const PACKAGE_VERSION = "0.
|
|
6
|
+
export declare const PACKAGE_VERSION = "0.10.0";
|
|
7
7
|
//# sourceMappingURL=version.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.generated.d.ts","sourceRoot":"","sources":["../src/version.generated.ts"],"names":[],"mappings":"AAWA,qEAAqE;AACrE,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAE7C,oFAAoF;AACpF,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"version.generated.d.ts","sourceRoot":"","sources":["../src/version.generated.ts"],"names":[],"mappings":"AAWA,qEAAqE;AACrE,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAE7C,oFAAoF;AACpF,eAAO,MAAM,eAAe,WAAW,CAAC"}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
/** This package's npm name — the join key against a release feed. */
|
|
5
5
|
const PACKAGE_NAME = "@pithy-sh/i18n";
|
|
6
6
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
7
|
-
const PACKAGE_VERSION = "0.
|
|
7
|
+
const PACKAGE_VERSION = "0.10.0";
|
|
8
8
|
//#endregion
|
|
9
9
|
export { PACKAGE_NAME, PACKAGE_VERSION };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pithy-sh/i18n",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"reset": "bun run clean && rm -rf node_modules"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@pithy-sh/core": "^0.
|
|
38
|
+
"@pithy-sh/core": "^0.10.0",
|
|
39
39
|
"hono": "^4.13.2",
|
|
40
40
|
"react": "^19.0.0",
|
|
41
41
|
"zod": "^4.4.0"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@cloudflare/vitest-plugin": "^1.
|
|
49
|
+
"@cloudflare/vitest-plugin": "^1.4.2",
|
|
50
50
|
"@pithy-sh/auth": "workspace:*",
|
|
51
51
|
"@pithy-sh/core": "workspace:*",
|
|
52
52
|
"@pithy-sh/payments": "workspace:*",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"tsdown": "^0.23.0",
|
|
63
63
|
"typescript": "^7.0.2",
|
|
64
64
|
"vitest": "^4.1.0",
|
|
65
|
-
"wrangler": "^4.
|
|
65
|
+
"wrangler": "^4.151.0",
|
|
66
66
|
"zod": "^4.4.0"
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -41,6 +41,9 @@ import type { MessageCatalog } from "@pithy-sh/core/src/i18n/catalog";
|
|
|
41
41
|
export const esErrors: MessageCatalog = {
|
|
42
42
|
// Core: the codes every capability throws, and the ones a caller meets most.
|
|
43
43
|
"validation/invalid_input": "Los datos enviados no son válidos.",
|
|
44
|
+
"input/required": "Falta una respuesta obligatoria y no se puede preguntar por ella.",
|
|
45
|
+
"core/precondition_failed": "Falta algo que esto necesita. Prepáralo primero.",
|
|
46
|
+
"core/person_required": "Solo una persona puede dar este paso.",
|
|
44
47
|
"auth/invalid_token": "Tu sesión no es válida o ha caducado. Vuelve a iniciar sesión.",
|
|
45
48
|
"auth/forbidden": "No tienes permiso para hacer esto.",
|
|
46
49
|
"auth/provider_unavailable": "Este método de acceso no está disponible ahora. Prueba con otro.",
|
package/src/http/middleware.ts
CHANGED
|
@@ -27,7 +27,7 @@ export type LayersFor = (locale: string) => readonly (MessageCatalog | undefined
|
|
|
27
27
|
* formatters are held on the translator — which lives and dies with one request — rather than in a
|
|
28
28
|
* module-level cache.
|
|
29
29
|
*
|
|
30
|
-
* ## Why the query string is read off the URL here, and not through `
|
|
30
|
+
* ## Why the query string is read off the URL here, and not through `validate`
|
|
31
31
|
*
|
|
32
32
|
* §HTTP's rule is that a route declares its request contract on the route line and a handler reads
|
|
33
33
|
* `c.req.valid(target)`; `plugins/no-raw-request-input.grit` enforces it by making the raw accessors
|
package/src/version.generated.ts
CHANGED