mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: i18n: fix serialize
This commit is contained in:
1 parent
e1228345b0
commit
4976f94ec0
3 files changed
+8
-5
No files matched your search
@@ -152,7 +152,7 @@ class UiConstantsHandler extends ResourceHandler {
|
||||
class LanguageHandler extends ResourceHandler {
|
||||
async all({ lang }) {
|
||||
if (!global.Hydro.locales[lang]) lang = SystemModel.get('server.language');
|
||||
this.response.body = `window.LOCALES=${JSON.stringify(global.Hydro.locales[lang])};`;
|
||||
this.response.body = `window.LOCALES=${JSON.stringify(global.Hydro.locales[lang][Symbol.for('iterate')])};`;
|
||||
this.response.type = 'application/javascript';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user