mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core: remove deprecated apis
This commit is contained in:
1 parent
05b27fc1eb
commit
ec0ba8a394
9 files changed
+24
-37
No files matched your search
@@ -52,13 +52,6 @@ String.prototype.translate = function translate(...languages: string[]) {
|
||||
return this.toString();
|
||||
};
|
||||
|
||||
/** @deprecated use ctx.i18n.load instead. */
|
||||
function load(data: Record<string, Record<string, string>>) {
|
||||
for (const i in data) app.i18n.load(i, data[i]);
|
||||
}
|
||||
|
||||
export = load;
|
||||
|
||||
function collect(lang: string) {
|
||||
const s = translations[lang];
|
||||
if (!(s instanceof Array)) return {};
|
||||
@@ -81,4 +74,3 @@ global.Hydro.locales = new Proxy(translations, {
|
||||
});
|
||||
},
|
||||
}) as any;
|
||||
global.Hydro.lib.i18n = load;
|
||||
Reference in new issue
Block a user