i18n: localize mode-picker messages#2932
Conversation
- Add 8 MessageIds for ModePicker surface (title, instruction, mode hints, footer labels) - Thread locale through ModePickerView::new() - Mode names (Agent/Plan/YOLO) kept English per convention
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 Mode Picker UI in the TUI crate. It introduces new localization keys and translations for multiple languages, updates the ModePickerView to accept and utilize the user's locale, and refactors the view to dynamically fetch localized strings instead of using hardcoded English values. The review feedback highlights that several translations in Vietnamese, Portuguese, and Spanish are too long and will be truncated on narrow terminals (under 44 columns), and provides concise, natural alternatives to ensure the UI fits correctly.
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.
| MessageId::ModePickerTitle => " Chế độ ", | ||
| MessageId::ModePickerInstruction => "Chọn cách CodeWhale vận hành:", | ||
| MessageId::ModePickerAgentHint => "Thực thi bình thường với phê duyệt", | ||
| MessageId::ModePickerPlanHint => "Lập kế hoạch trước khi thực thi", | ||
| MessageId::ModePickerYoloHint => "Tự động phê duyệt; bật shell", | ||
| MessageId::ModePickerFooterMove => "di chuyển ", | ||
| MessageId::ModePickerFooterSelect => "chọn ", | ||
| MessageId::ModePickerFooterCancel => "hủy ", |
There was a problem hiding this comment.
The Vietnamese translation for the YOLO hint (ModePickerYoloHint) is slightly too long.
When the terminal is narrow, the mode picker popup is constrained to its minimum width of 44 columns (inner width of 40 columns).
- The YOLO hint (
Tự động phê duyệt; bật shell) is 29 characters. Combined with the prefix (> 3. YOLO), the total line width is 41 characters, which exceeds the 40-character inner width and will be truncated by 1 character.
We can optimize this translation to be more concise and natural while fitting perfectly within the 40-character inner width:
- Use
"Tự động duyệt; bật shell"(25 chars) for the YOLO hint.
| MessageId::ModePickerTitle => " Chế độ ", | |
| MessageId::ModePickerInstruction => "Chọn cách CodeWhale vận hành:", | |
| MessageId::ModePickerAgentHint => "Thực thi bình thường với phê duyệt", | |
| MessageId::ModePickerPlanHint => "Lập kế hoạch trước khi thực thi", | |
| MessageId::ModePickerYoloHint => "Tự động phê duyệt; bật shell", | |
| MessageId::ModePickerFooterMove => "di chuyển ", | |
| MessageId::ModePickerFooterSelect => "chọn ", | |
| MessageId::ModePickerFooterCancel => "hủy ", | |
| MessageId::ModePickerTitle => " Chế độ ", | |
| MessageId::ModePickerInstruction => "Chọn cách CodeWhale vận hành:", | |
| MessageId::ModePickerAgentHint => "Thực thi bình thường với phê duyệt", | |
| MessageId::ModePickerPlanHint => "Lập kế hoạch trước khi thực thi", | |
| MessageId::ModePickerYoloHint => "Tự động duyệt; bật shell", | |
| MessageId::ModePickerFooterMove => "di chuyển ", | |
| MessageId::ModePickerFooterSelect => "chọn ", | |
| MessageId::ModePickerFooterCancel => "hủy ", |
| MessageId::ModePickerTitle => " Modo ", | ||
| MessageId::ModePickerInstruction => "Escolha como o CodeWhale deve operar:", | ||
| MessageId::ModePickerAgentHint => "Execução normal com aprovações", | ||
| MessageId::ModePickerPlanHint => "Planejar antes de executar", | ||
| MessageId::ModePickerYoloHint => "Aprovação automática; shell ativado", | ||
| MessageId::ModePickerFooterMove => "mover ", | ||
| MessageId::ModePickerFooterSelect => "selecionar ", | ||
| MessageId::ModePickerFooterCancel => "cancelar ", |
There was a problem hiding this comment.
The Portuguese translation for the YOLO hint (ModePickerYoloHint) and the footer buttons (ModePickerFooterSelect, ModePickerFooterCancel) are too long.
When the terminal is narrow, the mode picker popup is constrained to its minimum width of 44 columns (inner width of 40 columns).
- The YOLO hint (
Aprovação automática; shell ativado) is 35 characters. Combined with the prefix (> 3. YOLO), the total line width is 47 characters, which exceeds the 40-character inner width and will be truncated. - The bottom title with
"selecionar "(11) and"cancelar "(9) has a total display width of 47 characters, which exceeds the available bottom border width of 42 characters (44 - 2) and will be truncated.
We can optimize these translations to be more concise and natural while fitting perfectly within the 44-column layout:
- Use
"Auto-aprovar; shell ativo"(26 chars) for the YOLO hint. - Use
"escolher "(9 chars) for select. - Use
"sair "(5 chars) for cancel.
| MessageId::ModePickerTitle => " Modo ", | |
| MessageId::ModePickerInstruction => "Escolha como o CodeWhale deve operar:", | |
| MessageId::ModePickerAgentHint => "Execução normal com aprovações", | |
| MessageId::ModePickerPlanHint => "Planejar antes de executar", | |
| MessageId::ModePickerYoloHint => "Aprovação automática; shell ativado", | |
| MessageId::ModePickerFooterMove => "mover ", | |
| MessageId::ModePickerFooterSelect => "selecionar ", | |
| MessageId::ModePickerFooterCancel => "cancelar ", | |
| MessageId::ModePickerTitle => " Modo ", | |
| MessageId::ModePickerInstruction => "Escolha como o CodeWhale deve operar:", | |
| MessageId::ModePickerAgentHint => "Execução normal com aprovações", | |
| MessageId::ModePickerPlanHint => "Planejar antes de executar", | |
| MessageId::ModePickerYoloHint => "Auto-aprovar; shell ativo", | |
| MessageId::ModePickerFooterMove => "mover ", | |
| MessageId::ModePickerFooterSelect => "escolher ", | |
| MessageId::ModePickerFooterCancel => "sair ", |
| MessageId::ModePickerTitle => " Modo ", | ||
| MessageId::ModePickerInstruction => "Elige cómo debe operar CodeWhale:", | ||
| MessageId::ModePickerAgentHint => "Ejecución normal con aprobaciones", | ||
| MessageId::ModePickerPlanHint => "Planificar antes de ejecutar", | ||
| MessageId::ModePickerYoloHint => "Aprobación automática; shell habilitado", | ||
| MessageId::ModePickerFooterMove => "mover ", | ||
| MessageId::ModePickerFooterSelect => "seleccionar ", | ||
| MessageId::ModePickerFooterCancel => "cancelar ", |
There was a problem hiding this comment.
The Spanish translation for the YOLO hint (ModePickerYoloHint) and the footer buttons (ModePickerFooterSelect, ModePickerFooterCancel) are too long.
When the terminal is narrow, the mode picker popup is constrained to its minimum width of 44 columns (inner width of 40 columns).
- The YOLO hint (
Aprobación automática; shell habilitado) is 39 characters. Combined with the prefix (> 3. YOLO), the total line width is 51 characters, which exceeds the 40-character inner width and will be truncated. - The bottom title with
"seleccionar "(12) and"cancelar "(9) has a total display width of 47 characters, which exceeds the available bottom border width of 42 characters (44 - 2) and will be truncated.
We can optimize these translations to be more concise and natural while fitting perfectly within the 44-column layout:
- Use
"Auto-aprobar; shell activo"(27 chars) for the YOLO hint. - Use
"elegir "(7 chars) for select. - Use
"volver "(7 chars) for cancel.
| MessageId::ModePickerTitle => " Modo ", | |
| MessageId::ModePickerInstruction => "Elige cómo debe operar CodeWhale:", | |
| MessageId::ModePickerAgentHint => "Ejecución normal con aprobaciones", | |
| MessageId::ModePickerPlanHint => "Planificar antes de ejecutar", | |
| MessageId::ModePickerYoloHint => "Aprobación automática; shell habilitado", | |
| MessageId::ModePickerFooterMove => "mover ", | |
| MessageId::ModePickerFooterSelect => "seleccionar ", | |
| MessageId::ModePickerFooterCancel => "cancelar ", | |
| MessageId::ModePickerTitle => " Modo ", | |
| MessageId::ModePickerInstruction => "Elige cómo debe operar CodeWhale:", | |
| MessageId::ModePickerAgentHint => "Ejecución normal con aprobaciones", | |
| MessageId::ModePickerPlanHint => "Planificar antes de ejecutar", | |
| MessageId::ModePickerYoloHint => "Auto-aprobar; shell activo", | |
| MessageId::ModePickerFooterMove => "mover ", | |
| MessageId::ModePickerFooterSelect => "elegir ", | |
| MessageId::ModePickerFooterCancel => "volver ", |
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.
637b787 to
5fa064e
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.
5fa064e to
d825ebf
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.
d825ebf to
0df96b9
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.
0df96b9 to
7147891
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 mode-picker modal (8 MessageIds) across all 7 shipped locales.
Strings
ModePickerTitle—" Mode "ModePickerInstruction—"Choose how CodeWhale should operate:"ModePickerAgentHint—"Normal execution with approvals"ModePickerPlanHint—"Plan first before execution"ModePickerYoloHint—"Auto-approve; shell enabled"ModePickerFooterMove—"move "ModePickerFooterSelect—"select "ModePickerFooterCancel—"cancel "Infrastructure
locale: Localefield toModePickerViewAppAction::OpenModePickerinui.rsVerification
cargo clippy: cleancargo fmt --all --check: clean