From 301164da372a70fca785800fa7aa044001590742 Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Sat, 28 Nov 2026 09:49:36 +0530 Subject: [PATCH 1/5] fix(help-center): translate the portal's remaining chrome MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The copy added with the review (failure states, retry, delete dialogs, reader feedback) went through Paraglide, but the portal's own chrome was still hardcoded English: the index title, subtitle, search field and empty states; the article's meta line, archived notice, neighbour links and verdict prompt; the nav and outline headings; and every article-action label and toast. Move all of it into the shared catalog — 54 new keys across the eight locales, including the rail search and the "More articles" bucket — so a reader on a translated board does not get half a page in their language. English copy is unchanged; only its source moved. --- apps/web/src/portal/help-center/content.ts | 4 +- .../help-center-article-actions.tsx | 47 ++++++++-------- .../help-center/help-center-article-page.tsx | 49 +++++++++++------ .../portal/help-center/help-center-nav.tsx | 8 +-- .../portal/help-center/help-center-page.tsx | 35 ++++++------ .../help-center/help-center-rail-search.tsx | 10 ++-- .../portal/help-center/help-center-toc.tsx | 10 ++-- messages/ar.json | 54 +++++++++++++++++++ messages/de.json | 54 +++++++++++++++++++ messages/en.json | 54 +++++++++++++++++++ messages/es.json | 54 +++++++++++++++++++ messages/fr.json | 54 +++++++++++++++++++ messages/pt.json | 54 +++++++++++++++++++ messages/ru.json | 54 +++++++++++++++++++ messages/zh.json | 54 +++++++++++++++++++ 15 files changed, 529 insertions(+), 66 deletions(-) diff --git a/apps/web/src/portal/help-center/content.ts b/apps/web/src/portal/help-center/content.ts index bd6bd9b7e..fb9ee9e84 100644 --- a/apps/web/src/portal/help-center/content.ts +++ b/apps/web/src/portal/help-center/content.ts @@ -4,6 +4,8 @@ import * as Cause from "effect/Cause"; import * as Option from "effect/Option"; import * as Predicate from "effect/Predicate"; +import { m } from "@/paraglide/messages.js"; + /** * The shapes the portal's help center navigation works on. * @@ -85,7 +87,7 @@ export function buildHelpCenterSections({ icon: null, isTopic: false, key: UNLISTED_SECTION_KEY, - name: "More articles", + name: m.same_quaint_polecat_coax(), }); } diff --git a/apps/web/src/portal/help-center/help-center-article-actions.tsx b/apps/web/src/portal/help-center/help-center-article-actions.tsx index 51e925e43..50b6037bb 100644 --- a/apps/web/src/portal/help-center/help-center-article-actions.tsx +++ b/apps/web/src/portal/help-center/help-center-article-actions.tsx @@ -40,6 +40,7 @@ import { helpCenterMcpServerId, renderHelpCenterArticleMarkdown, } from "@/lib/help-center-agent"; +import { m } from "@/paraglide/messages.js"; /** * The article's actions, in the shape Blume gives a documentation page: a @@ -98,9 +99,7 @@ const CHAT_PROVIDERS = [ type MenuIcon = ComponentProps["icon"]; const PROMPT = (markdownUrl: string, title: string) => - encodeURIComponent( - `Read ${markdownUrl} so I can ask you questions about "${title}".` - ); + encodeURIComponent(m.active_salty_termite_stop({ title, url: markdownUrl })); /** Cursor's documented install deeplink carries a base64 JSON config. */ const cursorInstallUrl = (name: string, url: string) => { @@ -145,8 +144,8 @@ const notifyCopied = (title: string) => { const notifyCopyFailed = () => { toastManager.add({ - description: "Your browser did not allow the write.", - title: "Copy failed", + description: m.bald_level_koala_charm(), + title: m.lazy_lucky_puma_dig(), type: "error", }); }; @@ -219,7 +218,7 @@ function useMarkdownCopy(article: THelpCenterArticlePublic) { try { await writeClipboard(article.content); setCopied(true); - notifyCopied("Markdown copied"); + notifyCopied(m.formal_tame_carp_explore()); } catch { notifyCopyFailed(); } @@ -284,7 +283,9 @@ function CopyRow({ className="size-4 shrink-0" icon={copied ? Tick02Icon : Copy01Icon} /> - {copied ? "Copied" : "Copy as Markdown"} + + {copied ? m.least_sour_badger_quell() : m.less_true_ray_propel()} + ); } @@ -295,14 +296,14 @@ function ExportMenu({ readonly article: THelpCenterArticlePublic; }) { return ( - + downloadMarkdown(article)}> - Download Markdown + {m.deft_drab_gull_win()} window.print()}> - Print / Save as PDF + {m.grassy_pretty_blackbird_adore()} ); @@ -316,7 +317,7 @@ function ChatMenu({ readonly title: string; }) { return ( - + {CHAT_PROVIDERS.map((provider) => ( string) => { - void copyText(build(currentMcpUrl()), "Command copied"); + void copyText(build(currentMcpUrl()), m.kind_maroon_chipmunk_strive()); }; return ( - + { - void copyText(currentMcpUrl(), "MCP server URL copied"); + void copyText(currentMcpUrl(), m.tangy_fit_haddock_revive()); }} > - Copy server URL + {m.long_moving_dog_fall()} - Copy Claude Code command + {m.least_elegant_raven_achieve()} @@ -368,7 +373,7 @@ function McpMenu({ mcpName }: { readonly mcpName: string }) { } > - Copy Codex command + {m.gaudy_bright_opossum_succeed()} - Add to Cursor + {m.fun_dry_dolphin_kick()} - Add to VS Code + {m.maroon_yummy_pug_bask()} void copyMarkdown()} /> @@ -444,7 +449,7 @@ export function HelpCenterArticleActionsDisclosure({ )} > - Article actions + {m.salty_muddy_martin_bump()} )} - Updated {formatHelpDate(article.updatedAt)} - {readingMinutes(article.content)} min read + + {m.lucky_weird_cat_renew({ + date: formatHelpDate(article.updatedAt), + })} + + + {m.arable_major_cockroach_rest({ + count: readingMinutes(article.content), + })} + - {article.viewCount.toLocaleString()}{" "} - {article.viewCount === 1 ? "view" : "views"} + {article.viewCount === 1 + ? m.equal_seemly_wolf_yell({ + count: article.viewCount.toLocaleString(), + }) + : m.civil_fancy_fox_dance({ + count: article.viewCount.toLocaleString(), + })} {article.isArchived ? (

- This article describes behaviour that is no longer current. + {m.suave_less_giraffe_clasp()}

) : null} @@ -473,7 +486,7 @@ function SiblingLink({ icon={ArrowLeft02Icon} /> )} - {isNext ? "Next" : "Previous"} + {isNext ? m.sad_tasty_stingray_spark() : m.honest_quick_polecat_sew()} {isNext ? (