chore: cleanup wrong and unused doc links in i18 translations by appling docLink method usage (#21112)
This commit is contained in:
parent
6c0a91a64f
commit
6a5236b200
44 changed files with 12 additions and 67 deletions
|
|
@ -20,6 +20,7 @@ import type {
|
|||
import { useToastContext } from '@/app/components/base/toast'
|
||||
import AppIcon from '@/app/components/base/app-icon'
|
||||
import { noop } from 'lodash-es'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
|
||||
const systemTypes = ['api']
|
||||
type ExternalDataToolModalProps = {
|
||||
|
|
@ -40,6 +41,7 @@ const ExternalDataToolModal: FC<ExternalDataToolModalProps> = ({
|
|||
onValidateBeforeSave,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const docLink = useDocLink()
|
||||
const { notify } = useToastContext()
|
||||
const { locale } = useContext(I18n)
|
||||
const [localeData, setLocaleData] = useState(data.type ? data : { ...data, type: 'api' })
|
||||
|
|
@ -243,7 +245,7 @@ const ExternalDataToolModal: FC<ExternalDataToolModalProps> = ({
|
|||
<div className='flex h-9 items-center justify-between text-sm font-medium text-gray-900'>
|
||||
{t('common.apiBasedExtension.selector.title')}
|
||||
<a
|
||||
href={t('common.apiBasedExtension.linkUrl') || '/'}
|
||||
href={docLink('/guides/extension/api-based-extension/README')}
|
||||
target='_blank' rel='noopener noreferrer'
|
||||
className='group flex items-center text-xs font-normal text-gray-500 hover:text-primary-600'
|
||||
>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import { useModalContext } from '@/context/modal-context'
|
|||
import { CustomConfigurationStatusEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
||||
import cn from '@/utils/classnames'
|
||||
import { noop } from 'lodash-es'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
|
||||
const systemTypes = ['openai_moderation', 'keywords', 'api']
|
||||
|
||||
|
|
@ -46,6 +47,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({
|
|||
onSave,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const docLink = useDocLink()
|
||||
const { notify } = useToastContext()
|
||||
const { locale } = useContext(I18n)
|
||||
const { data: modelProviders, isLoading, mutate } = useSWR('/workspaces/current/model-providers', fetchModelProviders)
|
||||
|
|
@ -316,7 +318,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({
|
|||
<div className='flex h-9 items-center justify-between'>
|
||||
<div className='text-sm font-medium text-text-primary'>{t('common.apiBasedExtension.selector.title')}</div>
|
||||
<a
|
||||
href={t('common.apiBasedExtension.linkUrl') || '/'}
|
||||
href={docLink('/guides/extension/api-based-extension/README')}
|
||||
target='_blank' rel='noopener noreferrer'
|
||||
className='group flex items-center text-xs text-text-tertiary hover:text-primary-600'
|
||||
>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@ import {
|
|||
RiExternalLinkLine,
|
||||
RiPuzzle2Line,
|
||||
} from '@remixicon/react'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
|
||||
const Empty = () => {
|
||||
const { t } = useTranslation()
|
||||
const docLink = useDocLink()
|
||||
|
||||
return (
|
||||
<div className='mb-2 rounded-xl bg-background-section p-6'>
|
||||
|
|
@ -15,7 +17,7 @@ const Empty = () => {
|
|||
<div className='system-sm-medium mb-1 text-text-secondary'>{t('common.apiBasedExtension.title')}</div>
|
||||
<a
|
||||
className='system-xs-regular flex items-center text-text-accent'
|
||||
href={t('common.apiBasedExtension.linkUrl') || '/'}
|
||||
href={docLink('/guides/extension/api-based-extension/README')}
|
||||
target='_blank' rel='noopener noreferrer'
|
||||
>
|
||||
{t('common.apiBasedExtension.link')}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import type { FC } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
import Modal from '@/app/components/base/modal'
|
||||
import Button from '@/app/components/base/button'
|
||||
import { BookOpen01 } from '@/app/components/base/icons/src/vender/line/education'
|
||||
|
|
@ -29,6 +30,7 @@ const ApiBasedExtensionModal: FC<ApiBasedExtensionModalProps> = ({
|
|||
onSave,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const docLink = useDocLink()
|
||||
const [localeData, setLocaleData] = useState(data)
|
||||
const [loading, setLoading] = useState(false)
|
||||
const { notify } = useToastContext()
|
||||
|
|
@ -100,7 +102,7 @@ const ApiBasedExtensionModal: FC<ApiBasedExtensionModalProps> = ({
|
|||
<div className='flex h-9 items-center justify-between text-sm font-medium text-text-primary'>
|
||||
{t('common.apiBasedExtension.modal.apiEndpoint.title')}
|
||||
<a
|
||||
href={t('common.apiBasedExtension.linkUrl') || '/'}
|
||||
href={docLink('/guides/extension/api-based-extension/README')}
|
||||
target='_blank' rel='noopener noreferrer'
|
||||
className='group flex items-center text-xs font-normal text-text-accent'
|
||||
>
|
||||
|
|
|
|||
|
|
@ -467,7 +467,6 @@ const translation = {
|
|||
apiBasedExtension: {
|
||||
title: 'API-Erweiterungen bieten zentralisiertes API-Management und vereinfachen die Konfiguration für eine einfache Verwendung in Difys Anwendungen.',
|
||||
link: 'Erfahren Sie, wie Sie Ihre eigene API-Erweiterung entwickeln.',
|
||||
linkUrl: 'https://docs.dify.ai/en/guides/extension/api-based-extension/README',
|
||||
add: 'API-Erweiterung hinzufügen',
|
||||
selector: {
|
||||
title: 'API-Erweiterung',
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ const translation = {
|
|||
unknownError: 'Unbekannter Fehler',
|
||||
resetAll: 'Alles zurücksetzen',
|
||||
extractOnlyMainContent: 'Extrahieren Sie nur den Hauptinhalt (keine Kopf-, Navigations- und Fußzeilen usw.)',
|
||||
firecrawlDocLink: 'https://docs.dify.ai/en/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
firecrawlTitle: 'Extrahieren von Webinhalten mit 🔥Firecrawl',
|
||||
maxDepthTooltip: 'Maximale Tiefe für das Crawlen relativ zur eingegebenen URL. Tiefe 0 kratzt nur die Seite der eingegebenen URL, Tiefe 1 kratzt die URL und alles nach der eingegebenen URL + ein / und so weiter.',
|
||||
crawlSubPage: 'Unterseiten crawlen',
|
||||
|
|
@ -85,7 +84,6 @@ const translation = {
|
|||
configureJinaReader: 'Jina Reader konfigurieren',
|
||||
waterCrawlNotConfigured: 'Watercrawl ist nicht konfiguriert',
|
||||
configureWatercrawl: 'Wasserkrabbe konfigurieren',
|
||||
watercrawlDocLink: 'https://docs.dify.ai/de/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
watercrawlTitle: 'Webinhalt mit Watercrawl extrahieren',
|
||||
watercrawlDoc: 'Wasserkriechen-Dokumente',
|
||||
configureFirecrawl: 'Firecrawl konfigurieren',
|
||||
|
|
|
|||
|
|
@ -484,7 +484,6 @@ const translation = {
|
|||
apiBasedExtension: {
|
||||
title: 'API extensions provide centralized API management, simplifying configuration for easy use across Dify\'s applications.',
|
||||
link: 'Learn how to develop your own API Extension.',
|
||||
linkUrl: 'https://docs.dify.ai/en/guides/extension/api-based-extension/README',
|
||||
add: 'Add API Extension',
|
||||
selector: {
|
||||
title: 'API Extension',
|
||||
|
|
|
|||
|
|
@ -80,10 +80,8 @@ const translation = {
|
|||
run: 'Run',
|
||||
firecrawlTitle: 'Extract web content with 🔥Firecrawl',
|
||||
firecrawlDoc: 'Firecrawl docs',
|
||||
firecrawlDocLink: 'https://docs.dify.ai/en/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
watercrawlTitle: 'Extract web content with Watercrawl',
|
||||
watercrawlDoc: 'Watercrawl docs',
|
||||
watercrawlDocLink: 'https://docs.dify.ai/en/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
jinaReaderTitle: 'Convert the entire site to Markdown',
|
||||
jinaReaderDoc: 'Learn more about Jina Reader',
|
||||
jinaReaderDocLink: 'https://jina.ai/reader',
|
||||
|
|
|
|||
|
|
@ -471,7 +471,6 @@ const translation = {
|
|||
apiBasedExtension: {
|
||||
title: 'Las extensiones basadas en API proporcionan una gestión centralizada de API, simplificando la configuración para su fácil uso en las aplicaciones de Dify.',
|
||||
link: 'Aprende cómo desarrollar tu propia Extensión API.',
|
||||
linkUrl: 'https://docs.dify.ai/en/guides/extension/api-based-extension/README',
|
||||
add: 'Agregar Extensión API',
|
||||
selector: {
|
||||
title: 'Extensión API',
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ const translation = {
|
|||
run: 'Ejecutar',
|
||||
firecrawlTitle: 'Extraer contenido web con 🔥Firecrawl',
|
||||
firecrawlDoc: 'Documentación de Firecrawl',
|
||||
firecrawlDocLink: 'https://docs.dify.ai/en/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
options: 'Opciones',
|
||||
crawlSubPage: 'Rastrear subpáginas',
|
||||
limit: 'Límite',
|
||||
|
|
@ -92,7 +91,6 @@ const translation = {
|
|||
configureFirecrawl: 'Configurar Firecrawl',
|
||||
watercrawlDoc: 'Documentos de Watercrawl',
|
||||
configureJinaReader: 'Configurar Jina Reader',
|
||||
watercrawlDocLink: 'https://docs.dify.ai/es/guías/base-de-conocimientos/crear-conocimientos-y-subir-documentos/importar-datos-de-contenido/sincronizar-desde-el-sitio-web',
|
||||
configureWatercrawl: 'Configurar Watercrawl',
|
||||
waterCrawlNotConfiguredDescription: 'Configura Watercrawl con la clave de API para usarlo.',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -471,7 +471,6 @@ const translation = {
|
|||
apiBasedExtension: {
|
||||
title: 'افزونههای مبتنی بر API مدیریت متمرکز API را فراهم میکنند و پیکربندی را برای استفاده آسان در برنامههای Dify ساده میکنند.',
|
||||
link: 'نحوه توسعه افزونه API خود را بیاموزید.',
|
||||
linkUrl: 'https://docs.dify.ai/en/guides/extension/api-based-extension/README',
|
||||
add: 'افزودن افزونه API',
|
||||
selector: {
|
||||
title: 'افزونه API',
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ const translation = {
|
|||
run: 'اجرا',
|
||||
firecrawlTitle: 'استخراج محتوای وب با fireFirecrawl',
|
||||
firecrawlDoc: 'مستندات Firecrawl',
|
||||
firecrawlDocLink: '<a href="https://docs.dify.ai/en/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website">https://docs.dify.ai/en/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website</a>',
|
||||
options: 'گزینهها',
|
||||
crawlSubPage: 'خزش صفحات فرعی',
|
||||
limit: 'محدودیت',
|
||||
|
|
@ -92,7 +91,6 @@ const translation = {
|
|||
waterCrawlNotConfiguredDescription: 'برای استفاده از Watercrawl، آن را با کلید API پیکربندی کنید.',
|
||||
waterCrawlNotConfigured: 'Watercrawl پیکربندی نشده است',
|
||||
configureJinaReader: 'پیکربندی خواننده جینا',
|
||||
watercrawlDocLink: 'https://docs.dify.ai/fa/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
watercrawlTitle: 'محتوای وب را با واترکرال استخراج کنید',
|
||||
configureWatercrawl: 'تنظیم واترکراول',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -467,7 +467,6 @@ const translation = {
|
|||
apiBasedExtension: {
|
||||
title: 'Les extensions API fournissent une gestion centralisée des API, simplifiant la configuration pour une utilisation facile à travers les applications de Dify.',
|
||||
link: 'Apprenez comment développer votre propre Extension API.',
|
||||
linkUrl: 'https://docs.dify.ai/fonctionnalites/extension/extension_basee_sur_api',
|
||||
add: 'Ajouter l\'extension API',
|
||||
selector: {
|
||||
title: 'Extension de l\'API',
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ const translation = {
|
|||
preview: 'Aperçu',
|
||||
crawlSubPage: 'Explorer les sous-pages',
|
||||
configure: 'Configurer',
|
||||
firecrawlDocLink: 'https://docs.dify.ai/en/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
maxDepth: 'Profondeur maximale',
|
||||
fireCrawlNotConfigured: 'Firecrawl n’est pas configuré',
|
||||
firecrawlTitle: 'Extraire du contenu web avec 🔥Firecrawl',
|
||||
|
|
@ -88,7 +87,6 @@ const translation = {
|
|||
configureJinaReader: 'Configurer le lecteur Jina',
|
||||
configureWatercrawl: 'Configurer Watercrawl',
|
||||
waterCrawlNotConfigured: 'Watercrawl n\'est pas configuré',
|
||||
watercrawlDocLink: 'https://docs.dify.ai/fr/guide/base-de-connaissances/créer-des-connaissances-et-télécharger-des-documents/importer-des-données-de-contenu/synchroniser-depuis-un-site-web',
|
||||
configureFirecrawl: 'Configurer Firecrawl',
|
||||
},
|
||||
cancel: 'Annuler',
|
||||
|
|
|
|||
|
|
@ -488,7 +488,6 @@ const translation = {
|
|||
title:
|
||||
'एपीआई एक्सटेंशन केंद्रीकृत एपीआई प्रबंधन प्रदान करते हैं, जो Dify के अनुप्रयोगों में आसान उपयोग के लिए कॉन्फ़िगरेशन को सरल बनाते हैं।',
|
||||
link: 'अपना खुद का एपीआई एक्सटेंशन कैसे विकसित करें, यह जानें।',
|
||||
linkUrl: 'https://docs.dify.ai/en/guides/extension/api-based-extension/README',
|
||||
add: 'एपीआई एक्सटेंशन जोड़ें',
|
||||
selector: {
|
||||
title: 'एपीआई एक्सटेंशन',
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ const translation = {
|
|||
run: 'चलाएं',
|
||||
firecrawlTitle: '🔥फायरक्रॉल के साथ वेब सामग्री निकालें',
|
||||
firecrawlDoc: 'फायरक्रॉल दस्तावेज़',
|
||||
firecrawlDocLink:
|
||||
'https://docs.dify.ai/guides/knowledge-base/sync_from_website',
|
||||
options: 'विकल्प',
|
||||
crawlSubPage: 'उप-पृष्ठों को क्रॉल करें',
|
||||
limit: 'सीमा',
|
||||
|
|
@ -97,7 +95,6 @@ const translation = {
|
|||
configureFirecrawl: 'फायरक्रॉल को कॉन्फ़िगर करें',
|
||||
watercrawlDoc: 'वाटरक्रॉल दस्तावेज़',
|
||||
waterCrawlNotConfiguredDescription: 'इसे उपयोग करने के लिए वॉटरक्रॉल को एपीआई कुंजी के साथ कॉन्फ़िगर करें।',
|
||||
watercrawlDocLink: 'https://docs.dify.ai/en/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
configureJinaReader: 'जिना रीडर कॉन्फ़िगर करें',
|
||||
configureWatercrawl: 'वाटरक्रॉल कॉन्फ़िगर करें',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -495,7 +495,6 @@ const translation = {
|
|||
title:
|
||||
'Le estensioni API forniscono una gestione centralizzata delle API, semplificando la configurazione per un facile utilizzo nelle applicazioni di Dify.',
|
||||
link: 'Scopri come sviluppare la tua estensione API.',
|
||||
linkUrl: 'https://docs.dify.ai/en/guides/extension/api-based-extension/README',
|
||||
add: 'Aggiungi Estensione API',
|
||||
selector: {
|
||||
title: 'Estensione API',
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@ const translation = {
|
|||
run: 'Esegui',
|
||||
firecrawlTitle: 'Estrai contenuti web con 🔥Firecrawl',
|
||||
firecrawlDoc: 'Documenti Firecrawl',
|
||||
firecrawlDocLink:
|
||||
'https://docs.dify.ai/guides/knowledge-base/sync_from_website',
|
||||
options: 'Opzioni',
|
||||
crawlSubPage: 'Crawl sotto-pagine',
|
||||
limit: 'Limite',
|
||||
|
|
@ -101,7 +99,6 @@ const translation = {
|
|||
configureJinaReader: 'Configura Jina Reader',
|
||||
configureWatercrawl: 'Configura Watercrawl',
|
||||
waterCrawlNotConfigured: 'Watercrawl non è configurato',
|
||||
watercrawlDocLink: 'https://docs.dify.ai/it/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
},
|
||||
cancel: 'Annulla',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -485,7 +485,6 @@ const translation = {
|
|||
apiBasedExtension: {
|
||||
title: 'API 拡張機能は、Dify のアプリケーション全体での簡単な使用のための設定を簡素化し、集中的な API 管理を提供します。',
|
||||
link: '独自の API 拡張機能を開発する方法について学ぶ。',
|
||||
linkUrl: 'https://docs.dify.ai/en/guides/extension/api-based-extension/README',
|
||||
add: 'API 拡張機能を追加',
|
||||
selector: {
|
||||
title: 'API 拡張機能',
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ const translation = {
|
|||
run: '実行',
|
||||
firecrawlTitle: '🔥Firecrawl を使っでウエブコンテンツを抽出',
|
||||
firecrawlDoc: 'Firecrawl ドキュメント',
|
||||
firecrawlDocLink: 'https://docs.dify.ai/en/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
jinaReaderTitle: 'サイト全体を Markdown に変換する',
|
||||
jinaReaderDoc: 'Jina Reader の詳細',
|
||||
jinaReaderDocLink: 'https://jina.ai/reader',
|
||||
|
|
@ -98,7 +97,6 @@ const translation = {
|
|||
watercrawlDoc: 'ウォータークローリングの文書',
|
||||
watercrawlTitle: 'Watercrawl を使用してウェブコンテンツを抽出する',
|
||||
waterCrawlNotConfigured: 'Watercrawl は設定されていません',
|
||||
watercrawlDocLink: 'https://docs.dify.ai/ja/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website',
|
||||
},
|
||||
},
|
||||
stepTwo: {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue