Files
homarr/packages/translation/src/index.ts
Meier Lukas 361700b239 feat: add board access settings (#249)
* wip: add board access settings

* wip: add user access control

* wip: add user access control

* feat: add user access control

* refactor: move away from mantine-modal-manager

* fix: ci issues and failing tests

* fix: lint issue

* fix: format issue

* fix: deepsource issues

* chore: address pull request feedback
2024-03-20 20:30:58 +01:00

20 lines
497 B
TypeScript

import type { stringOrTranslation, TranslationFunction } from "./type";
export * from "./type";
export const supportedLanguages = ["en", "de"] as const;
export type SupportedLanguage = (typeof supportedLanguages)[number];
export const defaultLocale = "en";
export { languageMapping } from "./lang";
export const translateIfNecessary = (
t: TranslationFunction,
value: stringOrTranslation | undefined,
) => {
if (typeof value === "function") {
return value(t);
}
return value;
};