Skip to content

🌐 [translation-sync] [names] Use builtins and %run, as Python 3 and the code cells do - #144

Merged
mmcky merged 2 commits into
mainfrom
translation-sync-2026-11-02T01-11-55-pr-654
Nov 2, 2026
Merged

mmcky merged 2 commits into
mainfrom
translation-sync-2026-11-02T01-11-55-pr-654

Conversation

@mmcky

@mmcky mmcky commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

This PR contains automated translations from QuantEcon/lecture-python-programming.

Source PR

#654 - [names] Use builtins and %run, as Python 3 and the code cells do

Files Updated

  • ✏️ lectures/names.md
  • ✏️ .translate/state/names.md.yml

Details

  • Source Language: en
  • Target Language: zh-cn
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Nov 2, 2026
Copilot AI balanced review requested due to automatic review settings November 2, 2026 01:11
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-11-02
Routing: editor — 2 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other)
Shadow gate: would NOT auto-merge (recorded only; no action taken)


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 9/10
Terminology 9/10
Formatting 9/10
Overall 9/10

Summary: The translation of the 'Interactive Sessions' and 'The builtins Namespace' sections is accurate, fluent, and terminologically consistent with the glossary and established style. No blocking or major issues were found; only a couple of minor stylistic nits regarding punctuation placement within code spans are noted. Accurate and clear rendering of technical concepts like namespaces, LEGB rule, and builtins mechanics in the modified sections Consistent and correct use of full-width Chinese punctuation throughout the changed sections Proper spacing maintained between Chinese text and inline code/backticks Code blocks, figure directives, and admonitions preserved correctly with no structural breakage

Suggestions:

  • [minor · fluency] lectures/names.md — ## Interactive Sessions: '这些命令也被视为在某个模块内执行——在这种情况下,该模块称为 __main__。': The em-dash '——' used here is a direct carryover style from English but is acceptable in Chinese; however consistency check shows the surrounding paragraph uses full-width punctuation correctly, so this is only a nitpick on dash usage which is stylistically fine.
  • [minor · terminology] lectures/names.md — ## The __builtins__ Namespace: '我们一直在使用各种内置函数,例如 max()、dir()、str()、list()、len()、range()、type() 等。': The English source lists the functions inside a single inline code span as max(), dir(), str(), list(), len(), range(), type(), but the translation moved the Chinese enumeration comma '、' inside the code span territory conceptually by keeping them in one code span with ASCII commas internally yet readable text uses enumeration marks outside; this is a minor inconsistency since the comma separat… → Consider formatting as individual inline code spans separated by Chinese enumeration commas: max()、dir()、str()、list()、len()、range()、type() 等。

🔍 Diff Quality

Check Status
Scope Correct ✅
Position Correct ❌
Structure Preserved ✅
Heading-map Correct ✅
Overall 7.5/10

Summary: The target correctly synced the __builtin__-to-builtins wording change but missed updating the run command to %run, making the translation sync incomplete.

Issues:

  • Source change 'IPython's run command' → 'IPython's %run command' was not propagated to the target document; target still reads 'IPython 的 run 命令' instead of 'IPython 的 %run 命令'
  • Only one of the two source edits (the __builtin__ → builtins module change) was correctly synced to the target

This review was generated automatically by action-translation review mode.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No issues were found and both translated edits were verified against the upstream source with consistent, non-future sync metadata.

No open issues 🎉

What changed in this PR

This is an automated translation-sync PR that propagates upstream source changes from QuantEcon/lecture-python-programming#654 into the Simplified Chinese (zh-cn) translation of the "Names and Namespaces" lecture. The changes align the Chinese text with modern Python 3 terminology to match what the executable code cells actually use.

I verified both Chinese edits against the source English file at commit 3100228:

  • "当我们使用 IPython 的 %run 命令运行脚本时…" correctly reflects the source "When we run a script using IPython's %run command…".
  • "这些定义由 builtins 模块提供。" correctly reflects "These definitions are provided by the builtins module." (replacing the obsolete __builtin__ reference). The nearby __builtins__ namespace reference on the next line remains correct and consistent.

The state metadata (source-sha, synced-at, model, mode, tool-version) is internally consistent with the PR's embedded sync metadata. The synced-at date (2026-11-02) matches today and is not a future date.

Changes:

  • Update run → %run to match the IPython magic command used in the code cells.
  • Replace the obsolete __builtin__ module reference with the Python 3 builtins module.
  • Refresh the translation-state YAML (source SHA, sync date, model, mode NEW→UPDATE, tool version).
File Description
lectures/​names.md Corrects two translated lines to use %run and builtins, matching upstream Python 3 terminology and the executable code cells.
.translate/​state/​names.md.yml Updates translation-sync bookkeeping metadata (source SHA, date, model, mode, tool version).

No issues were found; the translation faithfully and completely reflects the source PR, and the metadata is consistent.

Review effort: Balanced

@mmcky
mmcky merged commit d32ecdb into main Nov 2, 2026
4 of 5 checks passed
@mmcky
mmcky deleted the translation-sync-2026-11-02T01-11-55-pr-654 branch November 2, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants