@cosmicdrift/kumiko-locale-de 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 { localeDe } from "../index";
3
+ import { localeDeBundle } from "../strings";
4
+ import { localeDeClient } from "../web";
5
+
6
+ describe("localeDe mount", () => {
7
+ test("client plugin exposes German Save", () => {
8
+ expect(localeDeClient().translations["de"]["kumiko.actions.save"]).toBe("Speichern");
9
+ });
10
+
11
+ test("server feature registers de translations without throwing", () => {
12
+ const feature = localeDe();
13
+ expect(feature.name).toBe("locale-de");
14
+ expect(feature.translations?.["kumiko.actions.save"]?.["de"]).toBe("Speichern");
15
+ expect(localeDeBundle["auth.mail.reset.button"]).toBe("Passwort zurücksetzen");
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 { localeDeBundle } from "./strings";
4
+
5
+ export { localeDeBundle };
6
+
7
+ export function localeDe() {
8
+ registerMailTranslations("de", localeDeBundle);
9
+ return defineFeature("locale-de", (r) => {
10
+ r.describe(
11
+ "German UI and mail copy for framework screens. Opt-in; not included by includeBundled.",
12
+ );
13
+ r.translations({
14
+ keys: Object.fromEntries(Object.entries(localeDeBundle).map(([k, v]) => [k, { de: v }])),
15
+ });
16
+ });
17
+ }