refactor: refactor locales, separate locales within apps,fixed #12

This commit is contained in:
vben
2024-07-07 00:17:44 +08:00
parent 3571511394
commit 208d4188fc
77 changed files with 486 additions and 394 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import SwitchItem from '../switch-item.vue';

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { SelectListItem } from '@vben/types';
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import { SUPPORT_LANGUAGES } from '@vben-core/preferences';
import SelectItem from '../select-item.vue';

View File

@@ -3,7 +3,7 @@ import type { SelectListItem } from '@vben/types';
import { computed } from 'vue';
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import SwitchItem from '../switch-item.vue';
import ToggleItem from '../toggle-item.vue';

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { type Component, computed } from 'vue';
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import { ContentCompact, ContentWide } from '../../icons';

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import InputItem from '../input-item.vue';
import SwitchItem from '../switch-item.vue';

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import SwitchItem from '../switch-item.vue';

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { LayoutHeaderModeType, SelectListItem } from '@vben/types';
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import SelectItem from '../select-item.vue';
import SwitchItem from '../switch-item.vue';

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import SwitchItem from '../switch-item.vue';

View File

@@ -3,8 +3,8 @@ import type { LayoutType } from '@vben/types';
import { type Component, computed } from 'vue';
import { $t } from '@vben/locales';
import { MdiQuestionMarkCircleOutline } from '@vben-core/iconify';
import { $t } from '@vben-core/locales';
import { VbenTooltip } from '@vben-core/shadcn-ui';
import {

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { SelectListItem } from '@vben/types';
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import SwitchItem from '../switch-item.vue';
import ToggleItem from '../toggle-item.vue';

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import NumberFieldItem from '../number-field-item.vue';
import SwitchItem from '../switch-item.vue';

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import SwitchItem from '../switch-item.vue';

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed } from 'vue';
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import { isWindowsOs } from '@vben-core/toolkit';
import SwitchItem from '../switch-item.vue';

View File

@@ -3,9 +3,9 @@ import type { BuiltinThemeType } from '@vben/types';
import { computed, ref } from 'vue';
import { $t } from '@vben/locales';
import { TinyColor, convertToHsl } from '@vben-core/colorful';
import { MdiEditBoxOutline } from '@vben-core/iconify';
import { $t } from '@vben-core/locales';
import {
BUILT_IN_THEME_PRESETS,
type BuiltinThemePreset,

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import SwitchItem from '../switch-item.vue';

View File

@@ -3,12 +3,12 @@ import type { ThemeModeType } from '@vben-core/preferences';
import type { Component } from 'vue';
import { $t } from '@vben/locales';
import {
IcRoundMotionPhotosAuto,
IcRoundWbSunny,
MdiMoonAndStars,
} from '@vben-core/iconify';
import { $t } from '@vben-core/locales';
import SwitchItem from '../switch-item.vue';

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { loadLocaleMessages } from '@vben/locales';
import { loadLocaleMessages } from '@vben-core/locales';
import { preferences, updatePreferences } from '@vben-core/preferences';
import Preferences from './preferences.vue';

View File

@@ -15,8 +15,8 @@ import type { SegmentedItem } from '@vben-core/shadcn-ui';
import { computed, ref } from 'vue';
import { $t, loadLocaleMessages } from '@vben/locales';
import { IcRoundFolderCopy, IcRoundRestartAlt } from '@vben-core/iconify';
import { $t, loadLocaleMessages } from '@vben-core/locales';
import {
clearPreferencesCache,
preferences,

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { $t } from '@vben/locales';
import { $t } from '@vben-core/locales';
import { VbenButton } from '@vben-core/shadcn-ui';
import IconSetting from './icons/setting.vue';