diff --git a/index.ts b/index.ts index 327baaf..3f8732e 100644 --- a/index.ts +++ b/index.ts @@ -186,4 +186,4 @@ export * from './warehousingShared' export * from './workflow.client' export * from './workflow' - \ No newline at end of file + export * from './utils/translations' diff --git a/package.json b/package.json index 983032f..9bafaed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reflex-platform/npm-core-sdk", - "version": "1.13.0-SNAPSHOT-260306095709", + "version": "1.13.0-SNAPSHOT-260306140017", "description": "npm libs from core model proto files", "homepage": "", "main": "index.ts", diff --git a/utils/translations.ts b/utils/translations.ts new file mode 100644 index 0000000..7d9c0fc --- /dev/null +++ b/utils/translations.ts @@ -0,0 +1,37 @@ +// Code generated by translations generator; DO NOT EDIT. +// Source: translations.yaml + +/** + * Label represents a translation key scoped to a specific context. + */ +export interface Label { + /** + * Context is the translation scope (e.g. "metadata"). + */ + context: string; + /** + * Key is the unique translation identifier within the context. + */ + key: string; +} + +/** + * Builds a translation label for a metadata key. + */ +export function metadataKeyLabel(domain: string, entity: string, parent: string, name: string): Label { + return { + context: "metadata", + key: [domain, entity, parent, name, "key"].join("_").toLowerCase(), + }; +} + +/** + * Builds a translation label for a metadata value. + */ +export function metadataValueLabel(domain: string, entity: string, parent: string, name: string, value: string): Label { + return { + context: "metadata", + key: [domain, entity, parent, name, "value", value].join("_").toLowerCase(), + }; +} +