fix34: устранён import-time баг i18n, усилен SSH tunnel policy и doctor warning

This commit is contained in:
2026-05-09 12:34:47 +05:00
parent b2639da71c
commit 2e8e88bccc
6 changed files with 158 additions and 9 deletions
+10 -4
View File
@@ -1,10 +1,15 @@
import { createI18n } from "vue-i18n";
import { useAppStore } from "@/store/modules/app";
const appStore = useAppStore();
import defaultSettings from "@/settings";
import enLocale from "./package/en";
import ruLocale from "./package/ru";
function initialLocale(): string {
if (typeof window === "undefined") {
return defaultSettings.language || "ru";
}
return window.localStorage.getItem("language") || defaultSettings.language || "ru";
}
const messages = {
ru: {
...ruLocale,
@@ -16,7 +21,8 @@ const messages = {
const i18n = createI18n({
legacy: false,
locale: appStore.language,
locale: initialLocale(),
fallbackLocale: "ru",
messages: messages,
globalInjection: true,
});