replace vue-i18n with i18next-vue
Complete the i18n migration by switching runtime setup and remaining components to i18next-vue, and add shared locale constants/helpers for SSR and client language handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useTranslation } from 'i18next-vue';
|
||||
import PageHeader from '@/components/dashboard/PageHeader.vue';
|
||||
import NotificationActions from './components/NotificationActions.vue';
|
||||
import NotificationList from './components/NotificationList.vue';
|
||||
@@ -21,7 +21,7 @@ interface Notification {
|
||||
|
||||
const loading = ref(false);
|
||||
const activeTab = ref('all');
|
||||
const { t } = useI18n();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const notifications = ref<Notification[]>([
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useTranslation } from 'i18next-vue';
|
||||
|
||||
interface Props {
|
||||
loading?: boolean;
|
||||
@@ -13,7 +13,7 @@ const emit = defineEmits<{
|
||||
clearAll: [];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t } = useTranslation();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useTranslation } from 'i18next-vue';
|
||||
import InfoIcon from '@/components/icons/InfoIcon.vue';
|
||||
import CheckCircleIcon from '@/components/icons/CheckCircleIcon.vue';
|
||||
import AlertTriangleIcon from '@/components/icons/AlertTriangleIcon.vue';
|
||||
@@ -32,7 +32,7 @@ const emit = defineEmits<{
|
||||
delete: [id: string];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const iconComponent = computed(() => {
|
||||
const icons: Record<string, any> = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useTranslation } from 'i18next-vue';
|
||||
import NotificationItem from './NotificationItem.vue';
|
||||
|
||||
interface Notification {
|
||||
@@ -24,7 +24,7 @@ const emit = defineEmits<{
|
||||
delete: [id: string];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t } = useTranslation();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user