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

Town name list in Arabic #6666

Closed
DorpsGek opened this issue Jan 21, 2018 · 6 comments · Fixed by #10747
Closed

Town name list in Arabic #6666

DorpsGek opened this issue Jan 21, 2018 · 6 comments · Fixed by #10747
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers

Comments

@DorpsGek
Copy link
Member

PaulC opened the ticket and wrote:

Is this a bug with the Arabic/Egypt language? In the town name list, populations are shown with a closing bracket (and space?) before the number.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6666
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
@frosch123 frosch123 removed the Core label Apr 14, 2018
@nielsmh
Copy link
Contributor

nielsmh commented May 25, 2018

Most likely needs to be fixed by adding an {LRE} mark (Left-to-right embedding) before the population count in the translated text.

@andythenorth andythenorth added the stale Stale issues label Jan 5, 2019
@andythenorth andythenorth removed the stale Stale issues label Jan 24, 2019
@James103
Copy link
Contributor

Still occurs in OpenTTD 1.9.0-RC1 (and probably trunk), Arabic/Hebrew translations have not been updated to include the {LRE} (U+202A) character. Also reproducible outside of OpenTTD when the following HTML code is put in a webpage:

<html dir="rtl">
<p>hello (world)</p>
</html>

See https://stackoverflow.com/questions/15471500/right-to-left-bracket-display-wrong and https://stackoverflow.com/questions/5741522/brackets-displays-wrongly-for-right-to-left-display-style/7931678 for more info.

@James103
Copy link
Contributor

James103 commented Jul 9, 2019

After merging pull request #7480, there are several areas that still need to be addressed (non-RTL text handling in RTL conditions).

  • Arabic Egypt, ##ownname: One of the parentheses needs to be changed.
    Left-to-right (expected): Arabic (Egypt), Right-to-left (actual): (Arabic (Egypt
    Temporary Fix: Change Arabic (Egypt) to (Arabic (Egypt in
    ##ownname Arabic (Egypt)
  • When you have non-RTL text of the form a (b) in RTL conditions, it turns into (a (b, but due to it being non-RTL, it should stay as a (b).
  • Console, where you enter a command: The prefix "] " turns into "[ " in right-to-left mode.
  • Additionally, past commands entered into the console that end in symbols have the trailing symbols moved to the left of the "[" instead of after the rest of the command. This includes commands consisting entirely of symbols.

@James103
Copy link
Contributor

In OpenTTD 20190707-master-g1e723934a1:
The town name/population in the town listing is fixed, but the actual display isn't fixed and still gives something like "(Carnville )558" in Arabic and "(Carnville (558" in Hebrew. Expected: "Carnville (558)".

@LordAro LordAro reopened this Jul 27, 2019
douiwby pushed a commit to douiwby/OpenTTD that referenced this issue Apr 16, 2020
@TrueBrain TrueBrain removed the pinned label Jan 3, 2021
@TrueBrain
Copy link
Member

In OpenTTD 20190707-master-g1e723934a1: The town name/population in the town listing is fixed, but the actual display isn't fixed and still gives something like "(Carnville )558" in Arabic and "(Carnville (558" in Hebrew. Expected: "Carnville (558)".

This is a translation issue. They will have to fix that.

Most of the other issues should be resolved in Windows / MacOS already, and will soon be solved on Linux too. If there are any remaining issues, please create a new ticket; as this ticket was about townnames, but the comment shows a few other issues, making this ticket hard to track :)

@TrueBrain
Copy link
Member

And for future references:

* Arabic Egypt, `##ownname`: One of the parentheses needs to be changed.

Nope; is fine as it is.

  Left-to-right (expected): `Arabic (Egypt)`, Right-to-left (actual): `(Arabic (Egypt`

Already fixed.

  Temporary Fix: Change `Arabic (Egypt)` to `(Arabic (Egypt` in https://github.com/OpenTTD/OpenTTD/blob/1e723934a13c0fbe54d48a0add5d3af8a82b1ac5/src/lang/arabic_egypt.txt#L2

Similar; this is normal bidi, and the current text is correct as it stands.

* When you have non-RTL text of the form `a (b)` in RTL conditions, it turns into `(a (b`, but due to it being non-RTL, it should stay as `a (b)`.

Already fixed.

* Console, where you enter a command: The prefix "] " turns into "[ " in right-to-left mode.

The is correct, and according to the bi-directional unicode rules. A single [ will turn into a ], as it is RTL. When you write another ], it will change into [], as now it is LTR.
It gets a bit more weird: say you enter [abc], it shows as such. Till you hit enter. Than it becomes [] [abc. This too is fully according to bidi rules, but a bit odd. We could polish it a bit more, and render the console prefix as a separate string instead of combining it. But honestly .. this is just hard to get right in RTL, and is better left to fixing by someone who actually uses RTL, instead of us LTR people trying to guestimate how RTL actually works in day-to-day :)

* Additionally, past commands entered into the console that end in symbols have the trailing symbols moved to the left of the "[" instead of after the rest of the command. This includes commands consisting entirely of symbols.

All in all, we render RTL as best as we can, but when you mix RTL with LTR it just becomes a bit messy. We are willing to fix bugs, but please by someone who uses RTL, and can guide us to what is common and normal. We LTR-people are just terrible in actually understanding what is going on :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants