Skip to content

🌐 [translation-sync] Improve jax_intro lecture#104

Merged
mmcky merged 2 commits intomainfrom
translation-sync-jax-intro-pr-527
Apr 13, 2026
Merged

🌐 [translation-sync] Improve jax_intro lecture#104
mmcky merged 2 commits intomainfrom
translation-sync-jax-intro-pr-527

Conversation

@mmcky
Copy link
Copy Markdown
Contributor

@mmcky mmcky commented Apr 13, 2026

Automated Translation Sync

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

Source PR

#527 - Improve jax_intro lecture

Files Updated

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

Details

  • Source Language: en
  • Target Language: fa
  • Model: claude-sonnet-4-6

Note: This is a clean replacement for #99 which had merge conflicts. See action-translation#63.


This PR was created automatically by the translation action.

Copilot AI review requested due to automatic review settings April 13, 2026 11:53
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 13, 2026

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit 513b3a0
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/69dcda26ae7bf3000810f3b1
😎 Deploy Preview https://deploy-preview-104--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

github-actions bot commented Apr 13, 2026

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-4-6 | Date: 2026-04-13


📝 Translation Quality

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

Summary: This is a high-quality translation of the changed sections. Accuracy, fluency, terminology, and formatting are all excellent. The Persian text conveys the technical content faithfully and reads naturally for an academic audience. The few minor issues identified are stylistic refinements rather than substantive errors — the translation is fully suitable for publication as-is. All MyST/Markdown formatting is perfectly preserved throughout the changed sections, including code blocks, LaTeX math, directives, and cross-references. Technical terminology is consistently and correctly translated — terms like 'pure functions' (توابع خالص), 'immutability' (تغییرناپذیری), 'functional programming' (برنامه‌نویسی تابعی), 'vectorization' (برداری‌سازی), and 'just-in-time compilation' (کامپایل JIT) align well with the reference glossary. The translation reads naturally in Persian academic register across all modified sections, with appropriate sentence structure and minimal awkward phrasing. The YAML frontmatter translation metadata is correctly structured with proper heading hierarchy using double-colon notation for nested sections. Nuanced technical explanations — such as the rationale for explicit random state, the relationship between pure functions and JIT compilation, and the description of asynchronous dispatch — are accurately conveyed in all changed sections.

Suggestions:

  • Similarities section: 'حتی نگاشت‌های با مقدار اسکالر روی آرایه‌ها' → Consider 'حتی توابع با مقدار اسکالر روی آرایه‌ها' — The English says 'scalar-valued maps on arrays' and while 'نگاشت' is technically correct, 'توابع اسکالر-مقدار' may read more naturally in Persian academic context.

  • Why Functional Programming? section: 'توابع خالص راحت‌تر مشتق‌گیری می‌شوند' → Consider 'توابع خالص به سادگی بیشتری مشتق‌گیری می‌شوند' — The phrase 'راحت‌تر' (more comfortable) is slightly informal; 'به سادگی بیشتری' or 'آسان‌تر' would be more precise for 'easier to differentiate'.

  • Random number generation section: 'برای تولید یک نمونه (شبه) مستقل، یک گزینه "تقسیم" کلید موجود است' → Consider 'برای تولید یک نمونه (شبه) مستقل، یک گزینه "تقسیم" کردن کلید موجود است' — The English says 'one option is to "split" the existing key'; adding 'کردن' after 'تقسیم' makes it clearer that 'split' is used as a verb/action here.

  • Compiling the whole function section: 'کامپایلر می‌تواند چندین فراخوانی به شتاب‌دهنده سخت‌افزاری و ایجاد تعدادی آرایه میانی را حذف کند' → Consider 'کامپایلر می‌تواند چندین فراخوانی به شتاب‌دهنده سخت‌افزاری و ایجاد تعداد زیادی آرایه میانی را حذف کند' — 'a number of' is better rendered as 'تعداد زیادی' rather than 'تعدادی' to preserve the English implication of non-trivial overhead elimination.

  • Combining transformations section: 'این ترکیب jit، vmap، و (همان‌طور که در ادامه خواهیم دید) grad در قلب طراحی JAX قرار دارد' → Consider 'این ترکیب jit، vmap، و (همان‌طور که در ادامه خواهیم دید) grad در هسته طراحی JAX قرار دارد' — 'central to JAX's design' is idiomatically better expressed as 'در هسته طراحی' rather than 'در قلب طراحی', though both are acceptable.


