Skip to content

🌐 [translation-sync] FIX: lecture cleanup batch from the 2026-08 tracker audit - #154

Merged
mmcky merged 12 commits into
mainfrom
translation-sync-2026-08-18T03-44-19-pr-595
Aug 18, 2026
Merged

🌐 [translation-sync] FIX: lecture cleanup batch from the 2026-08 tracker audit#154
mmcky merged 12 commits into
mainfrom
translation-sync-2026-08-18T03-44-19-pr-595

Conversation

@mmcky

@mmcky mmcky commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

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

Source PR

#595 - FIX: lecture cleanup batch from the 2026-08 tracker audit

Files Updated

  • ✏️ lectures/autodiff.md
  • ✏️ .translate/state/autodiff.md.yml
  • ✏️ lectures/numpy.md
  • ✏️ .translate/state/numpy.md.yml
  • ✏️ lectures/pandas.md
  • ✏️ .translate/state/pandas.md.yml
  • ✏️ lectures/pandas_panel.md
  • ✏️ .translate/state/pandas_panel.md.yml
  • ✏️ lectures/polars.md
  • ✏️ .translate/state/polars.md.yml
  • ✏️ lectures/python_by_example.md
  • ✏️ .translate/state/python_by_example.md.yml

Details

  • Source Language: en
  • Target Language: fa
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

Copilot AI lite review requested due to automatic review settings August 18, 2026 03:44
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Aug 18, 2026
@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit b357ab3
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/6a83d520b2a2d700084f3e0f
😎 Deploy Preview https://deploy-preview-154--majestic-griffin-10b166.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-18
Routing: editor — 3 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 8/10
Terminology 9/10
Formatting 9/10
Overall 8.8/10

Summary: ترجمه فارسی بخش‌های تغییریافته این PR به‌طور کلی دقیق، روان و از نظر اصطلاحات فنی سازگار با واژه‌نامه مرجع است. ساختار MyST/Markdown از جمله بلوک‌های کد، معادلات و دایرکتیوهای exercise/solution به‌درستی حفظ شده‌اند و خطای نحوی جدی یافت نشد. چند مورد جزئی شامل ناهماهنگی URL در بخش pandas.md، تفاوت کد در توابع map/replace_nan نسبت به نسخه اصلی، و چند نکته سبکی کوچک شناسایی شد که تأثیر محدودی بر کیفیت کلی دارند. ترجمه اصطلاحات فنی مانند «مشتق‌گیری خودکار»، «گرادیان کاهشی»، «Broadcasting» و «ارزیابی تنبل» دقیق و مطابق با واژه‌نامه مرجع است. بلوک‌های کد و عبارات ریاضی LaTeX به‌درستی و بدون تغییر حفظ شده‌اند. ساختار markdown/MyST شامل هدینگ‌ها، تمرین‌ها (exercise/solution) و دایرکتیوها به‌درستی رعایت شده است. سبک نگارش رسمی و آکادمیک در سراسر بخش‌های تغییریافته حفظ شده و برای محتوای آموزشی مناسب است.

Suggestions:

  • [minor · fluency] lectures/numpy.md — ## مروری کلی (NumPy): جمله «ما قبلاً در درس‌های قبلی کدهایی شامل NumPy دیده‌ایم» با «قبلاً» و «قبلی» تکرار واژگانی نامطلوبی دارد که در متن اصلی وجود ندارد. → «ما پیش‌تر در درس‌های قبلی کدهایی شامل NumPy دیده‌ایم.»
  • [minor · accuracy] lectures/pandas.md — df = pd.read_csv('https://github.com/QuantEcon/data-lectures/raw/main/lectures/test_pwt.csv'): URL خواندن فایل CSV در ترجمه با URL موجود در متن اصلی انگلیسی متفاوت است (متن اصلی از raw.githubusercontent.com/.../lecture-python-programming/... استفاده می‌کند، اما ترجمه از data-lectures/raw/... استفاده کرده است). → بررسی و همسان‌سازی URL با متن اصلی: 'https://raw.githubusercontent.com/QuantEcon/lecture-python-programming/main/lectures/_static/lecture_specific/pandas/data/test_pwt.csv'
  • [minor · accuracy] lectures/pandas.md — df.map(lambda x : round(x,2) if not isinstance(x, str) else x): کد در بخش «ایجاد تغییرات در DataFrames» و «کاربرد: جایگزینی مقدار گمشده» با متن اصلی انگلیسی (که از type(x)!=str و np.isnan استفاده می‌کند) متفاوت نوشته شده است؛ این تغییرات کد از نسخه اصلی منحرف شده و ممکن است رفتار متفاوتی داشته باشد (مثلاً isinstance با pd.isna به‌جای np.isnan). → کد را دقیقاً مطابق نسخه انگلیسی حفظ کنید یا در صورت تغییر عمدی، این تفاوت را مستند کنید.
  • [minor · terminology] lectures/python_by_example.md — ## هدف:رسم یک فرآیند نویز سفید: در عنوان «هدف:رسم یک فرآیند نویز سفید» فاصله بعد از دونقطه رعایت نشده است که در فارسی رسمی و آکادمیک مرسوم است فاصله‌گذاری صحیح رعایت شود. → هدف: رسم یک فرآیند نویز سفید
  • [nit · fluency] lectures/polars.md — ### مقایسه عملکرد: عبارت «نکته کلیدی» برای «The take-away» ترجمه شده که قابل قبول است اما می‌توان از عبارت رایج‌تر «نتیجه‌گیری» یا «جمع‌بندی» نیز استفاده کرد تا با سبک آکادمیک هماهنگ‌تر باشد.

