@cosmicdrift/kumiko-locale-es 0.208.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.
@@ -0,0 +1,17 @@
1
+ import { describe, expect, test } from "bun:test";
2
+ import { localeEs } from "../index";
3
+ import { localeEsBundle } from "../strings";
4
+ import { localeEsClient } from "../web";
5
+
6
+ describe("localeEs mount", () => {
7
+ test("client plugin exposes Spanish Save", () => {
8
+ expect(localeEsClient().translations["es"]["kumiko.actions.save"]).toBe("Guardar");
9
+ });
10
+
11
+ test("server feature registers es translations without throwing", () => {
12
+ const feature = localeEs();
13
+ expect(feature.name).toBe("locale-es");
14
+ expect(feature.translations?.["kumiko.actions.save"]?.["es"]).toBe("Guardar");
15
+ expect(localeEsBundle["auth.mail.reset.button"]).toBe("Restablecer contraseña");
16
+ });
17
+ });
package/src/index.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
2
+ import { registerMailTranslations } from "@cosmicdrift/kumiko-framework/i18n";
3
+ import { localeEsBundle } from "./strings";
4
+
5
+ export { localeEsBundle };
6
+
7
+ export function localeEs() {
8
+ registerMailTranslations("es", localeEsBundle);
9
+ return defineFeature("locale-es", (r) => {
10
+ r.describe(
11
+ "Spanish UI and mail copy for framework screens. Opt-in; not included by includeBundled.",
12
+ );
13
+ r.translations({
14
+ keys: Object.fromEntries(Object.entries(localeEsBundle).map(([k, v]) => [k, { es: v }])),
15
+ });
16
+ });
17
+ }