Background: Translation projects must handle upstream changes
The course content for A Tour of Go comes from the official repository:
golang/websiteThe early workflow was straightforward:
Official source code
↓
Translation
↓
Validation
↓
ReleaseThis approach works for an initial translation but is not suitable for long-term maintenance.
When the upstream content changes, several questions need answering:
- Which course pages have changed?
- Are the existing translations still valid?
- Do they need to be retranslated?
- Which pages can continue to be reused?
Therefore, an upstream revision sync mechanism has been added to go-tour-i18n.
Recording the official source baseline
The project now records the corresponding upstream commit:
upstream_commit
upstream_commit_timeThe release manifest includes:
{
"upstream_commit": "645042eb697eaf69e33a9af00c6b5b3fffdead5a",
"upstream_commit_time": "2026-08-20T05:56:11Z"
}This ensures that every official release version clearly corresponds to:
- Which official source code version;
- Which translation result;
- Which production release.
![[Figure 1: Git commit and project status]](https://media.shuijingwanwq.com/2026/08/1-72.png)
Automatically detecting upstream source changes
When the official source code is updated, the project first performs a source preview.
This detection found:
welcome.articleremoved the old Simplified Chinese community translation link;basics.articlechangedvarto an inline code tag;- 93 referenced Example sources had no content changes.
Detection results:
Page unchanged=103
content_changed=0
Example unchanged=93
content_changed=0
conditional unchanged=2This means:
Most of the course content does not need to be retranslated; only the parts that have actually changed need to be processed.
![[Figure 2: upstream source preview]](https://media.shuijingwanwq.com/2026/08/2-62-1024x88.png)
stale status: avoiding overwriting historical translations
Previously, the only translation status was:
readyHowever, after the upstream changes, the original translations cannot simply be considered still valid.
Therefore, the following has been added:
stalestatus.
This time:
welcome/2basics/9
Due to the source revision change, it goes from the original:
readyto:
staleThen it re-enters the translation workflow.
This avoids:
- mistakenly assuming that old translations still correspond to the new source code;
- manually missing upstream modifications.
![[Figure 3: stale retranslation status]](https://media.shuijingwanwq.com/2026/08/3-55-1024x62.png)
Regenerating translation batches
For the changed pages, new translation tasks are generated:
chatgpt-zh-CN-013It includes:
welcome/2
basics/9Full workflow:
export
↓
ChatGPT raw response
↓
process
↓
restore
↓
validation
↓
Translation Quality Review
↓
promotionResults this time:
process:
restore_passed=2
restore_failed=0
validation:
validation_passed=2
validation_failed=0
review:
2/2 approvedAnd the quality rating:
A![[Figure 4: Retranslation workflow]](https://media.shuijingwanwq.com/2026/08/4-47-1024x26.png)
Promotion preflight check
After retranslation is completed, it is not published directly.
The project adds a promotion preflight.
This check:
unit_count=122
page_count=103
example_count=19
changed_count=2
unchanged_count=120
review_approved_count=122
can_apply=trueConfirms:
- All translation units are complete;
- The page count is correct;
- Example status is normal;
- Review has passed.
Only after this is it allowed to proceed to formal application.
![[Figure 5: promotion preflight]](https://media.shuijingwanwq.com/2026/08/5-26-1024x26.png)
Generating a new production release
Finally, a release bundle is generated:
{
"locale": "zh-CN",
"upstream_commit": "645042eb697eaf69e33a9af00c6b5b3fffdead5a",
"translation_units": 122,
"pages": 103,
"eligible_examples": 19,
"articles": 7
}The current release includes:
- 122 translation units;
- 103 course pages;
- 19 executable Examples;
- 7 article files.
![[Figure 6: release.json]](https://media.shuijingwanwq.com/2026/08/6-15.png)
Summary
The implementation of this upstream sync mechanism completes a major upgrade for go-tour-i18n:
From:
One-time translation projectTo:
Continuously maintained multilingual course systemNew maintenance workflow:
golang/website upstream
↓
commit baseline
↓
source diff
↓
stale detection
↓
translation regeneration
↓
validation
↓
Translation Quality Review
↓
promotion
↓
production releaseWhen expanding to more language versions in the future, the same set of sync and validation workflows can be reused without redesigning the entire translation system.

![[Figure 2: upstream source preview]](https://media.shuijingwanwq.com/2026/08/2-62.png)