From 60443148118e1d459514d6f0db1038f2dfd61614 Mon Sep 17 00:00:00 2001 From: Jin Hai Date: Fri, 26 Dec 2025 11:18:08 +0800 Subject: [PATCH] Fix text issue (#12221) ### What problem does this PR solve? Fix several text issues. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Signed-off-by: Jin Hai --- api/db/db_models.py | 2 +- .../joint_services/memory_message_service.py | 2 +- common/constants.py | 2 +- web/src/locales/de.ts | 10 ++-- web/src/locales/en.ts | 60 +++++++++---------- web/src/locales/fr.ts | 2 +- web/src/locales/it.ts | 2 +- web/src/locales/ru.ts | 10 ++-- web/src/locales/zh.ts | 10 ++-- web/src/pages/agent/form/agent-form/index.tsx | 2 +- .../agent-form/tool-popover/tool-command.tsx | 2 +- web/src/pages/agent/index.tsx | 2 +- web/src/pages/agent/version-dialog/index.tsx | 2 +- .../components/link-data-pipline-modal.tsx | 2 +- web/src/pages/memories/interface.ts | 2 +- .../memory-setting/advanced-settings-form.tsx | 8 +-- web/src/pages/memory/memory-setting/index.tsx | 2 +- .../data-source/add-datasource-modal.tsx | 2 +- 18 files changed, 62 insertions(+), 62 deletions(-) diff --git a/api/db/db_models.py b/api/db/db_models.py index 65fe1fd6e..738e26a06 100644 --- a/api/db/db_models.py +++ b/api/db/db_models.py @@ -1189,7 +1189,7 @@ class Memory(DataBaseModel): permissions = CharField(max_length=16, null=False, index=True, help_text="me|team", default="me") description = TextField(null=True, help_text="description") memory_size = IntegerField(default=5242880, null=False, index=False) - forgetting_policy = CharField(max_length=32, null=False, default="fifo", index=False, help_text="lru|fifo") + forgetting_policy = CharField(max_length=32, null=False, default="FIFO", index=False, help_text="LRU|FIFO") temperature = FloatField(default=0.5, index=False) system_prompt = TextField(null=True, help_text="system prompt", index=False) user_prompt = TextField(null=True, help_text="user prompt", index=False) diff --git a/api/db/joint_services/memory_message_service.py b/api/db/joint_services/memory_message_service.py index 06b05d356..97e41b366 100644 --- a/api/db/joint_services/memory_message_service.py +++ b/api/db/joint_services/memory_message_service.py @@ -96,7 +96,7 @@ async def save_to_memory(memory_id: str, message_dict: dict): current_memory_size = get_memory_size_cache(memory_id, tenant_id) if new_msg_size + current_memory_size > memory.memory_size: size_to_delete = current_memory_size + new_msg_size - memory.memory_size - if memory.forgetting_policy == "fifo": + if memory.forgetting_policy == "FIFO": message_ids_to_delete, delete_size = MessageService.pick_messages_to_delete_by_fifo(memory_id, tenant_id, size_to_delete) MessageService.delete_message({"message_id": message_ids_to_delete}, tenant_id, memory_id) decrease_memory_size_cache(memory_id, delete_size) diff --git a/common/constants.py b/common/constants.py index ccf3547cc..83a18f9ba 100644 --- a/common/constants.py +++ b/common/constants.py @@ -171,7 +171,7 @@ class MemoryStorageType(StrEnum): class ForgettingPolicy(StrEnum): - FIFO = "fifo" + FIFO = "FIFO" # environment diff --git a/web/src/locales/de.ts b/web/src/locales/de.ts index dfa447690..e54e5fc90 100644 --- a/web/src/locales/de.ts +++ b/web/src/locales/de.ts @@ -417,7 +417,7 @@ Prozedurales Gedächtnis: Erlernte Fähigkeiten, Gewohnheiten und automatisierte fileFilter: 'Dateifilter', setDefaultTip: '', setDefault: 'Als Standard festlegen', - eidtLinkDataPipeline: 'Ingestion-Pipeline bearbeiten', + editLinkDataPipeline: 'Ingestion-Pipeline bearbeiten', linkPipelineSetTip: 'Verknüpfung der Ingestion-Pipeline mit diesem Datensatz verwalten', default: 'Standard', @@ -900,7 +900,7 @@ Beispiel: general/v2/`, Beispiel: https://fsn1.your-objectstorage.com`, S3CompatibleAddressingStyleTip: `Erforderlich für S3-kompatible Storage Box. Geben Sie den S3-kompatiblen Adressierungsstil an. Beispiel: Virtual Hosted Style`, - addDataSourceModalTital: 'Erstellen Sie Ihren {{name}} Connector', + addDataSourceModalTitle: 'Erstellen Sie Ihren {{name}} Connector', deleteSourceModalTitle: 'Datenquelle löschen', deleteSourceModalContent: `

Sind Sie sicher, dass Sie diese Datenquellenverknüpfung löschen möchten?

`, @@ -1357,12 +1357,12 @@ Beispiel: Virtual Hosted Style`, search: 'Suchen', communication: 'Kommunikation', developer: 'Entwickler', - typeCommandOrsearch: 'Geben Sie einen Befehl ein oder suchen Sie...', + typeCommandORsearch: 'Geben Sie einen Befehl ein oder suchen Sie...', builtIn: 'Eingebaut', ExceptionDefaultValue: 'Ausnahme-Standardwert', exceptionMethod: 'Ausnahmemethode', maxRounds: 'Maximale Reflexionsrunden', - delayEfterError: 'Verzögerung nach Fehler', + delayAfterError: 'Verzögerung nach Fehler', maxRetries: 'Maximale Wiederholungsrunden', advancedSettings: 'Erweiterte Einstellungen', addTools: 'Tools hinzufügen', @@ -1882,7 +1882,7 @@ Beispiel: Virtual Hosted Style`, }`, datatype: 'MIME-Typ der HTTP-Anfrage', insertVariableTip: 'Eingabe / Variablen einfügen', - historyversion: 'Versionsverlauf', + historyVersion: 'Versionsverlauf', version: { created: 'Erstellt', details: 'Versionsdetails', diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index 277eb6861..7ebbb7ceb 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -145,17 +145,17 @@ Procedural Memory: Learned skills, habits, and automated procedures.`, avatar: 'Avatar', description: 'Description', memorySize: 'Memory size', - advancedSettings: 'Advanced Settings', + advancedSettings: 'Advanced settings', permission: 'Permission', - onlyMe: 'Only Me', + onlyMe: 'Only me', team: 'Team', - storageType: 'Storage Type', + storageType: 'Storage type', storageTypePlaceholder: 'Please select storage type', - forgetPolicy: 'Forget Policy', + forgetPolicy: 'Forget policy', temperature: 'Temperature', - systemPrompt: 'System Prompt', + systemPrompt: 'System prompt', systemPromptPlaceholder: 'Please enter system prompt', - userPrompt: 'User Prompt', + userPrompt: 'User prompt', userPromptPlaceholder: 'Please enter user prompt', }, sideBar: { @@ -166,7 +166,7 @@ Procedural Memory: Learned skills, habits, and automated procedures.`, knowledgeList: { welcome: 'Welcome back', description: 'Which knowledge bases will you use today?', - createKnowledgeBase: 'Create Dataset', + createKnowledgeBase: 'Create dataset', name: 'Name', namePlaceholder: 'Please input name.', doc: 'Docs', @@ -364,11 +364,11 @@ Procedural Memory: Learned skills, habits, and automated procedures.`, autoQuestions: 'Auto-question', autoQuestionsTip: `Automatically extract N questions for each chunk to increase their ranking for queries containing those questions. You can check or update the added questions for a chunk from the chunk list. This feature will not disrupt the chunking process if an error occurs, except that it may add an empty result to the original chunk. Be aware that extra tokens will be consumed by the indexing model specified in 'Configuration'. For details, see https://ragflow.io/docs/dev/autokeyword_autoquestion.`, redo: 'Do you want to clear the existing {{chunkNum}} chunks?', - setMetaData: 'Set meta data', + setMetaData: 'Set metadata', pleaseInputJson: 'Please enter JSON', - documentMetaTips: `

The meta data is in Json format(it's not searchable). It will be added into prompt for LLM if any chunks of this document are included in the prompt.

+ documentMetaTips: `

The metadata is in Json format(it's not searchable). It will be added into prompt for LLM if any chunks of this document are included in the prompt.

Examples:

-The meta data is:
+The metadata is:
{ "Author": "Alex Dowson", @@ -401,14 +401,14 @@ Procedural Memory: Learned skills, habits, and automated procedures.`, imageTableContextWindowTip: 'Captures N tokens of text above and below the image & table to provide richer background context.', autoMetadata: 'Auto metadata', - mineruOptions: 'MinerU Options', - mineruParseMethod: 'Parse Method', + mineruOptions: 'MinerU options', + mineruParseMethod: 'Parse method', mineruParseMethodTip: 'Method for parsing PDF: auto (automatic detection), txt (text extraction), ocr (optical character recognition)', - mineruFormulaEnable: 'Formula Recognition', + mineruFormulaEnable: 'Formula recognition', mineruFormulaEnableTip: 'Enable formula recognition. Note: This may not work correctly for Cyrillic documents.', - mineruTableEnable: 'Table Recognition', + mineruTableEnable: 'Table recognition', mineruTableEnableTip: 'Enable table recognition and extraction.', overlappedPercent: 'Overlapped percent(%)', generationScopeTip: @@ -441,11 +441,11 @@ Procedural Memory: Learned skills, habits, and automated procedures.`, fileFilter: 'File filter', setDefaultTip: '', setDefault: 'Set as default', - eidtLinkDataPipeline: 'Edit Ingestion pipeline', - linkPipelineSetTip: 'Manage Ingestion pipeline linkage with this dataset', + editLinkDataPipeline: 'Edit ingestion pipeline', + linkPipelineSetTip: 'Manage ingestion pipeline linkage with this dataset', default: 'Default', dataPipeline: 'Ingestion pipeline', - linkDataPipeline: 'Link Ingestion pipeline', + linkDataPipeline: 'Link ingestion pipeline', enableAutoGenerate: 'Enable auto generate', teamPlaceholder: 'Please select a team.', dataFlowPlaceholder: 'Please select a pipeline.', @@ -756,8 +756,8 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-s maxTokens: 'Max tokens', maxTokensMessage: 'Max tokens is required', maxTokensTip: `This sets the maximum length of the model's output, measured in the number of tokens (words or pieces of words). Defaults to 512. If disabled, you lift the maximum token limit, allowing the model to determine the number of tokens in its responses.`, - maxTokensInvalidMessage: 'Please enter a valid number for Max Tokens.', - maxTokensMinMessage: 'Max Tokens cannot be less than 0.', + maxTokensInvalidMessage: 'Please enter a valid number for Max tokens.', + maxTokensMinMessage: 'Max tokens cannot be less than 0.', quote: 'Show quote', quoteTip: 'Whether to display the original text as a reference.', selfRag: 'Self-RAG', @@ -878,7 +878,7 @@ Example: general/v2/`, Example: https://fsn1.your-objectstorage.com`, S3CompatibleAddressingStyleTip: `Required for S3 compatible Storage Box. Specify the S3-compatible addressing style. Example: Virtual Hosted Style`, - addDataSourceModalTital: 'Create your {{name}} connector', + addDataSourceModalTitle: 'Create your {{name}} connector', deleteSourceModalTitle: 'Delete data source', deleteSourceModalContent: `

Are you sure you want to delete this data source link?

`, @@ -970,10 +970,10 @@ Example: Virtual Hosted Style`, avatarTip: 'This will be displayed on your profile.', profileDescription: 'Update your photo and personal details here.', maxTokens: 'Max tokens', - maxTokensMessage: 'Max Tokens is required', + maxTokensMessage: 'Max tokens is required', maxTokensTip: `This sets the maximum length of the model's output, measured in the number of tokens (words or pieces of words). Defaults to 512. If disabled, you lift the maximum token limit, allowing the model to determine the number of tokens in its responses.`, - maxTokensInvalidMessage: 'Please enter a valid number for Max Tokens.', - maxTokensMinMessage: 'Max Tokens cannot be less than 0.', + maxTokensInvalidMessage: 'Please enter a valid number for Max tokens.', + maxTokensMinMessage: 'Max tokens cannot be less than 0.', password: 'Password', passwordDescription: 'Please enter your current password to change your password.', @@ -1322,12 +1322,12 @@ Example: Virtual Hosted Style`, search: 'Search', communication: 'Communication', developer: 'Developer', - typeCommandOrsearch: 'Type a command or search...', + typeCommandORsearch: 'Type a command or search...', builtIn: 'Built-in', ExceptionDefaultValue: 'Exception default value', exceptionMethod: 'Exception method', maxRounds: 'Max reflection rounds', - delayEfterError: 'Delay after error', + delayAfterError: 'Delay after error', maxRetries: 'Max retry rounds', advancedSettings: 'Advanced settings', addTools: 'Add tools', @@ -1834,7 +1834,7 @@ This delimiter is used to split the input text into several text pieces echo of }`, datatype: 'MINE type of the HTTP request', insertVariableTip: `Enter / Insert variables`, - historyversion: 'Version history', + historyVersion: 'Version history', version: { created: 'Created', details: 'Version details', @@ -2247,7 +2247,7 @@ Important structured information may include: names, dates, locations, events, k dataflowParser: { result: 'Result', parseSummary: 'Parse summary', - parseSummaryTip: 'Parser:deepdoc', + parseSummaryTip: 'Parser:DeepDoc', parserMethod: 'Parser method', outputFormat: 'Output format', rerunFromCurrentStep: 'Rerun from current step', @@ -2270,10 +2270,10 @@ Important structured information may include: names, dates, locations, events, k

To keep them, please click Rerun to re-run the current stage.

`, changeStepModalConfirmText: 'Switch Anyway', changeStepModalCancelText: 'Cancel', - unlinkPipelineModalTitle: 'Unlink Ingestion pipeline', + unlinkPipelineModalTitle: 'Unlink ingestion pipeline', unlinkPipelineModalConfirmText: 'Unlink', unlinkPipelineModalContent: ` -

Once unlinked, this Dataset will no longer be connected to the current Ingestion pipeline.

+

Once unlinked, this Dataset will no longer be connected to the current ingestion pipeline.

Files that are already being parsed will continue until completion

Files that are not yet parsed will no longer be processed


Are you sure you want to proceed?

`, @@ -2284,7 +2284,7 @@ Important structured information may include: names, dates, locations, events, k }, datasetOverview: { downloadTip: 'Files being downloaded from data sources. ', - processingTip: 'Files being processed by Ingestion pipeline.', + processingTip: 'Files being processed by ingestion pipeline.', totalFiles: 'Total files', downloading: 'Downloading', downloadSuccessTip: 'Total successful downloads', diff --git a/web/src/locales/fr.ts b/web/src/locales/fr.ts index fb69d047d..dd691a245 100644 --- a/web/src/locales/fr.ts +++ b/web/src/locales/fr.ts @@ -1191,7 +1191,7 @@ export default { }`, datatype: 'Type MIME de la requête HTTP', insertVariableTip: `Entrer / Insérer des variables`, - historyversion: 'Historique des versions', + historyVersion: 'Historique des versions', version: { created: 'Créé', details: 'Détails de la version', diff --git a/web/src/locales/it.ts b/web/src/locales/it.ts index 564c93953..ce41f3ccf 100644 --- a/web/src/locales/it.ts +++ b/web/src/locales/it.ts @@ -325,7 +325,7 @@ export default { fileFilter: 'Filtro file', setDefaultTip: '', setDefault: 'Imposta come predefinito', - eidtLinkDataPipeline: 'Modifica pipeline di ingestione', + editLinkDataPipeline: 'Modifica pipeline di ingestione', linkPipelineSetTip: 'Gestisci il collegamento della pipeline di ingestione con questo dataset', default: 'Predefinito', diff --git a/web/src/locales/ru.ts b/web/src/locales/ru.ts index 4c0c42401..32fd04d5d 100644 --- a/web/src/locales/ru.ts +++ b/web/src/locales/ru.ts @@ -311,7 +311,7 @@ export default { fileFilter: 'Фильтр файлов', setDefaultTip: '', setDefault: 'Установить по умолчанию', - eidtLinkDataPipeline: 'Редактировать пайплайн обработки', + editLinkDataPipeline: 'Редактировать пайплайн обработки', linkPipelineSetTip: 'Управление связью пайплайна обработки с этим набором данных', default: 'По умолчанию', @@ -722,7 +722,7 @@ export default { Пример: https://fsn1.your-objectstorage.com`, S3CompatibleAddressingStyleTip: `Требуется для S3 совместимого Storage Box. Укажите стиль адресации, совместимый с S3. Пример: Virtual Hosted Style`, - addDataSourceModalTital: 'Создайте ваш коннектор {{name}}', + addDataSourceModalTitle: 'Создайте ваш коннектор {{name}}', deleteSourceModalTitle: 'Удалить источник данных', deleteSourceModalContent: `

Вы уверены, что хотите удалить эту ссылку на источник данных?

`, @@ -1133,12 +1133,12 @@ export default { search: 'Поиск', communication: 'Коммуникация', developer: 'Разработчик', - typeCommandOrsearch: 'Введите команду или поиск...', + typeCommandORsearch: 'Введите команду или поиск...', builtIn: 'Встроенный', ExceptionDefaultValue: 'Значение по умолчанию при исключении', exceptionMethod: 'Метод обработки исключений', maxRounds: 'Макс. раундов рефлексии', - delayEfterError: 'Задержка после ошибки', + delayAfterError: 'Задержка после ошибки', maxRetries: 'Макс. попыток повтора', advancedSettings: 'Расширенные настройки', addTools: 'Добавить инструменты', @@ -1637,7 +1637,7 @@ export default { }`, datatype: 'MIME тип HTTP запроса', insertVariableTip: `Введите / Вставьте переменные`, - historyversion: 'История версий', + historyVersion: 'История версий', version: { created: 'Создано', details: 'Детали версии', diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts index 950e0c060..848749c28 100644 --- a/web/src/locales/zh.ts +++ b/web/src/locales/zh.ts @@ -405,7 +405,7 @@ export default { fileFilter: '正则匹配表达式', setDefaultTip: '', setDefault: '设置默认', - eidtLinkDataPipeline: '编辑pipeline', + editLinkDataPipeline: '编辑pipeline', linkPipelineSetTip: '管理与此数据集的数据管道链接', default: '默认', dataPipeline: 'Ingestion pipeline', @@ -820,7 +820,7 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于 '可选:指定空间键以限制同步到特定空间。留空则同步所有可访问的空间。多个空间请用逗号分隔(例如:DEV,DOCS,HR)', s3PrefixTip: `指定 S3 存储桶内的文件夹路径,用于读取文件。 示例:general/v2/`, - addDataSourceModalTital: '创建你的 {{name}} 链接', + addDataSourceModalTitle: '创建你的 {{name}} 链接', deleteSourceModalTitle: '删除数据源链接', deleteSourceModalContent: `

您确定要删除此数据源链接吗?

`, @@ -1202,14 +1202,14 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于 search: '搜索', communication: '通信', developer: '开发者', - typeCommandOrsearch: '输入命令或或搜索...', + typeCommandORsearch: '输入命令或或搜索...', builtIn: '内置', goto: '异常分支', comment: '默认值', ExceptionDefaultValue: '异常处理默认值', exceptionMethod: '异常处理方法', maxRounds: '最大反思轮数', - delayEfterError: '错误后延迟', + delayAfterError: '错误后延迟', maxRetries: '最大重试轮数', advancedSettings: '高级设置', addTools: '添加工具', @@ -1246,7 +1246,7 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于 dialog: '对话', flow: '工作流', noMoreData: '没有更多数据了', - historyversion: '历史版本', + historyVersion: '历史版本', version: { details: '版本详情', download: '下载', diff --git a/web/src/pages/agent/form/agent-form/index.tsx b/web/src/pages/agent/form/agent-form/index.tsx index a78dc1f77..23227eb51 100644 --- a/web/src/pages/agent/form/agent-form/index.tsx +++ b/web/src/pages/agent/form/agent-form/index.tsx @@ -242,7 +242,7 @@ function AgentForm({ node }: INextOperatorForm) { name={`delay_after_error`} render={({ field }) => ( - {t('flow.delayEfterError')} + {t('flow.delayAfterError')} diff --git a/web/src/pages/agent/form/agent-form/tool-popover/tool-command.tsx b/web/src/pages/agent/form/agent-form/tool-popover/tool-command.tsx index b5edf6d89..d3cd5009a 100644 --- a/web/src/pages/agent/form/agent-form/tool-popover/tool-command.tsx +++ b/web/src/pages/agent/form/agent-form/tool-popover/tool-command.tsx @@ -115,7 +115,7 @@ export function ToolCommand({ value, onChange }: ToolCommandProps) { return ( - + No results found. {Menus.map((x) => ( diff --git a/web/src/pages/agent/index.tsx b/web/src/pages/agent/index.tsx index 059d642ec..92bd3a0fe 100644 --- a/web/src/pages/agent/index.tsx +++ b/web/src/pages/agent/index.tsx @@ -246,7 +246,7 @@ export default function Agent() { {isPipeline || (