Skip to content

Frontend: Cleanup i18next logs#8459

Merged
tristanlabelle merged 1 commit into
developfrom
frontend/feature/cleanup-i18next-logs
May 12, 2026
Merged

Frontend: Cleanup i18next logs#8459
tristanlabelle merged 1 commit into
developfrom
frontend/feature/cleanup-i18next-logs

Conversation

@tristanlabelle

@tristanlabelle tristanlabelle commented May 5, 2026

Copy link
Copy Markdown
Contributor

The console output from a local yarn start is almost unusable because of the amount of i18next logging, which includes every loaded string. Unfortunately i18next, and especially next-i18next don't allow muting only that log level, so my only solution was monkey patching console.log.

This then exposed two warnings/errors that we had been missing:

  • en-CORP strings were failing to load because i18next canonicalized the locale to en-Corp.
  • mod strings for non-English locales were erroring because they don't exist.

The most verbose logs being filtered are:

i18next::backendConnector: loaded namespace global for language zh-Hant { ... }
i18next: initialized { ... }
i18next: languageChanged en

Testing

Ran the frontend locally and reloaded /dashboard.

Before: over 8000 lines of junk, including:

i18next::backendConnector: loaded namespace donations for language hi {
  donations_box: {
    monthly_button_label: 'मासिक',
    action_button_label: 'अगला',
    validation_message: 'यह फ़ील्ड आवश्यक है',
    one_time_button_label: 'एक बार',
    ...

After:

 ✓ Starting...
Generated blog index with 53 posts.
Generated RSS feed with 53 posts.
Generated blog index with 53 posts.
Generated RSS feed with 53 posts.
 ○ Compiling /instrumentation ...
 ✓ Compiled /instrumentation in 2.6s (1072 modules)
 ✓ Ready in 8.4s
 ○ Compiling /[...slug] ...
 ✓ Compiled /[...slug] in 19.1s (3871 modules)
 ○ Compiling /404 ...
 ✓ Compiled /404 in 1572ms (3879 modules)
 GET /_next/static/webpack/1d9b70390693ccc9.webpack.hot-update.json 404 in 25652ms
 ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
 ○ Compiling /middleware ...
 ✓ Compiled /middleware in 1129ms (832 modules)
 ○ Compiling /dashboard ...
 ✓ Compiled /dashboard in 1615ms (4054 modules)
 GET /dashboard 200 in 2717ms
 GET /_next/static/webpack/1d9b70390693ccc9.webpack.hot-update.json 404 in 2119ms

Web frontend checklist

  • There are no console warnings when running the app
  • Added tests where relevant
  • Clicked around my changes running locally and it works
  • Checked Desktop, Mobile and Tablet screen sizes

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

@vercel

vercel Bot commented May 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
couchers Ready Ready Preview May 5, 2026 1:30pm

Request Review

@tristanlabelle
tristanlabelle marked this pull request as ready for review May 5, 2026 13:34
@tristanlabelle
tristanlabelle requested a review from nabramow as a code owner May 5, 2026 13:34
@tristanlabelle
tristanlabelle requested review from a team and aapeliv May 5, 2026 13:34
Comment thread app/web/next-i18next.config.js

@aapeliv aapeliv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread app/web/next-i18next.config.js
@tristanlabelle
tristanlabelle merged commit d5e7d11 into develop May 12, 2026
18 checks passed
@tristanlabelle
tristanlabelle deleted the frontend/feature/cleanup-i18next-logs branch May 12, 2026 00:35
@github-actions

Copy link
Copy Markdown
Contributor

📝 Release Notes

This PR does not need to be included in release notes.

Reason: This PR is mainly a developer-experience cleanup for local frontend logs and fixes issues discovered during development, but it does not introduce a noticeable end-user feature, UX change, or significant user-facing bug fix in production.

🤖 Bot Debug Information

Model: couchers.openai.gpt-5.4
Decision: exclude
Reasoning: This PR is mainly a developer-experience cleanup for local frontend logs and fixes issues discovered during development, but it does not introduce a noticeable end-user feature, UX change, or significant user-facing bug fix in production.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants