Reorganize repo structure and standards references

This commit is contained in:
david committed 2026-06-29 05:03:42 +02:00
1 parent 3cb93a81be
commit be2054274d
5885 files changed
+2588 -195

No files matched your search

@@ -0,0 +1,25 @@
import { describe, expect, it } from "vitest";
import type { TFunction } from "i18next";
import { PropertyAttributeName } from "~/application/enums/entities/PropertyAttributeName";
import PropertyAttributeHelper from "./PropertyAttributeHelper";
describe("PropertyAttributeHelper", () => {
it("localizes visible property attribute option labels when a translator is provided", () => {
const t = (key: string) =>
({
"formats.boolean.yesNo": "Ja/Nein",
"formats.boolean.trueFalse": "Wahr/Falsch",
"formats.boolean.enabledDisabled": "Aktiviert/Deaktiviert",
"formats.boolean.onOff": "An/Aus",
"formats.boolean.activeInactive": "Aktiv/Inaktiv",
})[key] ?? key;
expect(PropertyAttributeHelper.getPropertyAttributeOptions(PropertyAttributeName.FormatBoolean, t as unknown as TFunction)).toEqual([
{ name: "Ja/Nein", value: "yesNo", labelKey: "formats.boolean.yesNo" },
{ name: "Wahr/Falsch", value: "trueFalse", labelKey: "formats.boolean.trueFalse" },
{ name: "Aktiviert/Deaktiviert", value: "enabledDisabled", labelKey: "formats.boolean.enabledDisabled" },
{ name: "An/Aus", value: "onOff", labelKey: "formats.boolean.onOff" },
{ name: "Aktiv/Inaktiv", value: "activeInactive", labelKey: "formats.boolean.activeInactive" },
]);
});
});