feat(i18n): localize ConfigSection and ConfigScope labels (11 MessageIds)#2918
feat(i18n): localize ConfigSection and ConfigScope labels (11 MessageIds)#2918gordonlu wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Code Review
This pull request localizes the configuration section and scope labels in the TUI views by adding corresponding message IDs and translations across multiple languages (English, Vietnamese, Chinese, Japanese, Portuguese, and Spanish). It updates ConfigScope and ConfigSection to retrieve localized labels using the current locale, and adapts the configuration view rendering and tests accordingly. The review feedback highlights an issue where filtering in non-English locales will no longer match English terms (like 'display' or 'session'). It suggests updating the filter logic to match against both the localized and English labels to preserve search usability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| let section = row.section.label(self.locale).to_lowercase(); | ||
| let key = row.key.to_lowercase(); | ||
| let value = self.row_display_value(row).to_lowercase(); | ||
| let scope = row.scope.label().to_lowercase(); | ||
| let scope = row.scope.label(self.locale).to_lowercase(); |
There was a problem hiding this comment.
When using a non-English locale, filtering the configuration view using English terms (such as "display" or "session") will no longer match because the section and scope labels are fully localized. Since these are common technical terms, it is highly beneficial to allow filtering by both the localized labels and their English/canonical equivalents.
We can achieve this elegantly by formatting the search strings to include both the localized and English labels.
let section = format!("{} {}", row.section.label(self.locale), row.section.label(Locale::En)).to_lowercase();
let key = row.key.to_lowercase();
let value = self.row_display_value(row).to_lowercase();
let scope = format!("{} {}", row.scope.label(self.locale), row.scope.label(Locale::En)).to_lowercase();There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
aa8361d to
d3bea72
Compare
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Thanks @gordonlu — we merged #2891 and #2896 from your i18n batch tonight, which moved Since the slices all touch |
Summary
Localize the 9 ConfigSection labels (Provider, Model, Permissions, Network, Display, Composer, Sidebar, History, MCP) and 2 ConfigScope labels (SESSION, SAVED) in the config view.
Changes
ConfigSection::label()andConfigScope::label()to acceptLocaleand delegate totr(). Update all call sites to pass locale.Testing
Locale::Enexplicitly where they assert section/scope labelslegacy_sse_closed_stream_reconnects_and_retries_tool_call)cargo fmt --all -- --checkpasses