Skip to content

i18n: add warning if falling back to default translation, pt 2#8165

Merged
mimecuvalo merged 1 commit intomainfrom
mime/i18n-log-warn-2
Mar 5, 2026
Merged

i18n: add warning if falling back to default translation, pt 2#8165
mimecuvalo merged 1 commit intomainfrom
mime/i18n-log-warn-2

Conversation

@mimecuvalo
Copy link
Copy Markdown
Member

@mimecuvalo mimecuvalo commented Mar 5, 2026

bah, whoops, followup again #8164 (review)

Change type

  • bugfix
  • improvement
  • feature
  • api
  • other

Note

Low Risk
Low risk: only changes when the fallback console.warn fires, moving it out of render and preventing repeated warnings on re-renders.

Overview
Moves the "falling back to default translation" warning in useTranslation from render-time to a useEffect keyed on translation?.messages, so the warning only emits when messages are missing (or change to missing) rather than on every render.

Written by Cursor Bugbot for commit 87ae187. This will update automatically on new commits. Configure here.

@huppy-bot huppy-bot bot added the other ⚙️ Changes that don't affect SDK users, e.g. internal or .com changes label Mar 5, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 5, 2026

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

Project Deployment Actions Updated (UTC)
examples Ready Ready Preview Mar 5, 2026 3:55pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
analytics Ignored Ignored Mar 5, 2026 3:55pm
chat-template Ignored Ignored Mar 5, 2026 3:55pm
tldraw-docs Ignored Ignored Mar 5, 2026 3:55pm
tldraw-shader Ignored Ignored Mar 5, 2026 3:55pm
workflow-template Ignored Ignored Mar 5, 2026 3:55pm

Request Review

@mimecuvalo mimecuvalo enabled auto-merge March 5, 2026 15:53
@mimecuvalo mimecuvalo added this pull request to the merge queue Mar 5, 2026
Merged via the queue into main with commit 535ee94 Mar 5, 2026
23 checks passed
@mimecuvalo mimecuvalo deleted the mime/i18n-log-warn-2 branch March 5, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

other ⚙️ Changes that don't affect SDK users, e.g. internal or .com changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant