feat(frontend): added more localized strings

This commit is contained in:
sct
2020-11-27 06:59:22 +00:00
parent 45d6a1e1c0
commit 659a601877
25 changed files with 646 additions and 268 deletions

View File

@@ -13,10 +13,13 @@ import { LanguageContext, AvailableLocales } from '../context/LanguageContext';
import Head from 'next/head';
import Toast from '../components/Toast';
const loadLocaleData = (locale: string) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const loadLocaleData = (locale: string): Promise<any> => {
switch (locale) {
case 'ja':
return import('../i18n/locale/ja.json');
case 'fr':
return import('../i18n/locale/fr.json');
default:
return import('../i18n/locale/en.json');
}