mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 17:23:21 +00:00
feat(ui): Convert interval seconds to days, hours, minutes, and seconds (#5220)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
co-authored by
Frank Elsinga
parent
2a6d9b4acd
commit
c1adcfbfc2
+6
-4
@@ -1,5 +1,5 @@
|
||||
import { currentLocale } from "../i18n";
|
||||
import { setPageLocale } from "../util-frontend";
|
||||
import { setPageLocale, relativeTimeFormatter } from "../util-frontend";
|
||||
const langModules = import.meta.glob("../lang/*.json");
|
||||
|
||||
export default {
|
||||
@@ -28,11 +28,13 @@ export default {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async changeLang(lang) {
|
||||
let message = (await langModules["../lang/" + lang + ".json"]()).default;
|
||||
let message = (await langModules["../lang/" + lang + ".json"]())
|
||||
.default;
|
||||
this.$i18n.setLocaleMessage(lang, message);
|
||||
this.$i18n.locale = lang;
|
||||
localStorage.locale = lang;
|
||||
setPageLocale();
|
||||
}
|
||||
}
|
||||
relativeTimeFormatter.updateLocale(lang);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user