From 3474c179e691a43fc6357e070092902faa986501 Mon Sep 17 00:00:00 2001 From: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Date: Wed, 15 Oct 2025 16:46:46 +0800 Subject: [PATCH] fix: enhance dataset menu and add service API translations (#26931) --- .../components/app-sidebar/dataset-info/menu.tsx | 14 +++++++++----- web/i18n/de-DE/dataset.ts | 11 +++++++++++ web/i18n/en-US/dataset.ts | 4 ++-- web/i18n/es-ES/dataset.ts | 11 +++++++++++ web/i18n/fa-IR/dataset.ts | 11 +++++++++++ web/i18n/fr-FR/dataset.ts | 11 +++++++++++ web/i18n/hi-IN/dataset.ts | 11 +++++++++++ web/i18n/id-ID/dataset.ts | 11 +++++++++++ web/i18n/it-IT/dataset.ts | 11 +++++++++++ web/i18n/ja-JP/dataset.ts | 4 ++-- web/i18n/ko-KR/dataset.ts | 11 +++++++++++ web/i18n/pl-PL/dataset.ts | 11 +++++++++++ web/i18n/pt-BR/dataset.ts | 11 +++++++++++ web/i18n/ro-RO/dataset.ts | 11 +++++++++++ web/i18n/ru-RU/dataset.ts | 11 +++++++++++ web/i18n/sl-SI/dataset.ts | 11 +++++++++++ web/i18n/th-TH/dataset.ts | 11 +++++++++++ web/i18n/tr-TR/dataset.ts | 11 +++++++++++ web/i18n/uk-UA/dataset.ts | 11 +++++++++++ web/i18n/vi-VN/dataset.ts | 11 +++++++++++ web/i18n/zh-Hans/dataset.ts | 4 ++-- web/i18n/zh-Hant/dataset.ts | 11 +++++++++++ 22 files changed, 213 insertions(+), 11 deletions(-) diff --git a/web/app/components/app-sidebar/dataset-info/menu.tsx b/web/app/components/app-sidebar/dataset-info/menu.tsx index fd560ce643..6f91c9c513 100644 --- a/web/app/components/app-sidebar/dataset-info/menu.tsx +++ b/web/app/components/app-sidebar/dataset-info/menu.tsx @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next' import MenuItem from './menu-item' import { RiDeleteBinLine, RiEditLine, RiFileDownloadLine } from '@remixicon/react' import Divider from '../../base/divider' +import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail' type MenuProps = { showDelete: boolean @@ -18,6 +19,7 @@ const Menu = ({ detectIsUsedByApp, }: MenuProps) => { const { t } = useTranslation() + const runtimeMode = useDatasetDetailContextWithSelector(state => state.dataset?.runtime_mode) return (
@@ -27,11 +29,13 @@ const Menu = ({ name={t('common.operation.edit')} handleClick={openRenameModal} /> - + {runtimeMode === 'rag_pipeline' && ( + + )}
{showDelete && ( <> diff --git a/web/i18n/de-DE/dataset.ts b/web/i18n/de-DE/dataset.ts index fbb52878f8..0b9d08a984 100644 --- a/web/i18n/de-DE/dataset.ts +++ b/web/i18n/de-DE/dataset.ts @@ -226,6 +226,17 @@ const translation = { updated: 'Aktualisierte', externalKnowledgeBase: 'Externe Wissensdatenbank', createFromPipeline: 'Aus Wissenspipeline erstellen', + serviceApi: { + card: { + title: 'Backend-Dienst-API', + apiReference: 'API Referenz', + apiKey: 'API-Schlüssel', + endpoint: 'Service-API-Endpunkt', + }, + title: 'Service-API', + enabled: 'Im Dienst', + disabled: 'Behindert', + }, } export default translation diff --git a/web/i18n/en-US/dataset.ts b/web/i18n/en-US/dataset.ts index f0ad06121c..b89a1fbd34 100644 --- a/web/i18n/en-US/dataset.ts +++ b/web/i18n/en-US/dataset.ts @@ -90,8 +90,8 @@ const translation = { intro2: 'as a context', intro3: ',', intro4: 'or it ', - intro5: 'can be created', - intro6: ' as a standalone ChatGPT index plug-in to publish', + intro5: 'can be published', + intro6: ' as an independent service.', unavailable: 'Unavailable', unavailableTip: 'Embedding model is not available, the default embedding model needs to be configured', datasets: 'KNOWLEDGE', diff --git a/web/i18n/es-ES/dataset.ts b/web/i18n/es-ES/dataset.ts index 785e2c962b..4fbdae1239 100644 --- a/web/i18n/es-ES/dataset.ts +++ b/web/i18n/es-ES/dataset.ts @@ -226,6 +226,17 @@ const translation = { externalKnowledgeBase: 'Base de conocimientos externa', createFromPipeline: 'Crear desde Knowledge Pipeline', updated: 'Actualizado', + serviceApi: { + card: { + apiReference: 'Referencia de la API', + apiKey: 'Clave API', + endpoint: 'Punto de enlace de la API de servicio', + title: 'API del servicio de backend', + }, + enabled: 'En servicio', + title: 'API de servicios', + disabled: 'Discapacitado', + }, } export default translation diff --git a/web/i18n/fa-IR/dataset.ts b/web/i18n/fa-IR/dataset.ts index b4a6f1f97d..f0c1a69044 100644 --- a/web/i18n/fa-IR/dataset.ts +++ b/web/i18n/fa-IR/dataset.ts @@ -226,6 +226,17 @@ const translation = { updated: 'بروز رسانی', createFromPipeline: 'ایجاد از پایپ لاین دانش', externalKnowledgeBase: 'پایگاه دانش خارجی', + serviceApi: { + card: { + apiKey: 'کلید API', + title: 'رابط برنامه‌نویسی سرویس پشتیبان', + apiReference: 'مرجع API', + endpoint: 'نقطه انتهایی رابط برنامه‌نویسی سرویس', + }, + disabled: 'معلول', + enabled: 'در حال خدمت', + title: 'رابط برنامه‌نویسی سرویس', + }, } export default translation diff --git a/web/i18n/fr-FR/dataset.ts b/web/i18n/fr-FR/dataset.ts index d267356ce7..2a18ae9f6b 100644 --- a/web/i18n/fr-FR/dataset.ts +++ b/web/i18n/fr-FR/dataset.ts @@ -226,6 +226,17 @@ const translation = { updated: 'Actualisé', createFromPipeline: 'Créer à partir du pipeline de connaissances', externalKnowledgeBase: 'Base de connaissances externe', + serviceApi: { + card: { + apiKey: 'Clé API', + apiReference: 'Référence API', + title: 'API du service backend', + endpoint: 'Point de terminaison de l\'API', + }, + enabled: 'En service', + title: 'API de service', + disabled: 'désactivé', + }, } export default translation diff --git a/web/i18n/hi-IN/dataset.ts b/web/i18n/hi-IN/dataset.ts index 360b57d21d..fa1948c497 100644 --- a/web/i18n/hi-IN/dataset.ts +++ b/web/i18n/hi-IN/dataset.ts @@ -233,6 +233,17 @@ const translation = { updated: 'अपडेट किया गया', externalKnowledgeBase: 'बाहरी ज्ञान आधार', createFromPipeline: 'ज्ञान पाइपलाइन से बनाएं', + serviceApi: { + card: { + apiReference: 'एपीआई संदर्भ', + apiKey: 'एपीआई कुंजी', + title: 'बैकएंड सेवा एपीआई', + endpoint: 'सेवा एपीआई एंडपॉइंट', + }, + enabled: 'सेवा में', + disabled: 'अक्षम', + title: 'सेवा एपीआई', + }, } export default translation diff --git a/web/i18n/id-ID/dataset.ts b/web/i18n/id-ID/dataset.ts index ac421c4d1a..4c41fb0942 100644 --- a/web/i18n/id-ID/dataset.ts +++ b/web/i18n/id-ID/dataset.ts @@ -219,6 +219,17 @@ const translation = { updated: 'Diperbarui', createFromPipeline: 'Membuat dari Knowledge Pipeline', externalKnowledgeBase: 'Basis Pengetahuan Eksternal', + serviceApi: { + card: { + apiKey: 'Kunci API', + apiReference: 'Referensi API', + title: 'API layanan backend', + endpoint: 'Titik Akhir API Layanan', + }, + title: 'API Layanan', + enabled: 'Sedang Beroperasi', + disabled: 'Dinonaktifkan', + }, } export default translation diff --git a/web/i18n/it-IT/dataset.ts b/web/i18n/it-IT/dataset.ts index 99a21f12e0..7489034e53 100644 --- a/web/i18n/it-IT/dataset.ts +++ b/web/i18n/it-IT/dataset.ts @@ -233,6 +233,17 @@ const translation = { updated: 'Aggiornato', externalKnowledgeBase: 'Base di conoscenza esterna', createFromPipeline: 'Creazione da pipeline di conoscenza', + serviceApi: { + card: { + endpoint: 'Endpoint dell\'API di servizio', + apiKey: 'Chiave API', + title: 'API del servizio backend', + apiReference: 'Riferimento API', + }, + disabled: 'Disabilitato', + title: 'API di servizio', + enabled: 'In servizio', + }, } export default translation diff --git a/web/i18n/ja-JP/dataset.ts b/web/i18n/ja-JP/dataset.ts index 1e96961751..02afcd453a 100644 --- a/web/i18n/ja-JP/dataset.ts +++ b/web/i18n/ja-JP/dataset.ts @@ -87,8 +87,8 @@ const translation = { intro2: 'コンテキストとして', intro3: '、', intro4: 'または', - intro5: '作成することができます', - intro6: '単体の ChatGPT インデックスプラグインとして公開するために', + intro5: '公開することができます', + intro6: '独立したサービスとして', unavailable: '利用不可', unavailableTip: '埋め込みモデルが利用できません。デフォルトの埋め込みモデルを設定する必要があります', datasets: 'ナレッジベース', diff --git a/web/i18n/ko-KR/dataset.ts b/web/i18n/ko-KR/dataset.ts index 2bbed9a339..7f6153f968 100644 --- a/web/i18n/ko-KR/dataset.ts +++ b/web/i18n/ko-KR/dataset.ts @@ -225,6 +225,17 @@ const translation = { updated: '업데이트', externalKnowledgeBase: '외부 기술 자료', createFromPipeline: '지식 파이프라인에서 만들기', + serviceApi: { + card: { + apiReference: 'API 참고', + endpoint: '서비스 API 엔드포인트', + apiKey: 'API 키', + title: '백엔드 서비스 API', + }, + enabled: '서비스 중', + title: '서비스 API', + disabled: '장애인', + }, } export default translation diff --git a/web/i18n/pl-PL/dataset.ts b/web/i18n/pl-PL/dataset.ts index 4267736a35..5c1d3630e9 100644 --- a/web/i18n/pl-PL/dataset.ts +++ b/web/i18n/pl-PL/dataset.ts @@ -232,6 +232,17 @@ const translation = { updated: 'Aktualizowano', createFromPipeline: 'Tworzenie na podstawie potoku wiedzy', externalKnowledgeBase: 'Zewnętrzna baza wiedzy', + serviceApi: { + card: { + apiKey: 'Klucz API', + title: 'Usługa backendowa API', + apiReference: 'Dokumentacja API', + endpoint: 'Punkt końcowy API usługi', + }, + title: 'Interfejs API usługi', + disabled: 'Niepełnosprawny', + enabled: 'W serwisie', + }, } export default translation diff --git a/web/i18n/pt-BR/dataset.ts b/web/i18n/pt-BR/dataset.ts index ebbf0a1d0d..0983eddcf6 100644 --- a/web/i18n/pt-BR/dataset.ts +++ b/web/i18n/pt-BR/dataset.ts @@ -226,6 +226,17 @@ const translation = { updated: 'Atualizado', externalKnowledgeBase: 'Base de conhecimento externa', createFromPipeline: 'Criar a partir do pipeline de conhecimento', + serviceApi: { + card: { + apiKey: 'Chave de API', + apiReference: 'Referência da API', + title: 'API de serviço de backend', + endpoint: 'Endpoint da API de Serviço', + }, + enabled: 'Em serviço', + title: 'API de Serviço', + disabled: 'Desativado', + }, } export default translation diff --git a/web/i18n/ro-RO/dataset.ts b/web/i18n/ro-RO/dataset.ts index dcdc081779..29efbd10fc 100644 --- a/web/i18n/ro-RO/dataset.ts +++ b/web/i18n/ro-RO/dataset.ts @@ -226,6 +226,17 @@ const translation = { updated: 'Actualizat', externalKnowledgeBase: 'Baza de cunoștințe externă', createFromPipeline: 'Crearea din Knowledge Pipeline', + serviceApi: { + card: { + title: 'API pentru serviciul backend', + apiReference: 'Referință API', + endpoint: 'Punct final API de servicii', + apiKey: 'Cheie API', + }, + disabled: 'Dezactivat', + enabled: 'În serviciu', + title: 'API de servicii', + }, } export default translation diff --git a/web/i18n/ru-RU/dataset.ts b/web/i18n/ru-RU/dataset.ts index d1701b4be5..1b8c8d4c31 100644 --- a/web/i18n/ru-RU/dataset.ts +++ b/web/i18n/ru-RU/dataset.ts @@ -226,6 +226,17 @@ const translation = { updated: 'Обновлено', externalKnowledgeBase: 'Внешняя база знаний', createFromPipeline: 'Создание из конвейера знаний', + serviceApi: { + card: { + apiReference: 'Справочник API', + title: 'API бэкенд-сервиса', + apiKey: 'API ключ', + endpoint: 'Конечная точка API сервиса', + }, + enabled: 'На службе', + title: 'Сервисный API', + disabled: 'Отключено', + }, } export default translation diff --git a/web/i18n/sl-SI/dataset.ts b/web/i18n/sl-SI/dataset.ts index fab7a11241..cc84adf851 100644 --- a/web/i18n/sl-SI/dataset.ts +++ b/web/i18n/sl-SI/dataset.ts @@ -226,6 +226,17 @@ const translation = { createFromPipeline: 'Ustvarjanje iz cevovoda znanja', updated: 'Posodobljene', externalKnowledgeBase: 'Zunanja baza znanja', + serviceApi: { + card: { + apiKey: 'API ključ', + endpoint: 'Vhodna točka API storitve', + title: 'API storitev za zaledje', + apiReference: 'API Referenca', + }, + title: 'Storitveni API', + disabled: 'Onemogočeno', + enabled: 'V storitvi', + }, } export default translation diff --git a/web/i18n/th-TH/dataset.ts b/web/i18n/th-TH/dataset.ts index 1a49ba1626..58ddf8ba8e 100644 --- a/web/i18n/th-TH/dataset.ts +++ b/web/i18n/th-TH/dataset.ts @@ -225,6 +225,17 @@ const translation = { updated: 'ปรับ ปรุง', externalKnowledgeBase: 'ฐานความรู้ภายนอก', createFromPipeline: 'สร้างจากไปป์ไลน์ความรู้', + serviceApi: { + card: { + title: 'บริการแบ็กเอนด์ API', + apiReference: 'เอกสารอ้างอิง API', + apiKey: 'กุญแจ API', + endpoint: 'จุดเชื่อมต่อ API บริการ', + }, + enabled: 'ให้บริการ', + disabled: 'ถูกปิดใช้งาน', + title: 'บริการ API', + }, } export default translation diff --git a/web/i18n/tr-TR/dataset.ts b/web/i18n/tr-TR/dataset.ts index fea5ab5bb0..e290dfe711 100644 --- a/web/i18n/tr-TR/dataset.ts +++ b/web/i18n/tr-TR/dataset.ts @@ -226,6 +226,17 @@ const translation = { updated: 'Güncel -leştirilmiş', createFromPipeline: 'Bilgi İşlem Hattından Oluşturun', externalKnowledgeBase: 'Harici Bilgi Bankası', + serviceApi: { + card: { + apiReference: 'API Referansı', + title: 'Backend servis api', + apiKey: 'API Anahtarı', + endpoint: 'Hizmet API Uç Noktası', + }, + disabled: 'Engelli', + enabled: 'Hizmette', + title: 'Servis API\'si', + }, } export default translation diff --git a/web/i18n/uk-UA/dataset.ts b/web/i18n/uk-UA/dataset.ts index 5732d80718..61972ac565 100644 --- a/web/i18n/uk-UA/dataset.ts +++ b/web/i18n/uk-UA/dataset.ts @@ -227,6 +227,17 @@ const translation = { updated: 'Оновлено', createFromPipeline: 'Створюйте на основі Knowledge Pipeline', externalKnowledgeBase: 'Зовнішня база знань', + serviceApi: { + card: { + title: 'API бекенд-сервіс', + apiReference: 'Посилання на API', + apiKey: 'Ключ API', + endpoint: 'Кінцева точка API сервісу', + }, + disabled: 'Вимкнено', + enabled: 'У службі', + title: 'Сервісний API', + }, } export default translation diff --git a/web/i18n/vi-VN/dataset.ts b/web/i18n/vi-VN/dataset.ts index 695e97e6ea..e5ffd5b61b 100644 --- a/web/i18n/vi-VN/dataset.ts +++ b/web/i18n/vi-VN/dataset.ts @@ -226,6 +226,17 @@ const translation = { updated: 'Cập nhật', createFromPipeline: 'Tạo từ quy trình kiến thức', externalKnowledgeBase: 'Cơ sở kiến thức bên ngoài', + serviceApi: { + card: { + title: 'API dịch vụ backend', + endpoint: 'Điểm cuối API dịch vụ', + apiKey: 'Khóa API', + apiReference: 'Tham chiếu API', + }, + enabled: 'Đang phục vụ', + disabled: 'Vô hiệu hóa', + title: 'Giao diện lập trình dịch vụ', + }, } export default translation diff --git a/web/i18n/zh-Hans/dataset.ts b/web/i18n/zh-Hans/dataset.ts index 641925a425..69a92b5529 100644 --- a/web/i18n/zh-Hans/dataset.ts +++ b/web/i18n/zh-Hans/dataset.ts @@ -90,8 +90,8 @@ const translation = { intro2: '作为上下文', intro3: ',', intro4: '或可以', - intro5: '创建', - intro6: '为独立的 ChatGPT 插件发布使用', + intro5: '发布', + intro6: '为独立的服务', unavailable: '不可用', unavailableTip: '由于 embedding 模型不可用,需要配置默认 embedding 模型', datasets: '知识库', diff --git a/web/i18n/zh-Hant/dataset.ts b/web/i18n/zh-Hant/dataset.ts index fcc16963fa..f037ec7a70 100644 --- a/web/i18n/zh-Hant/dataset.ts +++ b/web/i18n/zh-Hant/dataset.ts @@ -226,6 +226,17 @@ const translation = { externalKnowledgeBase: '外部知識庫', createFromPipeline: '從知識管線建立', updated: '更新時間', + serviceApi: { + card: { + title: '後端服務 API', + apiReference: 'API 參考', + endpoint: '服務 API 端點', + apiKey: 'API 金鑰', + }, + enabled: '使用中', + title: '服務 API', + disabled: '已停用', + }, } export default translation