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

LinkButton's text is not automatically translated (unlike Button) #52120

Closed
Calinou opened this issue Aug 26, 2021 · 0 comments · Fixed by #52145
Closed

LinkButton's text is not automatically translated (unlike Button) #52120

Calinou opened this issue Aug 26, 2021 · 0 comments · Fixed by #52145
Milestone

Comments

@Calinou
Copy link
Member

Calinou commented Aug 26, 2021

Godot version

3.3.3.stable, 4.0.dev

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 470.57.02)

Issue description

LinkButton's text is not automatically translated, unlike Button's text.

As a workaround, you can use a script to set the button's text wrapped with a tr() call.

This was originally reported in #34050 (comment).

This is because Button's set_text() logic should be copied into LinkButton's:

https://github.com/godotengine/godot/blob/3.x/scene/gui/button.cpp#L242-L251

https://github.com/godotengine/godot/blob/3.x/scene/gui/link_button.cpp#L33-L37

The same should also be done in the master branch.

Steps to reproduce

  • Create a Button node and set some text to it.
  • Create a LinkButton node and set some text to it.
  • Translate both their texts using a CSV or PO file.
  • Notice that only the Button's text is changed.

Minimal reproduction project

No response

@Calinou Calinou added this to the 4.0 milestone Aug 26, 2021
@Calinou Calinou changed the title LinkButton's text is not automatically translated LinkButton's text is not automatically translated (unlike Button) Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant