[0.12.1] Right-To-Left languages are presented Left-To-Right

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 370
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.22] Right-To-Left languages are presented Left-To-Right

Post by jockeril »

cube wrote:I added a functionality very simillar to Dev-iL's script to 0.12.1. It's definitely not perfect, and there will be issues with line wrapping strings, but it's better than nothing.
Update for [0.12.1] - Problem not resolved yet - all the non-hebrew text, including the [FONT] section in the "core.cfg" file is inverted as well. The code needs to differentiate hebrew letters from latin, symbols and all other characters in the locale files...

I have manually inverted the [font] section items just to be able to start factorio in hebrew
Attachments
starting in herbew error.GIF
starting in herbew error.GIF (15.78 KiB) Viewed 6014 times
CORE CFG in locale_he folder.GIF
CORE CFG in locale_he folder.GIF (35.12 KiB) Viewed 6014 times
other settings.GIF
other settings.GIF (109.65 KiB) Viewed 6014 times
graphics settings.GIF
graphics settings.GIF (109.05 KiB) Viewed 6014 times
commands help in game.GIF
commands help in game.GIF (72.91 KiB) Viewed 6014 times
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: [0.12.1] Right-To-Left languages are presented Left-To-Right

Post by MF- »

I guess that would be the result of "if (hebrew) then just_print_everything_RLT" ?
Still good progress I'd say.

Now you have to invert the LTR/English text in the hebrew files,
which is much less tedious. :)

User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 370
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.12.1] Right-To-Left languages are presented Left-To-Right

Post by jockeril »

MF- wrote:I guess that would be the result of "if (hebrew) then just_print_everything_RLT" ?
Still good progress I'd say.

Now you have to invert the LTR/English text in the hebrew files,
which is much less tedious. :)
Basicly, you'r right... I just hed bring it up becuase if anyone else get this error, this post should be the first place he looks.

After checking with the current Hebrew translator -@Dev-il, As I understand it, a fix for this problem was implemented about half an hour after the 0.12.1 version was released. It took me another day to get to d/l'ing the new version and checking it.

Next version should have a fix for Hebrew & English
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image

User avatar
Dev-iL
Filter Inserter
Filter Inserter
Posts: 304
Joined: Thu Jul 02, 2015 2:48 pm
Contact:

Re: [0.12.2] Right-To-Left languages are presented Left-To-Right

Post by Dev-iL »

cube wrote:I added a functionality very simillar to Dev-iL's script to 0.12.1. It's definitely not perfect, and there will be issues with line wrapping strings, but it's better than nothing.
Inverted English and parentheses still appears in 0.12.2:
Image

I guess I'll just update my mod with the latest strings....
Leading Hebrew translator of Factorio.

User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 370
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.12.1] Right-To-Left languages are presented Left-To-Right

Post by jockeril »

didn't think about latest strings, just used your mod from the previous version...

לא חשבתי על זה שיש עדכונים לטקסטים, ישר עדכנתי לתוסף שלך מהגירסא הקודמת
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.12.1] Right-To-Left languages are presented Left-To-Right

Post by cube »

So I spent the better part of today thinking about how to fix this problem properly, and then I gave up. The BiDi algorithm is so complicated that I can't hope to implement it myself in a reasonable time (and without too many errors), and all libraries I found are either just an example, or have slightly incompatible license.

So I went back to Dev-iL's idea with external script to reverse the characters and used python-bidi in our deploy scripts.

I manually checked the content of the mod against output of python-bidi and the only difference I noticed was with percentages in technology names. In the mod i see "%80 something hebrew", in my script output it's "80% something hebrew". The problem is that I don't know if my editor supports RTL or no, so I don't know which way it should go :-) @Dev-iL: Did you check that percentages are correct in your script output?

I'm attaching core.cfg and base.cfg from the new method for criticism. Please replace the files in game and have a look. Thanks.
Attachments
base.cfg
(24.03 KiB) Downloaded 276 times
core.cfg
(35.37 KiB) Downloaded 266 times

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.12.1] Right-To-Left languages are presented Left-To-Right

Post by cube »

I almost forgot -- you will need to delete the "rtl" = true flag in core/locale/he/info.json. Easiest way to do this is to test my two files on a directory that already has Dev-iL's changes applied.

User avatar
Dev-iL
Filter Inserter
Filter Inserter
Posts: 304
Joined: Thu Jul 02, 2015 2:48 pm
Contact:

Re: [0.12.1] Right-To-Left languages are presented Left-To-Right

Post by Dev-iL »

cube wrote:@Dev-iL: Did you check that percentages are correct in your script output?

I'm attaching core.cfg and base.cfg from the new method for criticism. Please replace the files in game and have a look. Thanks.
As I said in IRC: with my method this is not displayed correctly, with yours it is:
Image
Leading Hebrew translator of Factorio.

User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 370
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.12.1] Right-To-Left languages are presented Left-To-Right

Post by jockeril »

Where are we about this ? Is there any chance that that python-bidi makes it into the game code instead of in your deploy scripts ?

I'm tired of inverting every translation I add to mods... :(
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.12.1] Right-To-Left languages are presented Left-To-Right

Post by cube »

jockeril wrote:Where are we about this ? Is there any chance that that python-bidi makes it into the game code instead of in your deploy scripts ?

I'm tired of inverting every translation I add to mods... :(
Not a very large chance, sorry. We can't use python-bidi because that would require python instalation. The C++ libraries I've seen were either huge or not working properly or with an incompatible license or some combination of these.

I can probably dig out the inverting script from our deploy script and publish it on github or something, if that will help you.

User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 370
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.12.x] Right-To-Left languages are presented Left-To-Right

Post by jockeril »

cube, I found some interesting answers here (How can I recognize RTL strings in C++) - those guys are talking about a C++ unit called ICU (answer 2) AND there is also a short code example (answer 3) - will you please reconsider ?
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image

Post Reply

Return to “Minor issues”