Page 1 of 1

[0.17.x] Dynamic pluralization not working for most strings in RTL languages

Posted: Wed Feb 27, 2019 11:51 am
by Dev-iL
When running the following command in a RTL locale (e.g. Hebrew), it shows the pluralization codes, instead of a comprehensible sentence.

Code: Select all

/c game.print({"gui-map-generator.reset-to-preset", 5})
Expected result:
Image
אתחול 5 אפשרויות לברירת המחדל

Actual result:
Image

Notes:
  • It does work for strings that don't have words besides the pluralization structure (e.g. the strings called: "days", "minutes", etc).
  • The issue might stem from the localization saved in Crowdin, though it's very difficult to tell due to the way mixed LTR-RTL strings are displayed there.
  • (The console entries and window itself should be justified to the right, but that's a different issue....)

Re: [0.17.x] Dynamic pluralization not working for most strings in RTL languages

Posted: Thu Feb 28, 2019 7:10 pm
by siwy2411
I'm not sure it really is connected with RTL languages - I have a similar problem when playing in Polish - see screenshot below:
bug.png
bug.png (194.18 KiB) Viewed 2514 times
but then again, it might be a different bug :)

Re: [0.17.x] Dynamic pluralization not working for most strings in RTL languages

Posted: Fri Mar 01, 2019 6:46 am
by Dev-iL
siwy2411 wrote: Thu Feb 28, 2019 7:10 pm I have a similar problem when playing in Polish
Hi there! I know for a fact that this is an issue with the localization (a recurring mistake by one of the translators, which they were made aware of). If the correction hasn't made it into 0.17.3, it will surely happen in one of the next releases. If however, this doesn't happen, and the string on Crowdin appears to be correct, then it would be worthy of a bug report. You can always participate on Crowdin if you want to speed up or improve the localization :)

Re: [0.17.x] Dynamic pluralization not working for most strings in RTL languages

Posted: Fri Mar 01, 2019 2:15 pm
by kovarex
The problem seems to be the missing __ (double underscore) at the end of the plural definition. Not a bug of factorio.

Re: [0.17.x] Dynamic pluralization not working for most strings in RTL languages

Posted: Fri Mar 01, 2019 2:31 pm
by Bilka
The Hebrew locale is not missing that underscore: https://crowdin.com/translate/factorio/18/en-he#35572. Please dont confuse the two offtopic posts with the actual bug in the first post.

Re: [0.17.x] Dynamic pluralization not working for most strings in RTL languages

Posted: Fri Mar 01, 2019 2:51 pm
by Dev-iL
I've made a userscript today that allows to toggle the direction in which Hebrew strings are displayed in Crowdin's translation textareas between LTR and RTL (it's nothing fancy, just change some attribute in of the web control, no bidi(rectional) inversion or anything like that going on). It was meant as a tool for translators, but it might also be handy for debugging (to see whether codes are intact despite their strange appearance in RTL).

Re: [0.17.x] Dynamic pluralization not working for most strings in RTL languages

Posted: Fri Mar 01, 2019 3:14 pm
by kovarex
Now I get it. We have a script that changes the order of all words in the translation, and it also changes the plural definition backwards. The script probably should be fixed to not do that.

Re: [0.17.x] Dynamic pluralization not working for most strings in RTL languages

Posted: Wed Mar 27, 2019 10:03 am
by Klonan
So... this is not longer an issue, since RTL support is removed