mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
用国际化重写硬编码提示
This commit is contained in:
@@ -779,6 +779,16 @@ export default {
|
||||
'roleConfig.fetchConfigFailed': 'Konfiguration konnte nicht abgerufen werden',
|
||||
'roleConfig.fetchModelsFailed': 'Modellliste konnte nicht abgerufen werden',
|
||||
'roleConfig.fetchPluginsFailed': 'Plugin-Liste konnte nicht abgerufen werden',
|
||||
'roleConfig.cannotResumeAudio': 'Audio-Wiedergabe kann nicht fortgesetzt werden',
|
||||
'roleConfig.selectVoiceFirst': 'Bitte wählen Sie zuerst eine Stimme aus',
|
||||
'roleConfig.audioLoadTimeout': 'Audio-Laden dauert zu lange, bitte versuchen Sie es später erneut',
|
||||
'roleConfig.cloneAudioPlayFailed': 'Klon-Audio-Wiedergabe fehlgeschlagen',
|
||||
'roleConfig.cannotPlayCloneAudio': 'Klon-Audio kann nicht abgespielt werden',
|
||||
'roleConfig.getCloneAudioFailed': 'Klon-Audio konnte nicht abgerufen werden',
|
||||
'roleConfig.noPreviewAudio': 'Diese Stimme hat keine Vorschau-Audio-Datei',
|
||||
'roleConfig.audioPlayFailed': 'Audio-Wiedergabe fehlgeschlagen',
|
||||
'roleConfig.cannotPlayAudio': 'Audio kann nicht abgespielt werden',
|
||||
'roleConfig.audioPlayError': 'Fehler bei der Audio-Wiedergabe',
|
||||
|
||||
// Function management dialog text
|
||||
'functionDialog.title': 'Funktionsverwaltung',
|
||||
|
||||
@@ -779,6 +779,16 @@ export default {
|
||||
'roleConfig.fetchConfigFailed': 'Failed to fetch configuration',
|
||||
'roleConfig.fetchModelsFailed': 'Failed to fetch model list',
|
||||
'roleConfig.fetchPluginsFailed': 'Failed to fetch plugin list',
|
||||
'roleConfig.cannotResumeAudio': 'Cannot resume audio playback',
|
||||
'roleConfig.selectVoiceFirst': 'Please select a voice first',
|
||||
'roleConfig.audioLoadTimeout': 'Audio loading takes too long, please try again later',
|
||||
'roleConfig.cloneAudioPlayFailed': 'Clone audio playback failed',
|
||||
'roleConfig.cannotPlayCloneAudio': 'Cannot play clone audio',
|
||||
'roleConfig.getCloneAudioFailed': 'Failed to get clone audio',
|
||||
'roleConfig.noPreviewAudio': 'This voice has no preview audio available',
|
||||
'roleConfig.audioPlayFailed': 'Audio playback failed',
|
||||
'roleConfig.cannotPlayAudio': 'Cannot play audio',
|
||||
'roleConfig.audioPlayError': 'Error occurred during audio playback',
|
||||
|
||||
// Function management dialog text
|
||||
'functionDialog.title': 'Function Management',
|
||||
|
||||
@@ -779,6 +779,16 @@ export default {
|
||||
'roleConfig.fetchConfigFailed': 'Không thể lấy cấu hình',
|
||||
'roleConfig.fetchModelsFailed': 'Không thể tải danh sách mô hình',
|
||||
'roleConfig.fetchPluginsFailed': 'Không thể tải danh sách plugin',
|
||||
'roleConfig.cannotResumeAudio': 'Không thể tiếp tục phát âm thanh',
|
||||
'roleConfig.selectVoiceFirst': 'Vui lòng chọn giọng nói trước',
|
||||
'roleConfig.audioLoadTimeout': 'Tải âm thanh mất quá nhiều thời gian, vui lòng thử lại sau',
|
||||
'roleConfig.cloneAudioPlayFailed': 'Phát âm thanh sao chép thất bại',
|
||||
'roleConfig.cannotPlayCloneAudio': 'Không thể phát âm thanh sao chép',
|
||||
'roleConfig.getCloneAudioFailed': 'Không thể lấy âm thanh sao chép',
|
||||
'roleConfig.noPreviewAudio': 'Giọng nói này không có âm thanh xem trước',
|
||||
'roleConfig.audioPlayFailed': 'Phát âm thanh thất bại',
|
||||
'roleConfig.cannotPlayAudio': 'Không thể phát âm thanh',
|
||||
'roleConfig.audioPlayError': 'Lỗi trong quá trình phát âm thanh',
|
||||
|
||||
// Function management dialog text
|
||||
'functionDialog.title': 'Quản lý chức năng',
|
||||
|
||||
@@ -779,6 +779,16 @@ export default {
|
||||
'roleConfig.fetchConfigFailed': '获取配置失败',
|
||||
'roleConfig.fetchModelsFailed': '获取模型列表失败',
|
||||
'roleConfig.fetchPluginsFailed': '获取插件列表失败',
|
||||
'roleConfig.cannotResumeAudio': '无法恢复播放音频',
|
||||
'roleConfig.selectVoiceFirst': '请先选择一个音色',
|
||||
'roleConfig.audioLoadTimeout': '音频加载时间较长,请稍后重试',
|
||||
'roleConfig.cloneAudioPlayFailed': '克隆音频播放失败',
|
||||
'roleConfig.cannotPlayCloneAudio': '无法播放克隆音频',
|
||||
'roleConfig.getCloneAudioFailed': '获取克隆音频失败',
|
||||
'roleConfig.noPreviewAudio': '该音色暂无可预览的音频',
|
||||
'roleConfig.audioPlayFailed': '音频播放失败',
|
||||
'roleConfig.cannotPlayAudio': '无法播放音频',
|
||||
'roleConfig.audioPlayError': '播放音频过程出错',
|
||||
|
||||
// 功能管理对话框文本
|
||||
'functionDialog.title': '功能管理',
|
||||
|
||||
@@ -779,6 +779,16 @@ export default {
|
||||
'roleConfig.fetchConfigFailed': '獲取配置失敗',
|
||||
'roleConfig.fetchModelsFailed': '獲取模型列表失敗',
|
||||
'roleConfig.fetchPluginsFailed': '獲取插件列表失敗',
|
||||
'roleConfig.cannotResumeAudio': '無法恢復播放音訊',
|
||||
'roleConfig.selectVoiceFirst': '請先選擇一個音色',
|
||||
'roleConfig.audioLoadTimeout': '音訊載入時間較長,請稍後重試',
|
||||
'roleConfig.cloneAudioPlayFailed': '克隆音訊播放失敗',
|
||||
'roleConfig.cannotPlayCloneAudio': '無法播放克隆音訊',
|
||||
'roleConfig.getCloneAudioFailed': '獲取克隆音訊失敗',
|
||||
'roleConfig.noPreviewAudio': '該音色暫無可預覽的音訊',
|
||||
'roleConfig.audioPlayFailed': '音訊播放失敗',
|
||||
'roleConfig.cannotPlayAudio': '無法播放音訊',
|
||||
'roleConfig.audioPlayError': '播放音訊過程出錯',
|
||||
|
||||
// 功能管理對話框文本
|
||||
'functionDialog.title': '功能管理',
|
||||
|
||||
@@ -767,7 +767,7 @@ export default {
|
||||
// 从暂停状态恢复播放
|
||||
this.currentAudio.play().catch((error) => {
|
||||
console.error("恢复播放失败:", error);
|
||||
this.$message.warning("无法恢复播放音频");
|
||||
this.$message.warning(this.$t('roleConfig.cannotResumeAudio'));
|
||||
});
|
||||
this.isPaused = false;
|
||||
} else {
|
||||
@@ -788,7 +788,7 @@ export default {
|
||||
const targetVoiceId = voiceId || this.form.ttsVoiceId;
|
||||
|
||||
if (!targetVoiceId) {
|
||||
this.$message.warning("请先选择一个音色");
|
||||
this.$message.warning(this.$t('roleConfig.selectVoiceFirst'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -874,7 +874,7 @@ export default {
|
||||
// 设置超时,防止加载过长时间
|
||||
const timeoutId = setTimeout(() => {
|
||||
if (this.currentAudio && this.playingVoice) {
|
||||
this.$message.warning("音频加载时间较长,请稍后重试");
|
||||
this.$message.warning(this.$t('roleConfig.audioLoadTimeout'));
|
||||
this.playingVoice = false;
|
||||
}
|
||||
}, 10000); // 10秒超时
|
||||
@@ -883,7 +883,7 @@ export default {
|
||||
this.currentAudio.onerror = () => {
|
||||
clearTimeout(timeoutId);
|
||||
console.error("克隆音频播放错误");
|
||||
this.$message.warning("克隆音频播放失败");
|
||||
this.$message.warning(this.$t('roleConfig.cloneAudioPlayFailed'));
|
||||
this.playingVoice = false;
|
||||
};
|
||||
|
||||
@@ -905,12 +905,12 @@ export default {
|
||||
this.currentAudio.play().catch((error) => {
|
||||
clearTimeout(timeoutId);
|
||||
console.error("播放克隆音频失败:", error);
|
||||
this.$message.warning("无法播放克隆音频");
|
||||
this.$message.warning(this.$t('roleConfig.cannotPlayCloneAudio'));
|
||||
this.playingVoice = false;
|
||||
});
|
||||
} else {
|
||||
clearTimeout(timeoutId);
|
||||
this.$message.warning("获取克隆音频失败");
|
||||
this.$message.warning(this.$t('roleConfig.getCloneAudioFailed'));
|
||||
this.playingVoice = false;
|
||||
}
|
||||
});
|
||||
@@ -950,7 +950,7 @@ export default {
|
||||
|
||||
if (!audioUrl) {
|
||||
// 如果没有音频URL,显示友好的提示
|
||||
this.$message.warning("该音色暂无可预览的音频");
|
||||
this.$message.warning(this.$t('roleConfig.noPreviewAudio'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -969,7 +969,7 @@ export default {
|
||||
// 设置超时,防止加载过长时间
|
||||
const timeoutId = setTimeout(() => {
|
||||
if (this.currentAudio && this.playingVoice) {
|
||||
this.$message.warning("音频加载时间较长,请稍后重试");
|
||||
this.$message.warning(this.$t('roleConfig.audioLoadTimeout'));
|
||||
this.playingVoice = false;
|
||||
}
|
||||
}, 10000); // 10秒超时
|
||||
@@ -978,7 +978,7 @@ export default {
|
||||
this.currentAudio.onerror = () => {
|
||||
clearTimeout(timeoutId);
|
||||
console.error("音频播放错误");
|
||||
this.$message.warning("音频播放失败");
|
||||
this.$message.warning(this.$t('roleConfig.audioPlayFailed'));
|
||||
this.playingVoice = false;
|
||||
};
|
||||
|
||||
@@ -996,13 +996,13 @@ export default {
|
||||
this.currentAudio.play().catch((error) => {
|
||||
clearTimeout(timeoutId);
|
||||
console.error("播放失败:", error);
|
||||
this.$message.warning("无法播放音频");
|
||||
this.$message.warning(this.$t('roleConfig.cannotPlayAudio'));
|
||||
this.playingVoice = false;
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("播放音频过程出错:", error);
|
||||
this.$message.error("播放音频过程出错");
|
||||
this.$message.error(this.$t('roleConfig.audioPlayError'));
|
||||
this.playingVoice = false;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user