Page 1 of 1

0.15.33 - Hebrew translation is reversed

Posted: Wed Aug 16, 2017 11:26 am
by HammerPiano
Hi, I am trying to traslate bob's mods to hebrew, and when I translate the text gets reversed in the game.
For example when I write
"assembling-machine-4=מכונת הרכבה 4"
In the game it shows: תנוכמ הבכרה 4
factorio trans.PNG
factorio trans.PNG (468.61 KiB) Viewed 2341 times
(Note that hebrew is read from right to left)
Also, when I am looking at the traslation of the base game/mod it self, the hebrew in the files is reversed.
The .cfg file is attached.
bobassembly.cfg
(2.75 KiB) Downloaded 88 times

Re: 0.15.33 - Hebrew translation is reversed

Posted: Wed Aug 16, 2017 11:43 am
by posila
We have script to convert all texts into left to right format during deployment. You need to do the same. We use python library Bidi to do it.

Code: Select all

                            display_lines = [bidi.algorithm.get_display(line) for line in lines]

Re: 0.15.33 - Hebrew translation is reversed

Posted: Wed Aug 16, 2017 11:45 am
by Koub
Hi

You may want to look at this topic :
viewtopic.php?f=41&t=12235

It's quite old, but I think you'll find the answer to your problem.

Re: 0.15.33 - Hebrew translation is reversed

Posted: Wed Aug 16, 2017 6:42 pm
by HammerPiano
@Koub
I found the python script in the link you sent here, I will use it in my translation.
@Posila
I'll look if Bidi can help me
Thank you all :)

Re: 0.15.33 - Hebrew translation is reversed

Posted: Thu Aug 24, 2017 11:27 am
by Dev-iL
BTW, to add to the list of problems with RTL languages, when displaying the physical units of things (e.g. power), I suppose that Factorio does string concatenation like so: [unit prefix][unit name], so "k" + "W" correctly shows as "kW".
In RTL, since the direction of reading is reversed, simple substitution of the strings for their localization produces the equivalent of "watt kilo" - which is wrong... For this reason, unit names/prefixes must remain untranslated :(

Re: 0.15.33 - Hebrew translation is reversed

Posted: Thu Aug 24, 2017 11:29 am
by Klonan
Dev-iL wrote:BTW, to add to the list of problems with RTL languages, when displaying the physical units of things (e.g. power), I suppose that Factorio does string concatenation like so: [unit prefix][unit name], so "k" + "W" correctly shows as "kW".
In RTL, since the direction of reading is reversed, simple substitution of the strings for their localization produces the equivalent of "watt kilo" - which is wrong... For this reason, unit names/prefixes must remain untranslated :(
Can't you just reverse them in crowdin?

Re: 0.15.33 - Hebrew translation is reversed

Posted: Thu Aug 24, 2017 5:44 pm
by Dev-iL
Klonan wrote:Can't you just reverse them in crowdin?
Not sure what you mean... In Crowdin, the size prefixes (e.g. https://crowdin.com/translate/factorio/all/en-he#8191) and the symbols (https://crowdin.com/translate/factorio/all/en-he#8198) appear separately. Perhaps I was unclear in my description of the problem: let's say in English, you would write pronounce "kW" as "kilowatt" and if this term appeared as-is, there would be no problem. However, since we were asked to translate each term separately, the displayed version in Hebrew becomes "wattkilo" -> because the word for the prefix and the word for the unit need to switch places to make sense when reading RTL.

Code: Select all

  k  +  W    becomes kW
  |     |
וואט + קילו  becomes וואטקילו but needs to be קילווואט
But it's ok.. I've made my peace with these limitations.