Skip to content

Town name list in Arabic #6666

Closed
Closed

Description

@DorpsGek

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

Activity

  1. added
    flysprayThis issue is imported from FlySpray (https://bugs.openttd.org/)
    on Apr 7, 2018
  2. nielsmh commented on May 25, 2018

    @nielsmh
    Contributor

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

  3. James103 commented on Mar 12, 2019

    @James103
    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.

  4. added 2 commits that reference this issue on Jul 7, 2019
    6208657
    8efa99f
  5. James103 commented on Jul 9, 2019

    @James103
    Contributor

    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.
  6. James103 commented on Jul 27, 2019

    @James103
    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)".

  7. added a commit that references this issue on Apr 16, 2020
    f3db0d1
  8. TrueBrain commented on Apr 30, 2023

    @TrueBrain
    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 :)

  9. TrueBrain commented on May 1, 2023

    @TrueBrain
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingflysprayThis issue is imported from FlySpray (https://bugs.openttd.org/)good first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions