You've already forked npm-core-sdk
38 lines
959 B
TypeScript
38 lines
959 B
TypeScript
// 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(),
|
|
};
|
|
}
|
|
|