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

Better respect auto-translation of static strings #81180

Closed
wants to merge 1 commit into from

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Aug 30, 2023

I noticed that GUI nodes make heavy use of RTR. It has 2 problems:

  • minor one is that this makes the strings translated in scene nodes (mostly affects FileDialog)
  • major one is that it forces the string to be translated even if auto_translate is disabled

I changed RTR to TTRC where internal auto-translation can be used (Buttons and PopupMenus; since #75012 it works even in the editor). For dynamic strings I added a new ATR() function, which is the same as already existing atr(), but it's used for strings that should be fetched for translation.

Partially addresses #80549 If we make auto_translate propagated, this PR is required to make it actually work.

Note that we need to add ATR to the translation fetch list (I think it's done on the translation repo?)

@KoBeWi KoBeWi added this to the 4.x milestone Aug 30, 2023
@KoBeWi KoBeWi requested review from a team as code owners August 30, 2023 20:50
@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 6, 2023

I just noticed that NOTIFICATION_TRANSLATION_CHANGED is not handled by most nodes, so changing locale at runtime won't update them if they use ATR(). I guess it's something for another PR.

@akien-mga
Copy link
Member

Superseded by #86222.

@akien-mga akien-mga closed this Feb 29, 2024
@akien-mga akien-mga removed this from the 4.3 milestone Feb 29, 2024
@KoBeWi KoBeWi deleted the make_atr_bigger branch February 29, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants