0.15.33 - Hebrew translation is reversed

Bugs that are actually features.
Post Reply
HammerPiano
Fast Inserter
Fast Inserter
Posts: 232
Joined: Thu Dec 31, 2015 7:36 am
Contact:

0.15.33 - Hebrew translation is reversed

Post 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 2302 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 87 times

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: 0.15.33 - Hebrew translation is reversed

Post 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]

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: 0.15.33 - Hebrew translation is reversed

Post 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.
Koub - Please consider English is not my native language.

HammerPiano
Fast Inserter
Fast Inserter
Posts: 232
Joined: Thu Dec 31, 2015 7:36 am
Contact:

Re: 0.15.33 - Hebrew translation is reversed

Post 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 :)

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

Re: 0.15.33 - Hebrew translation is reversed

Post 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 :(
Leading Hebrew translator of Factorio.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: 0.15.33 - Hebrew translation is reversed

Post 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?

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

Re: 0.15.33 - Hebrew translation is reversed

Post 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.
Leading Hebrew translator of Factorio.

Post Reply

Return to โ€œNot a bugโ€