22
33from openpilot .selfdrive .ui .ui_state import ui_state
44from openpilot .system .ui .lib .application import gui_app , FontWeight
5+ from openpilot .system .ui .lib .multilang import tr
56from openpilot .system .ui .lib .text_measure import measure_text_cached
67from openpilot .system .ui .lib .wrap_text import wrap_text
78from openpilot .system .ui .widgets import Widget
@@ -29,21 +30,21 @@ def _render_for_non_prime_users(self, rect: rl.Rectangle):
2930 w = rect .width - 160
3031
3132 # Title
32- gui_label (rl .Rectangle (x , y , w , 90 ), "Upgrade Now" , 75 , font_weight = FontWeight .BOLD )
33+ gui_label (rl .Rectangle (x , y , w , 90 ), tr ( "Upgrade Now" ) , 75 , font_weight = FontWeight .BOLD )
3334
3435 # Description with wrapping
3536 desc_y = y + 140
3637 font = gui_app .font (FontWeight .LIGHT )
37- wrapped_text = "\n " .join (wrap_text (font , "Become a comma prime member at connect.comma.ai" , 56 , int (w )))
38+ wrapped_text = "\n " .join (wrap_text (font , tr ( "Become a comma prime member at connect.comma.ai" ) , 56 , int (w )))
3839 text_size = measure_text_cached (font , wrapped_text , 56 )
3940 rl .draw_text_ex (font , wrapped_text , rl .Vector2 (x , desc_y ), 56 , 0 , rl .WHITE )
4041
4142 # Features section
4243 features_y = desc_y + text_size .y + 50
43- gui_label (rl .Rectangle (x , features_y , w , 50 ), "PRIME FEATURES:" , 41 , font_weight = FontWeight .BOLD )
44+ gui_label (rl .Rectangle (x , features_y , w , 50 ), tr ( "PRIME FEATURES:" ) , 41 , font_weight = FontWeight .BOLD )
4445
4546 # Feature list
46- features = ["Remote access" , "24/7 LTE connectivity" , "1 year of drive storage" , "Remote snapshots" ]
47+ features = [tr ( "Remote access" ), tr ( "24/7 LTE connectivity" ), tr ( "1 year of drive storage" ), tr ( "Remote snapshots" ) ]
4748 for i , feature in enumerate (features ):
4849 item_y = features_y + 80 + i * 65
4950 gui_label (rl .Rectangle (x , item_y , 100 , 60 ), "✓" , 50 , color = rl .Color (70 , 91 , 234 , 255 ))
@@ -58,5 +59,5 @@ def _render_for_prime_user(self, rect: rl.Rectangle):
5859 y = rect .y + 40
5960
6061 font = gui_app .font (FontWeight .BOLD )
61- rl .draw_text_ex (font , "✓ SUBSCRIBED" , rl .Vector2 (x , y ), 41 , 0 , rl .Color (134 , 255 , 78 , 255 ))
62- rl .draw_text_ex (font , "comma prime" , rl .Vector2 (x , y + 61 ), 75 , 0 , rl .WHITE )
62+ rl .draw_text_ex (font , tr ( "✓ SUBSCRIBED" ) , rl .Vector2 (x , y ), 41 , 0 , rl .Color (134 , 255 , 78 , 255 ))
63+ rl .draw_text_ex (font , tr ( "comma prime" ) , rl .Vector2 (x , y + 61 ), 75 , 0 , rl .WHITE )
0 commit comments