diff --git a/frontend/src/components/SkeletonLoader.tsx b/frontend/src/components/SkeletonLoader.tsx index 26a1fe2b..eea39673 100644 --- a/frontend/src/components/SkeletonLoader.tsx +++ b/frontend/src/components/SkeletonLoader.tsx @@ -1,4 +1,5 @@ import { useState, useEffect } from 'react'; +import { useTranslation } from 'react-i18next'; interface SkeletonLoaderProps { count?: number; @@ -22,6 +23,7 @@ const SkeletonLoader: React.FC = ({ count = 1, component = 'default', }) => { + const { t } = useTranslation(); const [skeletonCount, setSkeletonCount] = useState(count); useEffect(() => { @@ -353,7 +355,17 @@ const SkeletonLoader: React.FC = ({ const render = componentMap[component] || componentMap.default; - return <>{render()}; + // The Spinner this replaces carried role="status"; without it a screen + // reader gets no signal at all while a section loads. Absolutely + // positioned by `sr-only`, so it never becomes a flex/grid item. + return ( + <> + + {t('loading')} + + {render()} + + ); }; export default SkeletonLoader; diff --git a/frontend/src/locale/de.json b/frontend/src/locale/de.json index b91db717..061b5480 100644 --- a/frontend/src/locale/de.json +++ b/frontend/src/locale/de.json @@ -7,6 +7,7 @@ "tagline": "DocsGPT verwendet GenAI, bitte überprüfe kritische Informationen anhand der Quellen.", "sourceDocs": "Quelle", "none": "Keine", + "loading": "Wird geladen...", "cancel": "Abbrechen", "help": "Hilfe", "emailUs": "E-Mail senden", @@ -197,7 +198,8 @@ "queryPlaceholder": "Frage etwas, das diese Quelle beantworten sollte...", "run": "Ausführen", "notSavedHint": "Diese Einstellungen gelten nur für diesen Test – sie werden nicht in der Quelle gespeichert. Ändere sie in den Quelleneinstellungen, um sie dauerhaft zu übernehmen.", - "resultSummary": "{{count}} Chunks abgerufen · {{retriever}}", + "resultSummary_one": "{{count}} Chunk abgerufen · {{retriever}}", + "resultSummary_other": "{{count}} Chunks abgerufen · {{retriever}}", "latency": "{{ms}} ms", "empty": "Keine Chunks für diese Anfrage abgerufen.", "emptyWithThreshold": "Keine Chunks haben den Score-Schwellenwert ({{threshold}}) erreicht. Senke ihn, um knappe Treffer zu sehen.", @@ -1137,7 +1139,8 @@ "parseError": "Spezifikation konnte nicht geparst werden. Bitte Dateiformat prüfen.", "version": "Version", "baseUrl": "Basis-URL", - "actionsFound": "{{count}} Aktionen gefunden", + "actionsFound_one": "{{count}} Aktion gefunden", + "actionsFound_other": "{{count}} Aktionen gefunden", "selectAll": "Alle auswählen", "deselectAll": "Alle abwählen", "cancel": "Abbrechen", @@ -1211,7 +1214,8 @@ "title": "Quellen", "text": "Wähle deine Quellen", "link": "Quellen-Link", - "view_more": "{{count}} weitere Quellen", + "view_more_one": "{{count}} weitere Quelle", + "view_more_other": "{{count}} weitere Quellen", "noSourcesAvailable": "Keine Quellen verfügbar", "selectedCount": "{{count}} Quellen ausgewählt", "groupOwn": "Deine Quellen", @@ -1466,7 +1470,8 @@ "confidence": "Confidence threshold", "confidenceHint": "The judge must both flag the content and be at least this confident (default: 0.7)", "activeCount": "{{count}} active", - "needsSetup": "{{count}} need setup", + "needsSetup_one": "{{count}} benötigt Einrichtung", + "needsSetup_other": "{{count}} benötigen Einrichtung", "setupRequired": "Fill in this check's settings before saving.", "pickAtLeastOne": "Pick at least one — the check cannot run with none selected.", "remove": "Remove", diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index 52d28862..aa8aa48c 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -7,6 +7,7 @@ "tagline": "DocsGPT uses GenAI, please review critical information using sources.", "sourceDocs": "Source", "none": "None", + "loading": "Loading...", "cancel": "Cancel", "errorBoundary": { "message": "Something went wrong displaying this content.", diff --git a/frontend/src/locale/es.json b/frontend/src/locale/es.json index f22788cb..1c27a945 100644 --- a/frontend/src/locale/es.json +++ b/frontend/src/locale/es.json @@ -7,6 +7,7 @@ "tagline": "DocsGPT utiliza GenAI, por favor revisa información crítica utilizando fuentes.", "sourceDocs": "Fuente", "none": "Ninguno", + "loading": "Cargando...", "cancel": "Cancelar", "help": "Asistencia", "emailUs": "Envíanos un correo", @@ -197,7 +198,8 @@ "queryPlaceholder": "Pregunta algo que esta fuente debería responder...", "run": "Ejecutar", "notSavedHint": "Estos ajustes solo se usan para esta prueba — no se guardan en la fuente. Cámbialos en Configuración de la fuente para hacerlos permanentes.", - "resultSummary": "{{count}} fragmentos recuperados · {{retriever}}", + "resultSummary_one": "{{count}} fragmento recuperado · {{retriever}}", + "resultSummary_other": "{{count}} fragmentos recuperados · {{retriever}}", "latency": "{{ms}} ms", "empty": "No se recuperaron fragmentos para esta consulta.", "emptyWithThreshold": "Ningún fragmento alcanzó el umbral de puntuación ({{threshold}}). Bájalo para ver los que estuvieron cerca.", @@ -1137,7 +1139,8 @@ "parseError": "No se pudo analizar la especificación. Verifica el formato del archivo.", "version": "Versión", "baseUrl": "URL base", - "actionsFound": "{{count}} acciones encontradas", + "actionsFound_one": "{{count}} acción encontrada", + "actionsFound_other": "{{count}} acciones encontradas", "selectAll": "Seleccionar todo", "deselectAll": "Deseleccionar todo", "cancel": "Cancelar", @@ -1211,7 +1214,8 @@ "title": "Fuentes", "text": "Elegir tus fuentes", "link": "Enlace fuente", - "view_more": "Ver {{count}} más fuentes", + "view_more_one": "Ver {{count}} fuente más", + "view_more_other": "Ver {{count}} fuentes más", "noSourcesAvailable": "No hay fuentes disponibles", "selectedCount": "{{count}} fuentes seleccionadas", "groupOwn": "Tus fuentes", @@ -1466,7 +1470,8 @@ "confidence": "Confidence threshold", "confidenceHint": "The judge must both flag the content and be at least this confident (default: 0.7)", "activeCount": "{{count}} active", - "needsSetup": "{{count}} need setup", + "needsSetup_one": "{{count}} necesita configuración", + "needsSetup_other": "{{count}} necesitan configuración", "setupRequired": "Fill in this check's settings before saving.", "pickAtLeastOne": "Pick at least one — the check cannot run with none selected.", "remove": "Remove", diff --git a/frontend/src/locale/jp.json b/frontend/src/locale/jp.json index de8737f7..537a6373 100644 --- a/frontend/src/locale/jp.json +++ b/frontend/src/locale/jp.json @@ -7,6 +7,7 @@ "tagline": "DocsGPTはGenAIを使用しています。重要な情報はソースで確認してください。", "sourceDocs": "ソース", "none": "なし", + "loading": "読み込み中...", "cancel": "キャンセル", "help": "ヘルプ", "emailUs": "メールを送る", diff --git a/frontend/src/locale/ru.json b/frontend/src/locale/ru.json index 92ba9748..243954cb 100644 --- a/frontend/src/locale/ru.json +++ b/frontend/src/locale/ru.json @@ -7,6 +7,7 @@ "tagline": "DocsGPT использует GenAI, пожалуйста, проверьте важную информацию, используя источники.", "sourceDocs": "Источник", "none": "Нет", + "loading": "Загрузка...", "cancel": "Отмена", "help": "Помощь", "emailUs": "Напишите нам", @@ -207,7 +208,10 @@ "queryPlaceholder": "Спросите что-нибудь, на что этот источник должен ответить...", "run": "Запустить", "notSavedHint": "Эти настройки используются только для этого теста — они не сохраняются в источнике. Чтобы сделать их постоянными, измените их в настройках источника.", - "resultSummary": "Извлечено фрагментов: {{count}} · {{retriever}}", + "resultSummary_one": "Извлечён {{count}} фрагмент · {{retriever}}", + "resultSummary_few": "Извлечено {{count}} фрагмента · {{retriever}}", + "resultSummary_many": "Извлечено фрагментов: {{count}} · {{retriever}}", + "resultSummary_other": "Извлечено фрагментов: {{count}} · {{retriever}}", "latency": "{{ms}} мс", "empty": "По этому запросу фрагменты не извлечены.", "emptyWithThreshold": "Ни один фрагмент не набрал оценку не ниже порога ({{threshold}}). Понизьте порог, чтобы увидеть близкие результаты.", @@ -1167,7 +1171,10 @@ "parseError": "Не удалось разобрать спецификацию. Проверьте формат файла.", "version": "Версия", "baseUrl": "Базовый URL", - "actionsFound": "{{count}} действий найдено", + "actionsFound_one": "найдено {{count}} действие", + "actionsFound_few": "найдено {{count}} действия", + "actionsFound_many": "найдено {{count}} действий", + "actionsFound_other": "найдено {{count}} действий", "selectAll": "Выбрать все", "deselectAll": "Снять выделение со всех", "cancel": "Отмена", @@ -1241,7 +1248,10 @@ "title": "Источники", "text": "Выберите ваши источники", "link": "Ссылка на источник", - "view_more": "ещё {{count}} источников", + "view_more_one": "ещё {{count}} источник", + "view_more_few": "ещё {{count}} источника", + "view_more_many": "ещё {{count}} источников", + "view_more_other": "ещё {{count}} источников", "noSourcesAvailable": "Нет доступных источников", "selectedCount": "Выбрано источников: {{count}}", "groupOwn": "Ваши источники", @@ -1496,7 +1506,10 @@ "confidence": "Confidence threshold", "confidenceHint": "The judge must both flag the content and be at least this confident (default: 0.7)", "activeCount": "{{count}} active", - "needsSetup": "{{count}} need setup", + "needsSetup_one": "{{count}} требует настройки", + "needsSetup_few": "{{count}} требуют настройки", + "needsSetup_many": "{{count}} требуют настройки", + "needsSetup_other": "{{count}} требуют настройки", "setupRequired": "Fill in this check's settings before saving.", "pickAtLeastOne": "Pick at least one — the check cannot run with none selected.", "remove": "Remove", diff --git a/frontend/src/locale/zh-TW.json b/frontend/src/locale/zh-TW.json index ceb8e3b3..3e10c564 100644 --- a/frontend/src/locale/zh-TW.json +++ b/frontend/src/locale/zh-TW.json @@ -7,6 +7,7 @@ "tagline": "DocsGPT 使用生成式 AI,請使用原始資料來源審閱重要資訊。", "sourceDocs": "原始文件", "none": "無", + "loading": "載入中...", "cancel": "取消", "help": "幫助", "emailUs": "給我們發電郵", diff --git a/frontend/src/locale/zh.json b/frontend/src/locale/zh.json index 6df47b21..201b6c4c 100644 --- a/frontend/src/locale/zh.json +++ b/frontend/src/locale/zh.json @@ -7,6 +7,7 @@ "tagline": "DocsGPT 使用 GenAI, 请使用来源审核关键信息.", "sourceDocs": "源", "none": "无", + "loading": "加载中...", "cancel": "取消", "help": "帮助", "emailUs": "给我们发邮件", diff --git a/frontend/src/modals/MCPServerModal.tsx b/frontend/src/modals/MCPServerModal.tsx index 442cd568..48628e5a 100644 --- a/frontend/src/modals/MCPServerModal.tsx +++ b/frontend/src/modals/MCPServerModal.tsx @@ -455,7 +455,7 @@ export default function MCPServerModal({