Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Editor buttons not being translated #9557

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

ihhub
Copy link
Owner

@ihhub ihhub commented Feb 11, 2025

close #9542

The solution is not perfect and the root cause of this case and any similar possible cases in the future is that a text translation is done implicitly for some functions while others don't. We need to avoid these confusion by removing translation code from any button generation code. Explicitly doing translation guarantees that everything works fine.

close #9542

The solution is not perfect and the root cause of this case and any similar possible cases in the future is that a text translation is done implicitly for some functions while others don't. We need to avoid these confusion by removing translation code from any button generation code. Explicitly doing translation guarantees that everything works fine.
@ihhub ihhub added improvement New feature, request or improvement ui UI/GUI related stuff labels Feb 11, 2025
@ihhub ihhub added this to the 1.1.6 milestone Feb 11, 2025
@ihhub ihhub self-assigned this Feb 11, 2025
@ihhub
Copy link
Owner Author

ihhub commented Feb 11, 2025

Hi @zenseii , could you please test this solution?

@ihhub ihhub requested a review from zenseii February 11, 2025 14:51
@ihhub ihhub requested a review from Districh-ru February 11, 2025 15:09
Copy link
Collaborator

@zenseii zenseii left a comment

Choose a reason for hiding this comment

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

Great! A right step in the direction of tidying this code.

Copy link
Collaborator

@Districh-ru Districh-ru left a comment

Choose a reason for hiding this comment

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

Hi @ihhub,
This PR work OK, but I found a couple places for optimization and pushed the changes:
I've removed the redundant calls to .height( ) and also the calls to .width( buttonSize.width ) which result was not used later and was stored for nothing.
Also a did a one small optimizationto cache {textAreaWidth + backgroundBorders.width, textAreaHeight + backgroundBorders.height}.

@ihhub ihhub merged commit bbdda28 into master Feb 12, 2025
23 checks passed
@ihhub ihhub deleted the button-translation-standartization branch February 12, 2025 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature, request or improvement ui UI/GUI related stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add translation support for strings in map editor's file dialog
3 participants