Skip to content

Typed Translations#683

Merged
scazan merged 3 commits intodevfrom
onboarding-es-translations-typed-i18n
Mar 2, 2026
Merged

Typed Translations#683
scazan merged 3 commits intodevfrom
onboarding-es-translations-typed-i18n

Conversation

@scazan
Copy link
Collaborator

@scazan scazan commented Feb 26, 2026

This ensures that all translation keys are properly typed against the dictionary. It makes sure that we never have translations keys that don't exist in the dictionary with translations.

Typecheck now flags these situations and your IDE should also be showing it as an error.

Example with a bad translation key

Screenshot 2026-02-26 at 13 08 04

@vercel
Copy link
Contributor

vercel bot commented Feb 26, 2026

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

Project Deployment Actions Updated (UTC)
app Error Error Mar 2, 2026 1:17pm

Request Review

Comment on lines +43 to +50
<span className="text-neutral-gray4">
{t.rich('Results for <highlight>{query}</highlight>', {
query: query,
highlight: (chunks: React.ReactNode) => (
<span className="text-neutral-black">{chunks}</span>
),
})}
</span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice, didn't know we could do this 👍

@scazan scazan force-pushed the onboarding-es-translations-typed-i18n branch from 9715431 to 691c645 Compare March 2, 2026 13:14
@scazan scazan merged commit 5b2c4a4 into dev Mar 2, 2026
10 of 12 checks passed
@scazan scazan deleted the onboarding-es-translations-typed-i18n branch March 2, 2026 14:53
@scazan scazan mentioned this pull request Mar 4, 2026
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.

2 participants