Refactor localization handling in frontend components to use centralized i18n instance

This commit updates the localization implementation in App.vue, LogsView.vue, and PermissionsView.vue by replacing the use of `useI18n` with a direct import of the i18n instance. This change simplifies the translation function calls and ensures consistency across the application.
This commit is contained in:
Torsten Schulz (local)
2025-11-21 09:03:53 +01:00
parent a4d89374b7
commit 0525f7908d
3 changed files with 5 additions and 5 deletions

View File

@@ -336,7 +336,7 @@ export default {
// Synchronisiere Sprache aus Store mit i18n
if (this.language) {
this.$i18n.locale.value = this.language;
this.$i18n.locale = this.language;
}
// Nur Daten laden, wenn der Benutzer authentifiziert ist

View File

@@ -193,7 +193,7 @@
<script>
import { ref, computed, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
import i18n from '../i18n';
import apiClient from '../apiClient.js';
import InfoDialog from '../components/InfoDialog.vue';
@@ -203,7 +203,7 @@ export default {
InfoDialog
},
setup() {
const { t } = useI18n();
const t = (key, params) => i18n.global.t(key, params);
const logs = ref([]);
const total = ref(0);
const loading = ref(false);

View File

@@ -155,7 +155,7 @@
<script>
import { ref, computed, onMounted } from 'vue';
import { useStore } from 'vuex';
import { useI18n } from 'vue-i18n';
import i18n from '../i18n';
import apiClient from '../apiClient.js';
import { usePermissions } from '../composables/usePermissions.js';
import InfoDialog from '../components/InfoDialog.vue';
@@ -169,7 +169,7 @@ export default {
},
setup() {
const store = useStore();
const { t } = useI18n();
const t = (key, params) => i18n.global.t(key, params);
const { isOwner, isAdmin, can } = usePermissions();
const infoDialog = ref({