Skip to content

🌐 [translation-sync] Add Polars lecture to complement existing Pandas lecture - #79

Merged
mmcky merged 3 commits into
mainfrom
translation-sync-2026-07-30T22-06-56-pr-408
Jul 30, 2026
Merged

🌐 [translation-sync] Add Polars lecture to complement existing Pandas lecture#79
mmcky merged 3 commits into
mainfrom
translation-sync-2026-07-30T22-06-56-pr-408

Conversation

@mmcky

@mmcky mmcky commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

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

Source PR

#408 - Add Polars lecture to complement existing Pandas lecture

Files Added

  • lectures/polars.md
  • .translate/state/polars.md.yml

Files Updated

  • ✏️ lectures/_toc.yml

Details

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

This PR was created automatically by the translation action.

Copilot AI review requested due to automatic review settings July 30, 2026 22:06
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-07-30
Routing: editor — 1 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other)


📝 Translation Quality

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

Summary: The translation of the changed sections is accurate, fluent, and terminologically consistent, with correct MyST/Markdown formatting and no syntax errors. Minor stylistic nuances exist but do not detract from clarity or correctness. Consistent and accurate rendering of Polars-specific technical vocabulary (lazy evaluation, predicate pushdown, projection pushdown, column expressions, etc.) Code blocks, directives, and links are fully preserved with correct MyST syntax Full-width punctuation and spacing rules around inline directives are correctly applied throughout the changed sections Natural, fluent academic Chinese register maintained across explanatory prose and notes/tips

Suggestions:

  • [minor · terminology] lectures/polars.md — ### Eager vs lazy: The heading 'Eager vs lazy' is translated as '立即执行与惰性执行'. This is accurate and clear, but the term 'eager' is elsewhere sometimes referred to differently ('立即执行模式' vs '立即执行'). The translation is consistent internally, so this is only a minor stylistic note, not an error.
  • [minor · fluency] lectures/polars.md — ### Performance comparison, 'The take-away:': '由此可以得出以下结论:' is a reasonable translation of 'The take-away:' but slightly more formal/verbose than the terse English bullet-intro. This does not affect correctness. → 结论:
  • [nit · fluency] lectures/polars.md — ### Missing values, 'Let's insert some null values to demonstrate imputation techniques': '让我们插入一些空值来演示插补技术' is accurate; 'null values' translated as '空值' is standard and consistent, no issue found here, included only as confirmation of correct terminology usage.

🔍 Diff Quality

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

Summary: The translation is correctly scoped, positioned, and structurally faithful to the source, but the heading-map keys do not follow the documented slug/ID format.

Issues:

  • Heading map uses plain heading text keys (e.g., 'Overview', 'DataFrames::Selecting data') instead of the expected slugified English IDs (e.g., 'overview', 'dataframes::selecting-data'), which is inconsistent with the documented ID-generation scheme.
  • Top-level headings 'Series' and 'DataFrames' are mapped to themselves untranslated ('Series: Series', 'DataFrames: DataFrames'), which is odd but may be intentional since these are proper nouns; worth flagging for review.
  • The 'Exercises' section heading map entry exists, but sub-elements like exercise/solution directive labels (pl_ex1, pl_ex2) are not part of headings map, which is expected but worth noting no heading exists for exercises' nested titles.

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.

Pull request overview

Adds a new Chinese-language Polars lecture (synced from the upstream English source) and wires it into the Jupyter Book table of contents, along with translation-sync state metadata.

Changes:

  • Add new lecture: lectures/polars.md (Polars intro, eager vs lazy, examples, and exercises/solutions)
  • Update the book TOC to include the Polars chapter
  • Add translation sync state for the new lecture

Reviewed changes

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

File Description
lectures/polars.md New Polars lecture content in zh-cn, including examples and exercises
lectures/_toc.yml Adds polars to the “Working with Data” section
.translate/state/polars.md.yml Records translation sync metadata for polars.md
Comments suppressed due to low confidence (3)

lectures/polars.md:611

  • 该图的标题与 x 轴标签仍为英文('US Unemployment Rate' / 'year')。仓库中文讲座中同类图表标签通常使用中文,建议翻译以保持一致。
ax.set_title('US Unemployment Rate')
ax.set_xlabel('year', fontsize=12)
ax.set_ylabel('%', fontsize=12)

lectures/polars.md:725

  • 练习 1 解答中的坐标轴标签仍为英文('stock' / 'percentage change in price'),与中文讲座整体语言不一致。建议翻译为中文标签。
ax.set_xlabel('stock', fontsize=12)
ax.set_ylabel('percentage change in price', fontsize=12)

lectures/polars.md:810

  • 练习 2 解答中子图坐标轴标签使用英文('yearly return (%)' / 'year')。为与中文版本一致,建议将其翻译为中文。
    ax.set_ylabel('yearly return (%)', fontsize=12)
    ax.set_xlabel('year', fontsize=12)

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

Comment thread lectures/polars.md
Comment on lines +698 to +702
price_change = ticker.select([
((pl.col(tick).last() / pl.col(tick).first() - 1) * 100)
.alias(tick)
for tick in ticker_list.keys()
]).transpose(
Comment thread lectures/polars.md
Comment on lines +652 to +655
"""
Read closing price data from Yahoo Finance
and return a Polars DataFrame.
"""
Comment thread lectures/polars.md
Comment on lines +341 to +342
ax.set_xlabel('country', fontsize=12)
ax.set_ylabel('GDP per capita', fontsize=12)
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