🔍 Diff Quality

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

Summary: The translation sync correctly mirrors all source changes across the six files in matching positions, preserving structure and translation metadata.


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

This PR syncs the Persian (fa) lecture translations with upstream cleanup changes from QuantEcon/lecture-python-programming#595, primarily updating random-number generation patterns, a few dataset URLs, and small documentation/text adjustments while refreshing translation state metadata.

Changes:

  • Update examples to use NumPy’s default_rng() / standard_normal() instead of legacy np.random.randn(...) in multiple lectures.
  • Update some dataset URLs to raw.githubusercontent.com (and adjust one Polars dataset URL to the lecture repo’s _static path).
  • Minor content cleanups (e.g., JAX RNG key splitting in autodiff, added docstring clarification about seed, and refreshed .translate/state/*.yml metadata).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lectures/python_by_example.md Switch white-noise example to default_rng() and update explanatory text accordingly.
lectures/polars.md Use default_rng(), update dataset URLs, and adjust percent-change computation to handle nulls.
lectures/pandas.md Switch Series example to default_rng() / standard_normal().
lectures/pandas_panel.md Update dataset URLs to raw.githubusercontent.com.
lectures/numpy.md Clarify seed behavior in DiscreteRV docstring and update timing guidance to qe.Timer().
lectures/autodiff.md Make JAX randomness explicit via split(key, 3) and minor formatting cleanup.
.translate/state/python_by_example.md.yml Update sync metadata (source SHA, synced-at, tool version).
.translate/state/polars.md.yml Update sync metadata (source SHA, synced-at).
.translate/state/pandas.md.yml Update sync metadata (source SHA, synced-at).
.translate/state/pandas_panel.md.yml Update sync metadata (source SHA, synced-at, tool version).
.translate/state/numpy.md.yml Update sync metadata (source SHA, synced-at, tool version).
.translate/state/autodiff.md.yml Update sync metadata (source SHA, synced-at, model/mode, tool version).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lectures/polars.md
Comment on lines 132 to 136
```{code-cell} ipython3
df = pl.DataFrame({
'company': ['AMZN', 'AAPL', 'MSFT', 'GOOG'],
'daily returns': np.random.randn(4)
'daily returns': rng.standard_normal(4)
})
@mmcky
mmcky merged commit 1bceccd into main Aug 18, 2026
7 of 9 checks passed
@mmcky
mmcky deleted the translation-sync-2026-08-18T03-44-19-pr-595 branch August 18, 2026 03:52
mmcky added a commit that referenced this pull request Aug 18, 2026
The #154 sync was regenerated from its source PR's merge-time snapshot,
which predates the test_pwt repoint synced here in #153 — so it
reverted two polars.md reads to the source repo's old own-repo URL (a
path scheduled for deletion) and rewrote three pandas_panel.md reads
to the raw.githubusercontent host form. This restores all five reads
to the canonical data-lectures form the English source uses. URL-only;
no translated text changes. The underlying regeneration defect is
recorded in QuantEcon/action-translation#276.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Aug 19, 2026
…URL form (#158)

Restore .translate/state/{pandas,polars}.md.yml to the versions #153 wrote (source-sha 55c87c9f, the Track D repoint) — #154 overwrote them with the stale snapshot's SHA (d35eb831), making isSourceChanged over-report both lectures as pending. Also revert the pandas_panel.md half of #155: the three data reads return to the raw.githubusercontent form, which is what source main itself serves at its last touch of that file — the regeneration's rewrite there was correct sync content, not stale damage.

Measurement and ledger: QuantEcon/action-translation#276.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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