Skip to content

fix(docs/i18n): fix MDX compilation errors causing Cloudflare Pages failure#5460

Merged
leaanthony merged 7 commits into
wailsapp:masterfrom
taliesin-ai:translations/2026-05-15-8b087ed8
May 16, 2026
Merged

fix(docs/i18n): fix MDX compilation errors causing Cloudflare Pages failure#5460
leaanthony merged 7 commits into
wailsapp:masterfrom
taliesin-ai:translations/2026-05-15-8b087ed8

Conversation

@taliesin-ai

@taliesin-ai taliesin-ai commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Problem

The i18n batch-2 translations (committed 2026-05-07) introduced four categories of MDX compilation errors across all 7 translated locales. This causes astro build to exit 1, which fails the Cloudflare Pages: wails-v3-site check on all PRs.

Root Cause

The translation pipeline merged content that should be on separate lines. Three files per locale are affected:

Bug 1 — concepts/architecture.mdx (all 7 locales)

D2 lifecycle diagram truncated at line 327; Save: "Save State" {--- (diagram close {...} merged with --- footer separator).
Fix: Restore complete D2 diagram close + missing Build Process/Dev vs Prod/Memory/Security/Next Steps sections.

Bug 2 — quick-start/installation.mdx (all 7 locales)

</TabItem>#### heading on same line — unclosed <Tabs>/<Steps> block.
Fix: Add missing macOS/Linux npm TabItems, close Tabs/Steps, add Troubleshooting section.

Bug 3 — getting-started/your-first-app.mdx (all 7 locales)

[sentence].:::tip[...] merged on one line — tip admonition outside <Steps> list item.
Fix: Separate :::tip onto its own line with 4-space indent.

Bug 4 — zh-tw/index.mdx

Bare <0.5 — invalid MDX JSX before digit.
Fix: Escape as &lt;0.5.

Verification

Local build on fix branch: astro build exits 0, 1342 pages built.

CC @leaanthony

Summary by CodeRabbit

  • Documentation
    • Expanded architecture docs with lifecycle diagram updates (Save State & Application End), lifecycle hooks, build process, dev vs. prod flows, memory & security models, and next steps — updated in EN/DE/FR/JA/KO/PT
    • Reformatted "Tip"/callout blocks in Getting Started guides — DE/FR/JA/KO/PT
    • Added macOS/Linux npm installation guidance and package-manager notes in Quick Start — DE/FR/JA/KO/PT
    • Minor content fixes (NSIS filename, troubleshooting header/form formatting) across locales

Review Change Stack

Three systematic bugs found in the i18n batch-2 translation (2026-05-07):
1. architecture.mdx: D2 lifecycle diagram truncated mid-block, footer merged
2. quick-start/installation.mdx: </TabItem>#### heading merged, unclosed Tabs/Steps
3. getting-started/your-first-app.mdx: :::tip admonition merged onto previous line
4. zh-tw/index.mdx: bare < before digit treated as invalid JSX

All 7 locales (de, fr, ja, ko, pt, ru, zh-tw) affected. Local build verified:
astro build exits 0, 1342 pages built.
@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR updates localized MDX docs: extends architecture pages (lifecycle, hooks, build, dev/prod, memory, security), expands quick-start npm installation tabs for macOS/Linux, and reformats Pro Tip callouts in getting-started pages.

Changes

Localized Documentation Updates

Layer / File(s) Summary
Architecture pages: lifecycle, build, dev/prod, memory, security
docs/src/content/docs/de/concepts/architecture.mdx, docs/src/content/docs/fr/concepts/architecture.mdx, docs/src/content/docs/ja/concepts/architecture.mdx, docs/src/content/docs/ko/concepts/architecture.mdx, docs/src/content/docs/pt/concepts/architecture.mdx
Extended lifecycle diagram with Save State and Application End; added Lifecycle hooks with OnStartup/OnShutdown example (DE/PT); added Build Process, Development vs Production, Memory Model, Security Model, and Next Steps sections (DE/PT); minor emphasis/text fixes in KO/FR/JA lifecycle diagrams.
Getting Started: Pro Tip reformat
docs/src/content/docs/de/getting-started/your-first-app.mdx, docs/src/content/docs/fr/getting-started/your-first-app.mdx, docs/src/content/docs/ja/getting-started/your-first-app.mdx, docs/src/content/docs/ko/getting-started/your-first-app.mdx, docs/src/content/docs/pt/getting-started/your-first-app.mdx
Reformatted :::tip[...] blocks so the code block, paragraphs, and Git URL list render as separate lines while preserving examples; corrected PT NSIS filename and updated KO frontmatter description.
Quick Start: npm installation & troubleshooting
docs/src/content/docs/de/quick-start/installation.mdx, docs/src/content/docs/fr/quick-start/installation.mdx, docs/src/content/docs/ja/quick-start/installation.mdx, docs/src/content/docs/ko/quick-start/installation.mdx, docs/src/content/docs/pt/quick-start/installation.mdx
Expanded optional npm installation step with macOS and Linux tabbed instructions and npm --version checks; added alternative package manager tip (pnpm, yarn, bun); fixed the Go-version troubleshooting header separation and reorganized PT installation/troubleshooting content.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • wailsapp/wails#5355: Overlapping Portuguese documentation updates for architecture/installation pages.
  • wailsapp/wails#5352: Related Korean documentation edits touching the architecture lifecycle diagram.
  • wailsapp/wails#5354: Overlapping French architecture lifecycle/diagram updates.

Suggested labels

Documentation, v3-alpha, size:L, lgtm, reviewed ✅

Suggested reviewers

  • leaanthony

Poem

🐰 I hopped through docs in tongues of four,
Diagrams tuned and tips restored,
Tabs for npm, hooks placed just right,
Memory, build, and security in sight,
A small hare's cheer — docs polished and more!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: fixing MDX compilation errors in i18n documentation that were causing Cloudflare Pages build failures.
Description check ✅ Passed The description provides a comprehensive problem statement, root cause analysis, categorized bugs with fixes, and verification steps, though it lacks explicit testing checklist completion.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/src/content/docs/de/quick-start/installation.mdx`:
- Around line 360-363: The code block contains German text that must stay in
English; update the fenced code block in installation.mdx replacing "❌
webkit2gtk nicht gefunden" with "❌ webkit2gtk not found" and "Installation mit:"
with "Install with:" so the shell instruction ("sudo apt install
libwebkit2gtk-4.1-dev") remains unchanged and the code block matches the
original English source.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c8079e3e-5b31-4ca3-9107-15748d93283c

📥 Commits

Reviewing files that changed from the base of the PR and between 99617cc and 2620184.

📒 Files selected for processing (3)
  • docs/src/content/docs/de/concepts/architecture.mdx
  • docs/src/content/docs/de/getting-started/your-first-app.mdx
  • docs/src/content/docs/de/quick-start/installation.mdx

Comment on lines +360 to +363
```
❌ webkit2gtk nicht gefunden
Installation mit: sudo apt install libwebkit2gtk-4.1-dev
```

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Code block contains German text—should remain in English.

The example output in this code block contains German translations ("webkit2gtk nicht gefunden" and "Installation mit:"), but code blocks must remain in their original English form across all locale MDX files.

📝 Proposed fix to restore English text

-❌ webkit2gtk nicht gefunden

  • Installation mit: sudo apt install libwebkit2gtk-4.1-dev
    +❌ webkit2gtk not found
  • Install with: sudo apt install libwebkit2gtk-4.1-dev

As per coding guidelines: "For Wails documentation i18n/translation PRs, do not translate any text inside code blocks in MDX files. This includes fenced code blocks (```), embedded code/shell commands, and d2 diagram source text such as labels. Code block contents must remain exactly in their original English form across all locale MDX files."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/content/docs/de/quick-start/installation.mdx` around lines 360 -
363, The code block contains German text that must stay in English; update the
fenced code block in installation.mdx replacing "❌ webkit2gtk nicht gefunden"
with "❌ webkit2gtk not found" and "Installation mit:" with "Install with:" so
the shell instruction ("sudo apt install libwebkit2gtk-4.1-dev") remains
unchanged and the code block matches the original English source.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/src/content/docs/pt/quick-start/installation.mdx`:
- Line 14: In the Portuguese quick-start MDX file, revert translated
shell-comment lines inside fenced code blocks back to English: change "# Instale
o Go 1.25+ e depois:" to "# Install Go 1.25+ then:", change both occurrences of
"# Deve mostrar 1.25+" to "# Should show 1.25+", change "# Recarregar" to "#
Reload", and change "# ou ~/.bashrc" to "# or ~/.bashrc"; ensure these
replacements are made within the code block content (not prose) so all comments
in installation.mdx remain in original English across the file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: be8991dc-e101-4e1e-bae0-6067c5352c0b

📥 Commits

Reviewing files that changed from the base of the PR and between 92d212b and adb8cb1.

📒 Files selected for processing (3)
  • docs/src/content/docs/pt/concepts/architecture.mdx
  • docs/src/content/docs/pt/getting-started/your-first-app.mdx
  • docs/src/content/docs/pt/quick-start/installation.mdx

:::tip[TL;DR - Para desenvolvedores experientes]
```bash
# Instale o Go 1.25+, depois:
# Instale o Go 1.25+ e depois:

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove Portuguese translations from code block comments.

