Use lang file in typescript

This commit is contained in:
Harvey Tindall
2021-01-15 14:43:31 +00:00
parent c470e40737
commit 422f13202b
13 changed files with 229 additions and 97 deletions
+12
View File
@@ -27,12 +27,24 @@ declare interface Window {
tabs: Tabs;
invites: inviteList;
notifications: NotificationBox;
language: string;
lang: Lang;
langFile: {};
}
declare interface Lang {
get: (sect: string, key: string) => string;
strings: (key: string) => string;
notif: (key: string) => string;
var: (sect: string, key: string, ...subs: string[]) => string;
quantity: (key: string, number: number) => string;
}
declare interface NotificationBox {
connectionError: () => void;
customError: (type: string, message: string) => void;
customPositive: (type: string, bold: string, message: string) => void;
customSuccess: (type: string, message: string) => void;
}
declare interface Tabs {