Make is_layout_rtl()
translation domain aware
#97918
Draft
+198
−109
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #97893
This PR is mostly extracted from my #96921:
TranslationDomain
.force_right_to_left_layout_direction
,root_node_layout_direction
, or the fallback locale.is_layout_rtl()
is now translation domain aware.TranslationServer.get_tool_locale()
.Currently, this locale override behavior is available to engine code only, and is only used by the edited scene root. So it's relatively safe. API exposing and proper runtime switching will be implemented by a follow-up #96921.
Some further changes needed related to this PR:
It seems that
TranslationServer.get_tool_locale()
should be avoided in most places now because locale is potentially node-dependent. I did not touch those usages inTextServer
because I don't know what's the best way to handle this change. For example:godot/modules/text_server_adv/text_server_adv.cpp
Line 1760 in db66bd3
CC @bruvzg