@aigne/doc-smith 0.8.12-beta.6 → 0.8.12-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/.aigne/doc-smith/config.yaml +1 -1
  2. package/.aigne/doc-smith/history.yaml +37 -0
  3. package/.aigne/doc-smith/media-description.yaml +91 -0
  4. package/.aigne/doc-smith/preferences.yml +12 -0
  5. package/.aigne/doc-smith/upload-cache.yaml +36 -69
  6. package/.release-please-manifest.json +1 -1
  7. package/CHANGELOG.md +24 -0
  8. package/agents/clear/choose-contents.mjs +14 -1
  9. package/agents/clear/clear-media-description.mjs +129 -0
  10. package/agents/clear/index.yaml +3 -1
  11. package/agents/evaluate/code-snippet.mjs +28 -24
  12. package/agents/evaluate/document-structure.yaml +0 -4
  13. package/agents/evaluate/document.yaml +1 -5
  14. package/agents/generate/index.yaml +1 -0
  15. package/agents/generate/update-document-structure.yaml +9 -3
  16. package/agents/history/view.mjs +5 -2
  17. package/agents/init/index.mjs +10 -0
  18. package/agents/media/batch-generate-media-description.yaml +44 -0
  19. package/agents/media/generate-media-description.yaml +47 -0
  20. package/agents/media/load-media-description.mjs +238 -0
  21. package/agents/update/generate-document.yaml +10 -4
  22. package/agents/update/index.yaml +1 -0
  23. package/agents/update/update-document-detail.yaml +9 -3
  24. package/agents/update/user-review-document.mjs +2 -1
  25. package/agents/utils/load-sources.mjs +103 -53
  26. package/aigne.yaml +6 -0
  27. package/assets/report-template/report.html +34 -34
  28. package/docs/configuration-initial-setup.md +74 -55
  29. package/docs/configuration.ja.md +59 -86
  30. package/docs/configuration.md +59 -86
  31. package/docs/configuration.zh-TW.md +59 -86
  32. package/docs/configuration.zh.md +59 -86
  33. package/docs/getting-started.ja.md +43 -24
  34. package/docs/getting-started.md +29 -10
  35. package/docs/getting-started.zh-TW.md +42 -23
  36. package/docs/getting-started.zh.md +39 -20
  37. package/docs/guides-cleaning-up.ja.md +16 -15
  38. package/docs/guides-cleaning-up.md +19 -17
  39. package/docs/guides-cleaning-up.zh-TW.md +16 -15
  40. package/docs/guides-cleaning-up.zh.md +12 -11
  41. package/docs/guides-evaluating-documents.md +70 -29
  42. package/docs/guides-generating-documentation.ja.md +34 -32
  43. package/docs/guides-generating-documentation.md +59 -119
  44. package/docs/guides-generating-documentation.zh-TW.md +34 -32
  45. package/docs/guides-generating-documentation.zh.md +30 -28
  46. package/docs/guides-interactive-chat.md +34 -26
  47. package/docs/guides-managing-history.ja.md +17 -20
  48. package/docs/guides-managing-history.md +19 -17
  49. package/docs/guides-managing-history.zh-TW.md +18 -21
  50. package/docs/guides-managing-history.zh.md +13 -16
  51. package/docs/guides-publishing-your-docs.md +40 -35
  52. package/docs/guides-translating-documentation.ja.md +17 -17
  53. package/docs/guides-translating-documentation.md +39 -34
  54. package/docs/guides-translating-documentation.zh-TW.md +21 -21
  55. package/docs/guides-translating-documentation.zh.md +18 -18
  56. package/docs/guides-updating-documentation.ja.md +35 -35
  57. package/docs/guides-updating-documentation.md +11 -9
  58. package/docs/guides-updating-documentation.zh-TW.md +27 -27
  59. package/docs/guides-updating-documentation.zh.md +26 -26
  60. package/docs/overview.ja.md +13 -13
  61. package/docs/overview.md +2 -2
  62. package/docs/overview.zh-TW.md +19 -19
  63. package/docs/overview.zh.md +16 -16
  64. package/docs/release-notes.md +60 -27
  65. package/package.json +2 -1
  66. package/prompts/common/afs/afs-tools-usage.md +5 -0
  67. package/prompts/common/afs/use-afs-instruction.md +1 -0
  68. package/prompts/detail/generate/system-prompt.md +0 -13
  69. package/prompts/detail/generate/user-prompt.md +7 -0
  70. package/prompts/detail/update/system-prompt.md +1 -2
  71. package/prompts/detail/update/user-prompt.md +7 -0
  72. package/prompts/evaluate/document-structure.md +6 -7
  73. package/prompts/evaluate/document.md +16 -25
  74. package/prompts/media/media-description/system-prompt.md +35 -0
  75. package/prompts/media/media-description/user-prompt.md +8 -0
  76. package/prompts/structure/generate/system-prompt.md +0 -19
  77. package/prompts/structure/generate/user-prompt.md +22 -1
  78. package/prompts/structure/update/system-prompt.md +0 -17
  79. package/prompts/structure/update/user-prompt.md +24 -0
  80. package/tests/agents/history/view.test.mjs +97 -0
  81. package/tests/utils/history-utils.test.mjs +125 -97
  82. package/utils/constants/index.mjs +0 -107
  83. package/utils/file-utils.mjs +42 -1
  84. package/utils/history-utils.mjs +3 -3
  85. package/agents/update/fs-tools/glob.mjs +0 -184
  86. package/agents/update/fs-tools/grep.mjs +0 -317
  87. package/agents/update/fs-tools/read-file.mjs +0 -309
  88. package/media.md +0 -19
  89. package/tests/agents/update/fs-tools/glob.test.mjs +0 -438
  90. package/tests/agents/update/fs-tools/grep.test.mjs +0 -279
  91. package/tests/agents/update/fs-tools/read-file.test.mjs +0 -549
