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

Things that are wrong but are not easy to solve. We are working on these, but it will take some time.

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

Postby jockeril » Tue May 12, 2015 5:27 pm

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.

menus hebrew language 0.11.14-20.JPG
The main menu
menus hebrew language 0.11.14-20.JPG (23.6 KiB) Viewed 8159 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.
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby jockeril » Tue May 12, 2015 5:28 pm

Another example,
Attachments
options hebrew language inverted.JPG
the Options menu
options hebrew language inverted.JPG (55.6 KiB) Viewed 8157 times
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby jockeril » Wed May 13, 2015 9:44 pm

*Any* thoughts, #devs ?
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby MF- » Sat May 30, 2015 7:53 am

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?
MF-
Smart Inserter
Smart Inserter
 
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Location: Prague

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

Postby jockeril » Mon Jun 01, 2015 11:41 pm

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.
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby rk84 » Tue Jun 02, 2015 12:24 am

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
User avatar
rk84
Filter Inserter
Filter Inserter
 
Posts: 665
Joined: Wed Feb 13, 2013 9:15 am
Location: Finland

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

Postby sillyfly » Tue Jun 02, 2015 12:57 am

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.
sillyfly
Smart Inserter
Smart Inserter
 
Posts: 1061
Joined: Sun May 04, 2014 11:29 am

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

Postby jockeril » Tue Jun 02, 2015 6:48 pm

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
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby jockeril » Tue Jun 02, 2015 6:50 pm

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...
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby sillyfly » Tue Jun 02, 2015 9:32 pm

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 :)
sillyfly
Smart Inserter
Smart Inserter
 
Posts: 1061
Joined: Sun May 04, 2014 11:29 am

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

Postby bobingabout » Wed Jun 03, 2015 11:04 pm

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.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 4345
Joined: Fri May 09, 2014 1:01 pm

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

Postby jockeril » Fri Jun 05, 2015 7:25 pm

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 ?
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby betka » Wed Jun 10, 2015 6:19 pm

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

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

Postby betka » Wed Jun 10, 2015 7:59 pm

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.
betka
Burner Inserter
Burner Inserter
 
Posts: 17
Joined: Wed Jun 03, 2015 9:42 am

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

Postby jockeril » Thu Jun 11, 2015 12:06 pm

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.
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby jockeril » Sat Jun 20, 2015 5:55 am

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:
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby MF- » Sat Jun 20, 2015 7:26 am

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.
MF-
Smart Inserter
Smart Inserter
 
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Location: Prague

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

Postby jockeril » Sat Jun 20, 2015 10:02 am

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...
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby jockeril » Tue Jun 23, 2015 11:56 pm

הסבר בעברית לאחר זה שבאנגלית

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 - אופציה ראשונה) ולהעלות מחדש את המשחק.
[request] RTL support please
[suggestion] Blueprint file cabinet for sharing BP's
Hebrew Translator for FARL & EvoGUI and much more

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jockeril (or JoCKeR-iL)
- and steam !
Image
User avatar
jockeril
Filter Inserter
Filter Inserter
 
Posts: 276
Joined: Sun Feb 08, 2015 11:04 am
Location: Haderah, Israel

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

Postby MF- » Mon Jun 29, 2015 6:28 am

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.
MF-
Smart Inserter
Smart Inserter
 
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Location: Prague

Next

Return to Known issues

Who is online

Users browsing this forum: No registered users and 1 guest