#8060: i18n (1/4) - core infrastructure#18171
#8060: i18n (1/4) - core infrastructure#18171jethac wants to merge 2 commits intogoogle-gemini:mainfrom
Conversation
- Set up i18next and react-i18next infrastructure - Extract UI strings from Help, Auth, and Settings components - Add English locale files with proper structure - Implement styledText utility for interpolation - Convert Help tests to use snapshots per Jacob's feedback - Add direct component styling verification This is a pure refactoring with zero behavioral changes. All tests pass and code functionality remains identical.
Summary of ChangesHello @jethac, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request lays the essential groundwork for internationalization (i18n) within the CLI application. It integrates the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request establishes a solid foundation for internationalization using i18next. The changes are well-structured, including the core i18n setup, initial English translation files, and a clever utility for rendering styled text. The accompanying tests are comprehensive. My review focuses on enhancing the robustness of error handling in the new i18n module to prevent silent failures and make debugging easier, aligning with our repository's guidelines on detailed error logging. I've identified a couple of areas where improvements can be made.
96ffa18 to
9c3a73c
Compare
9c3a73c to
727ee36
Compare
727ee36 to
4f0c969
Compare
|
Hi there! Thank you for your contribution to Gemini CLI. We really appreciate the time and effort you've put into this pull request. To keep our backlog manageable and ensure we're focusing on current priorities, we are closing pull requests that haven't seen maintainer activity for 30 days. Currently, the team is prioritizing work associated with 🔒 maintainer only or help wanted issues. If you believe this change is still critical, please feel free to comment with updated details. Otherwise, we encourage contributors to focus on open issues labeled as help wanted. Thank you for your understanding! |
Summary
This is the first of four pull requests to implement the i18n system for Gemini CLI. This initial PR establishes the core infrastructure, utility patterns, and CLI entrypoint integration, using @hoteye's original work from PR #8060 as the foundation.
Implements Phase 1 of Issue #6525 (i18n infrastructure + core string extraction).
Supersedes PR #17738 (Previous 100+ commit PR being split into manageable semantic chunks).
Supersedes part of PR #8060 (hoteye's foundation, preserved with original authorship).
What's Included
From @hoteye's original work (preserved with authorship):
renderStyledTextutility: A novel solution for semantic interpolation in Ink terminal environments, allowing React components to be used within translations without fragmenting keys.common.json,help.json,dialogs.json) and foundational UI strings.New in this PR:
gemini.tsxso translations are available before the UI renders.test-setup.ts, ensuring unit tests use the translation system correctly.GEMINI_LANG,LANG, or theIntlAPI.ENOENTvs malformed files) as requested bygemini-code-assist.PR Stack
Architecture Highlights
Semantic Interpolation for Ink
Terminal UIs often require complex styling (bolding, colors) mid-sentence. Instead of breaking translations into fragments (which destroys context for translators), this PR introduces
renderStyledText:Testing
Attribution
The i18next infrastructure and
renderStyledTextutility is entirely @hoteye's work from PR #8060. This PR preserves hoteye's original commit to maintain attribution.