immich
immich copied to clipboard
bi-directional text direction is wrong
The bug
Bi-directional text (a mix of a right-to-left (RTL) language, such as Hebrew, and a left-to-right (LTR) language, such as English) is not rendered correctly.
For example, the translation of the string "Only on WiFi" to Hebrew appears as "רק ב WiFi" instead of "Wi-Fi רק ב".
That is, if the text starts with a letter from an RTL script, any following LTR text should be to the left of the RTL text, and any RTL text inserted after the LTR text should appear to the left of the LTR text.
In essence, LTR text direction is applied to RTL text.
The OS that Immich Server is running on
Arch
Version of Immich Server
v1.103.1
Version of Immich Mobile App
v1.103.1
Platform with the issue
- [ ] Server
- [ ] Web
- [X] Mobile
Your docker-compose.yml content
Same as https://github.com/immich-app/immich/blob/main/docker/docker-compose.yml
Your .env content
Same as example.env except for the password
Reproduction steps
1. open immich app on IOS/Android
2. go to Settings -> Languages and set language to Hebrew
3. go to a screen with a string of bi-directional text.
One such string is the "Allow self-signed SSL certificates" text found in Settings -> Advanced.
4. the text direction is partially reversed. For example the aforementioned string is shown as "התר תעודות SSL בחתימה עצמית" instead of "בחתימה עצמית SSL התר תעודות".
Relevant log output
No response
Additional information
A possible fix is correcting all occurrences of bi-directional text manually in he-IL.json file (I can do that as there are not too many). But that would require removing Hebrew from the Localizely platform to prevent the corrected strings from being overwritten in the future.
A better solution would be to set the direction of all text in the app to RTL whenever an RTL language like Hebrew is selected, I think that should make the text render in the correct order.
On a side note, I've noticed some of the strings are not available for translation, like the ones found in the new search view. Are there plans to add them in the future?