* 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
20 lines
497 B
TypeScript
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;
|
|
};
|