You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the generated .translation file to Project -> Project Settings... -> Localization
In Project -> Project Settings... -> Internationalization -> Locale, set Test to ar
Add a LineEdit node and type -=[]{}
Run the project, and notice that the text is on the right side, but the symbols are incorrectly in LTR (-=[]{}). Correct output is {}[]=-
Back in the editor, add a single Arabic letter (any will do), and notice that LineEdit immediately (and correctly) flips the symbols, and the newly-added Arabic letter, to RTL.
Notes
Identical behavior is seen with TextEdit.
The purpose of steps 2-4 are to simulate an Arabic environment when the project is run, despite OS.get_locale() == "en" (or your system's current language).
It's not a bug, by default text direction is determined only based on the text itself, if you want it to be based on locale/layout direction you can switch text direction from "Auto" to "Inherited". But detection for neutral text probably can be improved.
Thanks @bruvzg ! I tested your fix and it resolves this bug.
However I see two possible, unrelated, minor bugs with both your fix and 4.1.1-stable:
First:
(good) setting Text Direction to Inherited for LineEdit works.
(bad) setting Text Direction to Inherited for TextEdit also works, however I see Invalid text direction when I set the setting in the editor, and a bunch of these when I run the project:
Second:
The text and cursor slightly shifts left and right as I type any character. I am able to repro with:
Create a new project
Add a LineEdit node
Set Layout Direction to Right-to-Left
Run the project
(bad) Type ababab, one at a time, and notice the cursor shifts slightly to the left and right as you type a then b. It's subtle.
(good) Back in the editor, set Font size to 50. Relaunch the app, and notice typing ababab doesn't shift the cursor as you type each letter.
Let me know if you'd like separate issues written for one or both of these.
Godot version
v4.2.dev4.official [549fcce]
System information
Ubuntu 20.04 LTS
Issue description
See title.
Steps to reproduce
.translation
file to Project -> Project Settings... -> LocalizationTest
toar
LineEdit
node and type-=[]{}
-=[]{}
). Correct output is{}[]=-
LineEdit
immediately (and correctly) flips the symbols, and the newly-added Arabic letter, to RTL.Notes
TextEdit
.OS.get_locale() == "en"
(or your system's current language).Minimal reproduction project
rtlsymbols.zip
The text was updated successfully, but these errors were encountered: