mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-28 03:39:46 +08:00
更新国际化支持:调整多个组件中的文本引入,优化语言切换和翻译功能,删除不再使用的类型文件。
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import api from '@/api'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
// 国际化
|
||||
const { t } = useI18n()
|
||||
|
||||
// 定义所有的模块ID、名称列表
|
||||
const modules = ref<
|
||||
@@ -41,13 +45,13 @@ async function moduleTest(index: number) {
|
||||
target.loading = false
|
||||
if (result.success) {
|
||||
target.state = 'success'
|
||||
target.name = `${target.name} - 正常`
|
||||
target.name = `${target.name} - ${t('moduleTest.normal')}`
|
||||
} else if (!result.message) {
|
||||
target.state = undefined
|
||||
target.name = `${target.name} - 未启用`
|
||||
target.name = `${target.name} - ${t('moduleTest.disabled')}`
|
||||
} else {
|
||||
target.state = 'error'
|
||||
target.name = `${target.name} - 错误!`
|
||||
target.name = `${target.name} - ${t('moduleTest.error')}!`
|
||||
target.errmsg = result.message
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user