Skip to content

Add comprehensive i18n documentation for GeneralUpdate core components#38

Merged
JusterZhu merged 7 commits intomainfrom
copilot/update-online-documentation
Feb 12, 2026
Merged

Add comprehensive i18n documentation for GeneralUpdate core components#38
JusterZhu merged 7 commits intomainfrom
copilot/update-online-documentation

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

Creates production-ready documentation for GeneralUpdate.Bowl, GeneralUpdate.ClientCore, GeneralUpdate.Core, and GeneralUpdate.Differential following Docusaurus i18n standards with separate Chinese and English files.

Changes

Documentation Enhancement (4 components)

  • Expanded each component doc from ~100-250 lines to comprehensive documentation
  • Chinese documentation: ~10-17KB per component in docs/doc/ and i18n/zh-Hans/
  • English documentation: ~11-18KB per component in i18n/en/
  • Added Component Overview, Core Features, Quick Start, API Reference, Practical Examples, and Notes sections
  • 15+ ready-to-run .NET code examples across all components

Proper i18n Structure

  • Chinese documentation in docs/doc/ (default locale) and i18n/zh-Hans/
  • English documentation in i18n/en/docusaurus-plugin-content-docs/current/doc/
  • Each language has complete, separate documentation files following Docusaurus best practices
  • No mixed bilingual content - proper language separation for maintainability

API Documentation

  • Complete method signatures with parameter descriptions for all public APIs
  • Detailed class definitions (MonitorParameter, Configinfo, Packet, UpdateOption)
  • Return values and usage patterns documented

Configuration

  • Added C#, bash, and JSON syntax highlighting to docusaurus.config.js
  • Updated all i18n files (zh-Hans, en) with separate language content

Screenshots

Chinese Documentation (Default Locale):
Chinese documentation

English Documentation (i18n/en):
English documentation

Example

// GeneralUpdate.ClientCore - Client-side update management
var config = new Configinfo
{
    UpdateUrl = "http://your-server.com/api/update/check",
    ClientVersion = "1.0.0.0",
    InstallPath = AppDomain.CurrentDomain.BaseDirectory,
    AppSecretKey = "your-secret-key"
};

await new GeneralClientBootstrap()
    .SetConfig(config)
    .AddListenerMultiDownloadStatistics((sender, args) => 
        Console.WriteLine($"Progress: {args.ProgressPercentage}%"))
    .LaunchAsync();

Build verified: Both zh-Hans and en locales compile successfully with proper i18n structure.

Original prompt

This section details on the original issue you should resolve

