chore(web): enforce valid translation keys using typescript (#12106)

This commit is contained in:
Michel Heusschen 2024-08-29 14:41:39 +02:00 committed by GitHub
parent bab5ad7ebd
commit 9f5a3f1e84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 48 additions and 49 deletions

View file

@ -11,14 +11,14 @@
type PluralElement,
type SelectElement,
} from '@formatjs/icu-messageformat-parser';
import { locale as i18nLocale, json } from 'svelte-i18n';
import { locale as i18nLocale, json, type Translations } from 'svelte-i18n';
type MessagePart = {
message: string;
tag?: string;
};
export let key: string;
export let key: Translations;
export let values: InterpolationValues = {};
const getLocale = (locale?: string | null) => {