From ca69e1a2f53b7156100ea20ec7341428567c7b80 Mon Sep 17 00:00:00 2001 From: chenxu9741 Date: Wed, 17 Jul 2024 14:41:29 +0800 Subject: [PATCH] Add multilingual support for TTS (Text-to-Speech) functionality. (#6369) --- web/app/components/base/audio-btn/audio.ts | 15 --------------- web/i18n/es-ES/app-debug.ts | 3 +++ web/i18n/fr-FR/app-debug.ts | 3 +++ web/i18n/hi-IN/app-debug.ts | 3 +++ web/i18n/ko-KR/app-debug.ts | 3 +++ web/i18n/pl-PL/app-debug.ts | 3 +++ web/i18n/pt-BR/app-debug.ts | 3 +++ web/i18n/ro-RO/app-debug.ts | 3 +++ web/i18n/uk-UA/app-debug.ts | 3 +++ web/i18n/vi-VN/app-debug.ts | 3 +++ 10 files changed, 27 insertions(+), 15 deletions(-) diff --git a/web/app/components/base/audio-btn/audio.ts b/web/app/components/base/audio-btn/audio.ts index 239dfe0342..638626bf8a 100644 --- a/web/app/components/base/audio-btn/audio.ts +++ b/web/app/components/base/audio-btn/audio.ts @@ -60,21 +60,6 @@ export default class AudioPlayer { return this.sourceBuffer = this.mediaSource?.addSourceBuffer(contentType) - // this.sourceBuffer?.addEventListener('update', () => { - // if (this.cacheBuffers.length && !this.sourceBuffer?.updating) { - // const cacheBuffer = this.cacheBuffers.shift()! - // this.sourceBuffer?.appendBuffer(cacheBuffer) - // } - // // this.pauseAudio() - // }) - // - // this.sourceBuffer?.addEventListener('updateend', () => { - // if (this.cacheBuffers.length && !this.sourceBuffer?.updating) { - // const cacheBuffer = this.cacheBuffers.shift()! - // this.sourceBuffer?.appendBuffer(cacheBuffer) - // } - // // this.pauseAudio() - // }) }) } diff --git a/web/i18n/es-ES/app-debug.ts b/web/i18n/es-ES/app-debug.ts index ecc4805059..9e309a7d62 100644 --- a/web/i18n/es-ES/app-debug.ts +++ b/web/i18n/es-ES/app-debug.ts @@ -317,6 +317,9 @@ const translation = { language: 'Idioma', resolutionTooltip: 'Soporte de idioma para voz a texto.', voice: 'Voz', + autoPlay: 'Auto-reproducción', + autoPlayEnabled: 'Abierto', + autoPlayDisabled: 'Cierre', }, }, openingStatement: { diff --git a/web/i18n/fr-FR/app-debug.ts b/web/i18n/fr-FR/app-debug.ts index 5e5e8f9bad..14a4b9cb14 100644 --- a/web/i18n/fr-FR/app-debug.ts +++ b/web/i18n/fr-FR/app-debug.ts @@ -322,6 +322,9 @@ const translation = { language: 'Langue', resolutionTooltip: 'Support de la langue pour la voix de synthèse de texte.', voice: 'Voix', + autoPlay: 'Lecture Automatique', + autoPlayEnabled: 'Allumer', + autoPlayDisabled: 'Fermeture', }, }, openingStatement: { diff --git a/web/i18n/hi-IN/app-debug.ts b/web/i18n/hi-IN/app-debug.ts index 3950cf02ad..872a1b9fe8 100644 --- a/web/i18n/hi-IN/app-debug.ts +++ b/web/i18n/hi-IN/app-debug.ts @@ -349,6 +349,9 @@ const translation = { language: 'भाषा', resolutionTooltip: 'टेक्स्ट-टू-स्पीच वॉयस सपोर्ट भाषा।', voice: 'वॉयस', + autoPlay: 'ऑटो प्ले', + autoPlayEnabled: 'चालू करणे', + autoPlayDisabled: 'सोडा', }, }, openingStatement: { diff --git a/web/i18n/ko-KR/app-debug.ts b/web/i18n/ko-KR/app-debug.ts index 65d77a75fd..77eac2503d 100644 --- a/web/i18n/ko-KR/app-debug.ts +++ b/web/i18n/ko-KR/app-debug.ts @@ -316,6 +316,9 @@ const translation = { language: '언어', resolutionTooltip: '텍스트 읽기 음성 언어를 지원합니다.', voice: '음성', + autoPlay: '자동 재생', + autoPlayEnabled: '켜다', + autoPlayDisabled: '폐쇄', }, }, openingStatement: { diff --git a/web/i18n/pl-PL/app-debug.ts b/web/i18n/pl-PL/app-debug.ts index 9d51b9ee46..960209c045 100644 --- a/web/i18n/pl-PL/app-debug.ts +++ b/web/i18n/pl-PL/app-debug.ts @@ -347,6 +347,9 @@ const translation = { language: 'Język', resolutionTooltip: 'Wsparcie językowe głosu tekstu na mowę.', voice: 'Głos', + autoPlay: 'Automatyczne odtwarzanie', + autoPlayEnabled: 'włączyć coś', + autoPlayDisabled: 'zamknięcie', }, }, openingStatement: { diff --git a/web/i18n/pt-BR/app-debug.ts b/web/i18n/pt-BR/app-debug.ts index 1fae07a223..91730d44b3 100644 --- a/web/i18n/pt-BR/app-debug.ts +++ b/web/i18n/pt-BR/app-debug.ts @@ -322,6 +322,9 @@ const translation = { language: 'línguas', resolutionTooltip: 'Texto para voz timbre suporta idiomas.', voice: 'voz', + autoPlay: 'Reprodução automática', + autoPlayEnabled: 'ligar', + autoPlayDisabled: 'fecho', }, }, openingStatement: { diff --git a/web/i18n/ro-RO/app-debug.ts b/web/i18n/ro-RO/app-debug.ts index adb747b514..b4e9442de8 100644 --- a/web/i18n/ro-RO/app-debug.ts +++ b/web/i18n/ro-RO/app-debug.ts @@ -322,6 +322,9 @@ const translation = { language: 'Limbă', resolutionTooltip: 'Suport pentru limba de voce text-to-speech.', voice: 'Voce', + autoPlay: 'Redare automata', + autoPlayEnabled: 'Deschis', + autoPlayDisabled: 'închidere', }, }, openingStatement: { diff --git a/web/i18n/uk-UA/app-debug.ts b/web/i18n/uk-UA/app-debug.ts index 78798e7d53..c64444c871 100644 --- a/web/i18n/uk-UA/app-debug.ts +++ b/web/i18n/uk-UA/app-debug.ts @@ -316,6 +316,9 @@ const translation = { language: 'Мова', // Language resolutionTooltip: 'Мовна підтримка для синтезу мовлення.', // Text-to-speech voice support language。 voice: 'Голос', // Voice + autoPlay: 'Автоматичне відтворення', + autoPlayEnabled: 'ВІДЧИНЕНО', + autoPlayDisabled: 'закриття', }, }, openingStatement: { diff --git a/web/i18n/vi-VN/app-debug.ts b/web/i18n/vi-VN/app-debug.ts index 19fbbae1fd..ac8fe4b9f7 100644 --- a/web/i18n/vi-VN/app-debug.ts +++ b/web/i18n/vi-VN/app-debug.ts @@ -322,6 +322,9 @@ const translation = { language: 'Ngôn ngữ', resolutionTooltip: 'Giọng nói văn bản hỗ trợ ngôn ngữ。', voice: 'Giọng', + autoPlay: 'chạy tự động', + autoPlayEnabled: 'bật', + autoPlayDisabled: 'Khép kín', }, }, openingStatement: {