From e2ef0a40eef03bb2c50a3e40e7a1146a7d54c531 Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 15 Aug 2026 08:23:11 +0000 Subject: [PATCH] ui: translate settings sidebar parent menu labels --- .../selfdrive/ui/sunnypilot/layouts/settings/settings.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openpilot/selfdrive/ui/sunnypilot/layouts/settings/settings.py b/openpilot/selfdrive/ui/sunnypilot/layouts/settings/settings.py index 1b85c0923..e16b9c9e5 100644 --- a/openpilot/selfdrive/ui/sunnypilot/layouts/settings/settings.py +++ b/openpilot/selfdrive/ui/sunnypilot/layouts/settings/settings.py @@ -25,7 +25,7 @@ from openpilot.selfdrive.ui.sunnypilot.layouts.settings.trips import TripsLayout from openpilot.selfdrive.ui.sunnypilot.layouts.settings.vehicle import VehicleLayout from openpilot.selfdrive.ui.sunnypilot.layouts.settings.visuals import VisualsLayout from openpilot.system.ui.lib.application import gui_app, MousePos -from openpilot.system.ui.lib.multilang import tr_noop +from openpilot.system.ui.lib.multilang import tr, tr_noop from openpilot.system.ui.lib.text_measure import measure_text_cached from openpilot.system.ui.lib.wifi_manager import WifiManager from openpilot.system.ui.sunnypilot.lib.styles import style @@ -71,7 +71,8 @@ class NavButton(Widget): is_selected = self.panel_type == self.parent._current_panel text_color = OP.TEXT_SELECTED if is_selected else OP.TEXT_NORMAL content_x = rect.x + 90 - text_size = measure_text_cached(self.parent._font_medium, self.panel_info.name, 65) + label = tr(self.panel_info.name) + text_size = measure_text_cached(self.parent._font_medium, label, 65) # Draw background if selected if is_selected: @@ -90,7 +91,7 @@ class NavButton(Widget): content_x, rect.y + (OP.NAV_BTN_HEIGHT - text_size.y) / 2 ) - rl.draw_text_ex(self.parent._font_medium, self.panel_info.name, text_pos, 55, 0, text_color) + rl.draw_text_ex(self.parent._font_medium, label, text_pos, 55, 0, text_color) # Store button rect for click detection self.panel_info.button_rect = rect