🔍 Diff Quality

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

Summary: The translation target document correctly mirrors all structural and content changes made to the English source document, with appropriate updates to the translation metadata frontmatter reflecting the removal of the 'JIT Compilation::Summary' heading.

Issues:

  • The 'JIT Compilation::Summary' heading entry was removed from the translation metadata in the target document. The source English document still contains a '### Summary' subsection under 'JIT Compilation', but the target 'after' frontmatter no longer includes 'JIT Compilation::Summary: خلاصه'. However, looking more carefully at the English 'after' document, the '### Summary' section under JIT Compilation was also removed from the source, so this removal is consistent.
  • The translated body content for the 'Summary' subsection under JIT Compilation was present in the target 'before' but is absent in the target 'after', which correctly mirrors the removal of that section from the English source 'after'.

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Automated translation-sync update for the Persian (fa) version of the jax_intro lecture, aligning it with upstream content changes in the source repository and updating translation sync metadata.

Changes:

  • Reordered/updated introductory content (GPU admonition placement, imports moved earlier).
  • Updated narrative and examples across JIT timing and vmap sections (including a new mm_diff example).
  • Updated translation sync state (source-sha, synced-at).

Reviewed changes

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

File Description
lectures/jax_intro.md Updates translated lecture structure, examples, and explanatory text to match upstream revisions.
.translate/state/jax_intro.md.yml Bumps sync metadata to the latest upstream source commit/date.

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

# First run
y = jnp.cos(x)
# Hold the interpreter until the array operation finishes
jax.block_until_ready(y);
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

سمیکالن در انتهای jax.block_until_ready(y); در پایتون غیرضروری و غیرمتعارف است و ممکن است برای خواننده‌ها این تصور را ایجاد کند که لازم است. بهتر است سمیکالن را اینجا (و سایر موارد مشابه در فایل) حذف کنید.

Suggested change
jax.block_until_ready(y);
jax.block_until_ready(y)

Copilot uses AI. Check for mistakes.
Comment on lines +197 to 198
# Hold interpreter
jax.block_until_ready(y);
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

در این سلول هم jax.block_until_ready(y); با سمیکالن تمام شده و در کامنت # Hold interpreter فاصلهٔ اضافی انتهای خط وجود دارد. پیشنهاد می‌شود سمیکالن و فاصلهٔ انتهایی حذف شوند تا مثال‌ها تمیز و idiomatic بمانند.

Suggested change
# Hold interpreter
jax.block_until_ready(y);
# Hold interpreter
jax.block_until_ready(y)

Copilot uses AI. Check for mistakes.
mm_diff(x)
```

حال فرض کنید یک ماتریس داریم و می‌خواهیم این آمارها را برای هر سطر محاسبه کنیم.
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

در این بخش تابع mm_diff فقط یک مقدار (اختلاف میانگین و میانه) برمی‌گرداند، اما متن می‌گوید «این آمارها». برای سازگاری با مثال جدید بهتر است به «این مقدار/این اختلاف» (مفرد) تغییر کند.

Suggested change
حال فرض کنید یک ماتریس داریم و می‌خواهیم این آمارها را برای هر سطر محاسبه کنیم.
حال فرض کنید یک ماتریس داریم و می‌خواهیم این اختلاف را برای هر سطر محاسبه کنیم.

Copilot uses AI. Check for mistakes.
@mmcky mmcky merged commit c1a3537 into main Apr 13, 2026
2 of 3 checks passed
@mmcky mmcky deleted the translation-sync-jax-intro-pr-527 branch April 13, 2026 11:57
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants