[+] Display rating details

This commit is contained in:
Azalea
2024-03-15 01:10:15 -04:00
parent e85533686e
commit d9a332de44
8 changed files with 96 additions and 3 deletions

View File

@@ -18,6 +18,10 @@ if (navigator.language.startsWith('zh')) {
}
export function t(key: keyof LocalizedMessages, variables?: { [index: string]: any }) {
if (!msgs[lang][key]) {
console.warn(`Missing translation for ${key}`)
return key
}
if (variables) {
return msgs[lang][key].replace(/\${(.*?)}/g, (_: string, v: string | number) => variables[v] + "")
}