web: add basic lingui

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-04-03 19:07:11 +02:00
parent 650b084c72
commit 44d33ed96e
8 changed files with 1366 additions and 484 deletions

View File

@ -4,6 +4,7 @@ import { me } from "../api/Users";
import { SidebarItem } from "../elements/sidebar/Sidebar";
import { ID_REGEX, SLUG_REGEX, UUID_REGEX } from "../elements/router/Route";
import { Interface } from "./Interface";
import "./locale";
export const SIDEBAR_ITEMS: SidebarItem[] = [
new SidebarItem("Library", "/library"),

View File

@ -1,4 +1,3 @@
import "construct-style-sheets-polyfill";
import "./locale";
import "../elements/messages/MessageContainer";
import "../flows/FlowExecutor";

View File

@ -0,0 +1,7 @@
import { i18n } from '@lingui/core'
// messages.js is generated by the cli
import { messages } from '../locales/en';
i18n.load('en', messages)
i18n.activate('en')

1
web/src/locales/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.ts