[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: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

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

Post by jockeril »

I've searched the forums before I decided to start this post - FYI,

It would seem that when switching to a Right-To-Left language (namely Hebrew, which surprised me to find) makes that language's text appear inverted in the menus ( and I suppose the rest of the game ). Attached are some examples.
The main menu
The main menu
menus hebrew language 0.11.14-20.JPG (23.6 KiB) Viewed 23101 times
This behaviour was found to happen on the Hebrew & English versions of windows 7.

I'd presume that the problem lies with the fact that Factorio, like other programs needs to know to invert every letter it reads from the string (not just the words, but every letter), so it is represented Right-To-Left and not Left-To-Right, which is the natural way for all computer systems.

I'd also suggest adding a tag in the translation file, to let the game know that the chosen language is a Right-To-Left one - I've done some research and found that Hebrew, Arabic and all of their dialects are the only languages that still use right-To-Left orientation and *afaik* I don't see that changing in the near future.

I'm happy the game is open to such languages as Hebrew but the way it is now, it can not be used. If you fix this I could expand the user base of the game to hebrew speaking players
Last edited by jockeril on Sat Jul 25, 2015 6:15 pm, edited 5 times in total.
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
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

Another example,
Attachments
the Options menu
the Options menu
options hebrew language inverted.JPG (55.6 KiB) Viewed 23099 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
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

*Any* thoughts, #devs ?
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.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by MF- »

Out of curiosity:
Would reversing the order of character in the language file fix it visually,
or there would be some other typographic issue to remain?
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

MF- wrote:Out of curiosity:
Would reversing the order of character in the language file fix it visually,
or there would be some other typographic issue to remain?
Yes it will. I started reversing the text of some of the lines and plan to do them all, once I get a small program that will take a string and reverse it so I can copy-paste it there,

The problem will come when an update is done (and that's another bug I reported but got shot down) - if the file is changed, it's got new CRC and that makes the update fail. I'll need to send the new translation file to the #devs to integrate into the version before a new update comes. But, if there are changes to the translated text in the new version - that need to change before the new version is distributed and that means I need to get the new translation file ahead of time to make the necessary changes.

I think the simplest way is to have the game code reverse the text once it is read from file before displaying it to the user. That way a translation can come naturally to anyone making it in the file.
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
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by rk84 »

jockeril wrote: The problem will come when an update is done (and that's another bug I reported but got shot down) - if the file is changed, it's got new CRC and that makes the update fail. I'll need to send the new translation file to the #devs to integrate into the version before a new update comes. But, if there are changes to the translated text in the new version - that need to change before the new version is distributed and that means I need to get the new translation file ahead of time to make the necessary changes.
You could make a mod to overwrite base localizations.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
sillyfly
Smart Inserter
Smart Inserter
Posts: 1101
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by sillyfly »

MF- wrote:Out of curiosity:
Would reversing the order of character in the language file fix it visually,
or there would be some other typographic issue to remain?
That would work, but it is very much the wrong way of doing things. That's the way it was done back in the days Netscape Navigator was the main browser in use, and was dubbed "visual ordering". It's a bad idea: http://www.w3.org/International/questio ... vs-logical
Practically every modern OS and UI library has a builtin BiDi/RTL support. I don't know if Allegro (the graphics library used in Factorio) has such support, as it is a gaming library and not a general UI library, but if it does, solving this could be as simple as ticking an option.
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

rk84 wrote:
jockeril wrote: The problem will come when an update is done (and that's another bug I reported but got shot down) - if the file is changed, it's got new CRC and that makes the update fail. I'll need to send the new translation file to the #devs to integrate into the version before a new update comes. But, if there are changes to the translated text in the new version - that need to change before the new version is distributed and that means I need to get the new translation file ahead of time to make the necessary changes.
You could make a mod to overwrite base localizations.
But since I can't mod, this option is not one I have. Perhaps one of the modders that frequent these forums would like to raise that glove. I'd welcome it ! though I think it's the developer's responsibility to integrate it into the game
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
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

sillyfly wrote:
MF- wrote:Out of curiosity:
Would reversing the order of character in the language file fix it visually,
or there would be some other typographic issue to remain?
...

Practically every modern OS and UI library has a builtin BiDi/RTL support. I don't know if Allegro (the graphics library used in Factorio) has such support, as it is a gaming library and not a general UI library, but if it does, solving this could be as simple as ticking an option.
That sounds like something worth checking and I hope it's that simple, but as you can see, the #devs have not responded to this post yet...
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
sillyfly
Smart Inserter
Smart Inserter
Posts: 1101
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by sillyfly »

Give them time... They are hard at work on the 0.12 branch right now, and to be fair - this isn't really a game-breaking bug.
I trust they will get to it in due time :)
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by bobingabout »

jockeril wrote: But since I can't mod, this option is not one I have.
you're doing it already by editing the language files.

All you need to do is put them in a mod folder, with a mod json file, and the locale folder with subfolder of your locale. Look at another mod to see how they've done it, and for a JSON template.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

bobingabout wrote:
jockeril wrote: But since I can't mod, this option is not one I have.
you're doing it already by editing the language files.

All you need to do is put them in a mod folder, with a mod json file, and the locale folder with subfolder of your locale. Look at another mod to see how they've done it, and for a JSON template.
well, I know your a mod maker - I've used your mods ! I'll try this as you suggest and see. Will report later, thank you. But I i'd rather have it done the right way as intended by the game devs - they did leave room for localizing the game to other languages so why should RTL (or BiDi) be any different ?
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
betka
Burner Inserter
Burner Inserter
Posts: 17
Joined: Wed Jun 03, 2015 9:42 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by betka »

hello. btw just tried to put the game in heb on linux, same problem!
though, as the game is still playable in english, i guess the devs have many more urgent things to do now...
betka
Burner Inserter
Burner Inserter
Posts: 17
Joined: Wed Jun 03, 2015 9:42 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by betka »

jockeril and any other Hebrew-interested gamers here, a question for you: a complete fix, making all of GUI starting from right (a properly made interface for Hebrew), is quite a huge thing, but it could be easier (therefore, sooner done) to invert the text, so the word/string would be displayed correct, but still in the interface as it is now - aligned left and organized left (for example order of buttons and so on). that at least means, Hebrew readable and functional.
the question is, would that be ok for you as the players or for those you think would prefer the game in Hebrew? do you have any experience with such fixes anywhere? please, let us know, comments and suggestions are very welcome. thank you.
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

betka wrote:jockeril and any other Hebrew-interested gamers here, a question for you: a complete fix, making all of GUI starting from right (a properly made interface for Hebrew), is quite a huge thing, but it could be easier (therefore, sooner done) to invert the text, so the word/string would be displayed correct, but still in the interface as it is now - aligned left and organized left (for example order of buttons and so on). that at least means, Hebrew readable and functional.
the question is, would that be ok for you as the players or for those you think would prefer the game in Hebrew? do you have any experience with such fixes anywhere? please, let us know, comments and suggestions are very welcome. thank you.
First, thank you for your reply. I've been waiting for a #dev response. I think and agree that making a big change in game is not the only way to go. The fix you propose sounds like it might work to fix this problem. If I could get a test version to see how it looks (even a broken 0.12 or quick fixed 0.11.2x) I could play and assess the fix to give a more knowledgeable answer.

I do think it is just a visual problem fixable by having the game re-orient the RTL text the right way (from right to left) though i haven't given it enough testing to see if RTL orientation is enough or if a GUI change is requested - so far I've only inverted menu text to get an understanding of the best way to fix this.
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
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

bobingabout wrote:
jockeril wrote: But since I can't mod, this option is not one I have.
you're doing it already by editing the language files.

All you need to do is put them in a mod folder, with a mod json file, and the locale folder with subfolder of your locale. Look at another mod to see how they've done it, and for a JSON template.
I took your advice and decided to try making a "mod" for correct hebrew R-T-L. I looked again for a way to invert/reverse a whole sentence (inverting one word is easy, but whole sentences is the challenge) and found this nice web site that as a joke reverses text for you and it works with hebrew ! :shock:

so until the devs. make the proper change in the game to support R-T-L languages (hopefully the next version will already have that natively, and for those that don't adopt test versions and want to use the latest stable (currently 0.11.22) - this should do the job. :ugeek:
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.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by MF- »

side note: You are forgetting there is one more place where the text could be inverted.

It's the deploying scripts.
Meaning the text would be in "logical" ordering in the visible translation files / during translation,
but the deploy scripts would re-arrange it to "visual" when bundling it with the game.

That won't require game modifications
AND make it very easy to switch to full BiDi support one day.
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

MF- wrote:side note: You are forgetting there is one more place where the text could be inverted.

It's the deploying scripts.
Meaning the text would be in "logical" ordering in the visible translation files / during translation,
but the deploy scripts would re-arrange it to "visual" when bundling it with the game.

That won't require game modifications
AND make it very easy to switch to full BiDi support one day.
If I understand you correctly, then it's the other way around - the text in the locale files is visually ok - but the game re-arranges it logically and that messes up the visual...
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
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [0.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by jockeril »

ื”ืกื‘ืจ ื‘ืขื‘ืจื™ืช ืœืื—ืจ ื–ื” ืฉื‘ืื ื’ืœื™ืช

Update on my progress in the matter - I'v been re-assured that there is discussion about this problem, how ever no promises where made and I understand why.

Inverting the Hebrew translation files text strings using that site I mentioned before is progressing - I'v finished the base file ( I think) and am well over 2/3 of the core file - should be done tomorrow, if there is no change in my schedule.

The game seams to accept the "mod" very well considering that it's just a re-write of locale text and apart from a few strings in graphics - all the menus seam to have been translated ( the work I'm doing is on the hebrew locale files that come with the game, so what's not there - I don't have a way to translate before I check the en locale files).

Currently, the user must extract the mod files to the mods directory in Factorio, start the game so it recognizes the mod, enable it, change the interface to hebrew and then re-start the game so the hebrew translation will take affect

- I guess I can't deny it anymore - I'm part of the modding community now (including a mod of some KSP rover wheels...) :P

with your permission I will also write the same explanation in hebrew here, with some variation ;-)

ืื ื™ ืžืกื‘ ืืช ื”ืชืจื’ื•ื ืœืขื‘ืจื™ืช ืฉืœ Factorio ืœืžืฆื‘ ืชืฆื•ื’ื” ืžื™ืžื™ืŸ ืœืฉืžืืœ, ื›ื™ื•ื•ืŸ ืฉื”ืชืจื’ื•ื ื”ืžืงื•ืจื™ ืžื•ืคื™ืข ื”ืคื•ืš ื‘ืžืฉื—ืง ืขืฆืžื•. ื”ื”ืกื‘ื” ืชื™ื”ื™ื” ื‘ืฆื•ืจืช ืžื•ื“ ืœืžืฉื—ืง ืฉื ื™ืชืŸ ืœื”ืชืงื™ืŸ ื›ืžื• ื›ืœ ืžื•ื“ ืื—ืจ ืœืžืฉื—ืง ื•ื”ื™ื ืชืขื‘ื•ื“ ื‘ืฉืœื‘ ื–ื”,ืจืง ืœืžื™ ืฉืžืฉื ื” ืืช ืฉืคืช ื”ืžืžืฉืง ืœืขื‘ืจื™ืช ื•ืจืง ื‘ื’ื™ืจืกื 0.11.22. ื‘ื”ืžืฉืš ืื ื™ ืืชืŸ ืงื™ืฉื•ืจ ืœืฉืจืฉื•ืจ ืœืžื•ื“, ืื ื™ืชื‘ืจืจ ืฉื‘ื’ื™ืจืกื ื”ื‘ืื” ืขื“ื™ืŸ ืœื ืชืคืชืจ ื”ื‘ืขื™ื” ืฉืœ ืขื‘ืจื™ืช ื”ืคื•ื›ื” ื‘ืžืฉื—ืง, ืื—ืจืช ืื•ืกื™ืฃ ืงื™ืฉื•ืจ ืœืงื•ื‘ืฅ ื›ืืŸ.

ื ื›ื•ืŸ ืœืขื›ืฉื™ื• ืกื™ื™ืžืชื™ ืฉื ื™-ืฉืœื™ืฉ ืžื”ื”ืกื‘ื” ื•ืื ื”ื›ืœ ื™ืœืš ื—ืœืง ืืกื™ื™ื ืžื—ืจ ืืช ื”ื›ืœ. ืื ื™ ื‘ื•ื“ืง ืืช ื”ืชืจื’ื•ื ื‘ืชื ื•ืขื” (ื›ืžื• ืฉืœื™ืžื“ื• ื‘ืฆื‘ื... :D ) ื•ื—ื•ืฅ ืžืžืกืคืจ ืคืจืžื˜ืจื™ื ืžืฉื ื™ื™ื ื‘ืชืคืจื™ื˜ ื”ื’ืจืคื™ืงื”, ื ืจืื” ืฉื›ืœ ื”ืชืคืจื™ื˜ื™ื ื›ื‘ืจ ื”ื•ืกื‘ื• ื•ื ื™ืชื ื™ื ืœืงืจื™ืื” ื ื›ื•ืŸ. ืขืฉื™ืชื™ ื›ืžื” ืฉื™ื ื•ื™ื™ื (ืจืงื˜ื•ืช = ื˜ื™ืœื™ื ื•ืคืื ืœ ืกื•ืœืืจื™ ื”ืคืš ืœืงื•ืœื˜ ืกื•ืœืืจื™ ืœืžืฉืœ) ืฉืื ื™ ื—ื•ืฉื‘ ืฉื™ื•ืชืจ ืžืฉืงืคื™ื ืืช ื”ืžืฆื‘ ืžืืฉืจ ื”ืชืจื’ื•ื ื”ืžืงื•ืจื™.

ืขืœ ืžื ืช ืฉื–ื” ื™ืขื‘ื•ื“, ื™ืฆื˜ืจืš ื”ืฉื—ืงืŸ ืœืฉื™ื ืืช ื”ืžื•ื“ ื‘ืกื™ืคืจื™ืช ื”ืžื•ื“ื™ื, ืœื”ืขืœื•ืช ืืช ื”ืžืฉื—ืง ืคืขื ืื—ืช, ื›ื“ื™ ืฉ Factorio ื™ื–ื”ื” ืืช ื”ืžื•ื“, ืœืืคืฉืจ ืืช ื”ืžื•ื“ ืฉื™ืขื‘ื•ื“ ื‘ืžืฉื—ืง, ืœืขื‘ื•ืจ ืœืขื‘ืจื™ืช (ืขืœ ื™ื“ื™ ืฉื™ื ื•ื™ ืฉืคืช ื”ืžืžืฉืง ื‘ืชืคืจื™ื˜ ืืคืฉืจื•ื™ื•ืช Options - ืื•ืคืฆื™ื” ืจืืฉื•ื ื”) ื•ืœื”ืขืœื•ืช ืžื—ื“ืฉ ืืช ื”ืžืฉื—ืง.
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.11.20] Right-To-Left languages are presented Left-To-Right in the menus

Post by MF- »

jockeril wrote: If I understand you correctly, then it's the other way around - the text in the locale files is visually ok - but the game re-arranges it logically and that messes up the visual...
I thought factorio simply doesn't support RTL / BiDi.
So a "logical" RTL format will appear allright in the text editor, but will be presented "in byte order" in-game.
note: You know that technically there is a "RTL" unicode symbol, followed by character is reading order, right?

You workaround currently seems to be converting to "visual" ordering, where byte order is "left to right"
so there is no RTL marker and text might appear (but edit weirdly) right both in the text editor and in game.

Obviously a step forward would be using "logical" for the editing step, but then convert it to "visual" for the game.
That way the odd "visual" ordering will be limited to the internals of the game.
And I belive the factorio deploy scripts should be able to take care of that conversion.
Post Reply

Return to โ€œMinor issuesโ€