Refactor simple UI text into bundles#117
Refactor simple UI text into bundles#117Wind-DeterMination-backup wants to merge 3 commits intoTinyLake:mainfrom
Conversation
Summary of ChangesHello, 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 significantly refactors the handling of simple UI text by moving hardcoded strings into dedicated language bundles. This change enhances the maintainability and extensibility of the UI, making it easier to manage translations and adapt the application for different locales without modifying core code. The update ensures that all simple UI elements now leverage a consistent and robust internationalization mechanism. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
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 is a great step towards better internationalization by moving hardcoded UI strings to resource bundles. However, many of the new keys in bundle-mdtx.properties and bundle-mdtx_en.properties are very long and appear to be auto-generated from the string values. This can make them difficult to maintain. It would be better to use shorter, more semantic key names. For example, ui.simple.you-are-already-on-the-latest-version could be ui.simple.latest-version-notice.
Additionally, some keys appear to be truncated, which should be fixed. I've added specific comments for some of these.
Finally, I've noticed some inconsistencies in tone between the Chinese and English translations for the same key (e.g., ui.simple.surrender-vote), which might be worth reviewing for localization quality.
There was a problem hiding this comment.
Code Review
This pull request is an excellent and thorough refactoring that migrates hardcoded UI text to resource bundles, significantly improving the project's internationalization capabilities. The changes are extensive and well-executed across numerous files. I have one minor suggestion to improve the clarity of an English translation.
|
Progress update: renamed the unstable generated ui.simple keys to stable descriptive names, localized the remaining patch-backed runtime UI strings in work/core/src, regenerated patches/client with follow-up patch 0074-refactor-localize-patch-ui-strings.patch, and pushed gh-107 at d3dfdd6. Local gpt-5.4-high review on the final state did not surface new runtime localization issues beyond comments and intentional language-name literals. I also attempted local Gradle verification, but this environment stalled while fetching SDL-related dependencies during configuration, so there is no fresh successful compile log attached to this push. |
|
请重新阅读issue标题。不要干不相关的工作。 |
|
Follow-up update: I corrected the approach to match the current issue title. Instead of relying on a trailing cleanup patch, I inlined the localization replacements back into the existing patch files themselves and removed the temporary follow-up patch 0074. The branch is now updated at aad5321. |
|
不要改变i的用法。优先使用i而不是preproties文件。 |
Summary
i("...")calls from hardcoded Chinese literals to bundle keysui.simple.*entries inbundle-mdtx.propertiesandbundle-mdtx_en.propertiesUiTextBundleEn.zhToEnfallback map and makeUIExt.i(...)read bundle keys directlyVerification
./gradlew.bat :core:classes --no-daemonRefs #107