Skip to content

Commit

Permalink
fix: change aria text and add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
isekovanic committed Dec 3, 2024
1 parent ebca56e commit aecd18d
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/components/MessageInput/StopAIGenerationButton.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import React from 'react';
import { useTranslationContext } from '../../context';

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

export const StopAIGenerationButton = ({ onClick, ...restProps }: StopAIGenerationButtonProps) => (
<button
aria-label='aria/Stop'
className='str-chat__stop-generating-button'
data-testid='stop-ai-generation-button'
onClick={onClick}
{...restProps}
/>
);
export const StopAIGenerationButton = ({ onClick, ...restProps }: StopAIGenerationButtonProps) => {
const { t } = useTranslationContext();
return (
<button
aria-label={t('aria/Stop AI Generation')}
className='str-chat__stop-generating-button'
data-testid='stop-ai-generation-button'
onClick={onClick}
{...restProps}
/>
);
};
1 change: 1 addition & 0 deletions src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"aria/Remove attachment": "Anhang entfernen",
"aria/Retry upload": "Upload erneut versuchen",
"aria/Send": "Senden",
"aria/Stop AI Generation": "KI-Generierung stoppen",
"ban-command-args": "[@Benutzername] [Text]",
"ban-command-description": "Einen Benutzer verbannen",
"giphy-command-args": "[Text]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"aria/Remove attachment": "Remove attachment",
"aria/Retry upload": "Retry upload",
"aria/Send": "Send",
"aria/Stop AI Generation": "Stop AI Generation",
"live": "live",
"replyCount_one": "1 reply",
"replyCount_other": "{{ count }} replies",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"aria/Remove attachment": "Eliminar adjunto",
"aria/Retry upload": "Reintentar carga",
"aria/Send": "Enviar",
"aria/Stop AI Generation": "Detener generación de IA",
"ban-command-args": "[@usuario] [texto]",
"ban-command-description": "Prohibir a un usuario",
"giphy-command-args": "[texto]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"aria/Remove attachment": "Supprimer la pièce jointe",
"aria/Retry upload": "Réessayer le téléchargement",
"aria/Send": "Envoyer",
"aria/Stop AI Generation": "Arrêter la génération d'IA",
"ban-command-args": "[@nomdutilisateur] [texte]",
"ban-command-description": "Bannir un utilisateur",
"giphy-command-args": "[texte]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"aria/Remove attachment": "संलग्नक हटाएं",
"aria/Retry upload": "अपलोड पुनः प्रयास करें",
"aria/Send": "भेजें",
"aria/Stop AI Generation": "एआई जनरेशन रोकें",
"ban-command-args": "[@उपयोगकर्तनाम] [पाठ]",
"ban-command-description": "एक उपयोगकर्ता को प्रतिषेधित करें",
"giphy-command-args": "[पाठ]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"aria/Remove attachment": "Rimuovi allegato",
"aria/Retry upload": "Riprova caricamento",
"aria/Send": "Invia",
"aria/Stop AI Generation": "Interrompi generazione IA",
"ban-command-args": "[@nomeutente] [testo]",
"ban-command-description": "Vietare un utente",
"giphy-command-args": "[testo]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
"aria/Remove attachment": "添付ファイルを削除",
"aria/Retry upload": "アップロードを再試行",
"aria/Send": "送信",
"aria/Stop AI Generation": "AI生成を停止",
"ban-command-args": "[@ユーザ名] [テキスト]",
"ban-command-description": "ユーザーを禁止する",
"giphy-command-args": "[テキスト]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
"aria/Remove attachment": "첨부 파일 제거",
"aria/Retry upload": "업로드 다시 시도",
"aria/Send": "보내기",
"aria/Stop AI Generation": "AI 생성 중지",
"ban-command-args": "[@사용자이름] [텍스트]",
"ban-command-description": "사용자를 차단",
"giphy-command-args": "[텍스트]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"aria/Remove attachment": "Bijlage verwijderen",
"aria/Retry upload": "Upload opnieuw proberen",
"aria/Send": "Verzenden",
"aria/Stop AI Generation": "AI-generatie stoppen",
"ban-command-args": "[@gebruikersnaam] [tekst]",
"ban-command-description": "Een gebruiker verbannen",
"giphy-command-args": "[tekst]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"aria/Remove attachment": "Remover anexo",
"aria/Retry upload": "Tentar upload novamente",
"aria/Send": "Enviar",
"aria/Stop AI Generation": "Parar geração de IA",
"ban-command-args": "[@nomedeusuário] [texto]",
"ban-command-description": "Banir um usuário",
"giphy-command-args": "[texto]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"aria/Remove attachment": "Удалить вложение",
"aria/Retry upload": "Повторить загрузку",
"aria/Send": "Отправить",
"aria/Stop AI Generation": "Остановить генерацию ИИ",
"ban-command-args": "[@имяпользователя] [текст]",
"ban-command-description": "Заблокировать пользователя",
"giphy-command-args": "[текст]",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"aria/Remove attachment": "Eki kaldır",
"aria/Retry upload": "Yüklemeyi Tekrar Dene",
"aria/Send": "Gönder",
"aria/Stop AI Generation": "Yapay Zeka Üretimini Durdur",
"ban-command-args": "[@kullanıcıadı] [metin]",
"ban-command-description": "Bir kullanıcıyı yasakla",
"giphy-command-args": "[metin]",
Expand Down

0 comments on commit aecd18d

Please sign in to comment.