🎃 Set up i18n in the frontend and translate the sidebar and sign-in form (DE, IT)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- next.js, playwright, react, typescript
- Lĩnh vực
- frontend, internationalization, localization
Hướng nghiên cứu
Start with packages/frontend/src/app/layout.tsx, next.config.ts, and package.json to understand the existing layout, Sentry configuration, and dependencies; then inspect app-sidebar.tsx and app/login/page.tsx for the strings in scope. Add locale resolution, translations, switching, key-parity checks, and the documented coverage, while preserving existing routing and Sentry behavior. Verify the acceptance criteria with the i18n Playwright spec and existing frontend checks.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Part of the October Challenge #846.
Why
Many teams using AnythingMCP work in German- or Italian-speaking companies (think of the ERP connectors for SAP, Xentral, JTL-Wawi), and the people who set up connectors are often not the ones who read English comfortably. The README is already translated (README.de.md, README.ja.md, README.zh-CN.md) and the cookie banner speaks seven languages, but every UI string is hard-coded English and layout.tsx says lang="en". This issue lays the foundation and proves it on one area; each further page becomes its own small follow-up issue.
Self-hosted vs Cloud
- Self-hosted: enabled in Community and Business. Optional env
DEFAULT_LOCALE(defaulten) for instances where everyone speaks one language. - Cloud (
DEPLOYMENT_MODE=cloud): enabled, same behaviour;DEFAULT_LOCALEstays unset (en). The locale is a per-browser preference and never leaves the browser except as a cookie to our own frontend. - Who can use it: every visitor, signed in or not (the sign-in page must be translated before login). No role checks, no org data involved.
What to build
- Library:
next-intlv4 (supports Next.js 16 App Router and React 19, which we use:next ^16.3.6). Use its "without i18n routing" setup: no/[locale]/URL segment. Locale prefixes would breaksrc/proxy.ts's public-path list, the backend rewrites innext.config.tsand every bookmarked/OAuth callback URL. - Locale resolution in
src/i18n/request.ts(getRequestConfig): cookieNEXT_LOCALE→Accept-Languagebest match amongen,de,it→DEFAULT_LOCALE→en. - Root layout: set
<html lang={locale}>and wrap children withNextIntlClientProvider(most pages are'use client', so they useuseTranslations). Compose the next-intl plugin with the existingwithSentryConfiginnext.config.ts— do not drop Sentry. - Messages:
packages/frontend/messages/{en,de,it}.json, namespaced by area:nav.*,auth.signIn.*.en.jsonis the source of truth. Add a tiny script or test that fails whende/itmiss a key present inen(missing keys must fall back to English at runtime, not render the key). - Language switcher: a small select in the sidebar footer menu (next to "Log out") and on
/login(before sign-in). It sets theNEXT_LOCALEcookie (SameSite=Lax, 1 year, path/) and callsrouter.refresh(). - Translate as proof (only these):
- Sidebar: group titles and link labels in
NAV, "Settings", "Log out". - Sign-in/register form on
/login: heading, field labels, password rules, submit/switch buttons, the recovery-code links. Not the 2FA, license-key or email-verification sub-screens.
Translations must be natural, not machine-literal; native speakers among maintainers will review DE and IT.
- Sidebar: group titles and link labels in
- Do not translate: connector/tool names, adapter descriptions from the catalog, backend error messages (they come from the API in English).
Where to look
packages/frontend/package.json— Next 16 / React 19, no i18n lib yet.packages/frontend/src/app/layout.tsx:72— hard-codedlang="en";:81Providers.packages/frontend/next.config.ts:45—withSentryConfig(nextConfig, …).packages/frontend/src/proxy.ts:4— public paths; must keep working unchanged.packages/frontend/src/components/app-sidebar.tsx:43—NAV;:185"Log out";:202"Settings".packages/frontend/src/app/login/page.tsx:873(heading),:920–:960(fields), password rules ~:970.packages/frontend/src/components/cookie-consent.tsx:37,:424— existing per-language strings and browser auto-detection; follow-up can make it use the chosen locale.packages/frontend/src/lib/translation-safe-dom.ts— keep it: users still run browser translators on untranslated pages.packages/frontend/tests/e2e/login-redirect-query.spec.ts— Playwright pattern for/login.
Acceptance criteria
- With
Accept-Language: de-DEand no cookie,/loginrenders German and<html lang="de">; withit-ITItalian; withfr-FREnglish. - Switching language sets the cookie, persists across reload and sign-in, and overrides
Accept-Language. - Sidebar labels appear in the chosen language; all untranslated pages still render English, no raw keys visible.
- Key-parity check runs in CI (
npm run lint --workspace=packages/frontendor anode --testscript). - Playwright spec
packages/frontend/tests/e2e/i18n.spec.ts(uselocale/extraHTTPHeadersin the test) covers the three cases above; existing e2e specs still pass (they assert English strings). - Docs: "Translating the UI" section in
docs/(how to add a key, how to add a language) and a pointer inREADME.md.
Out of scope
- Translating other pages — maintainers will open one follow-up issue per page/area (dashboard, connectors, MCP servers, settings…).
- Storing the language on the user record / backend, translated emails, translated backend errors.
- Japanese, Chinese and other languages (easy to add once the foundation lands).
- Locale-aware number/date formatting (
toLocaleString('en-US')calls) — follow-up.
Size
L (several days, may be split: setup + switcher first, translations second).
How to claim
Comment "I'd like to work on this" and we'll assign you. Rules in #846.
- Ngôn ngữ chính
- TypeScript
- Star
- 856
- Fork
- 82
- Merge trung bình
- 6 giờ 44 phút
- Pull request đã merge (30 ngày)
- 181
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của HelpCode-ai/anythingmcp
-
Docs: document all SMTP_* and other undocumented env vars for self-hostingCó thể đã có người làm @notlakshitha đã nhận 6 ngày trước. Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
HelpCode-ai/anythingmcp#1049 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue hacktoberfest
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 70/100
HelpCode-ai/anythingmcp#996 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue hacktoberfest
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
HelpCode-ai/anythingmcp#995 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue hacktoberfest help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
HelpCode-ai/anythingmcp#982 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Workspace memory: personal and organization memory for AI clientsCó thể đã có người làm @helpcodeai đã nhận hôm nay. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
HelpCode-ai/anythingmcp#1151 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của HelpCode-ai/anythingmcp
Issue tương tự
-
e2e-failure ready-to-code
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(api): openapi.yaml still documents gif-tools optimize colors as 2-256 instead of 2, 4, 16, 256Đang mởarea: backend documentation priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
snapotter-hq/SnapOtter#2919 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
obsidianmd/pele#39 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
biomejs/biome#12475 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày