From 0ea853cf725c33b13c4bdc1cac2ec3ce401a8e37 Mon Sep 17 00:00:00 2001 From: Feng Peng Date: Sat, 22 Mar 2025 15:27:22 -0700 Subject: [PATCH] Remove extra files. --- src/leettools/common/i18n/README.md | 3 +- .../i18n/locales/en/LC_MESSAGES/messages.po | 170 ++++++++-------- .../i18n/locales/ja/LC_MESSAGES/messages.po | 182 ++++++++++-------- .../i18n/locales/zh/LC_MESSAGES/messages.po | 182 ++++++++++-------- src/leettools/common/i18n/translator.py | 4 +- src/leettools/core/schemas/user.py | 2 +- src/leettools/flow/flow_option_items.py | 6 +- 7 files changed, 306 insertions(+), 243 deletions(-) diff --git a/src/leettools/common/i18n/README.md b/src/leettools/common/i18n/README.md index 406a55d..1a5fbe8 100644 --- a/src/leettools/common/i18n/README.md +++ b/src/leettools/common/i18n/README.md @@ -32,8 +32,9 @@ pybabel compile -d locales 5. Run the unit tests to ensure the translations are working. -In the project root, run the following command to run the unit tests. +Get to the project root, run the following command to run the unit tests. ```bash +cd ../../../.. pytest -s tests/leettools/common/test_i18n.py ``` diff --git a/src/leettools/common/i18n/locales/en/LC_MESSAGES/messages.po b/src/leettools/common/i18n/locales/en/LC_MESSAGES/messages.po index a690fbe..cd9cbc4 100644 --- a/src/leettools/common/i18n/locales/en/LC_MESSAGES/messages.po +++ b/src/leettools/common/i18n/locales/en/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2025-03-08 17:48-0800\n" +"POT-Creation-Date: 2025-03-16 23:00-0700\n" "PO-Revision-Date: 2025-03-08 15:55-0800\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -18,59 +18,73 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.16.0\n" -#: ../../settings.py:635 +#: ../../settings.py:731 +#: ../../settings.py:731 msgid "LLM API Key used in the inference process." msgstr "" -#: ../../settings.py:642 +#: ../../settings.py:738 +#: ../../settings.py:738 msgid "LLM Base URL used in the inference process." msgstr "" -#: ../../settings.py:649 +#: ../../settings.py:745 +#: ../../settings.py:745 msgid "Default inference model used in the inference process." msgstr "" -#: ../../settings.py:656 +#: ../../settings.py:752 +#: ../../settings.py:752 msgid "Default dense embedding model used in the embedding process." msgstr "" -#: ../../settings.py:665 +#: ../../settings.py:761 +#: ../../settings.py:761 msgid "Dense embedding model dimension." msgstr "" -#: ../../settings.py:672 +#: ../../settings.py:768 +#: ../../settings.py:768 msgid "API Key used for the embedder." msgstr "" -#: ../../settings.py:679 +#: ../../settings.py:775 +#: ../../settings.py:775 msgid "Base URL for the the embedder service." msgstr "" -#: ../../settings.py:686 +#: ../../settings.py:782 +#: ../../settings.py:782 msgid "API Key used in the reranking process." msgstr "" -#: ../../settings.py:693 +#: ../../settings.py:789 +#: ../../settings.py:789 msgid "Base url used in the reranking process." msgstr "" -#: ../../settings.py:700 +#: ../../settings.py:796 +#: ../../settings.py:796 msgid "Default rerank model used in the rerank process." msgstr "" -#: ../../settings.py:707 +#: ../../settings.py:803 +#: ../../settings.py:803 msgid "Google API Key used in the search process." msgstr "" -#: ../../settings.py:714 +#: ../../settings.py:810 +#: ../../settings.py:810 msgid "Google custom search Key used in the search process." msgstr "" -#: ../../settings.py:721 +#: ../../settings.py:817 +#: ../../settings.py:817 msgid "Google custom search Key for patent used in the search process." msgstr "" -#: ../../settings.py:730 +#: ../../settings.py:826 +#: ../../settings.py:826 msgid "Tavily API Key used in the search process." msgstr "" @@ -212,131 +226,132 @@ msgid "" " local KB, filters by the import time." msgstr "" -#: ../../flow/flow_option_items.py:221 +#: ../../flow/flow_option_items.py:222 msgid "Max search Results" msgstr "" -#: ../../flow/flow_option_items.py:222 -msgid "" -"The maximum number of search results for retrievers to return. Each " -"retriever may have different paging mechanisms. Use the parameter and the" -" search iteration to control the number of results." +#: ../../flow/flow_option_items.py:223 +msgid "The maximum number of search results for retrievers to return. Each retriever may have different paging mechanisms. Use the parameter and the search iteration to control the number of results.If the retieval is local, -1 here means process all documents." msgstr "" -#: ../../flow/flow_option_items.py:239 +#: ../../flow/flow_option_items.py:238 msgid "Rewrite Search Keywords" msgstr "" -#: ../../flow/flow_option_items.py:240 +#: ../../flow/flow_option_items.py:239 msgid "Ask the LLM to generate search keywords from the search query." msgstr "" -#: ../../flow/flow_option_items.py:253 +#: ../../flow/flow_option_items.py:252 msgid "Search Language" msgstr "" -#: ../../flow/flow_option_items.py:254 +#: ../../flow/flow_option_items.py:253 msgid "The language used for keyword search if the search API supports." msgstr "" -#: ../../flow/flow_option_items.py:269 +#: ../../flow/flow_option_items.py:268 msgid "Output Language" msgstr "" -#: ../../flow/flow_option_items.py:270 +#: ../../flow/flow_option_items.py:269 msgid "Output the result in the language." msgstr "" -#: ../../flow/flow_option_items.py:283 +#: ../../flow/flow_option_items.py:282 msgid "Output Example" msgstr "" -#: ../../flow/flow_option_items.py:284 +#: ../../flow/flow_option_items.py:283 msgid "" "The example of the expected output content. If left empty, no example " "will be provided to LLM." msgstr "" -#: ../../flow/flow_option_items.py:301 +#: ../../flow/flow_option_items.py:300 msgid "Number of Sections" msgstr "" -#: ../../flow/flow_option_items.py:302 +#: ../../flow/flow_option_items.py:301 msgid "" "The number of sections in the output article. If left empty, the planning" " agent will decide automatically." msgstr "" -#: ../../flow/flow_option_items.py:318 +#: ../../flow/flow_option_items.py:317 msgid "Article Style" msgstr "" -#: ../../flow/flow_option_items.py:319 +#: ../../flow/flow_option_items.py:318 msgid "" "The style of the output article such as analytical research reports, " "humorous news articles, or technical blog posts." msgstr "" -#: ../../flow/flow_option_items.py:336 +#: ../../flow/flow_option_items.py:335 msgid "Word Count" msgstr "" -#: ../../flow/flow_option_items.py:337 +#: ../../flow/flow_option_items.py:336 msgid "The number of words in the output section. Empty means automatics." msgstr "" -#: ../../flow/flow_option_items.py:352 +#: ../../flow/flow_option_items.py:351 msgid "Extract Instruction" msgstr "" -#: ../../flow/flow_option_items.py:353 +#: ../../flow/flow_option_items.py:352 msgid "Describe what information to extract from the content." msgstr "" -#: ../../flow/flow_option_items.py:378 +#: ../../flow/flow_option_items.py:377 msgid "Extract Pydantic Model" msgstr "" -#: ../../flow/flow_option_items.py:379 +#: ../../flow/flow_option_items.py:378 msgid "" -"The schema of the target data as a pydantic model, see " -"https://docs.pydantic.dev" +"The schema of the target data as a pydantic model. Can be a single line " +"string as the file path to the pydantic model, or a multi-line string as " +"the pydantic model definition." +"The schema of the target data as a pydantic model. Can be a single line " +"string as the file path to the pydantic model, or a multi-line string as " +"the pydantic model definition." msgstr "" -#: ../../flow/flow_option_items.py:401 +#: ../../flow/flow_option_items.py:402 msgid "Extract Schema as JSON" msgstr "" -#: ../../flow/flow_option_items.py:402 +#: ../../flow/flow_option_items.py:403 msgid "The schema of the extracted information. Should be a JSON string." msgstr "" -#: ../../flow/flow_option_items.py:444 +#: ../../flow/flow_option_items.py:445 msgid "Extraction Instructions in Python" msgstr "" -#: ../../flow/flow_option_items.py:445 +#: ../../flow/flow_option_items.py:446 msgid "" "The instructions of the extractions in Python code. Right now the " "required variables are 'target_model_name' and 'instructions'. Also we " "need to specify the key fields and verify fields if needed." msgstr "" -#: ../../flow/flow_option_items.py:482 +#: ../../flow/flow_option_items.py:483 msgid "Target Pydantic Model Name used in the final list" msgstr "" -#: ../../flow/flow_option_items.py:483 +#: ../../flow/flow_option_items.py:484 msgid "" "There might be multiple Pydantic models in the schema definition. Specify" " which model to use for the final list." msgstr "" -#: ../../flow/flow_option_items.py:501 +#: ../../flow/flow_option_items.py:502 msgid "Key Fields" msgstr "" -#: ../../flow/flow_option_items.py:502 +#: ../../flow/flow_option_items.py:503 msgid "" "Comma separated field names that identifies an object in the extraction. " "Extracted data with the same key fields will be considered of the same " @@ -346,11 +361,11 @@ msgid "" "unique." msgstr "" -#: ../../flow/flow_option_items.py:521 +#: ../../flow/flow_option_items.py:522 msgid "Save extracted data to backend" msgstr "" -#: ../../flow/flow_option_items.py:522 +#: ../../flow/flow_option_items.py:523 msgid "" "Save the extracted data to the backend. Default True. If False, the " "extracted data will not be saved. The saved data will have the same " @@ -358,11 +373,11 @@ msgid "" "time and the original document URI." msgstr "" -#: ../../flow/flow_option_items.py:540 +#: ../../flow/flow_option_items.py:541 msgid "Verification Fields" msgstr "" -#: ../../flow/flow_option_items.py:541 +#: ../../flow/flow_option_items.py:542 msgid "" "Comma separated field names that need to be verified for the extracted " "objects. For example, although the address of a company is not in the key" @@ -371,111 +386,110 @@ msgid "" "no verification will be performed." msgstr "" -#: ../../flow/flow_option_items.py:559 +#: ../../flow/flow_option_items.py:560 msgid "Output format" msgstr "" -#: ../../flow/flow_option_items.py:560 +#: ../../flow/flow_option_items.py:561 msgid "" "The output of the extracted data. Default is json. Currently also support" " csv, md." msgstr "" -#: ../../flow/flow_option_items.py:576 +#: ../../flow/flow_option_items.py:577 msgid "Reference Style" msgstr "" -#: ../../flow/flow_option_items.py:577 +#: ../../flow/flow_option_items.py:578 msgid "" "The style of the references in the output article. Right now support " "news, default, and full." msgstr "" -#: ../../flow/flow_option_items.py:595 +#: ../../flow/flow_option_items.py:596 msgid "Strict Context" msgstr "" -#: ../../flow/flow_option_items.py:596 +#: ../../flow/flow_option_items.py:597 msgid "When generating a section, whether to use strict context or not." msgstr "" -#: ../../flow/flow_option_items.py:613 +#: ../../flow/flow_option_items.py:614 msgid "Target Site" msgstr "" -#: ../../flow/flow_option_items.py:614 +#: ../../flow/flow_option_items.py:615 msgid "" "When searching the web, limit the search to this site. Empty means search" " all sites." msgstr "" -#: ../../flow/flow_option_items.py:632 +#: ../../flow/flow_option_items.py:633 msgid "Max iteration when using the web search retriever" msgstr "" -#: ../../flow/flow_option_items.py:633 +#: ../../flow/flow_option_items.py:634 msgid "If the max result is not reached, how many times we go to the next page." msgstr "" -#: ../../flow/flow_option_items.py:650 +#: ../../flow/flow_option_items.py:651 msgid "Recursive scrape" msgstr "" -#: ../../flow/flow_option_items.py:651 +#: ../../flow/flow_option_items.py:652 msgid "If true, scrape the top urls found in the search results documents." msgstr "" -#: ../../flow/flow_option_items.py:668 +#: ../../flow/flow_option_items.py:669 msgid "Recursive scrape iteration" msgstr "" -#: ../../flow/flow_option_items.py:669 +#: ../../flow/flow_option_items.py:670 msgid "" "When we do recursive scraping, we will not stop until we reach the max " "number of results or the number of iterations specified here." msgstr "" -#: ../../flow/flow_option_items.py:687 +#: ../../flow/flow_option_items.py:688 msgid "Recursive scrape max item count" msgstr "" -#: ../../flow/flow_option_items.py:688 +#: ../../flow/flow_option_items.py:689 msgid "" "When we do recursive scraping, we will not stop until we reach the number" " of max iterations or the max number of results specified here." msgstr "" -#: ../../flow/flow_option_items.py:706 +#: ../../flow/flow_option_items.py:707 msgid "Image Search" msgstr "" -#: ../../flow/flow_option_items.py:707 +#: ../../flow/flow_option_items.py:708 msgid "When searching on the web, limit the search to image search. " msgstr "" -#: ../../flow/flow_option_items.py:722 +#: ../../flow/flow_option_items.py:723 msgid "Excluded Site" msgstr "" -#: ../../flow/flow_option_items.py:723 +#: ../../flow/flow_option_items.py:724 msgid "" "List of sites separated by comma to ignore when search for the " "information. Empty means no filter." msgstr "" -#: ../../flow/flow_option_items.py:741 +#: ../../flow/flow_option_items.py:742 msgid "Docsource UUID" msgstr "" -#: ../../flow/flow_option_items.py:742 +#: ../../flow/flow_option_items.py:743 msgid "The docsource uuid to run the query on when querying local KB." msgstr "" -#: ../../flow/flow_option_items.py:757 +#: ../../flow/flow_option_items.py:758 msgid "Context Limit" msgstr "" -#: ../../flow/flow_option_items.py:758 +#: ../../flow/flow_option_items.py:759 msgid "Override the context limit from the model info." msgstr "" - diff --git a/src/leettools/common/i18n/locales/ja/LC_MESSAGES/messages.po b/src/leettools/common/i18n/locales/ja/LC_MESSAGES/messages.po index 9acb4f8..ab233e8 100644 --- a/src/leettools/common/i18n/locales/ja/LC_MESSAGES/messages.po +++ b/src/leettools/common/i18n/locales/ja/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2025-03-08 17:48-0800\n" +"POT-Creation-Date: 2025-03-16 23:00-0700\n" "PO-Revision-Date: 2025-03-08 15:55-0800\n" "Last-Translator: FULL NAME \n" "Language: ja\n" @@ -18,59 +18,73 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.16.0\n" -#: ../../settings.py:635 +#: ../../settings.py:731 +#: ../../settings.py:731 msgid "LLM API Key used in the inference process." msgstr "推論プロセスで使用されるLLM APIキー。" -#: ../../settings.py:642 +#: ../../settings.py:738 +#: ../../settings.py:738 msgid "LLM Base URL used in the inference process." msgstr "推論プロセスで使用されるLLMベースURL。" -#: ../../settings.py:649 +#: ../../settings.py:745 +#: ../../settings.py:745 msgid "Default inference model used in the inference process." msgstr "推論プロセスで使用されるデフォルトの推論モデル。" -#: ../../settings.py:656 +#: ../../settings.py:752 +#: ../../settings.py:752 msgid "Default dense embedding model used in the embedding process." msgstr "埋め込みプロセスで使用されるデフォルトの密な埋め込みモデル。" -#: ../../settings.py:665 +#: ../../settings.py:761 +#: ../../settings.py:761 msgid "Dense embedding model dimension." msgstr "密な埋め込みモデルの次元。" -#: ../../settings.py:672 +#: ../../settings.py:768 +#: ../../settings.py:768 msgid "API Key used for the embedder." msgstr "埋め込み器で使用されるAPIキー。" -#: ../../settings.py:679 +#: ../../settings.py:775 +#: ../../settings.py:775 msgid "Base URL for the the embedder service." msgstr "埋め込みサービスのベースURL。" -#: ../../settings.py:686 +#: ../../settings.py:782 +#: ../../settings.py:782 msgid "API Key used in the reranking process." msgstr "再ランク付けプロセスで使用されるAPIキー。" -#: ../../settings.py:693 +#: ../../settings.py:789 +#: ../../settings.py:789 msgid "Base url used in the reranking process." msgstr "再ランク付けプロセスで使用されるベースURL。" -#: ../../settings.py:700 +#: ../../settings.py:796 +#: ../../settings.py:796 msgid "Default rerank model used in the rerank process." msgstr "再ランク付けプロセスで使用されるデフォルトの再ランクモデル。" -#: ../../settings.py:707 +#: ../../settings.py:803 +#: ../../settings.py:803 msgid "Google API Key used in the search process." msgstr "検索プロセスで使用されるGoogle APIキー。" -#: ../../settings.py:714 +#: ../../settings.py:810 +#: ../../settings.py:810 msgid "Google custom search Key used in the search process." msgstr "検索プロセスで使用されるGoogleカスタム検索キー。" -#: ../../settings.py:721 +#: ../../settings.py:817 +#: ../../settings.py:817 msgid "Google custom search Key for patent used in the search process." msgstr "検索プロセスで使用される特許用Googleカスタム検索キー。" -#: ../../settings.py:730 +#: ../../settings.py:826 +#: ../../settings.py:826 msgid "Tavily API Key used in the search process." msgstr "検索プロセスで使用されるTavily APIキー。" @@ -213,131 +227,129 @@ msgid "" " local KB, filters by the import time." msgstr "検索結果を制限する日数。0または空は制限なしを意味します。ローカルKBでは、インポート時間でフィルタリングします。" -#: ../../flow/flow_option_items.py:221 +#: ../../flow/flow_option_items.py:222 msgid "Max search Results" msgstr "最大検索結果数" -#: ../../flow/flow_option_items.py:222 -msgid "" -"The maximum number of search results for retrievers to return. Each " -"retriever may have different paging mechanisms. Use the parameter and the" -" search iteration to control the number of results." +#: ../../flow/flow_option_items.py:223 +msgid "The maximum number of search results for retrievers to return. Each retriever may have different paging mechanisms. Use the parameter and the search iteration to control the number of results.If the retieval is local, -1 here means process all documents." msgstr "リトリーバーが返す検索結果の最大数。各リトリーバーは異なるページング機構を持つ場合があります。パラメータと検索反復を使用して結果の数を制御します。" -#: ../../flow/flow_option_items.py:239 +#: ../../flow/flow_option_items.py:238 msgid "Rewrite Search Keywords" msgstr "検索キーワードの書き換え" -#: ../../flow/flow_option_items.py:240 +#: ../../flow/flow_option_items.py:239 msgid "Ask the LLM to generate search keywords from the search query." msgstr "検索クエリから検索キーワードを生成するようLLMに依頼します。" -#: ../../flow/flow_option_items.py:253 +#: ../../flow/flow_option_items.py:252 msgid "Search Language" msgstr "検索言語" -#: ../../flow/flow_option_items.py:254 +#: ../../flow/flow_option_items.py:253 msgid "The language used for keyword search if the search API supports." msgstr "検索APIがサポートしている場合のキーワード検索に使用される言語。" -#: ../../flow/flow_option_items.py:269 +#: ../../flow/flow_option_items.py:268 msgid "Output Language" msgstr "出力言語" -#: ../../flow/flow_option_items.py:270 +#: ../../flow/flow_option_items.py:269 msgid "Output the result in the language." msgstr "結果をその言語で出力します。" -#: ../../flow/flow_option_items.py:283 +#: ../../flow/flow_option_items.py:282 msgid "Output Example" msgstr "出力例" -#: ../../flow/flow_option_items.py:284 +#: ../../flow/flow_option_items.py:283 msgid "" "The example of the expected output content. If left empty, no example " "will be provided to LLM." msgstr "期待される出力内容の例。空の場合、LLMに例は提供されません。" -#: ../../flow/flow_option_items.py:301 +#: ../../flow/flow_option_items.py:300 msgid "Number of Sections" msgstr "セクション数" -#: ../../flow/flow_option_items.py:302 +#: ../../flow/flow_option_items.py:301 msgid "" "The number of sections in the output article. If left empty, the planning" " agent will decide automatically." msgstr "出力記事のセクション数。空の場合、プランニングエージェントが自動的に決定します。" -#: ../../flow/flow_option_items.py:318 +#: ../../flow/flow_option_items.py:317 msgid "Article Style" msgstr "記事スタイル" -#: ../../flow/flow_option_items.py:319 +#: ../../flow/flow_option_items.py:318 msgid "" "The style of the output article such as analytical research reports, " "humorous news articles, or technical blog posts." msgstr "分析的な研究レポート、ユーモアのあるニュース記事、技術ブログ投稿などの出力記事のスタイル。" -#: ../../flow/flow_option_items.py:336 +#: ../../flow/flow_option_items.py:335 msgid "Word Count" msgstr "単語数" -#: ../../flow/flow_option_items.py:337 +#: ../../flow/flow_option_items.py:336 msgid "The number of words in the output section. Empty means automatics." msgstr "出力セクションの単語数。空は自動を意味します。" -#: ../../flow/flow_option_items.py:352 +#: ../../flow/flow_option_items.py:351 msgid "Extract Instruction" msgstr "抽出指示" -#: ../../flow/flow_option_items.py:353 +#: ../../flow/flow_option_items.py:352 msgid "Describe what information to extract from the content." msgstr "コンテンツから抽出する情報を説明します。" -#: ../../flow/flow_option_items.py:378 +#: ../../flow/flow_option_items.py:377 msgid "Extract Pydantic Model" msgstr "Pydanticモデルの抽出" -#: ../../flow/flow_option_items.py:379 +#: ../../flow/flow_option_items.py:378 msgid "" -"The schema of the target data as a pydantic model, see " -"https://docs.pydantic.dev" -msgstr "ターゲットデータのスキーマをpydanticモデルとして定義します。https://docs.pydantic.dev を参照してください。" +"The schema of the target data as a pydantic model. Can be a single line " +"string as the file path to the pydantic model, or a multi-line string as " +"the pydantic model definition." +msgstr "ターゲットデータのスキーマをpydanticモデルとして定義します。単一行の文字列としてpydanticモデルのファイルパス、または複数行の文字列としてpydanticモデルの定義を指定できます。" -#: ../../flow/flow_option_items.py:401 +#: ../../flow/flow_option_items.py:402 msgid "Extract Schema as JSON" msgstr "JSONとしてスキーマを抽出" -#: ../../flow/flow_option_items.py:402 +#: ../../flow/flow_option_items.py:403 msgid "The schema of the extracted information. Should be a JSON string." msgstr "抽出された情報のスキーマ。JSON文字列である必要があります。" -#: ../../flow/flow_option_items.py:444 +#: ../../flow/flow_option_items.py:445 msgid "Extraction Instructions in Python" msgstr "Pythonでの抽出指示" -#: ../../flow/flow_option_items.py:445 +#: ../../flow/flow_option_items.py:446 msgid "" "The instructions of the extractions in Python code. Right now the " "required variables are 'target_model_name' and 'instructions'. Also we " "need to specify the key fields and verify fields if needed." msgstr "Pythonコードでの抽出指示。現在、必要な変数は'target_model_name'と'instructions'です。また、必要に応じてキーフィールドと検証フィールドを指定する必要があります。" -#: ../../flow/flow_option_items.py:482 +#: ../../flow/flow_option_items.py:483 msgid "Target Pydantic Model Name used in the final list" msgstr "最終リストで使用されるターゲットPydanticモデル名" -#: ../../flow/flow_option_items.py:483 +#: ../../flow/flow_option_items.py:484 msgid "" "There might be multiple Pydantic models in the schema definition. Specify" " which model to use for the final list." msgstr "スキーマ定義に複数のPydanticモデルが存在する可能性があります。最終リストに使用するモデルを指定してください。" -#: ../../flow/flow_option_items.py:501 +#: ../../flow/flow_option_items.py:502 msgid "Key Fields" msgstr "キーフィールド" -#: ../../flow/flow_option_items.py:502 +#: ../../flow/flow_option_items.py:503 msgid "" "Comma separated field names that identifies an object in the extraction. " "Extracted data with the same key fields will be considered of the same " @@ -347,11 +359,11 @@ msgid "" "unique." msgstr "抽出時にオブジェクトを識別するカンマ区切りのフィールド名。同じキーフィールドを持つ抽出データは同じオブジェクトとみなされます。同じオブジェクトの抽出されたすべてのバージョンはそれらに基づいて重複排除されます。キーフィールドは抽出された情報のスキーマに存在する必要があります。空の場合、抽出された各オブジェクトは一意とみなされます。" -#: ../../flow/flow_option_items.py:521 +#: ../../flow/flow_option_items.py:522 msgid "Save extracted data to backend" msgstr "抽出データをバックエンドに保存" -#: ../../flow/flow_option_items.py:522 +#: ../../flow/flow_option_items.py:523 msgid "" "Save the extracted data to the backend. Default True. If False, the " "extracted data will not be saved. The saved data will have the same " @@ -359,11 +371,11 @@ msgid "" "time and the original document URI." msgstr "抽出データをバックエンドに保存します。デフォルトはTrue。Falseの場合、抽出データは保存されません。保存されたデータはpydanticモデルで指定されたのと同じスキーマを持ち、インポート時間や元のドキュメントURIなどのメタデータも含まれます。" -#: ../../flow/flow_option_items.py:540 +#: ../../flow/flow_option_items.py:541 msgid "Verification Fields" msgstr "検証フィールド" -#: ../../flow/flow_option_items.py:541 +#: ../../flow/flow_option_items.py:542 msgid "" "Comma separated field names that need to be verified for the extracted " "objects. For example, although the address of a company is not in the key" @@ -372,110 +384,124 @@ msgid "" "no verification will be performed." msgstr "抽出されたオブジェクトに対して検証が必要なカンマ区切りのフィールド名。例えば、会社の住所はキーフィールドにはなく、会社は異なるオフィスに複数の住所を持つ可能性がありますが、抽出されたすべての住所を検証し重複排除したい場合があります。空の場合、検証は実行されません。" -#: ../../flow/flow_option_items.py:559 +#: ../../flow/flow_option_items.py:560 msgid "Output format" msgstr "出力形式" -#: ../../flow/flow_option_items.py:560 +#: ../../flow/flow_option_items.py:561 msgid "" "The output of the extracted data. Default is json. Currently also support" " csv, md." msgstr "抽出データの出力形式。デフォルトはjsonです。現在、csv、mdもサポートしています。" -#: ../../flow/flow_option_items.py:576 +#: ../../flow/flow_option_items.py:577 msgid "Reference Style" msgstr "参照スタイル" -#: ../../flow/flow_option_items.py:577 +#: ../../flow/flow_option_items.py:578 msgid "" "The style of the references in the output article. Right now support " "news, default, and full." msgstr "出力記事の参照のスタイル。現在、news、default、fullをサポートしています。" -#: ../../flow/flow_option_items.py:595 +#: ../../flow/flow_option_items.py:596 msgid "Strict Context" msgstr "厳密なコンテキスト" -#: ../../flow/flow_option_items.py:596 +#: ../../flow/flow_option_items.py:597 msgid "When generating a section, whether to use strict context or not." msgstr "セクションを生成する際に、厳密なコンテキストを使用するかどうか。" -#: ../../flow/flow_option_items.py:613 +#: ../../flow/flow_option_items.py:614 msgid "Target Site" msgstr "ターゲットサイト" -#: ../../flow/flow_option_items.py:614 +#: ../../flow/flow_option_items.py:615 msgid "" "When searching the web, limit the search to this site. Empty means search" " all sites." msgstr "ウェブ検索時に、このサイトに検索を制限します。空はすべてのサイトを検索することを意味します。" -#: ../../flow/flow_option_items.py:632 +#: ../../flow/flow_option_items.py:633 msgid "Max iteration when using the web search retriever" msgstr "ウェブ検索リトリーバー使用時の最大反復回数" -#: ../../flow/flow_option_items.py:633 +#: ../../flow/flow_option_items.py:634 msgid "If the max result is not reached, how many times we go to the next page." msgstr "最大結果に達していない場合、次のページに何回移動するか。" -#: ../../flow/flow_option_items.py:650 +#: ../../flow/flow_option_items.py:651 msgid "Recursive scrape" msgstr "再帰的スクレイピング" -#: ../../flow/flow_option_items.py:651 +#: ../../flow/flow_option_items.py:652 msgid "If true, scrape the top urls found in the search results documents." msgstr "trueの場合、検索結果文書で見つかった上位のURLをスクレイピングします。" -#: ../../flow/flow_option_items.py:668 +#: ../../flow/flow_option_items.py:669 msgid "Recursive scrape iteration" msgstr "再帰的スクレイピングの反復" -#: ../../flow/flow_option_items.py:669 +#: ../../flow/flow_option_items.py:670 msgid "" "When we do recursive scraping, we will not stop until we reach the max " "number of results or the number of iterations specified here." msgstr "再帰的スクレイピングを行う場合、最大結果数またはここで指定された反復回数に達するまで停止しません。" -#: ../../flow/flow_option_items.py:687 +#: ../../flow/flow_option_items.py:688 msgid "Recursive scrape max item count" msgstr "再帰的スクレイピングの最大項目数" -#: ../../flow/flow_option_items.py:688 +#: ../../flow/flow_option_items.py:689 msgid "" "When we do recursive scraping, we will not stop until we reach the number" " of max iterations or the max number of results specified here." msgstr "再帰的スクレイピングを行う場合、最大反復回数またはここで指定された最大結果数に達するまで停止しません。" -#: ../../flow/flow_option_items.py:706 +#: ../../flow/flow_option_items.py:707 msgid "Image Search" msgstr "画像検索" -#: ../../flow/flow_option_items.py:707 +#: ../../flow/flow_option_items.py:708 msgid "When searching on the web, limit the search to image search. " msgstr "ウェブ検索時に、検索を画像検索に制限します。" -#: ../../flow/flow_option_items.py:722 +#: ../../flow/flow_option_items.py:723 msgid "Excluded Site" msgstr "除外サイト" -#: ../../flow/flow_option_items.py:723 +#: ../../flow/flow_option_items.py:724 msgid "" "List of sites separated by comma to ignore when search for the " "information. Empty means no filter." msgstr "情報を検索する際に無視するサイトのカンマ区切りリスト。空はフィルターなしを意味します。" -#: ../../flow/flow_option_items.py:741 +#: ../../flow/flow_option_items.py:742 msgid "Docsource UUID" msgstr "ドキュメントソースUUID" -#: ../../flow/flow_option_items.py:742 +#: ../../flow/flow_option_items.py:743 msgid "The docsource uuid to run the query on when querying local KB." msgstr "ローカルKBを照会する際にクエリを実行するドキュメントソースUUID。" -#: ../../flow/flow_option_items.py:757 +#: ../../flow/flow_option_items.py:758 msgid "Context Limit" msgstr "コンテキスト制限" -#: ../../flow/flow_option_items.py:758 +#: ../../flow/flow_option_items.py:759 msgid "Override the context limit from the model info." msgstr "モデル情報からのコンテキスト制限を上書きします。" + +#~ msgid "" +#~ "The schema of the target data as" +#~ " a pydantic model, see " +#~ "https://docs.pydantic.dev" +#~ msgstr "ターゲットデータのスキーマをpydanticモデルとして定義します。https://docs.pydantic.dev を参照してください。" + + +#~ msgid "" +#~ "The schema of the target data as" +#~ " a pydantic model, see " +#~ "https://docs.pydantic.dev" +#~ msgstr "ターゲットデータのスキーマをpydanticモデルとして定義します。https://docs.pydantic.dev を参照してください。" + diff --git a/src/leettools/common/i18n/locales/zh/LC_MESSAGES/messages.po b/src/leettools/common/i18n/locales/zh/LC_MESSAGES/messages.po index 9d92cfd..2946f97 100644 --- a/src/leettools/common/i18n/locales/zh/LC_MESSAGES/messages.po +++ b/src/leettools/common/i18n/locales/zh/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2025-03-08 17:48-0800\n" +"POT-Creation-Date: 2025-03-16 23:00-0700\n" "PO-Revision-Date: 2025-03-08 15:55-0800\n" "Last-Translator: FULL NAME \n" "Language: zh\n" @@ -18,59 +18,73 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.16.0\n" -#: ../../settings.py:635 +#: ../../settings.py:731 +#: ../../settings.py:731 msgid "LLM API Key used in the inference process." msgstr "推理过程中使用的LLM API密钥。" -#: ../../settings.py:642 +#: ../../settings.py:738 +#: ../../settings.py:738 msgid "LLM Base URL used in the inference process." msgstr "推理过程中使用的LLM基础URL。" -#: ../../settings.py:649 +#: ../../settings.py:745 +#: ../../settings.py:745 msgid "Default inference model used in the inference process." msgstr "推理过程中使用的默认推理模型。" -#: ../../settings.py:656 +#: ../../settings.py:752 +#: ../../settings.py:752 msgid "Default dense embedding model used in the embedding process." msgstr "嵌入过程中使用的默认密集嵌入模型。" -#: ../../settings.py:665 +#: ../../settings.py:761 +#: ../../settings.py:761 msgid "Dense embedding model dimension." msgstr "密集嵌入模型维度。" -#: ../../settings.py:672 +#: ../../settings.py:768 +#: ../../settings.py:768 msgid "API Key used for the embedder." msgstr "嵌入器使用的API密钥。" -#: ../../settings.py:679 +#: ../../settings.py:775 +#: ../../settings.py:775 msgid "Base URL for the the embedder service." msgstr "嵌入器服务的基础URL。" -#: ../../settings.py:686 +#: ../../settings.py:782 +#: ../../settings.py:782 msgid "API Key used in the reranking process." msgstr "重排序过程中使用的API密钥。" -#: ../../settings.py:693 +#: ../../settings.py:789 +#: ../../settings.py:789 msgid "Base url used in the reranking process." msgstr "重排序过程中使用的基础URL。" -#: ../../settings.py:700 +#: ../../settings.py:796 +#: ../../settings.py:796 msgid "Default rerank model used in the rerank process." msgstr "重排序过程中使用的默认重排序模型。" -#: ../../settings.py:707 +#: ../../settings.py:803 +#: ../../settings.py:803 msgid "Google API Key used in the search process." msgstr "搜索过程中使用的Google API密钥。" -#: ../../settings.py:714 +#: ../../settings.py:810 +#: ../../settings.py:810 msgid "Google custom search Key used in the search process." msgstr "搜索过程中使用的Google自定义搜索密钥。" -#: ../../settings.py:721 +#: ../../settings.py:817 +#: ../../settings.py:817 msgid "Google custom search Key for patent used in the search process." msgstr "搜索过程中使用的Google专利自定义搜索密钥。" -#: ../../settings.py:730 +#: ../../settings.py:826 +#: ../../settings.py:826 msgid "Tavily API Key used in the search process." msgstr "搜索过程中使用的Tavily API密钥。" @@ -213,131 +227,129 @@ msgid "" " local KB, filters by the import time." msgstr "限制搜索结果的天数。0或空表示无限制。在本地知识库中,按导入时间过滤。" -#: ../../flow/flow_option_items.py:221 +#: ../../flow/flow_option_items.py:222 msgid "Max search Results" msgstr "最大搜索结果" -#: ../../flow/flow_option_items.py:222 -msgid "" -"The maximum number of search results for retrievers to return. Each " -"retriever may have different paging mechanisms. Use the parameter and the" -" search iteration to control the number of results." -msgstr "检索器返回的最大搜索结果数。每个检索器可能有不同的分页机制。使用参数和搜索迭代来控制结果数量。" +#: ../../flow/flow_option_items.py:223 +msgid "The maximum number of search results for retrievers to return. Each retriever may have different paging mechanisms. Use the parameter and the search iteration to control the number of results.If the retieval is local, -1 here means process all documents." +msgstr "检索器返回的最大搜索结果数。每个检索器可能有不同的分页机制。使用参数和搜索迭代来控制结果数量。如果检索是本地的,-1表示处理所有文档。" -#: ../../flow/flow_option_items.py:239 +#: ../../flow/flow_option_items.py:238 msgid "Rewrite Search Keywords" msgstr "重写搜索关键词" -#: ../../flow/flow_option_items.py:240 +#: ../../flow/flow_option_items.py:239 msgid "Ask the LLM to generate search keywords from the search query." msgstr "要求LLM从搜索查询生成搜索关键词。" -#: ../../flow/flow_option_items.py:253 +#: ../../flow/flow_option_items.py:252 msgid "Search Language" msgstr "搜索语言" -#: ../../flow/flow_option_items.py:254 +#: ../../flow/flow_option_items.py:253 msgid "The language used for keyword search if the search API supports." msgstr "如果搜索API支持,用于关键词搜索的语言。" -#: ../../flow/flow_option_items.py:269 +#: ../../flow/flow_option_items.py:268 msgid "Output Language" msgstr "输出语言" -#: ../../flow/flow_option_items.py:270 +#: ../../flow/flow_option_items.py:269 msgid "Output the result in the language." msgstr "用指定语言输出结果。" -#: ../../flow/flow_option_items.py:283 +#: ../../flow/flow_option_items.py:282 msgid "Output Example" msgstr "输出示例" -#: ../../flow/flow_option_items.py:284 +#: ../../flow/flow_option_items.py:283 msgid "" "The example of the expected output content. If left empty, no example " "will be provided to LLM." msgstr "预期输出内容的示例。如果留空,将不会向LLM提供示例。" -#: ../../flow/flow_option_items.py:301 +#: ../../flow/flow_option_items.py:300 msgid "Number of Sections" msgstr "章节数量" -#: ../../flow/flow_option_items.py:302 +#: ../../flow/flow_option_items.py:301 msgid "" "The number of sections in the output article. If left empty, the planning" " agent will decide automatically." msgstr "输出文章中的章节数量。如果留空,规划代理将自动决定。" -#: ../../flow/flow_option_items.py:318 +#: ../../flow/flow_option_items.py:317 msgid "Article Style" msgstr "文章风格" -#: ../../flow/flow_option_items.py:319 +#: ../../flow/flow_option_items.py:318 msgid "" "The style of the output article such as analytical research reports, " "humorous news articles, or technical blog posts." msgstr "输出文章的风格,如分析研究报告、幽默新闻文章或技术博客文章。" -#: ../../flow/flow_option_items.py:336 +#: ../../flow/flow_option_items.py:335 msgid "Word Count" msgstr "字数" -#: ../../flow/flow_option_items.py:337 +#: ../../flow/flow_option_items.py:336 msgid "The number of words in the output section. Empty means automatics." msgstr "输出部分的字数。空表示自动。" -#: ../../flow/flow_option_items.py:352 +#: ../../flow/flow_option_items.py:351 msgid "Extract Instruction" msgstr "提取指令" -#: ../../flow/flow_option_items.py:353 +#: ../../flow/flow_option_items.py:352 msgid "Describe what information to extract from the content." msgstr "描述从内容中提取什么信息。" -#: ../../flow/flow_option_items.py:378 +#: ../../flow/flow_option_items.py:377 msgid "Extract Pydantic Model" msgstr "提取Pydantic模型" -#: ../../flow/flow_option_items.py:379 +#: ../../flow/flow_option_items.py:378 msgid "" -"The schema of the target data as a pydantic model, see " -"https://docs.pydantic.dev" -msgstr "目标数据的模式作为pydantic模型,参见https://docs.pydantic.dev" +"The schema of the target data as a pydantic model. Can be a single line " +"string as the file path to the pydantic model, or a multi-line string as " +"the pydantic model definition." +msgstr "目标数据的模式作为pydantic模型。可以作为pydantic模型文件路径的单行字符串,或者作为pydantic模型定义的多行字符串。" -#: ../../flow/flow_option_items.py:401 +#: ../../flow/flow_option_items.py:402 msgid "Extract Schema as JSON" msgstr "将模式提取为JSON" -#: ../../flow/flow_option_items.py:402 +#: ../../flow/flow_option_items.py:403 msgid "The schema of the extracted information. Should be a JSON string." msgstr "提取信息的模式。应该是JSON字符串。" -#: ../../flow/flow_option_items.py:444 +#: ../../flow/flow_option_items.py:445 msgid "Extraction Instructions in Python" msgstr "Python中的提取指令" -#: ../../flow/flow_option_items.py:445 +#: ../../flow/flow_option_items.py:446 msgid "" "The instructions of the extractions in Python code. Right now the " "required variables are 'target_model_name' and 'instructions'. Also we " "need to specify the key fields and verify fields if needed." msgstr "Python代码中的提取指令。目前所需的变量是'target_model_name'和'instructions'。如果需要,我们还需要指定关键字段和验证字段。" -#: ../../flow/flow_option_items.py:482 +#: ../../flow/flow_option_items.py:483 msgid "Target Pydantic Model Name used in the final list" msgstr "最终列表中使用的目标Pydantic模型名称" -#: ../../flow/flow_option_items.py:483 +#: ../../flow/flow_option_items.py:484 msgid "" "There might be multiple Pydantic models in the schema definition. Specify" " which model to use for the final list." msgstr "模式定义中可能有多个Pydantic模型。指定最终列表使用哪个模型。" -#: ../../flow/flow_option_items.py:501 +#: ../../flow/flow_option_items.py:502 msgid "Key Fields" msgstr "关键字段" -#: ../../flow/flow_option_items.py:502 +#: ../../flow/flow_option_items.py:503 msgid "" "Comma separated field names that identifies an object in the extraction. " "Extracted data with the same key fields will be considered of the same " @@ -347,11 +359,11 @@ msgid "" "unique." msgstr "用逗号分隔的字段名,用于标识提取中的对象。具有相同关键字段的提取数据将被视为同一对象。同一对象的所有提取版本将基于这些字段进行去重。关键字段应存在于提取信息的模式中。如果留空,每个提取的对象都将被视为唯一。" -#: ../../flow/flow_option_items.py:521 +#: ../../flow/flow_option_items.py:522 msgid "Save extracted data to backend" msgstr "将提取的数据保存到后端" -#: ../../flow/flow_option_items.py:522 +#: ../../flow/flow_option_items.py:523 msgid "" "Save the extracted data to the backend. Default True. If False, the " "extracted data will not be saved. The saved data will have the same " @@ -359,11 +371,11 @@ msgid "" "time and the original document URI." msgstr "将提取的数据保存到后端。默认为True。如果为False,提取的数据将不会被保存。保存的数据将具有pydantic模型中指定的相同模式,以及导入时间和原始文档URI等元数据。" -#: ../../flow/flow_option_items.py:540 +#: ../../flow/flow_option_items.py:541 msgid "Verification Fields" msgstr "验证字段" -#: ../../flow/flow_option_items.py:541 +#: ../../flow/flow_option_items.py:542 msgid "" "Comma separated field names that need to be verified for the extracted " "objects. For example, although the address of a company is not in the key" @@ -372,111 +384,123 @@ msgid "" "no verification will be performed." msgstr "需要为提取对象验证的字段名,用逗号分隔。例如,虽然公司地址不在关键字段中,且一个公司可能有多个办公室地址,我们想要验证并去重所有提取的地址。如果留空,将不执行验证。" -#: ../../flow/flow_option_items.py:559 +#: ../../flow/flow_option_items.py:560 msgid "Output format" msgstr "输出格式" -#: ../../flow/flow_option_items.py:560 +#: ../../flow/flow_option_items.py:561 msgid "" "The output of the extracted data. Default is json. Currently also support" " csv, md." msgstr "提取数据的输出格式。默认为json。目前还支持csv、md。" -#: ../../flow/flow_option_items.py:576 +#: ../../flow/flow_option_items.py:577 msgid "Reference Style" msgstr "引用样式" -#: ../../flow/flow_option_items.py:577 +#: ../../flow/flow_option_items.py:578 msgid "" "The style of the references in the output article. Right now support " "news, default, and full." msgstr "输出文章中引用的样式。目前支持新闻、默认和完整样式。" -#: ../../flow/flow_option_items.py:595 +#: ../../flow/flow_option_items.py:596 msgid "Strict Context" msgstr "严格上下文" -#: ../../flow/flow_option_items.py:596 +#: ../../flow/flow_option_items.py:597 msgid "When generating a section, whether to use strict context or not." msgstr "生成章节时是否使用严格上下文。" -#: ../../flow/flow_option_items.py:613 +#: ../../flow/flow_option_items.py:614 msgid "Target Site" msgstr "目标网站" -#: ../../flow/flow_option_items.py:614 +#: ../../flow/flow_option_items.py:615 msgid "" "When searching the web, limit the search to this site. Empty means search" " all sites." msgstr "在网络搜索时,将搜索限制在此网站。空表示搜索所有网站。" -#: ../../flow/flow_option_items.py:632 +#: ../../flow/flow_option_items.py:633 msgid "Max iteration when using the web search retriever" msgstr "使用网络搜索检索器时的最大迭代次数" -#: ../../flow/flow_option_items.py:633 +#: ../../flow/flow_option_items.py:634 msgid "If the max result is not reached, how many times we go to the next page." msgstr "如果未达到最大结果,我们翻到下一页的次数。" -#: ../../flow/flow_option_items.py:650 +#: ../../flow/flow_option_items.py:651 msgid "Recursive scrape" msgstr "递归抓取" -#: ../../flow/flow_option_items.py:651 +#: ../../flow/flow_option_items.py:652 msgid "If true, scrape the top urls found in the search results documents." msgstr "如果为真,抓取搜索结果文档中找到的顶部URL。" -#: ../../flow/flow_option_items.py:668 +#: ../../flow/flow_option_items.py:669 msgid "Recursive scrape iteration" msgstr "递归抓取迭代" -#: ../../flow/flow_option_items.py:669 +#: ../../flow/flow_option_items.py:670 msgid "" "When we do recursive scraping, we will not stop until we reach the max " "number of results or the number of iterations specified here." msgstr "当我们进行递归抓取时,我们不会停止,直到达到最大结果数或这里指定的迭代次数。" -#: ../../flow/flow_option_items.py:687 +#: ../../flow/flow_option_items.py:688 msgid "Recursive scrape max item count" msgstr "递归抓取最大项目数" -#: ../../flow/flow_option_items.py:688 +#: ../../flow/flow_option_items.py:689 msgid "" "When we do recursive scraping, we will not stop until we reach the number" " of max iterations or the max number of results specified here." msgstr "当我们进行递归抓取时,我们不会停止,直到达到最大迭代次数或这里指定的最大结果数。" -#: ../../flow/flow_option_items.py:706 +#: ../../flow/flow_option_items.py:707 msgid "Image Search" msgstr "图片搜索" -#: ../../flow/flow_option_items.py:707 +#: ../../flow/flow_option_items.py:708 msgid "When searching on the web, limit the search to image search. " msgstr "在网络搜索时,将搜索限制为图片搜索。" -#: ../../flow/flow_option_items.py:722 +#: ../../flow/flow_option_items.py:723 msgid "Excluded Site" msgstr "排除网站" -#: ../../flow/flow_option_items.py:723 +#: ../../flow/flow_option_items.py:724 msgid "" "List of sites separated by comma to ignore when search for the " "information. Empty means no filter." msgstr "搜索信息时要忽略的网站列表,用逗号分隔。空表示无过滤。" -#: ../../flow/flow_option_items.py:741 +#: ../../flow/flow_option_items.py:742 msgid "Docsource UUID" msgstr "文档源UUID" -#: ../../flow/flow_option_items.py:742 +#: ../../flow/flow_option_items.py:743 msgid "The docsource uuid to run the query on when querying local KB." msgstr "在查询本地知识库时运行查询的文档源UUID。" -#: ../../flow/flow_option_items.py:757 +#: ../../flow/flow_option_items.py:758 msgid "Context Limit" msgstr "上下文限制" -#: ../../flow/flow_option_items.py:758 +#: ../../flow/flow_option_items.py:759 msgid "Override the context limit from the model info." msgstr "覆盖模型信息中的上下文限制。" +#~ msgid "" +#~ "The schema of the target data as" +#~ " a pydantic model, see " +#~ "https://docs.pydantic.dev" +#~ msgstr "目标数据的模式作为pydantic模型,参见https://docs.pydantic.dev" + +#~ msgid "" +#~ "The schema of the target data as" +#~ " a pydantic model, see " +#~ "https://docs.pydantic.dev" +#~ msgstr "目标数据的模式作为pydantic模型,参见https://docs.pydantic.dev" + diff --git a/src/leettools/common/i18n/translator.py b/src/leettools/common/i18n/translator.py index 6654598..323a835 100644 --- a/src/leettools/common/i18n/translator.py +++ b/src/leettools/common/i18n/translator.py @@ -40,7 +40,7 @@ def get_translator(self, lang: Optional[str] = None) -> Callable[[str], str]: lang = self.default_language if lang not in self.translation_cache: - logger().noop(f"Translator cache miss for language: {lang}", noop_lvl=3) + logger().noop(f"Translator cache miss for language: {lang}", noop_lvl=2) translator: gettext.NullTranslations = gettext.translation( "messages", localedir=str(self.locales_dir), @@ -48,7 +48,7 @@ def get_translator(self, lang: Optional[str] = None) -> Callable[[str], str]: fallback=True, ) self.translation_cache[lang] = translator.gettext - logger().noop(f"Translator cache set for language: {lang}", noop_lvl=3) + logger().noop(f"Translator cache set for language: {lang}", noop_lvl=2) else: logger().noop(f"Translator cache hit for language: {lang}", noop_lvl=3) diff --git a/src/leettools/core/schemas/user.py b/src/leettools/core/schemas/user.py index 12f34c9..a9d3d03 100644 --- a/src/leettools/core/schemas/user.py +++ b/src/leettools/core/schemas/user.py @@ -1,7 +1,7 @@ from abc import ABC, abstractmethod from dataclasses import dataclass from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from pydantic import BaseModel, Field diff --git a/src/leettools/flow/flow_option_items.py b/src/leettools/flow/flow_option_items.py index e292800..83dd3c6 100644 --- a/src/leettools/flow/flow_option_items.py +++ b/src/leettools/flow/flow_option_items.py @@ -216,14 +216,12 @@ def _days_limit( def _search_max_results( explicit: Optional[bool] = False, required: Optional[bool] = False ) -> FlowOptionItem: + # the description value hits some bug in babel, so we need to use the string in one line return FlowOptionItem( name=FLOW_OPTION_SEARCH_MAX_RESULTS, display_name=_("Max search Results"), description=_( - "The maximum number of search results for retrievers to return. " - "Each retriever may have different paging mechanisms. Use the parameter and " - "the search iteration to control the number of results." - "If the retieval is local, -1 here means process all documents." + "The maximum number of search results for retrievers to return. Each retriever may have different paging mechanisms. Use the parameter and the search iteration to control the number of results.If the retieval is local, -1 here means process all documents." ), default_value="10", value_type="int",