Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Places: Fix RTL rendering on maps #1391

Closed
shayaknyc opened this issue Jun 25, 2021 · 7 comments
Closed

Places: Fix RTL rendering on maps #1391

shayaknyc opened this issue Jun 25, 2021 · 7 comments
Assignees
Labels
bug Something isn't working released Available in the stable release

Comments

@shayaknyc
Copy link

shayaknyc commented Jun 25, 2021

Recently installed photoprism via docker-compose in a debian host environment - working great and it's been slowly indexing the photos. I have many photos geotagged in Israel, and all the Hebrew names of cities, etc are displayed with the Hebrew letters in left-to-right order, and not the proper right-to-left. For example, Petah Tikva is displayed in English properly, but the name in Hebrew underneath is displaying as:
הווקת חתפ

Instead of:
פתח תקווה

See screenshot:
image

Tried changing the different map types but it's all pulling from the same API. Weirdly, if you load up OSM directly, on their site it's displaying the proper right-to-left Hebrew names:

image
https://www.openstreetmap.org/#map=15/32.0173/34.7597

Wondering what could be the cause of this bizarre display. I can confirm that the Arabic is properly displaying right-to-left, so not really sure why Hebrew is displaying in reverse....

Any ideas?

@shayaknyc shayaknyc changed the title Map in places displays Hebrew in right-to-left order and not left-to-right Map in "Places" displays Hebrew in right-to-left order and not left-to-right Jun 25, 2021
@graciousgrey
Copy link
Member

@haimkastner do you have an idea on how to fix this? :)

@graciousgrey graciousgrey added the bug Something isn't working label Jun 28, 2021
@haimkastner
Copy link
Contributor

I checked this issue, and it's reproduced even if the browser and the machine interfaces are in Hebrew.

Seems to be a wrong configuration in the map component loading, I will dig into it to understand the issue root cause.

@shayaknyc shayaknyc changed the title Map in "Places" displays Hebrew in right-to-left order and not left-to-right Map in "Places" displays Hebrew in left-to-right order and not right-to-left Jun 28, 2021
@dror3go
Copy link

dror3go commented Jun 28, 2021

This seems to be an issue in an underlying tiles service rather than PhotoPrism itself, isn't it?
I did find some related issues - however those are pretty old issues dated back to ~2017:
https://blog.mapbox.com/improving-arabic-and-hebrew-text-in-map-labels-fd184cf5ebd1
openmaptiles/openmaptiles#171
maptiler/tileserver-gl#112

@haimkastner
Copy link
Contributor

Please review the fix on PR #1393

Seems that an RTL plugin is required in order to support RTL.

See the RTL documentation of Mapbox

After adding it, the plugin is loaded by lazy only when Hebrew is shown on the map.

As you can see in my environment:

image

@lastzero lastzero reopened this Jun 28, 2021
@lastzero lastzero added the please-test Ready for acceptance test label Jun 30, 2021
@lastzero
Copy link
Member

Our development preview and demo should be updated. Is this fixed for you there?

@haimkastner
Copy link
Contributor

Yes, the fix is there, and it looks good.

@lastzero
Copy link
Member

Excellent, thanks for testing 👍

@lastzero lastzero changed the title Map in "Places" displays Hebrew in left-to-right order and not right-to-left Places: Fix RTL rendering on maps Sep 20, 2021
@graciousgrey graciousgrey added released Available in the stable release and removed please-test Ready for acceptance test labels Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

5 participants