Skip to content

I18n: Remove unnessecary useTranslate() React hook#1646

Merged
benjaminshafii merged 1 commit intodifferent-ai:devfrom
johnnyshields:i18n-remove-react-hook
May 4, 2026
Merged

I18n: Remove unnessecary useTranslate() React hook#1646
benjaminshafii merged 1 commit intodifferent-ai:devfrom
johnnyshields:i18n-remove-react-hook

Conversation

@johnnyshields
Copy link
Copy Markdown
Contributor

@johnnyshields johnnyshields commented May 4, 2026

This PR is based on #1639

This PR removes more piece of I18n cruft from the codebase: a React hook that calls I18n.t() directly, and oddly wraps it in two different but similar functions.

A React hook like this could be useful in the future if there were some dynamic logic to re-render when the user's selected language changes, but as it stands none of that is implemented today, so it's better to just remove/replace the hook cleanly with I18n.t(), and if you ever need such logic in the future you can cleanly reimplement a new hook with hopefully just one wrapper function!

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 4, 2026

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

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 May 4, 2026 9:26pm

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 4, 2026

@johnnyshields is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

The following comment was made by an LLM, it may be inaccurate:

@benjaminshafii benjaminshafii force-pushed the i18n-remove-react-hook branch from 8412ec8 to d401e32 Compare May 4, 2026 21:26
@benjaminshafii benjaminshafii merged commit d3b33ae into different-ai:dev May 4, 2026
9 of 14 checks passed
@johnnyshields johnnyshields deleted the i18n-remove-react-hook branch May 5, 2026 03:26
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