Skip to content

Conversation

@TheSecurityDev
Copy link
Contributor

@TheSecurityDev TheSecurityDev commented Oct 24, 2025

This setting is added separately, so it wasn't being translated when all the others are.

Wrapped in lamba to be consistent, but all the ones in this class seem to work fine without the lambda, so curious why this is necessary.

Before:
2025-10-23_19-44_1

After:
2025-10-23_19-44

@Copilot Copilot AI review requested due to automatic review settings October 24, 2025 00:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a missing translation for the longitudinal personality setting's description text. The change ensures that the description is properly translated like other UI elements by wrapping it in a lambda function that calls the translation function.

Key Changes:

  • Added translation wrapper to the longitudinal personality toggle description to ensure it's translated consistently with other UI strings

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added the ui label Oct 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2025

raylib UI Preview

All Screenshots

self._long_personality_setting = multiple_button_item(
lambda: tr("Driving Personality"),
DESCRIPTIONS["LongitudinalPersonality"],
lambda: tr(DESCRIPTIONS["LongitudinalPersonality"]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should translate below?

Copy link
Contributor Author

@TheSecurityDev TheSecurityDev Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't because it's not included in self._toggle_defs (it's shown conditionally)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, it looks like it's still included in the loop, let me check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is excluded since it's a multiple_button_item instead of toggle_item. The toggle is added to _toggles further down, but not _toggle_defs

I found a way to include it though, but with a bit more code due to the difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, #36461 might be considered a more proper solution, although the simplicity of this pr can't be matched. Whichever one you like better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants