Format right-to-left and bi-di text in OSM tag values #4333
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.
The change fixes an issue where right-to-left language strings can be rendered incorrectly in the Tags table of Map Data or History views
Sample bug in text rendering
I noticed this street label in Erbil with mismatched parentheses. This turned out to be an error in the name string:
When reviewing the name in the Map Data (or now, History view), it looks like the name is wrapped in parentheses. With a wider box or shorter string, the parentheses appear to wrap one word (مشکۆ) . What we're really seeing is the 0th character of the name string , ( , displayed on the left end of this line.
Corrected
In an updated version with
dir="auto"
, the string renders like it did in the tiles. This makes the misplaced and unpaired parenthesis visible in the web view.CSS has a direction property, but it can only be set to
ltr
orrtl
, notauto
I've edited the name of the original way, but the issue can still be seen in the History tab.