Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

perf(web): cache locale dictionaries by language (MUL-9114) (#10473)

Multica Eve32eedec224d4
diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx
index bbdc314e2d..5c6aaa14f0 100644
--- a/apps/web/app/layout.tsx
+++ b/apps/web/app/layout.tsx
@@ -5,7 +5,6 @@ import { ThemeProvider } from "@/components/theme-provider";
import { Toaster } from "@multica/ui/components/ui/sonner";
import { cn } from "@multica/ui/lib/utils";
import { WebProviders } from "@/components/web-providers";
-import { RESOURCES } from "@multica/views/locales";
import { getRequestLocale } from "@/lib/request-locale";
import { HTML_LANG } from "@/lib/html-lang";
import { SITE_TITLE, TITLE_TEMPLATE } from "@/platform/document-title";
@@ -136,7 +135,6 @@ export default async function RootLayout({
children: React.ReactNode;
}) {
const locale = await getRequestLocale();
- const resources = { [locale]: RESOURCES[locale] };
const apiBaseUrl = resolveBrowserApiBaseUrl(process.env);
const wsUrl = resolveBrowserWsUrl(process.env);
// Opt-in Google Analytics: omitted entirely unless GOOGLE_ANALYTICS_ID is set.
@@ -179,7 +177,6 @@ export default async function RootLayout({
<ThemeProvider>
<WebProviders
locale={locale}
- resources={resources}
apiBaseUrl={apiBaseUrl}
wsUrl={wsUrl}
devToolbarApiUrl={devToolbarApiUrl}
diff --git a/apps/web/components/i18n/bundles/en.tsx b/apps/web/components/i18n/bundles/en.tsx
new file mode 100644
index 0000000000..5ff1b81c31
--- /dev/null
+++ b/apps/web/components/i18n/bundles/en.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import localeResources from "@multica/views/locales/en";
+import type { LocaleBundleProps } from "../locale-bundle";
+
+const resources = { "en": localeResources };
+
+export default function Bundle({ children }: LocaleBundleProps) {
+ return <>{children(resources)}</>;
+}
diff --git a/apps/web/components/i18n/bundles/es.tsx b/apps/web/components/i18n/bundles/es.tsx
new file mode 100644
index 0000000000..4dbfb2e1b7
--- /dev/null
+++ b/apps/web/components/i18n/bundles/es.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import localeResources from "@multica/views/locales/es";
+import type { LocaleBundleProps } from "../locale-bundle";
+
+const resources = { "es": localeResources };
+
+export default function Bundle({ children }: LocaleBundleProps) {
+ return <>{children(resources)}</>;
+}
diff --git a/apps/web/components/i18n/bundles/fr.tsx b/apps/web/components/i18n/bundles/fr.tsx
new file mode 100644
index 0000000000..ea272f1168
--- /dev/null
+++ b/apps/web/components/i18n/bundles/fr.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import localeResources from "@multica/views/locales/fr";
+import type { LocaleBundleProps } from "../locale-bundle";
+
+const resources = { "fr": localeResources };
+
+export default function Bundle({ children }: LocaleBundleProps) {
+ return <>{children(resources)}</>;
+}
diff --git a/apps/web/components/i18n/bundles/ja.tsx b/apps/web/components/i18n/bundles/ja.tsx
new file mode 100644
index 0000000000..e61ba2dc63
--- /dev/null
+++ b/apps/web/components/i18n/bundles/ja.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import localeResources from "@multica/views/locales/ja";
+import type { LocaleBundleProps } from "../locale-bundle";
+
+const resources = { "ja": localeResources };
+
+export default function Bundle({ children }: LocaleBundleProps) {
+ return <>{children(resources)}</>;
+}
diff --git a/apps/web/components/i18n/bundles/ko.tsx b/apps/web/components/i18n/bundles/ko.tsx
new file mode 100644
index 0000000000..4d88be1769
--- /dev/null
+++ b/apps/web/components/i18n/bundles/ko.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import localeResources from "@multica/views/locales/ko";
+import type { LocaleBundleProps } from "../locale-bundle";
+
+const resources = { "ko": localeResources };
+
+export default function Bundle({ children }: LocaleBundleProps) {
+ return <>{children(resources)}</>;
+}
diff --git a/apps/web/components/i18n/bundles/ru.tsx b/apps/web/components/i18n/bundles/ru.tsx
new file mode 100644
index 0000000000..09462dc330
--- /dev/null
+++ b/apps/web/components/i18n/bundles/ru.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import localeResources from "@multica/views/locales/ru";
+import type { LocaleBundleProps } from "../locale-bundle";
+
+const resources = { "ru": localeResources };
+
+export default function Bundle({ children }: LocaleBundleProps) {
+ return <>{children(resources)}</>;
+}
diff --git a/apps/web/components/i18n/bundles/zh-Hans.tsx b/apps/web/components/i18n/bundles/zh-Hans.tsx
new file mode 100644
index 0000000000..3d7a9cd9ce
--- /dev/null
+++ b/apps/web/components/i18n/bundles/zh-Hans.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import localeResources from "@multica/views/locales/zh-Hans";
+import type { LocaleBundleProps } from "../locale-bundle";
+
+const resources = { "zh-Hans": localeResources };
+
+export default function Bundle({ children }: LocaleBundleProps) {
+ return <>{children(resources)}</>;
+}
diff --git a/apps/web/components/i18n/bundles/zh-Hant.tsx b/apps/web/components/i18n/bundles/zh-Hant.tsx
new file mode 100644
index 0000000000..f33bd6e305
--- /dev/null
+++ b/apps/web/components/i18n/bundles/zh-Hant.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+import localeResources from "@multica/views/locales/zh-Hant";
+import type { LocaleBundleProps } from "../locale-bundle";
+
+const resources = { "zh-Hant": localeResources };
+
+export default function Bundle({ children }: LocaleBundleProps) {
+ return <>{children(resources)}</>;
+}
diff --git a/apps/web/components/i18n/locale-bundle.test.tsx b/apps/web/components/i18n/locale-bundle.test.tsx
new file mode 100644
index 0000000000..9d7bd8c4c2
--- /dev/null
+++ b/apps/web/components/i18n/locale-bundle.test.tsx
@@ -0,0 +1,46 @@
+// @vitest-environment node
+import type { ComponentType } from "react";
+import { renderToStaticMarkup } from "react-dom/server";
+import { SUPPORTED_LOCALES } from "@multica/core/i18n";
+import { RESOURCES } from "@multica/views/locales";
+import { describe, expect, it, vi } from "vitest";
+import type { LocaleBundleProps } from "./locale-bundle";
+
+const { loaders } = vi.hoisted(() => ({
+ loaders: new Map<
+ unknown,
+ () => Promise<{ default: ComponentType<LocaleBundleProps> }>
+ >(),
+}));
+
+vi.mock("next/dynamic", () => ({
+ default: (load: () => Promise<{ default: ComponentType<LocaleBundleProps> }>) => {
+ const Component = () => null;
+ loaders.set(Component, load);
+ return Component;
+ },
+}));
+
+import { LocaleBundle } from "./locale-bundle";
+
+describe("locale bundle selection", () => {
+ for (const locale of SUPPORTED_LOCALES) {
+ it(`loads only the shared ${locale} resources`, async () => {
+ const children = vi.fn<LocaleBundleProps["children"]>((resources) => {
+ expect(Object.keys(resources)).toEqual([locale]);
+ // Shared entry identity ensures web and the aggregate parity tests
+ // cover the same namespace registration, including future additions.
+ expect(resources[locale]).toBe(RESOURCES[locale]);
+ return <span>{locale}</span>;
+ });
+ const selected = LocaleBundle({ locale, children });
+ const load = loaders.get(selected.type);
+ expect(load).toBeDefined();
+ const { default: Bundle } = await load!();
+ expect(renderToStaticMarkup(<Bundle>{children}</Bundle>)).toBe(
+ `<span>${locale}</span>`,
+ );
+ expect(children).toHaveBeenCalledOnce();
+ });
+ }
+});
diff --git a/apps/web/components/i18n/locale-bundle.tsx b/apps/web/components/i18n/locale-bundle.tsx
new file mode 100644
index 0000000000..48636ed08e
--- /dev/null
+++ b/apps/web/components/i18n/locale-bundle.tsx
@@ -0,0 +1,30 @@
+"use client";
+
+import type { ComponentType, ReactNode } from "react";
+import dynamic from "next/dynamic";
+import type { LocaleResources, SupportedLocale } from "@multica/core/i18n";
+
+export interface LocaleBundleProps {
+ children: (resources: Record<string, LocaleResources>) => ReactNode;
+}
+
+// Keep SSR enabled: the same bundle must be ready for server rendering and
+// hydration. The resource callback stays within the client component tree.
+const BUNDLES: Record<SupportedLocale, ComponentType<LocaleBundleProps>> = {
+ en: dynamic<LocaleBundleProps>(() => import("./bundles/en")),
+ "zh-Hans": dynamic<LocaleBundleProps>(() => import("./bundles/zh-Hans")),
+ "zh-Hant": dynamic<LocaleBundleProps>(() => import("./bundles/zh-Hant")),
+ ko: dynamic<LocaleBundleProps>(() => import("./bundles/ko")),
+ ja: dynamic<LocaleBundleProps>(() => import("./bundles/ja")),
+ fr: dynamic<LocaleBundleProps>(() => import("./bundles/fr")),
+ es: dynamic<LocaleBundleProps>(() => import("./bundles/es")),
+ ru: dynamic<LocaleBundleProps>(() => import("./bundles/ru")),
+};
+
+export function LocaleBundle({
+ locale,
+ children,
+}: { locale: SupportedLocale } & LocaleBundleProps) {
+ const Bundle = BUNDLES[locale];
+ return <Bundle>{children}</Bundle>;
+}
diff --git a/apps/web/components/web-providers.test.tsx b/apps/web/components/web-providers.test.tsx
index 5bda25587e..8d823cdbcd 100644
--- a/apps/web/components/web-providers.test.tsx
+++ b/apps/web/components/web-providers.test.tsx
@@ -1,6 +1,7 @@
import { renderToString } from "react-dom/server";
import { render } from "@testing-library/react";
import { afterEach, describe, expect, it, vi } from "vitest";
+import type { LocaleBundleProps } from "./i18n/locale-bundle";
const installUserTimingCap = vi.hoisted(() => vi.fn());
@@ -18,11 +19,14 @@ vi.mock("@/platform/scroll-restoration", () => ({
WebScrollRestorationProvider: ({ children }: { children: React.ReactNode }) => <>{children}</>,
}));
vi.mock("@/platform/user-locale-sync", () => ({ useUserLocaleSyncEnabled: () => false }));
+vi.mock("@/components/i18n/locale-bundle", () => ({
+ LocaleBundle: ({ children }: LocaleBundleProps) => children({}),
+}));
import { WebProviders } from "./web-providers";
const tree = (
- <WebProviders locale="en" resources={{}}>
+ <WebProviders locale="en">
<span />
</WebProviders>
);
diff --git a/apps/web/components/web-providers.tsx b/apps/web/components/web-providers.tsx
index 9acdd6f1ee..da440242a5 100644
--- a/apps/web/components/web-providers.tsx
+++ b/apps/web/components/web-providers.tsx
@@ -5,8 +5,9 @@ import dynamic from "next/dynamic";
import { CoreProvider } from "@multica/core/platform";
import { installUserTimingCap } from "@multica/core/diagnostics";
import { createBrowserCookieLocaleAdapter } from "@multica/core/i18n/browser";
-import type { LocaleResources, SupportedLocale } from "@multica/core/i18n";
+import type { SupportedLocale } from "@multica/core/i18n";
import packageJson from "../package.json";
+import { LocaleBundle } from "@/components/i18n/locale-bundle";
import { WebNavigationProvider } from "@/platform/navigation";
import { WebScrollRestorationProvider } from "@/platform/scroll-restoration";
import {
@@ -56,14 +57,12 @@ const WEB_VERSION =
export function WebProviders({
children,
locale,
- resources,
apiBaseUrl,
wsUrl,
devToolbarApiUrl,
}: {
children: React.ReactNode;
locale: SupportedLocale;
- resources: Record<string, LocaleResources>;
apiBaseUrl?: string;
wsUrl?: string;
/** Set only when the dev toolbar is enabled; the backend it reports. */
@@ -84,24 +83,28 @@ export function WebProviders({
if (process.env.NODE_ENV === "development") installUserTimingCap();
}, []);
return (
- <CoreProvider
- apiBaseUrl={apiBaseUrl}
- wsUrl={wsUrl || deriveWsUrl()}
- cookieAuth={cookieAuth}
- onLogin={setLoggedInCookie}
- onLogout={clearLoggedInCookie}
- identity={identity}
- locale={locale}
- resources={resources}
- localeAdapter={localeAdapter}
- syncUserLocale={syncUserLocale}
- >
- <WebNavigationProvider>
- <WebScrollRestorationProvider>{children}</WebScrollRestorationProvider>
- {process.env.NODE_ENV === "development" && devToolbarApiUrl && (
- <WebDevToolbar apiUrl={devToolbarApiUrl} />
- )}
- </WebNavigationProvider>
- </CoreProvider>
+ <LocaleBundle locale={locale}>
+ {(resources) => (
+ <CoreProvider
+ apiBaseUrl={apiBaseUrl}
+ wsUrl={wsUrl || deriveWsUrl()}
+ cookieAuth={cookieAuth}
+ onLogin={setLoggedInCookie}
+ onLogout={clearLoggedInCookie}
+ identity={identity}
+ locale={locale}
+ resources={resources}
+ localeAdapter={localeAdapter}
+ syncUserLocale={syncUserLocale}
+ >
+ <WebNavigationProvider>
+ <WebScrollRestorationProvider>{children}</WebScrollRestorationProvider>
+ {process.env.NODE_ENV === "development" && devToolbarApiUrl && (
+ <WebDevToolbar apiUrl={devToolbarApiUrl} />
+ )}
+ </WebNavigationProvider>
+ </CoreProvider>
+ )}
+ </LocaleBundle>
);
}
diff --git a/e2e/locale-bundles.spec.ts b/e2e/locale-bundles.spec.ts
new file mode 100644
index 0000000000..4d892a9c96
--- /dev/null
+++ b/e2e/locale-bundles.spec.ts
@@ -0,0 +1,82 @@
+import { readFileSync } from "node:fs";
+import { expect, test, type Response } from "@playwright/test";
+import { SUPPORTED_LOCALES } from "../packages/core/i18n/types";
+
+function stringsIn(value: unknown): string[] {
+ if (typeof value === "string") return [value];
+ if (!value || typeof value !== "object") return [];
+ return Object.values(value).flatMap(stringsIn);
+}
+
+// Runtime setup copy is not rendered on /login. A distinctive phrase from
+// each dictionary identifies its downloaded JS even when chunk names change.
+const markers = SUPPORTED_LOCALES.map((locale) => {
+ const namespace: unknown = JSON.parse(
+ readFileSync(
+ new URL(`../packages/views/locales/${locale}/runtimes.json`, import.meta.url),
+ "utf8",
+ ),
+ );
+ const marker = stringsIn(namespace)
+ .filter((text) => text.length > 30 && !/["'\\\n\r]/.test(text))
+ .sort((a, b) => b.length - a.length)[0];
+ if (!marker) throw new Error(`No distinctive runtime copy for ${locale}`);
+ return { locale, marker };
+});
+
+test.use({ locale: "ru-RU" });
+
+test("Russian login keeps translations out of HTML and downloads only its language bundle", async ({
+ page,
+ context,
+ baseURL,
+}) => {
+ if (!baseURL) throw new Error("Locale bundle regression requires a baseURL");
+ await context.addCookies([
+ { name: "multica-locale", value: "ru", url: baseURL },
+ ]);
+ // Exercise the real page and providers with a deterministic logged-out API.
+ await context.route("**/api/config", (route) => route.fulfill({
+ json: { allow_signup: true, google_client_id: "", feature_flags: {} },
+ }));
+ await context.route("**/api/me", (route) => route.fulfill({
+ status: 401,
+ json: { error: "Not authenticated" },
+ }));
+ await context.routeWebSocket((url) => url.pathname === "/ws", (socket) => socket.close());
+
+ const scripts: Response[] = [];
+ const errors: string[] = [];
+ page.on("response", (response) => {
+ if (
+ response.url().includes("/_next/static/") &&
+ response.request().resourceType() === "script"
+ ) scripts.push(response);
+ });
+ page.on("pageerror", (error) => errors.push(error.message));
+ page.on("console", (message) => {
+ if (message.type() === "error" && /hydration|hydrating|React.*#418/i.test(message.text())) {
+ errors.push(message.text());
+ }
+ });
+
+ const response = await page.goto("/login", { waitUntil: "load" });
+ expect(response?.status()).toBe(200);
+ const html = await response!.text();
+ expect(html).toContain("Вход в Multica");
+ expect(html).not.toContain('\\"resources\\":');
+ expect(html).not.toContain('\\"runtimes\\":');
+ await expect(page.locator("html")).toHaveAttribute("lang", "ru");
+ await expect(page.locator('[data-slot="card-title"]')).toHaveText("Вход в Multica");
+ await page.locator("#login-email").fill("[email protected]");
+ await expect(page.locator('button[type="submit"][form="login-form"]')).toBeEnabled();
+
+ const bodies = await Promise.all(scripts.map((script) => script.text()));
+ const downloadedLocales = markers
+ .filter(({ marker }) => bodies.some((body) => body.includes(marker)))
+ .map(({ locale }) => locale);
+ expect(downloadedLocales).toEqual(["ru"]);
+ const russian = markers.find(({ locale }) => locale === "ru")!;
+ expect(bodies.filter((body) => body.includes(russian.marker))).toHaveLength(1);
+ expect(errors).toEqual([]);
+});
diff --git a/packages/views/locales/en.ts b/packages/views/locales/en.ts
new file mode 100644
index 0000000000..7e0116c056
--- /dev/null
+++ b/packages/views/locales/en.ts
@@ -0,0 +1,56 @@
+import type { LocaleResources } from "@multica/core/i18n";
+import enCommon from "./en/common.json";
+import enAuth from "./en/auth.json";
+import enSettings from "./en/settings.json";
+import enIssues from "./en/issues.json";
+import enAgents from "./en/agents.json";
+import enEditor from "./en/editor.json";
+import enOnboarding from "./en/onboarding.json";
+import enInvite from "./en/invite.json";
+import enLabels from "./en/labels.json";
+import enMembers from "./en/members.json";
+import enMyIssues from "./en/my-issues.json";
+import enSearch from "./en/search.json";
+import enInbox from "./en/inbox.json";
+import enWorkspace from "./en/workspace.json";
+import enProjects from "./en/projects.json";
+import enAutopilots from "./en/autopilots.json";
+import enSkills from "./en/skills.json";
+import enChat from "./en/chat.json";
+import enModals from "./en/modals.json";
+import enRuntimes from "./en/runtimes.json";
+import enLayout from "./en/layout.json";
+import enUsage from "./en/usage.json";
+import enUi from "./en/ui.json";
+import enSquads from "./en/squads.json";
+import enBilling from "./en/billing.json";
+
+const resources: LocaleResources = {
+ common: enCommon,
+ auth: enAuth,
+ settings: enSettings,
+ issues: enIssues,
+ agents: enAgents,
+ editor: enEditor,
+ onboarding: enOnboarding,
+ invite: enInvite,
+ labels: enLabels,
+ members: enMembers,
+ "my-issues": enMyIssues,
+ search: enSearch,
+ inbox: enInbox,
+ workspace: enWorkspace,
+ projects: enProjects,
+ autopilots: enAutopilots,
+ skills: enSkills,
+ chat: enChat,
+ modals: enModals,
+ runtimes: enRuntimes,
+ layout: enLayout,
+ usage: enUsage,
+ ui: enUi,
+ squads: enSquads,
+ billing: enBilling,
+};
+
+export default resources;
diff --git a/packages/views/locales/es.ts b/packages/views/locales/es.ts
new file mode 100644
index 0000000000..ae4bcc7584
--- /dev/null
+++ b/packages/views/locales/es.ts
@@ -0,0 +1,56 @@
+import type { LocaleResources } from "@multica/core/i18n";
+import esCommon from "./es/common.json";
+import esAuth from "./es/auth.json";
+import esSettings from "./es/settings.json";
+import esIssues from "./es/issues.json";
+import esAgents from "./es/agents.json";
+import esEditor from "./es/editor.json";
+import esOnboarding from "./es/onboarding.json";
+import esInvite from "./es/invite.json";
+import esLabels from "./es/labels.json";
+import esMembers from "./es/members.json";
+import esMyIssues from "./es/my-issues.json";
+import esSearch from "./es/search.json";
+import esInbox from "./es/inbox.json";
+import esWorkspace from "./es/workspace.json";
+import esProjects from "./es/projects.json";
+import esAutopilots from "./es/autopilots.json";
+import esSkills from "./es/skills.json";
+import esChat from "./es/chat.json";
+import esModals from "./es/modals.json";
+import esRuntimes from "./es/runtimes.json";
+import esLayout from "./es/layout.json";
+import esUsage from "./es/usage.json";
+import esUi from "./es/ui.json";
+import esSquads from "./es/squads.json";
+import esBilling from "./es/billing.json";
+
+const resources: LocaleResources = {
+ common: esCommon,
+ auth: esAuth,
+ settings: esSettings,
+ issues: esIssues,
+ agents: esAgents,
+ editor: esEditor,
+ onboarding: esOnboarding,
+ invite: esInvite,
+ labels: esLabels,
+ members: esMembers,
+ "my-issues": esMyIssues,
+ search: esSearch,
+ inbox: esInbox,
+ workspace: esWorkspace,
+ projects: esProjects,
+ autopilots: esAutopilots,
+ skills: esSkills,
+ chat: esChat,
+ modals: esModals,
+ runtimes: esRuntimes,
+ layout: esLayout,
+ usage: esUsage,
+ ui: esUi,
+ squads: esSquads,
+ billing: esBilling,
+};
+
+export default resources;
diff --git a/packages/views/locales/fr.ts b/packages/views/locales/fr.ts
new file mode 100644
index 0000000000..9b33105bd3
--- /dev/null
+++ b/packages/views/locales/fr.ts
@@ -0,0 +1,56 @@
+import type { LocaleResources } from "@multica/core/i18n";
+import frCommon from "./fr/common.json";
+import frAuth from "./fr/auth.json";
+import frSettings from "./fr/settings.json";
+import frIssues from "./fr/issues.json";
+import frAgents from "./fr/agents.json";
+import frEditor from "./fr/editor.json";
+import frOnboarding from "./fr/onboarding.json";
+import frInvite from "./fr/invite.json";
+import frLabels from "./fr/labels.json";
+import frMembers from "./fr/members.json";
+import frMyIssues from "./fr/my-issues.json";
+import frSearch from "./fr/search.json";
+import frInbox from "./fr/inbox.json";
+import frWorkspace from "./fr/workspace.json";
+import frProjects from "./fr/projects.json";
+import frAutopilots from "./fr/autopilots.json";
+import frSkills from "./fr/skills.json";
+import frChat from "./fr/chat.json";
+import frModals from "./fr/modals.json";
+import frRuntimes from "./fr/runtimes.json";
+import frLayout from "./fr/layout.json";
+import frUsage from "./fr/usage.json";
+import frUi from "./fr/ui.json";
+import frSquads from "./fr/squads.json";
+import frBilling from "./fr/billing.json";
+
+const resources: LocaleResources = {
+ common: frCommon,
+ auth: frAuth,
+ settings: frSettings,
+ issues: frIssues,
+ agents: frAgents,
+ editor: frEditor,
+ onboarding: frOnboarding,
+ invite: frInvite,
+ labels: frLabels,
+ members: frMembers,
+ "my-issues": frMyIssues,
+ search: frSearch,
+ inbox: frInbox,
+ workspace: frWorkspace,
+ projects: frProjects,
+ autopilots: frAutopilots,
+ skills: frSkills,
+ chat: frChat,
+ modals: frModals,
+ runtimes: frRuntimes,
+ layout: frLayout,
+ usage: frUsage,
+ ui: frUi,
+ squads: frSquads,
+ billing: frBilling,
+};
+
+export default resources;
diff --git a/packages/views/locales/index.ts b/packages/views/locales/index.ts
index e1ce560456..b613863b7a 100644
--- a/packages/views/locales/index.ts
+++ b/packages/views/locales/index.ts
@@ -1,423 +1,24 @@
import type { LocaleResources, SupportedLocale } from "@multica/core/i18n";
-import enCommon from "./en/common.json";
-import enAuth from "./en/auth.json";
-import enSettings from "./en/settings.json";
-import enIssues from "./en/issues.json";
-import enAgents from "./en/agents.json";
-import enEditor from "./en/editor.json";
-import enOnboarding from "./en/onboarding.json";
-import enInvite from "./en/invite.json";
-import enLabels from "./en/labels.json";
-import enMembers from "./en/members.json";
-import enMyIssues from "./en/my-issues.json";
-import enSearch from "./en/search.json";
-import enInbox from "./en/inbox.json";
-import enWorkspace from "./en/workspace.json";
-import enProjects from "./en/projects.json";
-import enAutopilots from "./en/autopilots.json";
-import enSkills from "./en/skills.json";
-import enChat from "./en/chat.json";
-import enModals from "./en/modals.json";
-import enRuntimes from "./en/runtimes.json";
-import enLayout from "./en/layout.json";
-import enUsage from "./en/usage.json";
-import enUi from "./en/ui.json";
-import enSquads from "./en/squads.json";
-import enBilling from "./en/billing.json";
-import zhHansCommon from "./zh-Hans/common.json";
-import zhHansAuth from "./zh-Hans/auth.json";
-import zhHansSettings from "./zh-Hans/settings.json";
-import zhHansIssues from "./zh-Hans/issues.json";
-import zhHansAgents from "./zh-Hans/agents.json";
-import zhHansEditor from "./zh-Hans/editor.json";
-import zhHansOnboarding from "./zh-Hans/onboarding.json";
-import zhHansInvite from "./zh-Hans/invite.json";
-import zhHansLabels from "./zh-Hans/labels.json";
-import zhHansMembers from "./zh-Hans/members.json";
-import zhHansMyIssues from "./zh-Hans/my-issues.json";
-import zhHansSearch from "./zh-Hans/search.json";
-import zhHansInbox from "./zh-Hans/inbox.json";
-import zhHansWorkspace from "./zh-Hans/workspace.json";
-import zhHansProjects from "./zh-Hans/projects.json";
-import zhHansAutopilots from "./zh-Hans/autopilots.json";
-import zhHansSkills from "./zh-Hans/skills.json";
-import zhHansChat from "./zh-Hans/chat.json";
-import zhHansModals from "./zh-Hans/modals.json";
-import zhHansRuntimes from "./zh-Hans/runtimes.json";
-import zhHansLayout from "./zh-Hans/layout.json";
-import zhHansUsage from "./zh-Hans/usage.json";
-import zhHansUi from "./zh-Hans/ui.json";
-import zhHansSquads from "./zh-Hans/squads.json";
-import zhHansBilling from "./zh-Hans/billing.json";
-import zhHantCommon from "./zh-Hant/common.json";
-import zhHantAuth from "./zh-Hant/auth.json";
-import zhHantSettings from "./zh-Hant/settings.json";
-import zhHantIssues from "./zh-Hant/issues.json";
-import zhHantAgents from "./zh-Hant/agents.json";
-import zhHantEditor from "./zh-Hant/editor.json";
-import zhHantOnboarding from "./zh-Hant/onboarding.json";
-import zhHantInvite from "./zh-Hant/invite.json";
-import zhHantLabels from "./zh-Hant/labels.json";
-import zhHantMembers from "./zh-Hant/members.json";
-import zhHantMyIssues from "./zh-Hant/my-issues.json";
-import zhHantSearch from "./zh-Hant/search.json";
-import zhHantInbox from "./zh-Hant/inbox.json";
-import zhHantWorkspace from "./zh-Hant/workspace.json";
-import zhHantProjects from "./zh-Hant/projects.json";
-import zhHantAutopilots from "./zh-Hant/autopilots.json";
-import zhHantSkills from "./zh-Hant/skills.json";
-import zhHantChat from "./zh-Hant/chat.json";
-import zhHantModals from "./zh-Hant/modals.json";
-import zhHantRuntimes from "./zh-Hant/runtimes.json";
-import zhHantLayout from "./zh-Hant/layout.json";
-import zhHantUsage from "./zh-Hant/usage.json";
-import zhHantUi from "./zh-Hant/ui.json";
-import zhHantSquads from "./zh-Hant/squads.json";
-import zhHantBilling from "./zh-Hant/billing.json";
-import koCommon from "./ko/common.json";
-import koAuth from "./ko/auth.json";
-import koSettings from "./ko/settings.json";
-import koIssues from "./ko/issues.json";
-import koAgents from "./ko/agents.json";
-import koEditor from "./ko/editor.json";
-import koOnboarding from "./ko/onboarding.json";
-import koInvite from "./ko/invite.json";
-import koLabels from "./ko/labels.json";
-import koMembers from "./ko/members.json";
-import koMyIssues from "./ko/my-issues.json";
-import koSearch from "./ko/search.json";
-import koInbox from "./ko/inbox.json";
-import koWorkspace from "./ko/workspace.json";
-import koProjects from "./ko/projects.json";
-import koAutopilots from "./ko/autopilots.json";
-import koSkills from "./ko/skills.json";
-import koChat from "./ko/chat.json";
-import koModals from "./ko/modals.json";
-import koRuntimes from "./ko/runtimes.json";
-import koLayout from "./ko/layout.json";
-import koUsage from "./ko/usage.json";
-import koUi from "./ko/ui.json";
-import koSquads from "./ko/squads.json";
-import koBilling from "./ko/billing.json";
-import jaCommon from "./ja/common.json";
-import jaAuth from "./ja/auth.json";
-import jaSettings from "./ja/settings.json";
-import jaIssues from "./ja/issues.json";
-import jaAgents from "./ja/agents.json";
-import jaEditor from "./ja/editor.json";
-import jaOnboarding from "./ja/onboarding.json";
-import jaInvite from "./ja/invite.json";
-import jaLabels from "./ja/labels.json";
-import jaMembers from "./ja/members.json";
-import jaMyIssues from "./ja/my-issues.json";
-import jaSearch from "./ja/search.json";
-import jaInbox from "./ja/inbox.json";
-import jaWorkspace from "./ja/workspace.json";
-import jaProjects from "./ja/projects.json";
-import jaAutopilots from "./ja/autopilots.json";
-import jaSkills from "./ja/skills.json";
-import jaChat from "./ja/chat.json";
-import jaModals from "./ja/modals.json";
-import jaRuntimes from "./ja/runtimes.json";
-import jaLayout from "./ja/layout.json";
-import jaUsage from "./ja/usage.json";
-import jaUi from "./ja/ui.json";
-import jaSquads from "./ja/squads.json";
-import jaBilling from "./ja/billing.json";
-import ruCommon from "./ru/common.json";
-import ruAuth from "./ru/auth.json";
-import ruSettings from "./ru/settings.json";
-import ruIssues from "./ru/issues.json";
-import ruAgents from "./ru/agents.json";
-import ruEditor from "./ru/editor.json";
-import ruOnboarding from "./ru/onboarding.json";
-import ruInvite from "./ru/invite.json";
-import ruLabels from "./ru/labels.json";
-import ruMembers from "./ru/members.json";
-import ruMyIssues from "./ru/my-issues.json";
-import ruSearch from "./ru/search.json";
-import ruInbox from "./ru/inbox.json";
-import ruWorkspace from "./ru/workspace.json";
-import ruProjects from "./ru/projects.json";
-import ruAutopilots from "./ru/autopilots.json";
-import ruSkills from "./ru/skills.json";
-import ruChat from "./ru/chat.json";
-import ruModals from "./ru/modals.json";
-import ruRuntimes from "./ru/runtimes.json";
-import ruLayout from "./ru/layout.json";
-import ruUsage from "./ru/usage.json";
-import ruUi from "./ru/ui.json";
-import ruSquads from "./ru/squads.json";
-import ruBilling from "./ru/billing.json";
-import frCommon from "./fr/common.json";
-import frAuth from "./fr/auth.json";
-import frSettings from "./fr/settings.json";
-import frIssues from "./fr/issues.json";
-import frAgents from "./fr/agents.json";
-import frEditor from "./fr/editor.json";
-import frOnboarding from "./fr/onboarding.json";
-import frInvite from "./fr/invite.json";
-import frLabels from "./fr/labels.json";
-import frMembers from "./fr/members.json";
-import frMyIssues from "./fr/my-issues.json";
-import frSearch from "./fr/search.json";
-import frInbox from "./fr/inbox.json";
-import frWorkspace from "./fr/workspace.json";
-import frProjects from "./fr/projects.json";
-import frAutopilots from "./fr/autopilots.json";
-import frSkills from "./fr/skills.json";
-import frChat from "./fr/chat.json";
-import frModals from "./fr/modals.json";
-import frRuntimes from "./fr/runtimes.json";
-import frLayout from "./fr/layout.json";
-import frUsage from "./fr/usage.json";
-import frUi from "./fr/ui.json";
-import frSquads from "./fr/squads.json";
-import frBilling from "./fr/billing.json";
-import esCommon from "./es/common.json";
-import esAuth from "./es/auth.json";
-import esSettings from "./es/settings.json";
-import esIssues from "./es/issues.json";
-import esAgents from "./es/agents.json";
-import esEditor from "./es/editor.json";
-import esOnboarding from "./es/onboarding.json";
-import esInvite from "./es/invite.json";
-import esLabels from "./es/labels.json";
-import esMembers from "./es/members.json";
-import esMyIssues from "./es/my-issues.json";
-import esSearch from "./es/search.json";
-import esInbox from "./es/inbox.json";
-import esWorkspace from "./es/workspace.json";
-import esProjects from "./es/projects.json";
-import esAutopilots from "./es/autopilots.json";
-import esSkills from "./es/skills.json";
-import esChat from "./es/chat.json";
-import esModals from "./es/modals.json";
-import esRuntimes from "./es/runtimes.json";
-import esLayout from "./es/layout.json";
-import esUsage from "./es/usage.json";
-import esUi from "./es/ui.json";
-import esSquads from "./es/squads.json";
-import esBilling from "./es/billing.json";
+import en from "./en";
+import zhHans from "./zh-Hans";
+import zhHant from "./zh-Hant";
+import ko from "./ko";
+import ja from "./ja";
+import ru from "./ru";
+import fr from "./fr";
+import es from "./es";
-// Single source of truth for the resource bundle. Both apps (web layout +
-// desktop App.tsx) import from here so adding a locale or namespace happens
-// in exactly one place.
+// Shared <locale>.ts entries are the source of truth for namespace registrations.
+// Add namespaces to every language entry. When adding a language, update its
+// entry module, packages/views/package.json exports, and the web LocaleBundle's
+// BUNDLES registration.
export const RESOURCES: Record<SupportedLocale, LocaleResources> = {
- en: {
- common: enCommon,
- auth: enAuth,
- settings: enSettings,
- issues: enIssues,
- agents: enAgents,
- editor: enEditor,
- onboarding: enOnboarding,
- invite: enInvite,
- labels: enLabels,
- members: enMembers,
- "my-issues": enMyIssues,
- search: enSearch,
- inbox: enInbox,
- workspace: enWorkspace,
- projects: enProjects,
- autopilots: enAutopilots,
- skills: enSkills,
- chat: enChat,
- modals: enModals,
- runtimes: enRuntimes,
- layout: enLayout,
- usage: enUsage,
- ui: enUi,
- squads: enSquads,
- billing: enBilling,
- },
- "zh-Hans": {
- common: zhHansCommon,
- auth: zhHansAuth,
- settings: zhHansSettings,
- issues: zhHansIssues,
- agents: zhHansAgents,
- editor: zhHansEditor,
- onboarding: zhHansOnboarding,
- invite: zhHansInvite,
- labels: zhHansLabels,
- members: zhHansMembers,
- "my-issues": zhHansMyIssues,
- search: zhHansSearch,
- inbox: zhHansInbox,
- workspace: zhHansWorkspace,
- projects: zhHansProjects,
- autopilots: zhHansAutopilots,
- skills: zhHansSkills,
- chat: zhHansChat,
- modals: zhHansModals,
- runtimes: zhHansRuntimes,
- layout: zhHansLayout,
- usage: zhHansUsage,
- ui: zhHansUi,
- squads: zhHansSquads,
- billing: zhHansBilling,
- },
- "zh-Hant": {
- common: zhHantCommon,
- auth: zhHantAuth,
- settings: zhHantSettings,
- issues: zhHantIssues,
- agents: zhHantAgents,
- editor: zhHantEditor,
- onboarding: zhHantOnboarding,
- invite: zhHantInvite,
- labels: zhHantLabels,
- members: zhHantMembers,
- "my-issues": zhHantMyIssues,
- search: zhHantSearch,
- inbox: zhHantInbox,
- workspace: zhHantWorkspace,
- projects: zhHantProjects,
- autopilots: zhHantAutopilots,
- skills: zhHantSkills,
- chat: zhHantChat,
- modals: zhHantModals,
- runtimes: zhHantRuntimes,
- layout: zhHantLayout,
- usage: zhHantUsage,
- ui: zhHantUi,
- squads: zhHantSquads,
- billing: zhHantBilling,
- },
- ko: {
- common: koCommon,
- auth: koAuth,
- settings: koSettings,
- issues: koIssues,
- agents: koAgents,
- editor: koEditor,
- onboarding: koOnboarding,
- invite: koInvite,
- labels: koLabels,
- members: koMembers,
- "my-issues": koMyIssues,
- search: koSearch,
- inbox: koInbox,
- workspace: koWorkspace,
- projects: koProjects,
- autopilots: koAutopilots,
- skills: koSkills,
- chat: koChat,
- modals: koModals,
- runtimes: koRuntimes,
- layout: koLayout,
- usage: koUsage,
- ui: koUi,
- squads: koSquads,
- billing: koBilling,
- },
- ja: {
- common: jaCommon,
- auth: jaAuth,
- settings: jaSettings,
- issues: jaIssues,
- agents: jaAgents,
- editor: jaEditor,
- onboarding: jaOnboarding,
- invite: jaInvite,
- labels: jaLabels,
- members: jaMembers,
- "my-issues": jaMyIssues,
- search: jaSearch,
- inbox: jaInbox,
- workspace: jaWorkspace,
- projects: jaProjects,
- autopilots: jaAutopilots,
- skills: jaSkills,
- chat: jaChat,
- modals: jaModals,
- runtimes: jaRuntimes,
- layout: jaLayout,
- usage: jaUsage,
- ui: jaUi,
- squads: jaSquads,
- billing: jaBilling,
- },
- ru: {
- common: ruCommon,
- auth: ruAuth,
- settings: ruSettings,
- issues: ruIssues,
- agents: ruAgents,
- editor: ruEditor,
- onboarding: ruOnboarding,
- invite: ruInvite,
- labels: ruLabels,
- members: ruMembers,
- "my-issues": ruMyIssues,
- search: ruSearch,
- inbox: ruInbox,
- workspace: ruWorkspace,
- projects: ruProjects,
- autopilots: ruAutopilots,
- skills: ruSkills,
- chat: ruChat,
- modals: ruModals,
- runtimes: ruRuntimes,
- layout: ruLayout,
- usage: ruUsage,
- ui: ruUi,
- squads: ruSquads,
- billing: ruBilling,
- },
- fr: {
- common: frCommon,
- auth: frAuth,
- settings: frSettings,
- issues: frIssues,
- agents: frAgents,
- editor: frEditor,
- onboarding: frOnboarding,
- invite: frInvite,
- labels: frLabels,
- members: frMembers,
- "my-issues": frMyIssues,
- search: frSearch,
- inbox: frInbox,
- workspace: frWorkspace,
- projects: frProjects,
- autopilots: frAutopilots,
- skills: frSkills,
- chat: frChat,
- modals: frModals,
- runtimes: frRuntimes,
- layout: frLayout,
- usage: frUsage,
- ui: frUi,
- squads: frSquads,
- billing: frBilling,
- },
- es: {
- common: esCommon,
- auth: esAuth,
- settings: esSettings,
- issues: esIssues,
- agents: esAgents,
- editor: esEditor,
- onboarding: esOnboarding,
- invite: esInvite,
- labels: esLabels,
- members: esMembers,
- "my-issues": esMyIssues,
- search: esSearch,
- inbox: esInbox,
- workspace: esWorkspace,
- projects: esProjects,
- autopilots: esAutopilots,
- skills: esSkills,
- chat: esChat,
- modals: esModals,
- runtimes: esRuntimes,
- layout: esLayout,
- usage: esUsage,
- ui: esUi,
- squads: esSquads,
- billing: esBilling,
- },
+ en,
+ "zh-Hans": zhHans,
+ "zh-Hant": zhHant,
+ ko,
+ ja,
+ ru,
+ fr,
+ es,
};
diff --git a/packages/views/locales/ja.ts b/packages/views/locales/ja.ts
new file mode 100644
index 0000000000..636f6ce055
--- /dev/null
+++ b/packages/views/locales/ja.ts
@@ -0,0 +1,56 @@
+import type { LocaleResources } from "@multica/core/i18n";
+import jaCommon from "./ja/common.json";
+import jaAuth from "./ja/auth.json";
+import jaSettings from "./ja/settings.json";
+import jaIssues from "./ja/issues.json";
+import jaAgents from "./ja/agents.json";
+import jaEditor from "./ja/editor.json";
+import jaOnboarding from "./ja/onboarding.json";
+import jaInvite from "./ja/invite.json";
+import jaLabels from "./ja/labels.json";
+import jaMembers from "./ja/members.json";
+import jaMyIssues from "./ja/my-issues.json";
+import jaSearch from "./ja/search.json";
+import jaInbox from "./ja/inbox.json";
+import jaWorkspace from "./ja/workspace.json";
+import jaProjects from "./ja/projects.json";
+import jaAutopilots from "./ja/autopilots.json";
+import jaSkills from "./ja/skills.json";
+import jaChat from "./ja/chat.json";
+import jaModals from "./ja/modals.json";
+import jaRuntimes from "./ja/runtimes.json";
+import jaLayout from "./ja/layout.json";
+import jaUsage from "./ja/usage.json";
+import jaUi from "./ja/ui.json";
+import jaSquads from "./ja/squads.json";
+import jaBilling from "./ja/billing.json";
+
+const resources: LocaleResources = {
+ common: jaCommon,
+ auth: jaAuth,
+ settings: jaSettings,
+ issues: jaIssues,
+ agents: jaAgents,
+ editor: jaEditor,
+ onboarding: jaOnboarding,
+ invite: jaInvite,
+ labels: jaLabels,
+ members: jaMembers,
+ "my-issues": jaMyIssues,
+ search: jaSearch,
+ inbox: jaInbox,
+ workspace: jaWorkspace,
+ projects: jaProjects,
+ autopilots: jaAutopilots,
+ skills: jaSkills,
+ chat: jaChat,
+ modals: jaModals,
+ runtimes: jaRuntimes,
+ layout: jaLayout,
+ usage: jaUsage,
+ ui: jaUi,
+ squads: jaSquads,
+ billing: jaBilling,
+};
+
+export default resources;
diff --git a/packages/views/locales/ko.ts b/packages/views/locales/ko.ts
new file mode 100644
index 0000000000..fed8d51f4e
--- /dev/null
+++ b/packages/views/locales/ko.ts
@@ -0,0 +1,56 @@
+import type { LocaleResources } from "@multica/core/i18n";
+import koCommon from "./ko/common.json";
+import koAuth from "./ko/auth.json";
+import koSettings from "./ko/settings.json";
+import koIssues from "./ko/issues.json";
+import koAgents from "./ko/agents.json";
+import koEditor from "./ko/editor.json";
+import koOnboarding from "./ko/onboarding.json";
+import koInvite from "./ko/invite.json";
+import koLabels from "./ko/labels.json";
+import koMembers from "./ko/members.json";
+import koMyIssues from "./ko/my-issues.json";
+import koSearch from "./ko/search.json";
+import koInbox from "./ko/inbox.json";
+import koWorkspace from "./ko/workspace.json";
+import koProjects from "./ko/projects.json";
+import koAutopilots from "./ko/autopilots.json";
+import koSkills from "./ko/skills.json";
+import koChat from "./ko/chat.json";
+import koModals from "./ko/modals.json";
+import koRuntimes from "./ko/runtimes.json";
+import koLayout from "./ko/layout.json";
+import koUsage from "./ko/usage.json";
+import koUi from "./ko/ui.json";
+import koSquads from "./ko/squads.json";
+import koBilling from "./ko/billing.json";
+
+const resources: LocaleResources = {
+ common: koCommon,
+ auth: koAuth,
+ settings: koSettings,
+ issues: koIssues,
+ agents: koAgents,
+ editor: koEditor,
+ onboarding: koOnboarding,
+ invite: koInvite,
+ labels: koLabels,
+ members: koMembers,
+ "my-issues": koMyIssues,
+ search: koSearch,
+ inbox: koInbox,
+ workspace: koWorkspace,
+ projects: koProjects,
+ autopilots: koAutopilots,
+ skills: koSkills,
+ chat: koChat,
+ modals: koModals,
+ runtimes: koRuntimes,
+ layout: koLayout,
+ usage: koUsage,
+ ui: koUi,
+ squads: koSquads,
+ billing: koBilling,
+};
+
+export default resources;
diff --git a/packages/views/locales/ru.ts b/packages/views/locales/ru.ts
new file mode 100644
index 0000000000..2123509474
--- /dev/null
+++ b/packages/views/locales/ru.ts
@@ -0,0 +1,56 @@
+import type { LocaleResources } from "@multica/core/i18n";
+import ruCommon from "./ru/common.json";
+import ruAuth from "./ru/auth.json";
+import ruSettings from "./ru/settings.json";
+import ruIssues from "./ru/issues.json";
+import ruAgents from "./ru/agents.json";
+import ruEditor from "./ru/editor.json";
+import ruOnboarding from "./ru/onboarding.json";
+import ruInvite from "./ru/invite.json";
+import ruLabels from "./ru/labels.json";
+import ruMembers from "./ru/members.json";
+import ruMyIssues from "./ru/my-issues.json";
+import ruSearch from "./ru/search.json";
+import ruInbox from "./ru/inbox.json";
+import ruWorkspace from "./ru/workspace.json";
+import ruProjects from "./ru/projects.json";
+import ruAutopilots from "./ru/autopilots.json";
+import ruSkills from "./ru/skills.json";
+import ruChat from "./ru/chat.json";
+import ruModals from "./ru/modals.json";
+import ruRuntimes from "./ru/runtimes.json";
+import ruLayout from "./ru/layout.json";
+import ruUsage from "./ru/usage.json";
+import ruUi from "./ru/ui.json";
+import ruSquads from "./ru/squads.json";
+import ruBilling from "./ru/billing.json";
+
+const resources: LocaleResources = {
+ common: ruCommon,
+ auth: ruAuth,
+ settings: ruSettings,
+ issues: ruIssues,
+ agents: ruAgents,
+ editor: ruEditor,
+ onboarding: ruOnboarding,
+ invite: ruInvite,
+ labels: ruLabels,
+ members: ruMembers,
+ "my-issues": ruMyIssues,
+ search: ruSearch,
+ inbox: ruInbox,
+ workspace: ruWorkspace,
+ projects: ruProjects,
+ autopilots: ruAutopilots,
+ skills: ruSkills,
+ chat: ruChat,
+ modals: ruModals,
+ runtimes: ruRuntimes,
+ layout: ruLayout,
+ usage: ruUsage,
+ ui: ruUi,
+ squads: ruSquads,
+ billing: ruBilling,
+};
+
+export default resources;
diff --git a/packages/views/locales/zh-Hans.ts b/packages/views/locales/zh-Hans.ts
new file mode 100644
index 0000000000..0399f15c85
--- /dev/null
+++ b/packages/views/locales/zh-Hans.ts
@@ -0,0 +1,56 @@
+import type { LocaleResources } from "@multica/core/i18n";
+import zhHansCommon from "./zh-Hans/common.json";
+import zhHansAuth from "./zh-Hans/auth.json";
+import zhHansSettings from "./zh-Hans/settings.json";
+import zhHansIssues from "./zh-Hans/issues.json";
+import zhHansAgents from "./zh-Hans/agents.json";
+import zhHansEditor from "./zh-Hans/editor.json";
+import zhHansOnboarding from "./zh-Hans/onboarding.json";
+import zhHansInvite from "./zh-Hans/invite.json";
+import zhHansLabels from "./zh-Hans/labels.json";
+import zhHansMembers from "./zh-Hans/members.json";
+import zhHansMyIssues from "./zh-Hans/my-issues.json";
+import zhHansSearch from "./zh-Hans/search.json";
+import zhHansInbox from "./zh-Hans/inbox.json";
+import zhHansWorkspace from "./zh-Hans/workspace.json";
+import zhHansProjects from "./zh-Hans/projects.json";
+import zhHansAutopilots from "./zh-Hans/autopilots.json";
+import zhHansSkills from "./zh-Hans/skills.json";
+import zhHansChat from "./zh-Hans/chat.json";
+import zhHansModals from "./zh-Hans/modals.json";
+import zhHansRuntimes from "./zh-Hans/runtimes.json";
+import zhHansLayout from "./zh-Hans/layout.json";
+import zhHansUsage from "./zh-Hans/usage.json";
+import zhHansUi from "./zh-Hans/ui.json";
+import zhHansSquads from "./zh-Hans/squads.json";
+import zhHansBilling from "./zh-Hans/billing.json";
+
+const resources: LocaleResources = {
+ common: zhHansCommon,
+ auth: zhHansAuth,
+ settings: zhHansSettings,
+ issues: zhHansIssues,
+ agents: zhHansAgents,
+ editor: zhHansEditor,
+ onboarding: zhHansOnboarding,
+ invite: zhHansInvite,
+ labels: zhHansLabels,
+ members: zhHansMembers,
+ "my-issues": zhHansMyIssues,
+ search: zhHansSearch,
+ inbox: zhHansInbox,
+ workspace: zhHansWorkspace,
+ projects: zhHansProjects,
+ autopilots: zhHansAutopilots,
+ skills: zhHansSkills,
+ chat: zhHansChat,
+ modals: zhHansModals,
+ runtimes: zhHansRuntimes,
+ layout: zhHansLayout,
+ usage: zhHansUsage,
+ ui: zhHansUi,
+ squads: zhHansSquads,
+ billing: zhHansBilling,
+};
+
+export default resources;
diff --git a/packages/views/locales/zh-Hant.ts b/packages/views/locales/zh-Hant.ts
new file mode 100644
index 0000000000..7587ba007b
--- /dev/null
+++ b/packages/views/locales/zh-Hant.ts
@@ -0,0 +1,56 @@
+import type { LocaleResources } from "@multica/core/i18n";
+import zhHantCommon from "./zh-Hant/common.json";
+import zhHantAuth from "./zh-Hant/auth.json";
+import zhHantSettings from "./zh-Hant/settings.json";
+import zhHantIssues from "./zh-Hant/issues.json";
+import zhHantAgents from "./zh-Hant/agents.json";
+import zhHantEditor from "./zh-Hant/editor.json";
+import zhHantOnboarding from "./zh-Hant/onboarding.json";
+import zhHantInvite from "./zh-Hant/invite.json";
+import zhHantLabels from "./zh-Hant/labels.json";
+import zhHantMembers from "./zh-Hant/members.json";
+import zhHantMyIssues from "./zh-Hant/my-issues.json";
+import zhHantSearch from "./zh-Hant/search.json";
+import zhHantInbox from "./zh-Hant/inbox.json";
+import zhHantWorkspace from "./zh-Hant/workspace.json";
+import zhHantProjects from "./zh-Hant/projects.json";
+import zhHantAutopilots from "./zh-Hant/autopilots.json";
+import zhHantSkills from "./zh-Hant/skills.json";
+import zhHantChat from "./zh-Hant/chat.json";
+import zhHantModals from "./zh-Hant/modals.json";
+import zhHantRuntimes from "./zh-Hant/runtimes.json";
+import zhHantLayout from "./zh-Hant/layout.json";
+import zhHantUsage from "./zh-Hant/usage.json";
+import zhHantUi from "./zh-Hant/ui.json";
+import zhHantSquads from "./zh-Hant/squads.json";
+import zhHantBilling from "./zh-Hant/billing.json";
+
+const resources: LocaleResources = {
+ common: zhHantCommon,
+ auth: zhHantAuth,
+ settings: zhHantSettings,
+ issues: zhHantIssues,
+ agents: zhHantAgents,
+ editor: zhHantEditor,
+ onboarding: zhHantOnboarding,
+ invite: zhHantInvite,
+ labels: zhHantLabels,
+ members: zhHantMembers,
+ "my-issues": zhHantMyIssues,
+ search: zhHantSearch,
+ inbox: zhHantInbox,
+ workspace: zhHantWorkspace,
+ projects: zhHantProjects,
+ autopilots: zhHantAutopilots,
+ skills: zhHantSkills,
+ chat: zhHantChat,
+ modals: zhHantModals,
+ runtimes: zhHantRuntimes,
+ layout: zhHantLayout,
+ usage: zhHantUsage,
+ ui: zhHantUi,
+ squads: zhHantSquads,
+ billing: zhHantBilling,
+};
+
+export default resources;
diff --git a/packages/views/package.json b/packages/views/package.json
index 98c9bc9f11..44699f60a3 100644
--- a/packages/views/package.json
+++ b/packages/views/package.json
@@ -74,6 +74,14 @@
"./i18n": "./i18n/index.ts",
"./attachments": "./attachments/index.ts",
"./locales": "./locales/index.ts",
+ "./locales/en": "./locales/en.ts",
+ "./locales/zh-Hans": "./locales/zh-Hans.ts",
+ "./locales/zh-Hant": "./locales/zh-Hant.ts",
+ "./locales/ko": "./locales/ko.ts",
+ "./locales/ja": "./locales/ja.ts",
+ "./locales/fr": "./locales/fr.ts",
+ "./locales/es": "./locales/es.ts",
+ "./locales/ru": "./locales/ru.ts",
"./locales/*": "./locales/*"
},
"dependencies": {