Shell command comments inside fenced code blocks must remain in English. The following lines contain translated comments that should be reverted to English:

  • Line 14: # Instale o Go 1.25+ e depois: → should be # Install Go 1.25+ then:
  • Line 36: # Deve mostrar 1.25+ → should be # Should show 1.25+
  • Line 59: # Deve mostrar 1.25+ → should be # Should show 1.25+
  • Line 93: # Recarregar → should be # Reload
  • Line 292: # Ubuntu/Debian → should remain # Ubuntu/Debian (already English, OK)
  • Line 297: # Fedora → should remain # Fedora (already English, OK)
  • Line 298: # Arch → should remain # Arch (already English, OK)
  • Line 345: # ou ~/.bashrc → should be # or ~/.bashrc

As per coding guidelines, code block contents (including comments) must remain in their original English form across all locale MDX files to maintain consistency.

Proposed fix
-# Instale o Go 1.25+ e depois:
+# Install Go 1.25+ then:
 go install github.com/wailsapp/wails/v3/cmd/wails3@latest
 wails3 doctor  # Verificar instalação
-go version  # Deve mostrar 1.25+
+go version  # Should show 1.25+
-source ~/.bashrc  # Recarregar
+source ~/.bashrc  # Reload
-source ~/.zshrc  # ou ~/.bashrc
+source ~/.zshrc  # or ~/.bashrc

