Skip to content

Commit

Permalink
update languages code
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasferreiralimax committed Oct 21, 2024
1 parent 2ac8224 commit 555aed0
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ In the `VoiceCaptureExampleComponent`, a `WritableSignal<boolean>` named `isVoic

Controls the initiation of voice capture.

### @Input() lang: string = 'en-US'
### @Input() lang: string = 'en'

Language of voice capture, this default is en-US.
Language of voice capture, this default is en.

### @Input() mode: string = 'fullscreen'

Expand Down
4 changes: 2 additions & 2 deletions projects/voicecapture-angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ In the `VoiceCaptureExampleComponent`, a `WritableSignal<boolean>` named `isVoic

Controls the initiation of voice capture.

### @Input() lang: string = 'en-US'
### @Input() lang: string = 'en'

Language of voice capture, this default is en-US.
Language of voice capture, this default is en.

### @Input() mode: string = 'fullscreen'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { translates } from './voicecapture-angular.translate';
})
export class VoiceCapture implements OnInit {
@Input() start: WritableSignal<boolean> = signal(false);
@Input() lang: string = 'en-US';
@Input() lang: string = 'en';
@Input() mode: string = 'fullscreen';
@Output() voiceTranscript = new EventEmitter<string>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
export const translates = {
'en-US': {
en: {
speakNow: 'Speak now',
noSpeech: 'No speech detected.',
audioCapture: 'Audio capture problem.',
enableMicrophone: 'Enable the microphone',
},
'pt-BR': {
pt: {
speakNow: 'Fale agora',
noSpeech: 'Nenhuma fala detectada.',
audioCapture: 'Problema na captura de áudio.',
enableMicrophone: 'Ative o microfone',
},
'es-ES': {
es: {
speakNow: 'Habla ahora',
noSpeech: 'No se detectó voz.',
audioCapture: 'Problema en la captura de audio.',
enableMicrophone: 'Activa el micrófono',
},
'fr-FR': {
fr: {
speakNow: 'Parlez maintenant',
noSpeech: 'Aucune parole détectée.',
audioCapture: 'Problème de capture audio.',
enableMicrophone: 'Activez le microphone',
},
'de-DE': {
de: {
speakNow: 'Sprich jetzt',
noSpeech: 'Keine Sprache erkannt.',
audioCapture: 'Audioproblem.',
enableMicrophone: 'Aktivieren Sie das Mikrofon',
},
'it-IT': {
it: {
speakNow: 'Parla ora',
noSpeech: 'Nessuna parola rilevata.',
audioCapture: 'Problema con la cattura audio.',
enableMicrophone: 'Abilita il microfono',
},
'ja-JP': {
ja: {
speakNow: '今話してください',
noSpeech: '音声が検出されませんでした。',
audioCapture: 'オーディオキャプチャの問題。',
enableMicrophone: 'マイクを有効にしてください',
},
'zh-CN': {
zh: {
speakNow: '现在说话',
noSpeech: '没有检测到语音。',
audioCapture: '音频捕获问题。',
enableMicrophone: '启用麦克风',
},
'ru-RU': {
ru: {
speakNow: 'Говорите сейчас',
noSpeech: 'Речь не обнаружена.',
audioCapture: 'Проблема с захватом звука.',
enableMicrophone: 'Включите микрофон',
},
'ar-SA': {
ar: {
speakNow: 'تحدث الآن',
noSpeech: 'لم يتم اكتشاف الكلام.',
audioCapture: 'مشكلة في التقاط الصوت.',
enableMicrophone: 'قم بتمكين الميكروفون',
},
'ko-KR': {
ko: {
speakNow: '지금 말하세요',
noSpeech: '음성이 감지되지 않았습니다.',
audioCapture: '오디오 캡처 문제.',
enableMicrophone: '마이크를 활성화하세요',
},
'nl-NL': {
nl: {
speakNow: 'Spreek nu',
noSpeech: 'Geen spraak gedetecteerd.',
audioCapture: 'Probleem met audiovangst.',
enableMicrophone: 'Activeer de microfoon',
},
'sv-SE': {
sv: {
speakNow: 'Tala nu',
noSpeech: 'Ingen tal upptäckt.',
audioCapture: 'Problem med ljudinspelning.',
Expand Down
26 changes: 13 additions & 13 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ <h2>VoiceCapture Example</h2>
>Choose the language:</label
>
<select id="langSelect" [(ngModel)]="langSelect" class="lang-select">
<option value="en-US">English (US)</option>
<option value="pt-BR">Portuguese (Brazil)</option>
<option value="es-ES">Spanish (Spain)</option>
<option value="fr-FR">French (France)</option>
<option value="de-DE">German (Germany)</option>
<option value="it-IT">Italian (Italy)</option>
<option value="ja-JP">Japanese (Japan)</option>
<option value="zh-CN">Chinese (Simplified)</option>
<option value="ru-RU">Russian (Russia)</option>
<option value="ar-SA">Arabic (Saudi Arabia)</option>
<option value="ko-KR">Korean (South Korea)</option>
<option value="nl-NL">Dutch (Netherlands)</option>
<option value="sv-SE">Swedish (Sweden)</option>
<option value="en">English</option>
<option value="pt">Portuguese</option>
<option value="es">Spanish</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="it">Italian</option>
<option value="ja">Japanese</option>
<option value="zh">Chinese</option>
<option value="ru">Russian</option>
<option value="ar">Arabic</option>
<option value="ko">Korean</option>
<option value="nl">Dutch</option>
<option value="sv">Swedish</option>
</select>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class AppComponent {
isModalActive: boolean = false;
isVoiceCaptureExample: WritableSignal<boolean> = signal(false);
voiceTextTranscript!: string;
langSelect = 'en-US';
langSelect = 'en';
modeSelect = 'fullscreen';

openModal(): void {
Expand Down

0 comments on commit 555aed0

Please sign in to comment.