Replace i18n by a custom implementation (#638)

There are two problems with the current localization strategy:
- We download the translations on-demand, which means that it does a serial roundtrip for nothing.
- withTranslation helper actually renders the app 3 times on startup, instead of once (I haven't tried to debug it)
This commit is contained in:
Christopher Chedeau
2020-01-31 21:06:06 +00:00
committed by GitHub
parent 637276301a
commit e4919e2e6c
21 changed files with 101 additions and 167 deletions

View File

@@ -1,6 +1,6 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { PreviousScene } from "../scene/types";
import { t } from "../i18n";
interface StoredScenesListProps {
scenes: PreviousScene[];
@@ -13,8 +13,6 @@ export function StoredScenesList({
currentId,
onChange,
}: StoredScenesListProps) {
const { t } = useTranslation();
return (
<React.Fragment>
<select