Also applies to: 36-36, 59-59, 93-93, 292-292, 297-297, 298-298, 345-345

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/content/docs/pt/quick-start/installation.mdx` at line 14, In the
Portuguese quick-start MDX file, revert translated shell-comment lines inside
fenced code blocks back to English: change "# Instale o Go 1.25+ e depois:" to
"# Install Go 1.25+ then:", change both occurrences of "# Deve mostrar 1.25+" to
"# Should show 1.25+", change "# Recarregar" to "# Reload", and change "# ou
~/.bashrc" to "# or ~/.bashrc"; ensure these replacements are made within the
code block content (not prose) so all comments in installation.mdx remain in
original English across the file.

@leaanthony leaanthony merged commit 816a299 into wailsapp:master May 16, 2026
12 of 13 checks passed
leaanthony pushed a commit that referenced this pull request May 16, 2026
Master commit 1c2ec6a (feat(linux): flip GTK4 + WebKitGTK 6.0 to the
default build) reorganised linux_cgo.go/linux_cgo_gtk3.go: GTK4 is now
the default build path.

Conflict resolutions:
- linux_cgo.go: use master (GTK4 default, already has undo/redo fix)
- docs/*: use master (translated content from fix(docs/i18n) #5460)

GTK3 path (linux_cgo_gtk3.go) still needs undo/redo fix — addressed in
the following commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants