Modify

Opened 3 years ago

Last modified 12 days ago

#16163 new enhancement

Right To Left support for input boxes

Reported by: iman Owned by: iman
Priority: normal Milestone: 21.04
Component: Core Version:
Keywords: RTL bidirectional Cc:

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 (5)

1.gif (17.1 KB) - added by iman 23 months ago.
sample.osm (285 bytes) - added by iman 23 months ago.
rtl_ltr_display.png (16.7 KB) - added by iman 23 months ago.
2.png (19.3 KB) - added by iman 23 months ago.
Screenshot 2021-04-09 at 21.21.56.png (127.6 KB) - added by simon04 13 days ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 3 years ago by iman

Owner: changed from team to iman
Type: defectenhancement

Changed 23 months ago by iman

Attachment: 1.gif added

Changed 23 months ago by iman

Attachment: sample.osm added

Changed 23 months ago by iman

Attachment: rtl_ltr_display.png added

Changed 23 months ago by iman

Attachment: 2.png added

comment:2 Changed 23 months ago by iman

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.

https://josm.openstreetmap.de/attachment/ticket/16163/1.gif

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).

https://josm.openstreetmap.de/attachment/ticket/16163/2.png

https://josm.openstreetmap.de/attachment/ticket/16163/rtl_ltr_display.png

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

Last edited 23 months ago by iman (previous) (diff)

comment:3 Changed 23 months ago by Sosha

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.

comment:4 Changed 13 days ago by simon04

In 17730/josm:

see #16163 - MainApplication: apply component orientation based on locale

comment:5 Changed 13 days ago by simon04

In 17731/josm:

see #16163 - ExtendedDialog.setupDialog: apply component orientation from MainFrame

comment:6 Changed 13 days ago by simon04

In 17732/josm:

see #16163 - Prefer GridBagConstraints.LINE_START over GridBagConstraints.WEST

comment:7 Changed 13 days ago by simon04

In 17733/josm:

see #16163 - Prefer SwingConstants.LEADING over SwingConstants.LEFT

Changed 13 days ago by simon04

comment:8 Changed 13 days ago by simon04

In 17734/josm:

see #16163 - Fix SwingConstants.LEFT for PreferenceTabbedPane

comment:9 Changed 12 days ago by Don-vip

Milestone: 21.04

comment:10 Changed 12 days ago by simon04

In 17738/josm:

see #16163 - Fix NPE in unit tests

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain iman.
as The resolution will be set.
to The owner will be changed from iman to the specified user.
The owner will change to iman
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from iman to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.