Skip to content

I18n: Remove unnessecary useTranslate() React hook - #1646

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

benjaminshafii merged 1 commit into
different-ai:devfrom
johnnyshields:i18n-remove-react-hook

Conversation

@johnnyshields

@johnnyshields johnnyshields commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

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

vercel Bot commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

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

vercel Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

@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

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

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

This branch was successfully deployed

1 active deployment
Preview – openwork-landing — d401e326 Deployed May 4, 2026 by vercel[bot]
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