-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Conversation
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.
Hi @zenseii , could you please test this solution? |
There was a problem hiding this 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.
|
There was a problem hiding this 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}
.
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.