Skip to content

🌐 [translation-sync] Small edits#98

Open
mmcky wants to merge 2 commits intomainfrom
translation-sync-2026-04-12T22-15-05-pr-526
Open

🌐 [translation-sync] Small edits#98
mmcky wants to merge 2 commits intomainfrom
translation-sync-2026-04-12T22-15-05-pr-526

Conversation

@mmcky
Copy link
Copy Markdown
Contributor

@mmcky mmcky commented Apr 12, 2026

Automated Translation Sync

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

Source PR

#526 - Small edits

Files Updated

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

Details

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

This PR was created automatically by the translation action.

Copilot AI review requested due to automatic review settings April 12, 2026 22:15
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 12, 2026

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit 6343d17
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/69dc196e908d0a0008cd84c6
😎 Deploy Preview https://deploy-preview-98--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 12, 2026

⚠️ Translation Quality Review

Verdict: WARN | Model: claude-sonnet-4-6 | Date: 2026-04-12


📝 Translation Quality

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

Summary: The translation is of high quality overall, accurately conveying all technical content in the modified sections with natural Persian phrasing. The main issue is a spurious 'from numba import jit' import added to the update function code cell in the Multithreaded Loops section that does not appear in the English source. There is also a minor terminological inconsistency where the heading 'تعیین نوع' (type determination) does not match the body text's correct use of 'استنتاج نوع' (type inference) in the Typing subsection. The formatting is well-preserved with proper MyST directives and mathematical notation intact. Technical terminology is consistently and correctly translated throughout all modified sections, following the reference glossary (e.g., 'برداری‌سازی' for vectorization, 'کامپایلر در زمان اجرا' for JIT compiler) Mathematical notation and LaTeX equations are perfectly preserved across all modified sections including the quadratic map and wealth update equations The admonition block ('توضیح' for 'Remark') and note blocks are correctly translated with appropriate MyST directive formatting maintained The Sharp Bits section and its subsections (Typing and Global Variables) are well-translated with natural Persian phrasing that reads fluently for academic audiences The explanation of JIT compilation mechanics in 'How and When it Works' is accurately translated with all bullet points and technical nuances preserved

⚠️ Markdown Syntax Errors (CRITICAL)

  • 🔴 In the Multithreaded Loops section, the Persian translation adds 'from numba import jit' inside the @jit decorated update function code block, which is not present in the English source code cell

Suggestions:

  • Sharp Bits section title: 'نکات ظریف' is acceptable but 'نکات تیز' or 'نکات مهم' might better capture the idiomatic meaning of 'sharp bits' (referring to tricky/problematic aspects). However, 'نکات ظریف' is defensible.

  • Typing section: 'تعیین نوع' (type determination) is used instead of a more standard 'استنتاج نوع' (type inference), which would better match the technical concept discussed in the section body where 'type inference' is the key topic. The body correctly uses 'استنتاج نوع' creating an inconsistency between heading and content.

  • Multithreaded Loops: The translation adds 'from numba import jit' to the code cell for the update function, which does not appear in the English source at that location. This is a spurious addition that could confuse readers since jit was already imported earlier.

  • Global Variables section: 'متغیرهای سراسری' correctly follows the glossary mapping for global variables, which is good. No issue here - this is a strength.

  • How and When it Works: The phrase 'کشش‌های مستقل' used in Multithreaded Loops for 'independent draws' is acceptable but 'نمونه‌های مستقل' or 'مقادیر تصادفی مستقل' would be more natural in Persian statistical writing.


🔍 Diff Quality

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

Summary: The translation target document is correctly updated to reflect all structural and content changes from the English source, with the heading map accurately revised to match the new section hierarchy.


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 for the Persian (fa) version of the Numba lecture, aligning content/structure with upstream “Small edits”.

Changes:

  • Restructures and rewrites portions of lectures/numba.md (new headings, revised explanations, timing “warm up” pattern, updated examples).
  • Updates document labels/anchors and some code cells to match the updated narrative.
  • Updates translation sync state metadata (source-sha, synced-at, tool version, section count).

Reviewed changes

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

File Description
lectures/numba.md Updates the translated Numba lecture content, section structure, and example code/timing snippets to match upstream edits.
.translate/state/numba.md.yml Bumps translation sync metadata (source SHA/date, tool version, section count).
Comments suppressed due to low confidence (1)

lectures/numba.md:116

  • In the qm example, the loop body is indented less than the rest of the function body. As written, this will raise an IndentationError (or execute outside the loop, depending on how whitespace is interpreted). Indent x[t+1] = ... to match the 4-space indentation used elsewhere inside the function.
    x = np.empty(n+1)
    x[0] = x0
    for t in range(n):
      x[t+1] = α * x[t] * (1 - x[t])
    return x

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


# شوک‌ها را بکش
def update(w, r=0.1, s=0.3, v1=0.1, v2=1.0):
" Updates household wealth. "
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The update function docstring has leading/trailing spaces (" Updates household wealth. "), which will be preserved in rendered/help output. Consider removing the extra spaces (and, if keeping a docstring here, match the docstring style used elsewhere, e.g. lectures/python_oop.md:636-638).

Suggested change
" Updates household wealth. "
"Updates household wealth."

Copilot uses AI. Check for mistakes.
Comment on lines +397 to +398
w0=1, T=1000, num_reps=50_000
):
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The multi-line compute_long_run_median_parallel signature indentation/parenthesis placement is inconsistent with other multi-line defs in this repo (e.g. lectures/numba.md later uses aligned parameters in compute_call_price_parallel). Reformatting to the same alignment style would improve readability and reduce diffs in future translation syncs.

Suggested change
w0=1, T=1000, num_reps=50_000
):
w0=1, T=1000, num_reps=50_000
):

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

@github-actions github-actions bot temporarily deployed to pull request April 12, 2026 22:20 Inactive
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