@pithy-sh/i18n 0.2.0 → 0.3.1

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.
@@ -15,13 +15,19 @@ import type { MessageCatalog } from "@pithy-sh/core/src/i18n/catalog";
15
15
  * `action` names `pithy` commands and repository files and never leaves the terminal, so nothing here
16
16
  * translates one. Placeholders match the `params` the throw sites pass.
17
17
  *
18
- * **Not one sentence below carries a placeholder, and that is a finding rather than a shortcut.** No
19
- * throw site in this repository passes `params` today — `git grep "params: {"` over every package's
20
- * `src` tree returns Workflow dispatch parameters and nothing else — so a `{name}` written here would
21
- * have no value to receive and `interpolate` leaves an unsupplied placeholder as written. `Sala {code}
22
- * llena.` on a caller's screen is worse than `Esa sala ya no admite más jugadores.`, which is why the
23
- * generic clause wins until the English side has a value to send. `./errors.test.ts` pins the absence,
24
- * and says there what would replace the pin the day a throw site starts naming one.
18
+ * **One sentence below carries a placeholder, and exactly one may.** `interpolate` leaves a placeholder
19
+ * nobody supplied written out as `{apiAnswer}`, so writing one here is a claim about a *call site*:
20
+ * that every throw of this code passes that name, on the degraded paths too. `core`'s
21
+ * `GUARANTEED_ERROR_PARAMS` is where a throw site makes that promise, and `./errors.test.ts` holds this
22
+ * file to it — a placeholder no code guarantees fails there. For a year the sound gate was the absence
23
+ * of placeholders, because no throw site passed `params` at all; `@pithy-sh/cloudflare`'s
24
+ * `cloudflareRefusal` is the first that does (#534), which is why the pin changed rather than relaxed.
25
+ *
26
+ * `cloudflare/request_failed` is that sentence. Cloudflare's own words are English we did not write and
27
+ * cannot translate, but its numeric code is what an operator quotes into a search, and dropping it left
28
+ * a Spanish reader with strictly less than an English one had. `apiAnswer` carries its own leading
29
+ * separator — `": 10000 Authentication error"`, or `""` when the call never reached Cloudflare — so the
30
+ * one sentence closes on its period both ways. A locale cannot write an `if`; the value can.
25
31
  *
26
32
  * Peninsular-neutral: one `es` serves es-ES, es-MX and es-AR, so a regionalism that reads as home to
27
33
  * one of them and as foreign to the other two is the wrong word even when it is the better word. Where
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,QAAQ,EAAE,cAkKtB,CAAC"}
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,cAkKtB,CAAC"}
@@ -15,13 +15,19 @@
15
15
  * `action` names `pithy` commands and repository files and never leaves the terminal, so nothing here
16
16
  * translates one. Placeholders match the `params` the throw sites pass.
17
17
  *
18
- * **Not one sentence below carries a placeholder, and that is a finding rather than a shortcut.** No
19
- * throw site in this repository passes `params` today — `git grep "params: {"` over every package's
20
- * `src` tree returns Workflow dispatch parameters and nothing else — so a `{name}` written here would
21
- * have no value to receive and `interpolate` leaves an unsupplied placeholder as written. `Sala {code}
22
- * llena.` on a caller's screen is worse than `Esa sala ya no admite más jugadores.`, which is why the
23
- * generic clause wins until the English side has a value to send. `./errors.test.ts` pins the absence,
24
- * and says there what would replace the pin the day a throw site starts naming one.
18
+ * **One sentence below carries a placeholder, and exactly one may.** `interpolate` leaves a placeholder
19
+ * nobody supplied written out as `{apiAnswer}`, so writing one here is a claim about a *call site*:
20
+ * that every throw of this code passes that name, on the degraded paths too. `core`'s
21
+ * `GUARANTEED_ERROR_PARAMS` is where a throw site makes that promise, and `./errors.test.ts` holds this
22
+ * file to it — a placeholder no code guarantees fails there. For a year the sound gate was the absence
23
+ * of placeholders, because no throw site passed `params` at all; `@pithy-sh/cloudflare`'s
24
+ * `cloudflareRefusal` is the first that does (#534), which is why the pin changed rather than relaxed.
25
+ *
26
+ * `cloudflare/request_failed` is that sentence. Cloudflare's own words are English we did not write and
27
+ * cannot translate, but its numeric code is what an operator quotes into a search, and dropping it left
28
+ * a Spanish reader with strictly less than an English one had. `apiAnswer` carries its own leading
29
+ * separator — `": 10000 Authentication error"`, or `""` when the call never reached Cloudflare — so the
30
+ * one sentence closes on its period both ways. A locale cannot write an `if`; the value can.
25
31
  *
26
32
  * Peninsular-neutral: one `es` serves es-ES, es-MX and es-AR, so a regionalism that reads as home to
27
33
  * one of them and as foreign to the other two is the wrong word even when it is the better word. Where
@@ -45,7 +51,7 @@ const esErrors = {
45
51
  "core/workflow_failed": "La operación no se ha completado.",
46
52
  "core/webhook_unverified": "La firma de la notificación no es válida.",
47
53
  "cloudflare/not_configured": "Este servicio no está disponible ahora.",
48
- "cloudflare/request_failed": "No se ha podido completar la llamada a Cloudflare.",
54
+ "cloudflare/request_failed": "No se ha podido completar la llamada a Cloudflare{apiAnswer}.",
49
55
  "cloudflare/invalid_response": "La respuesta de Cloudflare no tiene el formato esperado.",
50
56
  "secrets/not_found": "El secreto solicitado no existe.",
51
57
  "secrets/already_exists": "Ya existe un secreto con ese nombre.",
@@ -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.2.0";
6
+ export declare const PACKAGE_VERSION = "0.3.1";
7
7
  //# sourceMappingURL=version.generated.d.ts.map
@@ -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.2.0";
7
+ const PACKAGE_VERSION = "0.3.1";
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.2.0",
3
+ "version": "0.3.1",
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
  "dependencies": {
38
- "@pithy-sh/core": "^0.2.0"
38
+ "@pithy-sh/core": "^0.3.1"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "hono": "^4.13.2",
@@ -19,13 +19,19 @@ import type { MessageCatalog } from "@pithy-sh/core/src/i18n/catalog";
19
19
  * `action` names `pithy` commands and repository files and never leaves the terminal, so nothing here
20
20
  * translates one. Placeholders match the `params` the throw sites pass.
21
21
  *
22
- * **Not one sentence below carries a placeholder, and that is a finding rather than a shortcut.** No
23
- * throw site in this repository passes `params` today — `git grep "params: {"` over every package's
24
- * `src` tree returns Workflow dispatch parameters and nothing else — so a `{name}` written here would
25
- * have no value to receive and `interpolate` leaves an unsupplied placeholder as written. `Sala {code}
26
- * llena.` on a caller's screen is worse than `Esa sala ya no admite más jugadores.`, which is why the
27
- * generic clause wins until the English side has a value to send. `./errors.test.ts` pins the absence,
28
- * and says there what would replace the pin the day a throw site starts naming one.
22
+ * **One sentence below carries a placeholder, and exactly one may.** `interpolate` leaves a placeholder
23
+ * nobody supplied written out as `{apiAnswer}`, so writing one here is a claim about a *call site*:
24
+ * that every throw of this code passes that name, on the degraded paths too. `core`'s
25
+ * `GUARANTEED_ERROR_PARAMS` is where a throw site makes that promise, and `./errors.test.ts` holds this
26
+ * file to it — a placeholder no code guarantees fails there. For a year the sound gate was the absence
27
+ * of placeholders, because no throw site passed `params` at all; `@pithy-sh/cloudflare`'s
28
+ * `cloudflareRefusal` is the first that does (#534), which is why the pin changed rather than relaxed.
29
+ *
30
+ * `cloudflare/request_failed` is that sentence. Cloudflare's own words are English we did not write and
31
+ * cannot translate, but its numeric code is what an operator quotes into a search, and dropping it left
32
+ * a Spanish reader with strictly less than an English one had. `apiAnswer` carries its own leading
33
+ * separator — `": 10000 Authentication error"`, or `""` when the call never reached Cloudflare — so the
34
+ * one sentence closes on its period both ways. A locale cannot write an `if`; the value can.
29
35
  *
30
36
  * Peninsular-neutral: one `es` serves es-ES, es-MX and es-AR, so a regionalism that reads as home to
31
37
  * one of them and as foreign to the other two is the wrong word even when it is the better word. Where
@@ -54,7 +60,7 @@ export const esErrors: MessageCatalog = {
54
60
 
55
61
  // Cloudflare REST. Naming the provider is safe — it is the adopter's own account, not our infrastructure.
56
62
  "cloudflare/not_configured": "Este servicio no está disponible ahora.",
57
- "cloudflare/request_failed": "No se ha podido completar la llamada a Cloudflare.",
63
+ "cloudflare/request_failed": "No se ha podido completar la llamada a Cloudflare{apiAnswer}.",
58
64
  "cloudflare/invalid_response": "La respuesta de Cloudflare no tiene el formato esperado.",
59
65
 
60
66
  // Secrets.
@@ -13,4 +13,4 @@
13
13
  export const PACKAGE_NAME = "@pithy-sh/i18n";
14
14
 
15
15
  /** This package's version, stamped from its own package.json at generation time. */
16
- export const PACKAGE_VERSION = "0.2.0";
16
+ export const PACKAGE_VERSION = "0.3.1";