mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 01:10:02 +02:00
chore: fix types
This commit is contained in:
parent
af11fb4583
commit
f48dbd9417
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ export const locales = Object.keys(languages) as Locale[]
|
||||||
/**
|
/**
|
||||||
* Maps locale keys to their corresponding translation objects.
|
* Maps locale keys to their corresponding translation objects.
|
||||||
*/
|
*/
|
||||||
export const translations: Record<string, I18nType> = Object.fromEntries(
|
export const translations: Record<Locale, I18nType> = Object.fromEntries(
|
||||||
Object.entries(import.meta.glob('~/i18n/**/translation.json', { eager: true })).map(
|
Object.entries(import.meta.glob('~/i18n/**/translation.json', { eager: true })).map(
|
||||||
([key, value]) => {
|
([key, value]) => {
|
||||||
const result = i18nSchema.I18n(value)
|
const result = i18nSchema.I18n(value)
|
||||||
|
@ -34,7 +34,7 @@ export const i18n = {
|
||||||
LOCALES: Object.entries(languages).map(([key, locale]) => {
|
LOCALES: Object.entries(languages).map(([key, locale]) => {
|
||||||
return {
|
return {
|
||||||
...locale,
|
...locale,
|
||||||
ui: translations[key],
|
ui: translations[key as Locale],
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
} as const
|
} as const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue