Skip to content

Remove multi-lingual support from frontend#4682

Closed
marcoacierno wants to merge 1 commit into
mainfrom
claude/issue-4680-20260620-1830
Closed

Remove multi-lingual support from frontend#4682
marcoacierno wants to merge 1 commit into
mainfrom
claude/issue-4680-20260620-1830

Conversation

@marcoacierno

Copy link
Copy Markdown
Member

Removes Italian language support from the frontend codebase as requested in #4680.

Changes:

  • Removed i18n config from Next.js
  • Simplified locale context to always use English
  • Removed ~1200 lines of Italian translations
  • Removed language switching from header
  • Updated 40+ pages to use DEFAULT_LOCALE
  • Moved API routes from api/[lang]/ to api/

Closes #4680

Generated with Claude Code

- Remove i18n configuration from next.config.js
- Update middleware to remove locale routing
- Simplify locale context to always return English
- Remove Italian translations from locale/index.ts (~1200 lines)
- Remove language switching button from header
- Update link helpers to remove locale prefixes from URLs
- Move API routes from api/[lang]/ to api/
- Update all pages to use DEFAULT_LOCALE instead of locale from context
- Simplify _app.tsx by removing LocaleProvider wrapper

Closes #4680

Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com>
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pycon Error Error Jun 20, 2026 6:54pm

@claude

claude Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

This PR removes Italian language support from the Next.js frontend, deleting ~1200 lines of translations, removing i18n config, simplifying the locale context to always return English, and moving API routes from api/[lang]/... to api/....

Must-fix issues

Critical bug: page-static-props.ts uses undefined locale

frontend/src/components/page-handler/page-static-props.ts

DEFAULT_LOCALE is imported but never used. The function body still reads locale from the Next.js GetStaticProps context, but with i18n removed from next.config.js, context.locale will always be undefined. Every CMS/Wagtail page using getStaticProps from this file will send language: undefined to GraphQL. Replace locale with DEFAULT_LOCALE throughout getProps() — the import is already there.

Stale call signature in schedule-view

frontend/src/components/schedule-view/index.tsx line 304

getDayUrl(currentDay, language) still passes a second argument after the signature was changed to (day: string) in this PR. Silently ignored at runtime but is a type error.

Missing redirects for previously indexed URLs

The site previously served /en/* and /it/* paths. With no redirects added to next.config.js, all those URLs will 404 (breaking bookmarks and search engine links). Add:

{ source: '/en/:path*', destination: '/:path*', permanent: true },
{ source: '/it/:path*', destination: '/:path*', permanent: true },

Minor cleanup

  • LocaleProvider is exported from frontend/src/locale/context.tsx but removed from _app.tsx and no longer imported anywhere — can be deleted.
  • next-cookies in package.json is now unused (only the removed cookie-sync effect used it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove multi-lingual from the FE codebase

1 participant