feat: locales #27

Merged
Anri merged 26 commits from lang into main 2022-07-22 11:46:48 +02:00
Showing only changes of commit def329bf67 - Show all commits

View file

@ -49,10 +49,9 @@ export const getLocale = (client: Client, text: string) => {
const str = locale.get(text) const str = locale.get(text)
?? client.locales.get(client.config.default_lang)?.get(text); ?? client.locales.get(client.config.default_lang)?.get(text);
if (str === undefined) { if (str !== undefined) {
throw 'Missing locales';
}
data[lang] = str.toLowerCase(); data[lang] = str.toLowerCase();
}
}); });
return data; return data;