Skip to content

Commit

Permalink
fix: i18n files lost after building
Browse files Browse the repository at this point in the history
  • Loading branch information
orangelckc committed May 4, 2023
1 parent 6f24599 commit ccd9f04
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Function/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const triggerScroll = () => {
<TokenUsage />

<!-- 当前聊天角色对象 -->
<i18n-t keypath="session.chatWith" tag="div">
<i18n-t keypath="session.chatWith" tag="div" scope="global">
<a-tooltip :content="t('session.chatTip')">
<span class="mark cursor-pointer" @click="triggerScroll">
{{ currentRole?.name }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Session/components/NoSession.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const { shortcutKeys } = storeToRefs(useSettingsStore())
>

<span>
<i18n-t keypath="session.empty.role" tag="label">
<i18n-t keypath="session.empty.role" tag="label" scope="global">
<a-typography-text code>/</a-typography-text>
</i18n-t>
</span>
Expand Down
7 changes: 6 additions & 1 deletion src/components/Settings/components/General.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ const relaunch = () => {
<a-switch v-model="proxy.bypass" type="round"></a-switch>

<span class="text-sm text-[var(--color-text-3)]" v-if="proxy.bypass">
<i18n-t keypath="setting.general.proxyTip" tag="label" for="restart">
<i18n-t
keypath="setting.general.proxyTip"
tag="label"
for="restart"
scope="global"
>
<span class="mark cursor-pointer" @click="relaunch">{{
$t('setting.general.restart')
}}</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Settings/components/Model.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ watch(
{{ usedCredit }} / {{ totalCredit }}
</div> -->
<div>{{ $t('setting.model.balanceTip') }}</div>
<i18n-t keypath="setting.model.aiModelTip" tag="label">
<i18n-t keypath="setting.model.aiModelTip" tag="label" scope="global">
<span class="mark">gpt-3.5-turbo-0301</span>
</i18n-t>
</div>
Expand Down
4 changes: 3 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
export default defineConfig(async () => ({
plugins: [
vue(),
VueI18nPlugin({}),
VueI18nPlugin({
include: ['./src/locales/**']
}),
Unocss({
presets: [presetUno(), presetIcons(), presetAutoprefixer()],
transformers: [
Expand Down

0 comments on commit ccd9f04

Please sign in to comment.