tangram icon indicating copy to clipboard operation
tangram copied to clipboard

Right paren enclosing right-to-left translated names wrapping to the left of the name

Open drewwilliams opened this issue 8 years ago • 4 comments
trafficstars

TANGRAM VERSION:

0.14.2

ENVIRONMENT:

macOS 10.13.1 (17B48) Safari 11.0.1 (13604.3.5) Chrome 62.0.3202.94 (Official Build) (64-bit)

TO REPRODUCE THE ISSUE, FOLLOW THESE STEPS:

  • http://the.majesticplural.com/toponyms (brief project background here)
  • Choose a right-to-left language (e.g., Arabic, Hebrew, Farsi, Pashto) from the top-right language pull-down menu

RESULT:

For right-to-left languages, the right paren enclosing the translated name appears to be wrapping to the left of the name:

screen shot 2017-11-16 at 07 23 52

EXPECTED RESULT:

  • Choose a left-to-right language (e.g., English)

Would expect the enclosing right paren to remain on the right side of the name:

screen shot 2017-11-16 at 07 24 05

Here’s a sample section of my .yaml file that’s calling the translated name:

ux_language_text_source: | function() { if (typeof feature['name:'+global.selected_language] === "undefined") { return feature['name']; } else { return feature['name'] + '\n(' + feature['name:'+global.selected_language] + ')'; } }

Possibly related to https://github.com/tangrams/tangram/issues/541 “RTL curved label text flips order of punctuation/spaces” (closed)?

drewwilliams avatar Nov 16 '17 15:11 drewwilliams

Thanks for the report, will check it out. Not sure yet but I suspect the issue may be related to mixed LTR/RTL text in the same label. I think that some of the RTL handling may currently only work properly for labels that are all RTL.

bcamper avatar Nov 16 '17 18:11 bcamper

Curiously, these labels are presented correctly in Firefox 57 on macOS. screenshot-2017-11-16 true toponyms

matteblair avatar Nov 16 '17 18:11 matteblair

That is an interesting clue! And should help with debugging for sure.

bcamper avatar Nov 16 '17 19:11 bcamper

Firefox 57 does look better, which is interesting.

Still seeing this issue when the translated name splits to two lines:

screen shot 2017-11-16 at 11 29 25

drewwilliams avatar Nov 16 '17 19:11 drewwilliams