#16163 closed enhancement (fixed)
Right To Left support for input boxes
Reported by: | iman | Owned by: | iman |
---|---|---|---|
Priority: | normal | Milestone: | 21.10 |
Component: | Core | Version: | |
Keywords: | RTL bidirectional arabic | Cc: | aat765 |
Description
Currently the text we type in input boxes is Left-to-Right and left aligned by default. When writing in a RTL language like Persian, Arabic, etc it's better we have a RTL environment to type in.
For example on input boxes of this website we can switch between RTL and LTR text direction by pressing "right ctrl + shift" or "left ctrl + shift".
Such an ability is so useful for users who their language is RTL.
Attachments (6)
Change History (30)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Type: | defect → enhancement |
by , 5 years ago
by , 5 years ago
Attachment: | sample.osm added |
---|
by , 5 years ago
Attachment: | rtl_ltr_display.png added |
---|
by , 5 years ago
comment:3 by , 5 years ago
really 14 months ago and anyone don't respond to this issue?
literally this bug very very on my nerve. please someone resolv this issue.
by , 4 years ago
Attachment: | Screenshot 2021-04-09 at 21.21.56.png added |
---|
comment:9 by , 4 years ago
Milestone: | → 21.04 |
---|
follow-up: 12 comment:11 by , 4 years ago
Cc: | added |
---|---|
Keywords: | arabic added |
Milestone: | 21.04 → 21.05 |
@iman, aat765, please report if things improved and whether this is the right way to go...
comment:12 by , 4 years ago
Replying to simon04:
@iman, aat765, please report if things improved and whether this is the right way to go...
https://josm.openstreetmap.de/attachment/ticket/16163/jp2launcher_RkVU9Ouoml.png
Thank you, yes it is working properly now for Arabic language.
comment:13 by , 4 years ago
All tag keys are Latin script (LTR) so "key" text box must be (LTR) Left Aligned even if interface language is (RTL).
All tag values are Latin script (LTR) exept names and addresses in (RTL) languages (Arabic, Persian ...). So the best behavior is "value" textbox must be (LTR) Left Aligned even if interface language is (RTL) exept 2 cases value box must be right Aligned and (RTL):
- When the tag key is name in (RTL) language like (name:ar, name:fa, alt_name:ar...) even if interface language is (LTR).
- When interface language is (RTL) and tag is unlocaliesd name (name,alt_name) or address (addr:*).
comment:14 by , 4 years ago
This way the problem still exists but in another form: User wants to type an English string, while text box is forced RTL.
I prefer a mechanism to switch direction of text inside input box based on user demand regardless of interface language.
For instance this is Notepad.exe on Windows with a button to switch text direction:
https://s18.picofile.com/file/8432913184/switch_reading_order_in_notepad_exe.gif
(Also with hotkey for rtl direction: right ctrl + shift and hotkey for ltr direction: left ctrl + shift)
comment:15 by , 3 years ago
Milestone: | 21.05 → 21.06 |
---|
comment:16 by , 3 years ago
I am agree with Iman.
I see changing text direction by hot keys also seen in some Open-source Java programs like
http://docfetcher.sourceforge.net/en/index.html
The search textbox uses this feature
comment:17 by , 3 years ago
Milestone: | 21.06 → 21.07 |
---|
comment:18 by , 3 years ago
Milestone: | 21.07 → 21.08 |
---|
comment:19 by , 3 years ago
Milestone: | 21.08 → Longterm |
---|
comment:22 by , 3 years ago
Tested with latest build. Very nice! Thank you.
Auto toggle based on key is also awesome!
There's also another option: auto-switching direction and alignment based on first character of a word (Strong Left or Right character based on Unicode standards).
For example:
If I start typing "name", since it starts with "n", so the inputbox remains LTR and left-aligned.
Now I want to type a Persian name into the "value" inputbox, e.g. "خیابان سوم". Since this value starts with the RTL letter "خ" inputbox should be RTL and right-aligned.
Why this is important?
This reduces user confusion and prevent values such as "5 کوچه" (="5 Alley") instead of "کوچه 5" (="Alley 5"), because user see he is typing "Alley 5" but on display he gets "5 Alley", so he will manipulate it to get the proper display. There are more examples that some of them are even more complex that really can confuse users. Also maybe it reduce the usage of some invisible characters such as "right-to-left embeding" that forces the following string to be displayed RTL.
This gif shows what user gets while typing in a RTL script.
In the following screenshots you can see that the inputbox shows the string from left to right, while with the tags pane all is fine and it shows them correctly (similar to display on the map).
In case of RTL script, it's better to have right-alignment too, for the inputboxes. Because with left-alignment for a rtl string users get confused about start of the string: do it starts from the starting point of the inputbox, or from right side of the first letter? where he should click? You know, not all people are aware about Home/End keys or techniques of moving among text.
A Sample file used for screenshots.
Thanks