refactor(weknoracloud): enhance internationalization and UI feedback for credential management

- Updated the WeKnoraCloud settings and related components to utilize i18n for improved localization.
- Replaced hardcoded strings with translation keys for better maintainability and user experience.
- Enhanced user feedback messages for credential status, including configuration, expiration, and unconfiguration states.
- Improved UI elements to guide users in managing WeKnoraCloud credentials effectively.

This update streamlines the user interface and ensures consistent messaging across different languages.
This commit is contained in:
wizardchen
2026-04-14 17:29:44 +08:00
committed by lyingbug
parent 0eff63b308
commit 1fc90f5772
8 changed files with 173 additions and 51 deletions
@@ -93,14 +93,12 @@ import { storeToRefs } from 'pinia'
const { t } = useI18n()
function getEngineDisplayName(engineName: string): string {
if (engineName === 'weknoracloud') return 'WeKnora Cloud'
const key = `kbSettings.parser.engines.${engineName}.name`
const translated = t(key)
return translated !== key ? translated : engineName
}
function getEngineDisplayDesc(engineName: string, fallback: string): string {
if (engineName === 'weknoracloud') return '使用 WeKnora Cloud 进行文档解析'
const key = `kbSettings.parser.engines.${engineName}.desc`
const translated = t(key)
return translated !== key ? translated : fallback