fix(web): keep the reader's locale on the FAQ's internal links - #6798
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The FAQ answers link to
/en/install,/en/models,/en/docs/mcpand/en/contribute(and the/zh/ones in the Chinese answers). Every locale without its own FAQ reads the English answers, so someone on/ja/faqwho 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.faqEnandfaqZhbecome 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 passednpm run check— cleanRendered
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 thelang/hrefattributes 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