core: remove deprecated apis

This commit is contained in:
undefined committed 2023-01-29 11:34:02 +08:00
1 parent 05b27fc1eb
commit ec0ba8a394
9 files changed
+24 -37

No files matched your search

-8
View File
@@ -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;