Skip to content

Commit 4a7cea4

Browse files
committed
refactor: streamline i18n setup and update submodules
Simplify the i18n integration by importing i18n from @viur/vue-components instead of manually defining locales and messages. This change reduces complexity and potential errors in translation setup. Update submodules to incorporate the latest changes from @viur/vue-components and @viur/vue-utils, ensuring compatibility and incorporating new features or bug fixes from these dependencies.
1 parent ce40d17 commit 4a7cea4

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

admin/src/main.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ initApp(app)
1313

1414
import router from "./routes"
1515
import { createPinia } from "pinia"
16-
import { createI18n } from "vue-i18n"
17-
import en from "./translations/en"
18-
import de from "./translations/de"
1916
import piniaPluginPersistedstate from "pinia-plugin-persistedstate"
2017

2118
const pinia = createPinia()
@@ -31,16 +28,7 @@ app.component("WrapperNested", Wrapper_nested)
3128

3229
app.component("ActionHandler", ActionHandler)
3330

34-
// @ts-ignore
35-
import { de_translations, en_translations } from "@viur/vue-components/translations/translations"
36-
37-
const i18n = createI18n({
38-
legacy: false,
39-
locale: "de",
40-
fallbackLocale: "en",
41-
messages: { en: { ...en_translations, ...en }, de: { ...de_translations, ...de } },
42-
})
43-
31+
import { i18n } from "@viur/vue-components/i18n"
4432
app.use(i18n)
4533

4634
app.mount("#app")

0 commit comments

Comments
 (0)