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

Bugfix UI Mirroring #82859

Closed
wants to merge 1 commit into from
Closed

Conversation

Alex2782
Copy link
Contributor

@Alex2782 Alex2782 commented Oct 5, 2023

with this small adjustment UI Mirroring Demo works like before with the version Godot.4.0-rc6

@bruvzg: do you see any problems when en is no longer hardcoded?
(Note: in the header file locale is initialized with 'en'. )

https://github.com/godotengine/godot-demo-projects/tree/master/gui/ui_mirroring

original gscript

Screen-2023-10-05-164133.mp4

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

This is wrong, and will cause all untranslated (and English) apps to mirror on the systems with RTL system locale. Hard-coded "en" is correct, since it's a language of the translation keys by definition. So this is not a bug and should not be changed.

Instead, it should only mirror if app have translation for the RTL language (demo likely have it missing, but it should be fixed in the demo project).

@bruvzg
Copy link
Member

bruvzg commented Oct 5, 2023

So the correct fix for the demo is:

  • Add dummy translation.csv to the project:
keys,en,ar
dummy,dummy,dummy
  • Import it, and add both generated translation files in the Projects SettingsLocalizationTranslations.

@Alex2782
Copy link
Contributor Author

Alex2782 commented Oct 5, 2023

ok I will try it later

@Alex2782
Copy link
Contributor Author

Alex2782 commented Oct 5, 2023

Thanks for the tips!

godotengine/godot-demo-projects#974

@Alex2782 Alex2782 closed this Oct 5, 2023
@Alex2782 Alex2782 deleted the bugfix_ui_mirroring branch October 5, 2023 23:34
@AThousandShips AThousandShips removed this from the 4.x milestone Oct 6, 2023
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