- Add help docs for most sections
- Add translations documentation
- Fix up todos
- Remove german translation
This commit is contained in:
Jamie Curnow
2025-10-27 23:59:00 +10:00
parent 0f718570d6
commit 5d6916dcf0
38 changed files with 686 additions and 115 deletions

View File

@@ -1,5 +1,4 @@
import { createIntl, createIntlCache } from "react-intl";
import langDe from "./lang/de.json";
import langEn from "./lang/en.json";
import langFa from "./lang/fa.json";
import langList from "./lang/lang-list.json";
@@ -9,15 +8,12 @@ import langList from "./lang/lang-list.json";
// Remember when adding to this list, also update check-locales.js script
const localeOptions = [
["en", "en-US"],
["de", "de-DE"],
["fa", "fa-IR"],
];
const loadMessages = (locale?: string): typeof langList & typeof langEn => {
const thisLocale = locale || "en";
switch (thisLocale.slice(0, 2)) {
case "de":
return Object.assign({}, langList, langEn, langDe);
case "fa":
return Object.assign({}, langList, langEn, langFa);
default:
@@ -27,9 +23,6 @@ const loadMessages = (locale?: string): typeof langList & typeof langEn => {
const getFlagCodeForLocale = (locale?: string) => {
switch (locale) {
case "de-DE":
case "de":
return "DE";
case "fa-IR":
case "fa":
return "IR";