Skip to content

Commit aecd18d

Browse files
committed
fix: change aria text and add translations
1 parent ebca56e commit aecd18d

File tree

13 files changed

+25
-9
lines changed

13 files changed

+25
-9
lines changed
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import React from 'react';
2+
import { useTranslationContext } from '../../context';
23

34
export type StopAIGenerationButtonProps = React.ComponentProps<'button'>;
45

5-
export const StopAIGenerationButton = ({ onClick, ...restProps }: StopAIGenerationButtonProps) => (
6-
<button
7-
aria-label='aria/Stop'
8-
className='str-chat__stop-generating-button'
9-
data-testid='stop-ai-generation-button'
10-
onClick={onClick}
11-
{...restProps}
12-
/>
13-
);
6+
export const StopAIGenerationButton = ({ onClick, ...restProps }: StopAIGenerationButtonProps) => {
7+
const { t } = useTranslationContext();
8+
return (
9+
<button
10+
aria-label={t('aria/Stop AI Generation')}
11+
className='str-chat__stop-generating-button'
12+
data-testid='stop-ai-generation-button'
13+
onClick={onClick}
14+
{...restProps}
15+
/>
16+
);
17+
};

src/i18n/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
"aria/Remove attachment": "Anhang entfernen",
156156
"aria/Retry upload": "Upload erneut versuchen",
157157
"aria/Send": "Senden",
158+
"aria/Stop AI Generation": "KI-Generierung stoppen",
158159
"ban-command-args": "[@Benutzername] [Text]",
159160
"ban-command-description": "Einen Benutzer verbannen",
160161
"giphy-command-args": "[Text]",

src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
"aria/Remove attachment": "Remove attachment",
156156
"aria/Retry upload": "Retry upload",
157157
"aria/Send": "Send",
158+
"aria/Stop AI Generation": "Stop AI Generation",
158159
"live": "live",
159160
"replyCount_one": "1 reply",
160161
"replyCount_other": "{{ count }} replies",

src/i18n/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
"aria/Remove attachment": "Eliminar adjunto",
159159
"aria/Retry upload": "Reintentar carga",
160160
"aria/Send": "Enviar",
161+
"aria/Stop AI Generation": "Detener generación de IA",
161162
"ban-command-args": "[@usuario] [texto]",
162163
"ban-command-description": "Prohibir a un usuario",
163164
"giphy-command-args": "[texto]",

src/i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
"aria/Remove attachment": "Supprimer la pièce jointe",
159159
"aria/Retry upload": "Réessayer le téléchargement",
160160
"aria/Send": "Envoyer",
161+
"aria/Stop AI Generation": "Arrêter la génération d'IA",
161162
"ban-command-args": "[@nomdutilisateur] [texte]",
162163
"ban-command-description": "Bannir un utilisateur",
163164
"giphy-command-args": "[texte]",

src/i18n/hi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
"aria/Remove attachment": "संलग्नक हटाएं",
157157
"aria/Retry upload": "अपलोड पुनः प्रयास करें",
158158
"aria/Send": "भेजें",
159+
"aria/Stop AI Generation": "एआई जनरेशन रोकें",
159160
"ban-command-args": "[@उपयोगकर्तनाम] [पाठ]",
160161
"ban-command-description": "एक उपयोगकर्ता को प्रतिषेधित करें",
161162
"giphy-command-args": "[पाठ]",

src/i18n/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
"aria/Remove attachment": "Rimuovi allegato",
159159
"aria/Retry upload": "Riprova caricamento",
160160
"aria/Send": "Invia",
161+
"aria/Stop AI Generation": "Interrompi generazione IA",
161162
"ban-command-args": "[@nomeutente] [testo]",
162163
"ban-command-description": "Vietare un utente",
163164
"giphy-command-args": "[testo]",

src/i18n/ja.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
"aria/Remove attachment": "添付ファイルを削除",
153153
"aria/Retry upload": "アップロードを再試行",
154154
"aria/Send": "送信",
155+
"aria/Stop AI Generation": "AI生成を停止",
155156
"ban-command-args": "[@ユーザ名] [テキスト]",
156157
"ban-command-description": "ユーザーを禁止する",
157158
"giphy-command-args": "[テキスト]",

src/i18n/ko.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
"aria/Remove attachment": "첨부 파일 제거",
153153
"aria/Retry upload": "업로드 다시 시도",
154154
"aria/Send": "보내기",
155+
"aria/Stop AI Generation": "AI 생성 중지",
155156
"ban-command-args": "[@사용자이름] [텍스트]",
156157
"ban-command-description": "사용자를 차단",
157158
"giphy-command-args": "[텍스트]",

src/i18n/nl.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
"aria/Remove attachment": "Bijlage verwijderen",
156156
"aria/Retry upload": "Upload opnieuw proberen",
157157
"aria/Send": "Verzenden",
158+
"aria/Stop AI Generation": "AI-generatie stoppen",
158159
"ban-command-args": "[@gebruikersnaam] [tekst]",
159160
"ban-command-description": "Een gebruiker verbannen",
160161
"giphy-command-args": "[tekst]",

0 commit comments

Comments
 (0)