@@ -1,14 +1,14 @@
1
1
  # Publishing Your Docs
2
2
 
3
- Once you have generated your documentation, the next step is to publish it online, making it accessible to your audience. This guide provides a systematic overview of the publishing process using the `aigne doc publish` command.
3
+ After generating your documentation, the next step is to make it accessible online. This guide provides a systematic procedure for publishing your documentation using the `aigne doc publish` command.
4
4
 
5
5
  ## The Publish Command
6
6
 
7
- The primary command for making your documentation live is `aigne doc publish`. This command uploads your generated files to a web service, where they can be viewed in a browser.
7
+ The `aigne doc publish` command uploads your generated documentation files to a web service, making them available to your audience through a web browser.
8
8
 
9
- You can execute the command using its full name or its shorter aliases:
9
+ You can execute the command using its full name or one of its aliases for convenience.
10
10
 
11
- ```bash
11
+ ```bash Command Execution icon=lucide:terminal
12
12
  # Full command
13
13
  aigne doc publish
14
14
 
@@ -17,62 +17,67 @@ aigne doc pub
17
17
  aigne doc p
18
18
  ```
19
19
 
20
- When you run the publish command for the first time, you will be presented with an interactive prompt to select your preferred publishing platform.
20
+ When this command is run for the first time, it initiates an interactive prompt to guide you through selecting a publishing platform.
21
21
 
22
- ## Publishing Options
22
+ ![Publish Documentation Dialog](../assets/screenshots/doc-publish.png)
23
23
 
24
- You have several options for where to host your documentation. The interactive prompt will guide you through the selection.
24
+ ## Publishing Destinations
25
25
 
26
- ### 1. DocSmith Cloud (Free Hosting)
26
+ The tool provides several destinations for hosting your documentation. The interactive setup will present the following choices.
27
27
 
28
- This option publishes your documentation to `docsmith.aigne.io`, a free hosting service provided by AIGNE.
28
+ ### Option 1: DocSmith Cloud
29
29
 
30
- - **Use Case:** Ideal for open-source projects, personal blogs, or any scenario where public accessibility is desired without the need for custom infrastructure.
31
- - **Cost:** Free.
32
- - **Outcome:** Your documents will be publicly available at a URL provided upon successful publication.
30
+ This option publishes your documentation to `docsmith.aigne.io`, a free hosting service.
33
31
 
34
- ### 2. Your Existing Website
32
+ * **Intended Use**: This method is suitable for open-source projects or any documentation that is intended for public access.
33
+ * **Cost**: Free.
34
+ * **Outcome**: Your documentation will be publicly available at a URL provided after the publishing process is complete.
35
35
 
36
- This option allows you to publish the documentation to a website that you already own and manage.
36
+ ### Option 2: Your Existing Website
37
37
 
38
- - **Use Case:** Best for integrating documentation directly into an existing company website, product site, or personal domain. This method requires you to run your own instance of Discuss Kit.
39
- - **Cost:** Requires your own hosting infrastructure.
40
- - **Setup:**
41
- 1. Select this option in the prompt.
42
- 2. You will be asked to enter the URL of your website (e.g., `https://docs.your-company.com`).
43
- 3. To set up your own documentation website, you can get a Discuss Kit instance from the official store: [https://www.web3kit.rocks/discuss-kit](https://www.web3kit.rocks/discuss-kit).
38
+ This option allows you to publish documentation to a website you already own and manage. It requires you to operate your own instance of Discuss Kit.
44
39
 
45
- ### 3. New Website (Paid Service)
40
+ * **Intended Use**: This is for integrating documentation directly into an existing company website, product portal, or personal domain.
41
+ * **Requirements**: You must have your own hosting infrastructure and a running instance of Discuss Kit.
42
+ * **Procedure**:
43
+ 1. Select the "Your existing website" option from the interactive prompt.
44
+ 2. When prompted, enter the full URL of your website (e.g., `https://docs.your-company.com`).
45
+ 3. To set up your own documentation website, you can obtain a Discuss Kit instance from the official store: [https://www.web3kit.rocks/discuss-kit](https://www.web3kit.rocks/discuss-kit). Discuss Kit is a non-open-source service that provides the necessary backend for hosting.
46
46
 
47
- If you do not have an existing website, this service helps you set up a new, dedicated site for your documentation.
47
+ ### Option 3: New Website
48
48
 
49
- - **Use Case:** Suitable for creating a professional, standalone documentation portal with a custom domain and hosting managed for you.
50
- - **Cost:** This is a paid service.
51
- - **Process:** The command will guide you through the necessary steps to deploy and configure a new Discuss Kit instance. If you have started this process before, you will also see an option to resume your previous setup.
49
+ This option assists you in setting up a new, dedicated website for your documentation.
52
50
 
53
- ## Direct Publishing
51
+ * **Intended Use**: This is for users who need a standalone documentation portal but do not have an existing website.
52
+ * **Cost**: This is a paid service.
53
+ * **Procedure**: The command-line interface will guide you through the process of deploying and configuring a new Discuss Kit instance. If you have previously started this process, an option to resume the setup will also be available.
54
54
 
55
- For automated workflows, such as CI/CD pipelines, or after you have completed the initial setup, you can bypass the interactive prompt by specifying the application URL directly.
55
+ ## Automated Publishing
56
56
 
57
- Use the `--appUrl` flag followed by your website's URL.
57
+ For automated environments, such as a Continuous Integration/Continuous Deployment (CI/CD) pipeline, you can bypass the interactive prompt by specifying the destination URL directly.
58
58
 
59
- ```bash
60
- # Example for a custom documentation site
59
+ Use the `--appUrl` flag with the command to define the publishing target.
60
+
61
+ ```bash Direct Publishing Example icon=lucide:terminal
61
62
  aigne doc publish --appUrl https://docs.your-company.com
62
63
  ```
63
64
 
64
- Once you successfully publish to a specific URL (either by selecting an option in the prompt or by using the `--appUrl` flag), DocSmith saves this URL in your local configuration. On subsequent runs, it will automatically publish to the saved URL without asking again.
65
+ Once you publish to a specific URL for the first time (either through the interactive prompt or the `--appUrl` flag), the tool saves this URL to your local configuration file. Subsequent executions of `aigne doc publish` will automatically use the saved URL, streamlining the update process.
65
66
 
66
67
  ## Troubleshooting
67
68
 
68
69
  ### Authorization Errors
69
70
 
70
- If you encounter an error message containing "401" or "403," it indicates that your authentication token is invalid or has expired. This can happen if permissions have changed or if the token is old.
71
+ If the publishing process fails with an error message that includes "401" or "403," it signifies an issue with your authentication token. The token may be invalid, expired, or lack the required permissions.
71
72
 
72
- To resolve this, you can clear all stored configuration and credentials by running the `clear` command:
73
+ To resolve this, reset your local configuration and credentials by running the `clear` command:
73
74
 
74
- ```bash
75
+ ```bash Clear Configuration icon=lucide:terminal
75
76
  aigne doc clear
76
77
  ```
77
78
 
78
- After clearing the configuration, run `aigne doc publish` again. You will be guided through the authentication and setup process as if it were the first time.
79
+ After the command completes, run `aigne doc publish` again. You will be prompted to re-authenticate and configure your publishing destination.
80
+
81
+ ---
82
+
83
+ After successfully publishing your documentation, you may need to update it as your project evolves. For instructions on this process, please see the [Updating Documentation](./guides-updating-documentation.md) guide.
@@ -1,14 +1,14 @@
1
1
  # ドキュメントの翻訳
2
2
 
3
- このガイドでは、`aigne doc translate` コマンドを使用して、生成されたドキュメントを複数の言語に翻訳する方法について説明します。このプロセスではAIを利用して、翻訳が文脈を認識し、技術的な正確性を維持するようにします。
3
+ このガイドでは、`aigne doc translate` コマンドを使用して、生成されたドキュメントを多言語に翻訳する方法について説明します。このプロセスでは AI を使用して、翻訳が文脈を認識し、技術的な正確性を維持するようにします。
4
4
 
5
5
  このツールは12の言語をサポートしており、世界中のオーディエンスにリーチすることができます。ソースドキュメントの主要言語は、利用可能な翻訳言語のリストから自動的に除外されます。
6
6
 
7
7
  ## `translate` コマンド
8
8
 
9
- `aigne doc translate` コマンドは、既存のドキュメントファイルの翻訳を生成するために使用されます。インタラクティブに実行して、対象のドキュメントと言語を選択することも、コマンドラインフラグを使用してこれらのオプションを直接指定し、ワークフローを自動化することもできます。
9
+ `aigne doc translate` コマンドは、既存のドキュメントファイルの翻訳を生成するために使用されます。対話形式で実行して、翻訳したいドキュメントと言語を選択することも、自動化されたワークフローのためにコマンドラインフラグを使用してこれらのオプションを直接指定することもできます。
10
10
 
11
- ### インタラクティブモード
11
+ ### 対話モード
12
12
 
13
13
  ガイド付きのエクスペリエンスを利用するには、引数なしでコマンドを実行します。
14
14
 
@@ -18,21 +18,21 @@ aigne doc translate
18
18
 
19
19
  実行されると、ツールは以下の手順を実行します。
20
20
  1. 既存のドキュメントをスキャンします。
21
- 2. リストから翻訳したい特定のドキュメントを選択するよう促します。
22
- 3. 翻訳の対象言語を選択するよう促します。以前に選択した言語は、便宜上あらかじめチェックされています。
23
- 4. 選択された各ドキュメントと言語のペアについて翻訳プロセスを開始します。
24
- 5. 翻訳されたファイルを、言語ごとに適切なディレクトリに保存します。
21
+ 2. リストから翻訳したい特定のドキュメントを選択するように求めます。
22
+ 3. 翻訳の対象言語を選択するように求めます。以前に選択した言語は、便宜上、事前にチェックされています。
23
+ 4. 選択された各ドキュメントと言語のペアに対して翻訳プロセスを開始します。
24
+ 5. 翻訳されたファイルを同じディレクトリに保存します。新しいファイルは、元のファイル名に言語コードを追加して命名されます(例:`overview.md` の中国語翻訳は `overview.zh.md` になります)。
25
25
 
26
26
  ### コマンドラインオプション
27
27
 
28
- 非インタラクティブな使用やスクリプト作成のために、以下のコマンドラインフラグを使用して翻訳プロセスを制御できます。
28
+ 非対話的な使用やスクリプト作成のために、以下のコマンドラインフラグを使用して翻訳プロセスを制御できます。
29
29
 
30
30
  <x-field-group>
31
31
  <x-field data-name="--docs" data-type="array<string>">
32
- <x-field-desc markdown>翻訳するドキュメントのパスを1つ以上指定します。指定しない場合、ツールはインタラクティブモードに入り、利用可能なドキュメントのリストから選択できるようになります。</x-field-desc>
32
+ <x-field-desc markdown>翻訳する1つ以上のドキュメントパスを指定します。指定しない場合、ツールは対話モードに入り、利用可能なドキュメントのリストから選択できるようになります。</x-field-desc>
33
33
  </x-field>
34
34
  <x-field data-name="--langs" data-type="array<string>">
35
- <x-field-desc markdown>対象となる言語コード(例:`zh`、`ja`)を1つ以上指定します。省略した場合、インタラクティブに言語を選択するよう促されます。</x-field-desc>
35
+ <x-field-desc markdown>1つ以上のターゲット言語コード(例:`zh`、`ja`)を指定します。省略した場合、対話形式で言語を選択するように求められます。</x-field-desc>
36
36
  </x-field>
37
37
  <x-field data-name="--glossary" data-type="string">
38
38
  <x-field-desc markdown>用語集ファイルへのパス(例:`@path/to/glossary.md`)を提供します。これにより、特定の技術用語がすべてのドキュメントで一貫して翻訳されるようになります。</x-field-desc>
@@ -46,13 +46,13 @@ aigne doc translate
46
46
 
47
47
  #### 1. 特定のドキュメントを複数の言語に翻訳する
48
48
 
49
- インタラクティブなプロンプトなしで `overview.md` と `examples.md` を中国語(`zh`)と日本語(`ja`)に翻訳するには:
49
+ 対話プロンプトなしで `overview.md` と `examples.md` を中国語(`zh`)と日本語(`ja`)に翻訳するには:
50
50
 
51
51
  ```bash
52
52
  aigne doc translate --docs overview.md --docs examples.md --langs zh --langs ja
53
53
  ```
54
54
 
55
- #### 2. 用語集を使用して用語の一貫性を保つ
55
+ #### 2. 用語集を使用して一貫した用語を確保する
56
56
 
57
57
  技術用語が正しく翻訳されるように、用語集ファイルを提供します。これは、ブランド名や専門用語の一貫性を維持するのに役立ちます。
58
58
 
@@ -60,9 +60,9 @@ aigne doc translate --docs overview.md --docs examples.md --langs zh --langs ja
60
60
  aigne doc translate --glossary @./glossary.md
61
61
  ```
62
62
 
63
- #### 3. フィードバックを提供して翻訳スタイルを調整する
63
+ #### 3. フィードバックを提供して翻訳スタイルを洗練させる
64
64
 
65
- フィードバックを提供することで、翻訳スタイルをガイドできます。例えば、よりフォーマルなトーンを要求するには:
65
+ フィードバックを提供することで、翻訳スタイルをガイドできます。例えば、よりフォーマルなトーンをリクエストするには:
66
66
 
67
67
  ```bash
68
68
  aigne doc translate --feedback "Use a formal, technical tone for all translations."
@@ -88,8 +88,8 @@ aigne doc translate --feedback "Use a formal, technical tone for all translation
88
88
  | イタリア語 | `it` |
89
89
  | アラビア語 | `ar` |
90
90
 
91
- ## まとめ
91
+ ## 概要
92
92
 
93
- `translate` コマンドは、ドキュメントをローカライズするための構造化された方法を提供します。ガイド付き翻訳のためのインタラクティブモードを使用することも、自動化されたワークフローのためのコマンドラインオプションを使用することもできます。用語集やフィードバックなどの機能を使用することで、翻訳されたコンテンツの品質と一貫性を維持するのに役立ちます。
93
+ `translate` コマンドは、ドキュメントをローカライズするための構造化された方法を提供します。対話モードを使用してガイド付きの翻訳を行ったり、コマンドラインオプションを使用して自動化されたワークフローを構築したりできます。用語集やフィードバックなどの機能を使用することで、翻訳コンテンツの品質と一貫性を維持するのに役立ちます。
94
94
 
95
- ドキュメントを翻訳した後、[ドキュメントの公開](./guides-publishing-your-docs.md) に進むことができます。
95
+ ドキュメントを翻訳した後、[ドキュメントの公開](./guides-publishing-your-docs.md)に進むことができます。
@@ -2,43 +2,48 @@
2
2
 
3
3
  This guide provides instructions on how to translate your generated documentation into multiple languages using the `aigne doc translate` command. The process uses AI to ensure translations are contextually aware and maintain technical accuracy.
4
4
 
5
- The tool supports 12 languages, allowing you to reach a global audience. The primary language of your source documents will be automatically excluded from the list of available translation languages.
5
+ The tool supports 12 languages, such as Chinese, Japanese, and German, allowing you to make your documentation accessible to a global audience. The primary language of your source documents is automatically excluded from the list of available translation languages.
6
6
 
7
7
  ## The `translate` Command
8
8
 
9
- The `aigne doc translate` command is used to generate translations for your existing documentation files. You can run it interactively to select which documents and languages you want, or you can specify these options directly using command-line flags for automated workflows.
9
+ The `aigne doc translate` command generates translations for your existing documentation files. You can run it in an interactive mode for a step-by-step process or specify options directly on the command line for faster, automated workflows.
10
10
 
11
11
  ### Interactive Mode
12
12
 
13
- For a guided experience, run the command without any arguments:
13
+ For a guided experience, run the command without any arguments. This is the recommended approach for new users.
14
14
 
15
15
  ```bash
16
16
  aigne doc translate
17
17
  ```
18
18
 
19
- When executed, the tool will perform the following steps:
20
- 1. Scan for existing documents.
21
- 2. Prompt you to select the specific documents you wish to translate from a list.
22
- 3. Prompt you to select the target languages for translation. Previously selected languages will be pre-checked for convenience.
23
- 4. Begin the translation process for each selected document and language pair.
24
- 5. Save the translated files in the appropriate language-specific directories.
19
+ When you run this command, the tool will guide you through the following steps:
20
+
21
+ 1. **Select Documents:** You will be prompted to choose the specific documents you wish to translate from a list of all available files in your project.
22
+
23
+ ![Select documents to translate](../assets/screenshots/doc-translate.png)
24
+
25
+ 2. **Select Languages:** Next, you will be asked to select the target languages for translation. Any languages you have used before will be pre-selected to save time.
26
+
27
+ ![Select languages for translation](../assets/screenshots/doc-translate-langs.png)
28
+
29
+ 3. **Process and Save:** The tool begins the translation process. Once complete, the translated files are saved in the same directory as the original files. The new files are named by adding a language code to the original filename. For example, a Chinese translation of `overview.md` will be saved as `overview.zh.md`.
25
30
 
26
31
  ### Command-Line Options
27
32
 
28
- For non-interactive use or scripting, you can use the following command-line flags to control the translation process.
33
+ For non-interactive use or scripting, you can use command-line flags to control the translation process. This method is efficient when you already know which files and languages you need.
29
34
 
30
35
  <x-field-group>
31
36
  <x-field data-name="--docs" data-type="array<string>">
32
- <x-field-desc markdown>Specify one or more document paths to translate. If not provided, the tool will enter interactive mode to let you select from a list of available documents.</x-field-desc>
37
+ <x-field-desc markdown>Specify one or more document paths to translate. If this flag is not used, the tool will start in interactive mode to let you select from a list of available documents.</x-field-desc>
33
38
  </x-field>
34
39
  <x-field data-name="--langs" data-type="array<string>">
35
- <x-field-desc markdown>Specify one or more target language codes (e.g., `zh`, `ja`). If omitted, you will be prompted to select languages interactively.</x-field-desc>
40
+ <x-field-desc markdown>Specify one or more target language codes (e.g., `zh`, `ja`, `de`). If omitted, you will be prompted to select languages interactively.</x-field-desc>
36
41
  </x-field>
37
42
  <x-field data-name="--glossary" data-type="string">
38
- <x-field-desc markdown>Provide a path to a glossary file (e.g., `@path/to/glossary.md`). This ensures that specific technical terms are translated consistently across all documents.</x-field-desc>
43
+ <x-field-desc markdown>Provide a path to a glossary file (e.g., `@path/to/glossary.md`). This ensures that specific technical terms, brand names, or acronyms are translated consistently across all documents.</x-field-desc>
39
44
  </x-field>
40
45
  <x-field data-name="--feedback" data-type="string">
41
- <x-field-desc markdown>Provide specific instructions or feedback to guide the AI's translation style, such as adjusting the tone or terminology.</x-field-desc>
46
+ <x-field-desc markdown>Provide specific instructions to guide the AI's translation style. For example, you can ask for a more formal tone or specify how to handle certain phrases.</x-field-desc>
42
47
  </x-field>
43
48
  </x-field-group>
44
49
 
@@ -46,7 +51,7 @@ For non-interactive use or scripting, you can use the following command-line fla
46
51
 
47
52
  #### 1. Translate Specific Documents into Multiple Languages
48
53
 
49
- To translate `overview.md` and `examples.md` into Chinese (`zh`) and Japanese (`ja`) without interactive prompts:
54
+ To translate `overview.md` and `examples.md` into Chinese (`zh`) and Japanese (`ja`) without any interactive prompts, run the following command:
50
55
 
51
56
  ```bash
52
57
  aigne doc translate --docs overview.md --docs examples.md --langs zh --langs ja
@@ -54,42 +59,42 @@ aigne doc translate --docs overview.md --docs examples.md --langs zh --langs ja
54
59
 
55
60
  #### 2. Use a Glossary for Consistent Terminology
56
61
 
57
- To ensure technical terms are translated correctly, provide a glossary file. This is useful for maintaining consistency for brand names or specialized vocabulary.
62
+ If your documentation contains specialized vocabulary or brand names, you can use a glossary file to ensure they are always translated correctly.
58
63
 
59
64
  ```bash
60
- aigne doc translate --glossary @./glossary.md
65
+ aigne doc translate --glossary @./project-glossary.md
61
66
  ```
62
67
 
63
68
  #### 3. Provide Feedback to Refine Translation Style
64
69
 
65
- You can guide the translation style by providing feedback. For instance, to request a more formal tone:
70
+ You can guide the translation style by providing feedback. For instance, to request a more formal and technical tone for the output:
66
71
 
67
72
  ```bash
68
73
  aigne doc translate --feedback "Use a formal, technical tone for all translations."
69
74
  ```
70
75
 
71
- This feedback will be recorded in the history for the updated documents.
76
+ This feedback is recorded in the document's update history, which can be useful for tracking changes.
72
77
 
73
78
  ## Supported Languages
74
79
 
75
80
  The tool provides translation support for 12 languages. The native language of the documentation is English (`en`).
76
81
 
77
- | Language | Code |
78
- | :--- | :--- |
79
- | Chinese (Simplified) | `zh` |
80
- | Chinese (Traditional)| `zh-TW`|
81
- | Japanese | `ja` |
82
- | Korean | `ko` |
83
- | Spanish | `es` |
84
- | French | `fr` |
85
- | German | `de` |
86
- | Portuguese | `pt` |
87
- | Russian | `ru` |
88
- | Italian | `it` |
89
- | Arabic | `ar` |
82
+ | Language | Code |
83
+ | --------------------- | ------- |
84
+ | Chinese (Simplified) | `zh` |
85
+ | Chinese (Traditional) | `zh-TW` |
86
+ | Japanese | `ja` |
87
+ | Korean | `ko` |
88
+ | Spanish | `es` |
89
+ | French | `fr` |
90
+ | German | `de` |
91
+ | Portuguese | `pt` |
92
+ | Russian | `ru` |
93
+ | Italian | `it` |
94
+ | Arabic | `ar` |
90
95
 
91
96
  ## Summary
92
97
 
93
- The `translate` command offers a structured method for localizing your documentation. You can use its interactive mode for guided translations or command-line options for automated workflows. Using features like glossaries and feedback helps maintain the quality and consistency of the translated content.
98
+ The `translate` command offers a structured and reliable method for localizing your documentation. You can use its interactive mode for a guided process or its command-line options for efficient, automated workflows. Features like glossaries and feedback help maintain the quality and consistency of the translated content.
94
99
 
95
- After translating your documents, you can proceed to [Publishing Your Docs](./guides-publishing-your-docs.md).
100
+ After translating your documents, the next step is to make them available to your users. For instructions on how to do this, see the [Publishing Your Docs](./guides-publishing-your-docs.md) guide.
@@ -1,44 +1,44 @@
1
1
  # 翻譯文件
2
2
 
3
- 本指南說明如何使用 `aigne doc translate` 指令將您產生的文件翻譯成多種語言。此過程使用 AI 來確保翻譯具有上下文感知能力並保持技術準確性。
3
+ 本指南說明如何使用 `aigne doc translate` 指令將您產生的文件翻譯成多種語言。此過程使用 AI 來確保翻譯具有情境感知能力並保持技術準確性。
4
4
 
5
- 該工具支援 12 種語言,讓您能夠觸及全球受眾。您的源文件的主要語言將自動從可用的翻譯語言清單中排除。
5
+ 該工具支援 12 種語言,讓您能夠觸及全球受眾。您的來源文件的主要語言將自動從可用的翻譯語言清單中排除。
6
6
 
7
7
  ## `translate` 指令
8
8
 
9
- `aigne doc translate` 指令用於為您現有的文件檔案產生翻譯。您可以以互動模式執行它,以選擇您想要的文件和語言,或者您也可以使用命令列標誌直接指定這些選項,以實現自動化工作流程。
9
+ `aigne doc translate` 指令用於為您現有的文件檔案產生翻譯。您可以以互動模式執行它來選擇您想要的文件和語言,或者您也可以使用命令列旗標直接指定這些選項以實現自動化工作流程。
10
10
 
11
11
  ### 互動模式
12
12
 
13
- 若要獲得引導式體驗,請在不帶任何參數的情況下執行該指令:
13
+ 若要獲得引導式體驗,請在不帶任何參數的情況下執行此指令:
14
14
 
15
15
  ```bash
16
16
  aigne doc translate
17
17
  ```
18
18
 
19
- 執行後,該工具將執行以下步驟:
19
+ 執行時,該工具將執行以下步驟:
20
20
  1. 掃描現有文件。
21
- 2. 提示您從清單中選擇要翻譯的特定文件。
21
+ 2. 提示您從清單中選擇您希望翻譯的特定文件。
22
22
  3. 提示您選擇目標翻譯語言。為方便起見,先前選擇的語言將被預先勾選。
23
- 4. 為每個選定的文件和語言對開始翻譯過程。
24
- 5. 將翻譯後的文件儲存在相應的特定語言目錄中。
23
+ 4. 為每個選定的文件和語言組合開始翻譯過程。
24
+ 5. 將翻譯後的文件儲存在同一個目錄中。新檔案的命名方式是在原始檔名後附加語言代碼(例如,`overview.md` 的中文翻譯會變成 `overview.zh.md`)。
25
25
 
26
26
  ### 命令列選項
27
27
 
28
- 對於非互動式使用或腳本編寫,您可以使用以下命令列標誌來控制翻譯過程。
28
+ 對於非互動式使用或腳本編寫,您可以使用以下命令列旗標來控制翻譯過程。
29
29
 
30
30
  <x-field-group>
31
31
  <x-field data-name="--docs" data-type="array<string>">
32
- <x-field-desc markdown>指定一個或多個要翻譯的文件路徑。如果未提供,該工具將進入互動模式,讓您從可用文件清單中選擇。</x-field-desc>
32
+ <x-field-desc markdown>指定一個或多個要翻譯的文件路徑。若未提供,該工具將進入互動模式,讓您從可用文件清單中進行選擇。</x-field-desc>
33
33
  </x-field>
34
34
  <x-field data-name="--langs" data-type="array<string>">
35
- <x-field-desc markdown>指定一個或多個目標語言代碼(例如,`zh`、`ja`)。如果省略,系統將提示您以互動方式選擇語言。</x-field-desc>
35
+ <x-field-desc markdown>指定一個或多個目標語言代碼(例如 `zh`、`ja`)。若省略,系統將提示您以互動方式選擇語言。</x-field-desc>
36
36
  </x-field>
37
37
  <x-field data-name="--glossary" data-type="string">
38
- <x-field-desc markdown>提供一個詞彙表檔案的路徑(例如,`@path/to/glossary.md`)。這可以確保特定的技術術語在所有文件中得到一致的翻譯。</x-field-desc>
38
+ <x-field-desc markdown>提供詞彙表檔案的路徑(例如 `@path/to/glossary.md`)。這能確保特定的技術術語在所有文件中得到一致的翻譯。</x-field-desc>
39
39
  </x-field>
40
40
  <x-field data-name="--feedback" data-type="string">
41
- <x-field-desc markdown>提供具體的說明或回饋來指導 AI 的翻譯風格,例如調整語氣或術語。</x-field-desc>
41
+ <x-field-desc markdown>提供具體的指示或回饋來引導 AI 的翻譯風格,例如調整語氣或術語。</x-field-desc>
42
42
  </x-field>
43
43
  </x-field-group>
44
44
 
@@ -46,7 +46,7 @@ aigne doc translate
46
46
 
47
47
  #### 1. 將特定文件翻譯成多種語言
48
48
 
49
- 要將 `overview.md` 和 `examples.md` 翻譯成中文(`zh`)和日文(`ja`)而無需互動式提示:
49
+ 若要將 `overview.md` 和 `examples.md` 翻譯成中文(`zh`)和日文(`ja`)且不使用互動式提示:
50
50
 
51
51
  ```bash
52
52
  aigne doc translate --docs overview.md --docs examples.md --langs zh --langs ja
@@ -54,25 +54,25 @@ aigne doc translate --docs overview.md --docs examples.md --langs zh --langs ja
54
54
 
55
55
  #### 2. 使用詞彙表以確保術語一致
56
56
 
57
- 為確保技術術語翻譯正確,請提供一個詞彙表檔案。這對於保持品牌名稱或專業詞彙的一致性非常有用。
57
+ 為確保技術術語翻譯正確,請提供一個詞彙表檔案。這對於保持品牌名稱或專業詞彙的一致性很有用。
58
58
 
59
59
  ```bash
60
60
  aigne doc translate --glossary @./glossary.md
61
61
  ```
62
62
 
63
- #### 3. 提供回饋以優化翻譯風格
63
+ #### 3. 提供回饋以完善翻譯風格
64
64
 
65
- 您可以透過提供回饋來指導翻譯風格。例如,若要請求更正式的語氣:
65
+ 您可以透過提供回饋來引導翻譯風格。例如,若要請求更正式的語氣:
66
66
 
67
67
  ```bash
68
68
  aigne doc translate --feedback "Use a formal, technical tone for all translations."
69
69
  ```
70
70
 
71
- 此回饋將記錄在更新文件的歷史記錄中。
71
+ 此回饋將記錄在更新後文件的歷史記錄中。
72
72
 
73
73
  ## 支援的語言
74
74
 
75
- 該工具提供 12 種語言的翻譯支援。文件的原生語言是英文(`en`)。
75
+ 該工具支援 12 種語言的翻譯。文件的原生語言是英文(`en`)。
76
76
 
77
77
  | 語言 | 代碼 |
78
78
  | :--- | :--- |
@@ -90,6 +90,6 @@ aigne doc translate --feedback "Use a formal, technical tone for all translation
90
90
 
91
91
  ## 總結
92
92
 
93
- `translate` 指令為您的文件本地化提供了一種結構化的方法。您可以使用其互動模式進行引導式翻譯,或使用命令列選項進行自動化工作流程。使用詞彙表和回饋等功能有助於保持翻譯內容的品質和一致性。
93
+ `translate` 指令提供了一種結構化的方法來本地化您的文件。您可以使用其互動模式進行引導式翻譯,或使用命令列選項進行自動化工作流程。使用詞彙表和回饋等功能有助於保持翻譯內容的品質和一致性。
94
94
 
95
- 翻譯完文件後,您可以繼續進行[發布您的文件](./guides-publishing-your-docs.md)。
95
+ 翻譯完文件後,您可以繼續進行[發佈您的文件](./guides-publishing-your-docs.md)。
@@ -1,16 +1,16 @@
1
1
  # 翻译文档
2
2
 
3
- 本指南介绍了如何使用 `aigne doc translate` 命令将您生成的文档翻译成多种语言。该过程使用 AI 来确保翻译能够感知上下文并保持技术准确性。
3
+ 本指南介绍如何使用 `aigne doc translate` 命令将您生成的文档翻译成多种语言。该过程利用 AI 来确保翻译能够感知上下文并保持技术准确性。
4
4
 
5
- 该工具支持 12 种语言,使您能够触达全球受众。您源文档的主要语言将自动从可用翻译语言列表中排除。
5
+ 该工具支持 12 种语言,让您的内容能够触达全球受众。您源文档的主要语言将自动从可用翻译语言列表中排除。
6
6
 
7
7
  ## `translate` 命令
8
8
 
9
- `aigne doc translate` 命令用于为您现有的文档文件生成翻译。您可以以交互方式运行它来选择您想要的文档和语言,也可以使用命令行标志直接指定这些选项以实现自动化工作流。
9
+ `aigne doc translate` 命令用于为现有文档文件生成翻译。您可以以交互方式运行它来选择要翻译的文档和语言,也可以直接使用命令行标志指定这些选项以实现自动化工作流程。
10
10
 
11
11
  ### 交互模式
12
12
 
13
- 若需引导式体验,请不带任何参数运行该命令:
13
+ 如需引导式体验,请不带任何参数运行该命令:
14
14
 
15
15
  ```bash
16
16
  aigne doc translate
@@ -18,27 +18,27 @@ aigne doc translate
18
18
 
19
19
  执行后,该工具将执行以下步骤:
20
20
  1. 扫描现有文档。
21
- 2. 提示您从列表中选择希望翻译的特定文档。
22
- 3. 提示您选择目标翻译语言。为方便起见,先前选择的语言将被预先选中。
21
+ 2. 提示您从列表中选择要翻译的具体文档。
22
+ 3. 提示您选择目标翻译语言。为方便起见,先前选择的语言将被预先勾选。
23
23
  4. 为每个选定的文档和语言对开始翻译过程。
24
- 5. 将翻译后的文件保存在相应的特定语言目录中。
24
+ 5. 将翻译后的文件保存在同一目录中。新文件通过在原始文件名后附加语言代码来命名(例如,`overview.md` 的中文翻译将变为 `overview.zh.md`)。
25
25
 
26
26
  ### 命令行选项
27
27
 
28
- 对于非交互式使用或编写脚本,您可以使用以下命令行标志来控制翻译过程。
28
+ 对于非交互式使用或脚本编写,您可以使用以下命令行标志来控制翻译过程。
29
29
 
30
30
  <x-field-group>
31
31
  <x-field data-name="--docs" data-type="array<string>">
32
- <x-field-desc markdown>指定一个或多个要翻译的文档路径。如果未提供,该工具将进入交互模式,让您从可用文档列表中进行选择。</x-field-desc>
32
+ <x-field-desc markdown>指定要翻译的一个或多个文档路径。如果未提供,该工具将进入交互模式,让您从可用文档列表中进行选择。</x-field-desc>
33
33
  </x-field>
34
34
  <x-field data-name="--langs" data-type="array<string>">
35
- <x-field-desc markdown>指定一个或多个目标语言代码(例如,`zh`、`ja`)。如果省略,系统将提示您以交互方式选择语言。</x-field-desc>
35
+ <x-field-desc markdown>指定一个或多个目标语言代码(例如 `zh`、`ja`)。如果省略,系统将提示您以交互方式选择语言。</x-field-desc>
36
36
  </x-field>
37
37
  <x-field data-name="--glossary" data-type="string">
38
- <x-field-desc markdown>提供词汇表文件的路径(例如,`@path/to/glossary.md`)。这可确保特定技术术语在所有文档中得到一致的翻译。</x-field-desc>
38
+ <x-field-desc markdown>提供词汇表文件的路径(例如 `@path/to/glossary.md`)。这可以确保特定技术术语在所有文档中得到一致的翻译。</x-field-desc>
39
39
  </x-field>
40
40
  <x-field data-name="--feedback" data-type="string">
41
- <x-field-desc markdown>提供具体的说明或反馈来指导 AI 的翻译风格,例如调整语气或术语。</x-field-desc>
41
+ <x-field-desc markdown>提供具体说明或反馈以指导 AI 的翻译风格,例如调整语气或术语。</x-field-desc>
42
42
  </x-field>
43
43
  </x-field-group>
44
44
 
@@ -46,15 +46,15 @@ aigne doc translate
46
46
 
47
47
  #### 1. 将特定文档翻译成多种语言
48
48
 
49
- 要将 `overview.md` 和 `examples.md` 翻译成中文(`zh`)和日文(`ja`)且无需交互式提示:
49
+ 要将 `overview.md` 和 `examples.md` 翻译成中文(`zh`)和日文(`ja`),且无需交互式提示:
50
50
 
51
51
  ```bash
52
52
  aigne doc translate --docs overview.md --docs examples.md --langs zh --langs ja
53
53
  ```
54
54
 
55
- #### 2. 使用词汇表以确保术语一致
55
+ #### 2. 使用词汇表确保术语一致
56
56
 
57
- 为确保技术术语翻译正确,请提供一个词汇表文件。这对于保持品牌名称或专业词汇的一致性非常有用。
57
+ 为确保技术术语翻译正确,请提供词汇表文件。这对于保持品牌名称或专业词汇的一致性非常有用。
58
58
 
59
59
  ```bash
60
60
  aigne doc translate --glossary @./glossary.md
@@ -62,7 +62,7 @@ aigne doc translate --glossary @./glossary.md
62
62
 
63
63
  #### 3. 提供反馈以优化翻译风格
64
64
 
65
- 您可以通过提供反馈来指导翻译风格。例如,要请求更正式的语气:
65
+ 您可以通过提供反馈来指导翻译风格。例如,要求使用更正式的语气:
66
66
 
67
67
  ```bash
68
68
  aigne doc translate --feedback "Use a formal, technical tone for all translations."
@@ -72,7 +72,7 @@ aigne doc translate --feedback "Use a formal, technical tone for all translation
72
72
 
73
73
  ## 支持的语言
74
74
 
75
- 该工具提供 12 种语言的翻译支持。文档的母语是英语(`en`)。
75
+ 该工具支持 12 种语言的翻译。文档的母语是英语(`en`)。
76
76
 
77
77
  | 语言 | 代码 |
78
78
  | :--- | :--- |
@@ -90,6 +90,6 @@ aigne doc translate --feedback "Use a formal, technical tone for all translation
90
90
 
91
91
  ## 总结
92
92
 
93
- `translate` 命令为本地化您的文档提供了一种结构化的方法。您可以使用其交互模式进行引导式翻译,或使用命令行选项实现自动化工作流。使用词汇表和反馈等功能有助于保持翻译内容的质量和一致性。
93
+ `translate` 命令为本地化文档提供了一种结构化方法。您可以使用其交互模式进行引导式翻译,或使用命令行选项实现自动化工作流程。使用词汇表和反馈等功能有助于保持翻译内容的质量和一致性。
94
94
 
95
95
  翻译完文档后,您可以继续[发布您的文档](./guides-publishing-your-docs.md)。