-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add translation support for the website #7277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📚 Website preview is ready! 🔗 Preview URL: https://pr-7277.trilium-homepage.pages.dev ✅ All checks passed This preview will be updated automatically with new commits. |
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces internationalization support for the website using i18next
, which is a great addition. The implementation covers adding dependencies, creating the initial English translation file, and updating components to use translation functions.
However, there are a few critical issues with the current implementation. The i18next
setup in i18n.ts
will not work as expected in a reactive framework like Preact, as it won't trigger UI updates on language change. This also leads to issues in files like download-helper.ts
where translations are cached at module load time. I've also found a couple of bugs, such as a missing variable in a translation call and a wrong translation key being used.
My review includes detailed comments on these issues and suggestions for how to fix them by adopting standard react-i18next
patterns, like using the useTranslation
hook. Addressing these points will ensure the translation system is robust and works correctly.
No description provided.