<issue_title>GeneralUpdate Online Documentation Development</issue_title>
<issue_description>Based on the GeneralUpdate open-source repository (URL: https://github.com/GeneralLibrary/GeneralUpdate), please write developer usage documentation for the four core components: GeneralUpdate.Bowl, GeneralUpdate.ClientCore, GeneralUpdate.Core, GeneralUpdate.Differential, following these requirements:

  1. The documentation must strictly follow the official Docusaurus style, directory structure, and layout standards, be compatible with MDX syntax, use heading levels H1–H3, apply .NET syntax highlighting for code blocks, and match the sidebar structure logic of the official website.
  2. All content must be presented in Chinese–English bilingual format (Chinese first, English second for the same section), with consistent technical terms and unified expressions (either paragraph-by-paragraph or side-by-side layout is acceptable).
  3. Use the latest code implementation in the repository as the only reference. Only adapt and refine the original repository documentation to the Docusaurus style. If the original documentation has missing content, errors, or illogical structure, directly supplement and correct it according to the latest implementation.
  4. Each component’s documentation must include these core sections:
    • Component Overview (positioning & core value)
    • Core Features
    • Quick Start (installation & initialization)
    • Core API Reference
    • Practical Usage Examples (ready-to-run .NET code)
    • Notes & Warnings
      to ensure developers can quickly integrate and use the components following the document.
  5. Keep content concise, practical, and aligned with real component functions; avoid redundancy or overstatement, and fit the reading habits of .NET developers.</issue_description>

<agent_instructions>请充分理解issue和仓库、代码上下文。</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 12, 2026 15:21
…ntent

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
@JusterZhu
Copy link
Collaborator

@copilot What I mean is that the online documentation in both Chinese and English should be written in i18n.

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copilot AI changed the title [WIP] Add online documentation for core components Add comprehensive bilingual documentation for GeneralUpdate core components Feb 12, 2026
Copilot AI requested a review from JusterZhu February 12, 2026 15:31
Copilot AI and others added 3 commits February 12, 2026 15:37
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
…ial components

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
…ish in separate files

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 12, 2026

@copilot What I mean is that the online documentation in both Chinese and English should be written in i18n.

Done! I've restructured the documentation to follow proper i18n conventions. The bilingual documentation has been separated into:

  • Chinese documentation in docs/doc/ and i18n/zh-Hans/ (default locale)
  • English documentation in i18n/en/docusaurus-plugin-content-docs/current/doc/

Each language now has its own complete documentation files without mixed content.

Commit: 67f5a14

Chinese Documentation (Default Locale):
Chinese documentation

English Documentation (i18n/en):
English documentation

All four core components (Bowl, ClientCore, Core, Differential) now have separate Chinese and English versions following Docusaurus i18n best practices.

Copilot AI changed the title Add comprehensive bilingual documentation for GeneralUpdate core components Add comprehensive i18n documentation for GeneralUpdate core components Feb 12, 2026
@JusterZhu JusterZhu marked this pull request as ready for review February 12, 2026 15:56
Copilot AI review requested due to automatic review settings February 12, 2026 15:56
@JusterZhu JusterZhu merged commit beab699 into main Feb 12, 2026
1 check passed
@JusterZhu JusterZhu deleted the copilot/update-online-documentation branch February 12, 2026 15:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Docusaurus documentation for the four GeneralUpdate core components (Bowl, ClientCore, Core, Differential) and adds Prism syntax highlighting support so the docs render well across zh-Hans (default) and en locales.

Changes:

  • Rewrote/expanded docs for the 4 components with structured sections (Overview, Features, Quick Start, API Reference, Examples, Notes).
  • Added/updated parallel doc sets for default (zh-Hans) and i18n/en (English), plus updated i18n/zh-Hans copies.
  • Enabled Prism highlighting for csharp, bash, and json in docusaurus.config.js.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
website/docusaurus.config.js Enables additional Prism languages for better code highlighting in docs.
website/docs/doc/GeneralUpdate.Bowl.md Expanded default-locale Bowl documentation with API and examples.
website/docs/doc/GeneralUpdate.ClientCore.md Expanded default-locale ClientCore documentation with API and examples.
website/docs/doc/GeneralUpdate.Core.md Expanded default-locale Core documentation with API and examples.
website/docs/doc/GeneralUpdate.Differential.md Expanded default-locale Differential documentation with API and examples.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md Added/expanded English Bowl documentation mirroring default structure.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md Added/expanded English ClientCore documentation mirroring default structure.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md Added/expanded English Core documentation mirroring default structure.
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md Added/expanded English Differential documentation mirroring default structure.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md Updated zh-Hans localized Bowl documentation copy.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md Updated zh-Hans localized ClientCore documentation copy.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md Updated zh-Hans localized Core documentation copy.
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md Updated zh-Hans localized Differential documentation copy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +89 to +91
ProductId = "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
// 应用密钥(用于服务器验证)
AppSecretKey = "dfeb5833-975e-4afb-88f1-6278ee9aeff6"
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs include hard-coded ProductId and AppSecretKey values that look like real identifiers/keys. Even in examples, please replace these with obvious placeholders (e.g., "your-product-id", "your-secret-key") and consider adding a note that secrets should come from secure configuration (env vars/user secrets) rather than being committed to source control.

Suggested change
ProductId = "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
// 应用密钥(用于服务器验证)
AppSecretKey = "dfeb5833-975e-4afb-88f1-6278ee9aeff6"
ProductId = "your-product-id",
// 应用密钥(用于服务器验证)
AppSecretKey = "your-app-secret-key" // 实际项目中请从安全配置(环境变量、用户机密等)中读取,而不要硬编码或提交到版本库中

Copilot uses AI. Check for mistakes.
Comment on lines +88 to +92
// Product ID (for multi-product branch management)
ProductId = "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
// App secret key (for server verification)
AppSecretKey = "dfeb5833-975e-4afb-88f1-6278ee9aeff6"
};
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs include hard-coded ProductId and AppSecretKey values that look like real identifiers/keys. Even in examples, please replace these with obvious placeholders (e.g., "your-product-id", "your-secret-key") and consider adding a note that secrets should come from secure configuration (env vars/user secrets) rather than being committed to source control.

Copilot uses AI. Check for mistakes.
Comment on lines +89 to +91
ProductId = "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
// 应用密钥(用于服务器验证)
AppSecretKey = "dfeb5833-975e-4afb-88f1-6278ee9aeff6"
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档示例中硬编码了 ProductIdAppSecretKey(看起来像真实的标识/密钥)。即使是示例也建议替换为明确的占位符(如 "your-product-id""your-secret-key"),并补充提示:密钥应来自安全配置(环境变量/User Secrets 等),避免提交到仓库。

Suggested change
ProductId = "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
// 应用密钥(用于服务器验证)
AppSecretKey = "dfeb5833-975e-4afb-88f1-6278ee9aeff6"
ProductId = "your-product-id",
// 应用密钥(用于服务器验证)
// 注意: 在实际应用中,请从安全配置(如环境变量、User Secrets 等)中读取密钥,避免将真实密钥提交到仓库。
AppSecretKey = "your-app-secret-key"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GeneralUpdate Online Documentation Development

2 participants