mojira.dev
MC-100866

Formatting issue in right-to-left languages

There is formatting error with the text box in the game:
Texts involving *HebrewString1* %s(English string) *HebrewString2* will appear as in reversed order, if the variable is a number, it will display correctly (so that's crucial upon Crowdin translators to choose the correct arrangement of text to fix this issue).
I'm assuming it will show on all the right-to-left languages translations, the most crucial appearance would probably be in the commands output of /help, which will mess the translation to a point that it'll be hard understanding the syntax (the former noted ones would probably still be easy to understand)

Expected behavior:
*hebrewstring1* %s *hebrewstring2* would appear as shown

Actual behavior:
*HebrewString2* %s *HebrewString1* appears instead, as example in English:

press the %space% key to jump

will show as

key to jump %space% press the

Note again, this is showing that way only when Hebrew and English strings are mixed in the text box, the user command line may appear correct, but when prompting with the enter key, the behavior is as described above.

Linked issues

Attachments

Comments 15

Please do not mark unreleased versions as affected.
You don't have access to them yet.

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

"1 taken killa2k16 from levels"

I am not sure if this the same problem (maybe you can help me with that @unknown) but it appears text is not rendered right-to-left it there are latin or rather characters not used in right-to-left languages in the text. For example typing or writing ()________________ and then moving the cursor left and right reverses parts of the text likely because the pipebar character used as cursor does not exist in right-to-left languages.

The text isn't rendered as left to right at all, there are 2 cases basically to RTL parsing:

1)The text is rendered as RTL (aligned and displayed) correctly

2a)The text is not rendered as RTL (text appears mirrored like:" ekil derorrim sraeppa txet") which happens in most non supporting RTL interfaces.
2b)The text is rendered as RTL but displayed as LTR because of interface limitations or presets that were already globally implemented to all of the languages. this also cause issues when both language present in the same line, but not when there's a single language present

The following image describes the differences of how the interpreter displays a sentence in its current (1) and meant to be (2) styles, In addition, bear in mind that the whole interface should appear right to left in RTL languages, including chat boxes etc, however that may cause issues when playing on English servers and also the way of inputting commands (with backslash instead of slash, X killed Y read from right to left which makes a bit of confusion and user-level of understanding)

[media]

5 more comments

it seems like some sort of fix was issued but there are still things going on;

enchantment level should be displayed on the left of the enchantment name, same as in english "efficiency V", when you read in hebrew, the enchantment name appears on the right and then on the left the level of it.

also note how the description of "when on feet" enchantments starts to offset a little bit, it's because the text is aligned to the left

 

[media]

 

some of the formattings of english-based text on a server breaks (top server voting message is in english, rest is when language set to hebrew), note the red underline as exampled.

in addition, the name of the player appears as it should, but it's still aligned to the left. a "true RTL experience" would be that the entire message box would appear to the right, with the text aligned to the right extending leftwards. in this situation the text is aligned to the left, extending rightwards, which is somewhere in between.

[media]

brackets are sometimes reversed when mixed in hebrew and english text appears (should appear as [tpSpawn] / [tpHome] )

[media]

In general it seems like there's a huge leap in progress towards RTL languages, it still needs people to acknowledge how to approach this because it's quite of a wide issue that's hard to track in every bit for a single person

when typing however, it appears that English language wont format RTL the same way as Hebrew language does (it displays it as it should!)

so in conclusion, it works, but not all the way there to be a fully supported RTL game

I assume the rest of the issues come from the game basically aligning everything to the left, including enchantments&levels, it could just need a very minor fix.

if the messages would begin from the right side of the text box extending to the left that'll be one fix, if the textbox would be on the right side of the screen that'll be even greater fix (including the text beginning from right to left).

alignment should be to the right in addition to right to left formatting, that way you achieve fully supported RTL display and formatting on a certain platform

[media]

Can you still reproduce this issue in the latest version, 24w18a? If so, please provide clear steps to reproduce it.
From enabling the Hebrew language, I was able to observe that armor displayed all text correctly, unlike how "image-2020-07-23-20-38-08-689.png" showed it.

Here is my result:

[media]

Ron Asor

(Unassigned)

Confirmed

(Unassigned)

formatting, language, right-to-left

Minecraft 1.9.2, Minecraft 16w15a, Minecraft 1.11.2, Minecraft 1.13, Minecraft 1.13.1

Retrieved