mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: fix translation fallback
This commit is contained in:
1 parent
249efeb4cf
commit
461b486891
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.35.7",
|
||||
"version": "2.35.8",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -312,7 +312,7 @@ export class HandlerCommon {
|
||||
|
||||
translate(str: string) {
|
||||
if (!str) return '';
|
||||
return str.toString().translate(this.user?.viewLang, this.session?.viewLang, system.get('server.language'));
|
||||
return str.toString().translate(this.user?.viewLang || system.get('server.language'), this.session?.viewLang);
|
||||
}
|
||||
|
||||
renderTitle(str: string) {
|
||||
|
||||
Reference in new issue
Block a user