diff --git a/.github/workflows/translate-command.yml b/.github/workflows/translate-command.yml index e6c1f6b0..ff602b70 100644 --- a/.github/workflows/translate-command.yml +++ b/.github/workflows/translate-command.yml @@ -101,6 +101,13 @@ jobs: import json import re + # Language code mappings + LANG_TO_CODE = { + 'english': 'en', + 'chinese': 'zh', + 'japanese': 'ja' + } + # Read comments with open('pr_comments.json', 'r') as f: comments = json.load(f) @@ -131,8 +138,10 @@ jobs: print(f"Found translation check comment (length: {len(translation_comment)} chars)") # Parse checked boxes from the comment - # Simplified format: - [x] source target filepath - # Example: - [x] zh en introduction/Architecture.md + # New format: - [x] SourceLang to TargetLang: filepath + # Old format support: - [x] source target filepath + # Example new: - [x] English to Japanese: introduction/Architecture.md + # Example old: - [x] en ja introduction/Architecture.md checked_translations = [] checkbox_count = 0 @@ -144,21 +153,38 @@ jobs: if re.match(r'^\s*-\s*\[[xX]\]', line): checkbox_count += 1 print(f" ✓ Matched checkbox pattern!") - # Extract source, target, and path from simple format - # Format: - [x] LANG LANG filepath - match = re.search(r'^\s*-\s*\[[xX]\]\s+(\w+)\s+(\w+)\s+(\S+)', line) + + # Try new format first: "Language1 to Language2: filepath" + match = re.search(r'^\s*-\s*\[[xX]\]\s+(\w+)\s+to\s+(\w+):\s+(\S+)', line) if match: - source_lang = match.group(1).lower() - target_lang = match.group(2).lower() + source_lang_name = match.group(1).lower() + target_lang_name = match.group(2).lower() rel_path = match.group(3) + # Convert language names to codes + source_lang = LANG_TO_CODE.get(source_lang_name, source_lang_name) + target_lang = LANG_TO_CODE.get(target_lang_name, target_lang_name) + # Build the translation entry source_file = f"docs/{source_lang}/{rel_path}" checked_translations.append(f"{source_lang}:{target_lang}:{source_file}") - print(f"Found checked: {source_lang} → {target_lang}: {rel_path}") + print(f"Found checked (new format): {source_lang} → {target_lang}: {rel_path}") else: - print(f"Warning: Checkbox found but could not parse: {line[:80]}") + # Try old format: "source target filepath" + match = re.search(r'^\s*-\s*\[[xX]\]\s+(\w+)\s+(\w+)\s+(\S+)', line) + + if match: + source_lang = match.group(1).lower() + target_lang = match.group(2).lower() + rel_path = match.group(3) + + # Build the translation entry + source_file = f"docs/{source_lang}/{rel_path}" + checked_translations.append(f"{source_lang}:{target_lang}:{source_file}") + print(f"Found checked (old format): {source_lang} → {target_lang}: {rel_path}") + else: + print(f"Warning: Checkbox found but could not parse: {line[:80]}") elif '- [' in line: print(f" → Line contains '- [' but pattern didn't match") diff --git a/docs/en/quick_start/hudi.md b/docs/en/quick_start/hudi.md index a22672e2..db689e23 100644 --- a/docs/en/quick_start/hudi.md +++ b/docs/en/quick_start/hudi.md @@ -17,6 +17,8 @@ import TabItem from '@theme/TabItem'; - Load a tiny dataset into Hudi with Apache Spark - Configure StarRocks to access the Hive Metastore using an external catalog - Query the data with StarRocks where the data sits +OK + diff --git a/docs/ja/introduction/Architecture.md b/docs/ja/introduction/Architecture.md index 1b857e9b..4505e4bc 100644 --- a/docs/ja/introduction/Architecture.md +++ b/docs/ja/introduction/Architecture.md @@ -7,7 +7,7 @@ import QSOverview from '../_assets/commonMarkdown/quickstart-overview-tip.mdx' # Architecture -StarRocks は堅牢なアーキテクチャを備えています。システム全体は「フロントエンド」と「バックエンド」の2種類のコンポーネントのみで構成されています。フロントエンドノードは **FE** と呼ばれます。バックエンドノードには **BE** と **CN** (コンピュートノード) の2種類があります。データにローカルストレージを使用する場合に BE がデプロイされ、データがオブジェクトストレージまたは HDFS に保存される場合に CN がデプロイされます。StarRocks は外部コンポーネントに依存せず、デプロイとメンテナンスを簡素化します。ノードはサービス停止なしで水平にスケールできます。さらに、StarRocks はメタデータとサービスデータのレプリカメカニズムを備えており、データ信頼性を高め、単一障害点 (SPOF) を効率的に防止します。 +は堅牢なアーキテクチャを備えています。システム全体は「フロントエンド」と「バックエンド」の2種類のコンポーネントのみで構成されています。フロントエンドノードは **FE** と呼ばれます。バックエンドノードには **BE** と **CN** (コンピュートノード) の2種類があります。データにローカルストレージを使用する場合に BE がデプロイされ、データがオブジェクトストレージまたは HDFS に保存される場合に CN がデプロイされます。StarRocks は外部コンポーネントに依存せず、デプロイとメンテナンスを簡素化します。ノードはサービス停止なしで水平にスケールできます。さらに、StarRocks はメタデータとサービスデータのレプリカメカニズムを備えており、データ信頼性を高め、単一障害点 (SPOF) を効率的に防止します。 StarRocks は MySQL 通信プロトコルと互換性があり、標準 SQL をサポートしています。ユーザーは MySQL クライアントから StarRocks に接続し、瞬時に貴重なインサイトを得ることができます。 diff --git a/docs/zh/sql-reference/sql-functions/dict-functions/dict_mapping.md b/docs/zh/sql-reference/sql-functions/dict-functions/dict_mapping.md index dbdf43b4..90df1bb5 100644 --- a/docs/zh/sql-reference/sql-functions/dict-functions/dict_mapping.md +++ b/docs/zh/sql-reference/sql-functions/dict-functions/dict_mapping.md @@ -2,7 +2,7 @@ displayed_sidebar: docs --- -# `dict_mapping` +# dict_mapping 返回字典表中与指定键映射的值。