create-or-update-zh-translation-pr

Create or update Chinese translation PRs from English docs changes.

617|716|Updated Jul 23, 2016
One-click install
npx skills add https://github.com/pingcap/docs --skill create-or-update-zh-translation-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-or-update-zh-translation-pr
Source: https://github.com/pingcap/docs/tree/main/.ai/skills/create-or-update-zh-translation-pr
Command: npx skills add https://github.com/pingcap/docs --skill create-or-update-zh-translation-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Create or update a zh translation PR from pingcap/docs to pingcap/docs-cn by orchestrating repo-local scripts to prepare change-unit translation inputs, apply minimal edits to the existing Chinese files, and create or update the target PR with the same branch, title, body, and label rules used in gh-util.user.js.

Core Features & Use Cases

  • Prepare translation inputs from English source PRs, including metadata, content refs, and per-file change units.
  • Apply deterministic, minimal edits to Chinese target files, preserving existing translations where still valid.
  • Create or update translation PRs with consistent branches, titles, bodies, and labels, matching the upstream workflow.

Quick Start

Run the prepare_translation_inputs.py script in the .ai/skills/create-or-update-zh-translation-pr/scripts directory with the appropriate mode and PR URLs to initialize a translation workflow.

Frequently Asked Questions about create-or-update-zh-translation-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Chinese translation PRs from English docs?

To automate Chinese translation PRs from English docs, use scripts that prepare translation inputs and apply minimal edits to existing Chinese files. This workflow creates or updates target PRs with consistent branches, titles, bodies, and labels.

How do I synchronize pingcap/docs changes into pingcap/docs-cn?

To synchronize pingcap/docs changes into pingcap/docs-cn, orchestrate repo-local scripts that extract per-file change units from the English source and apply deterministic, minimal edits to the Chinese target files, preserving valid existing translations.

Do I need gh CLI and jq to create translation PRs for docs-cn?

Yes, creating translation PRs for docs-cn requires the gh CLI and jq. You also need a local clone of the docs-cn repository to run the included Python and shell scripts that generate translation-input.json and a ready-to-push translation branch.

What's the best way to update an existing Chinese translation PR?

The best way to update an existing Chinese translation PR is using a deterministic workflow that re-prepares translation inputs from the English source and applies minimal edits to the target files. This ensures the branch, title, body, and labels remain consistent with upstream rules.

How does the translation workflow preserve existing valid Chinese translations?

The translation workflow preserves existing valid Chinese translations by applying deterministic, minimal edits to the target files. Scripts prepare per-file change units from the English source and only update the parts that require synchronization.

Why are my automated translation PRs not matching the upstream workflow rules?

Automated translation PRs may not match upstream rules if the scripts do not enforce consistent branches, titles, bodies, and labels. This workflow enforces those rules deterministically to align with the gh-util.user.js configuration.