feat(i18n): localize ConfigEdit labels and default values (11 MessageIds)#2919
feat(i18n): localize ConfigEdit labels and default values (11 MessageIds)#2919gordonlu 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 various UI strings in the configuration view of the TUI application, replacing hardcoded English strings with localized messages across multiple languages. The review feedback highlights opportunities to simplify redundant Option conversions by cloning the options directly, and suggests using the imported tr function instead of its fully qualified path.
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.
| .default_model | ||
| .as_deref() | ||
| .unwrap_or("(default)") | ||
| .to_string(), | ||
| .map(|v| v.to_string()) | ||
| .unwrap_or_else(|| { | ||
| tr(app.ui_locale, MessageId::ConfigDefaultValue).to_string() | ||
| }), |
There was a problem hiding this comment.
The .as_deref().map(|v| v.to_string()) conversion is redundant here because settings.default_model is already of type Option<String>. We can simplify this by cloning the Option<String> directly.
.default_model
.clone()
.unwrap_or_else(|| {
tr(app.ui_locale, MessageId::ConfigDefaultValue).to_string()
}),| .reasoning_effort | ||
| .as_deref() | ||
| .unwrap_or("(config/default)") | ||
| .to_string(), | ||
| .map(|v| v.to_string()) | ||
| .unwrap_or_else(|| { | ||
| tr(app.ui_locale, MessageId::ConfigDefaultReasoning).to_string() | ||
| }), |
There was a problem hiding this comment.
| let mut spans = Vec::new(); | ||
| spans.push(Span::styled( | ||
| "New: ", | ||
| crate::localization::tr(locale, MessageId::ConfigEditNewLabel), |
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.
b149d3f to
d76b396
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 11 ConfigEdit-related strings including edit mode labels (Edit, Scope, Current, Hint, New), edit footer, status messages, default value placeholders, and currency suffix.
Changes
ConfigEdit*,ConfigRowEffective,ConfigDefault*, andConfigUnavailableMessageId variants with translations across all 7 shipped localesself.tr()/tr()calls in ConfigView editing mode, row display value formatting, and config row constructionTesting
Locale::En; cost-currency uses localized zh-Hans assertioncargo fmt --all -- --checkpasses