Skip to content

fix(web): keep the reader's locale on the FAQ's internal links - #6798

Merged
Hmbown merged 1 commit into
Hmbown:mainfrom
Lstarsky0:fix/faq-locale-links
Sep 30, 2026
Merged

Hmbown merged 1 commit into
Hmbown:mainfrom
Lstarsky0:fix/faq-locale-links

Conversation

@Lstarsky0

Copy link
Copy Markdown
Contributor

Summary

The FAQ answers link to /en/install, /en/models, /en/docs/mcp and /en/contribute (and the /zh/ ones in the Chinese answers). Every locale without its own FAQ reads the English answers, so someone on /ja/faq who follows one of those links ends up on the English site. The answers now build these links from the reader's locale, the way the other pages do; #6733 did the same for the constitution page's Install button.

faqEn and faqZh become functions of that prefix, and the page calls the one it picks with it.

No-Issue: small link fix found while moving the site pages off isZh.

Testing

Web only, no Rust touched. From web/:

  • npm test — 629 passed
  • npm run check — clean

Rendered faq, main vs this branch, all 18 locales: body text, <title>/description/og:/twitter: meta and the FAQPage JSON-LD identical. In en and zh the lang/href attributes are identical too; in the other 16 the only change is those five links moving from /en/… to the reader's locale, and every target page is built for every locale.

Checklist

  • This PR adds a new layer/module/abstraction — n/a
  • Updated docs or comments as needed — n/a
  • Added or updated tests where relevant — n/a
  • Verified TUI behavior manually if UI changes — n/a
  • Harvested/co-authored credit uses a GitHub numeric noreply address

The FAQ answers linked to /en/install, /en/models, /en/docs/mcp and
/en/contribute (and the /zh/ ones in the Chinese answers). Every locale
without its own FAQ reads the English answers, so a reader on /ja/faq
who followed one landed on the English site. The answers now take the
same /{locale}{path} prefix the other pages build their links with.

Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com>
@Lstarsky0
Lstarsky0 requested a review from Hmbown as a code owner September 30, 2026 14:08
@github-actions github-actions Bot added the contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm label Sep 30, 2026
@Hmbown
Hmbown merged commit 2d78466 into Hmbown:main Sep 30, 2026
42 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants