[Genhis][2.0.6] Failed Translation Request

This subforum contains all the issues which we already resolved.
User avatar
Cooldude2606
Fast Inserter
Fast Inserter
Posts: 104
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

[Genhis][2.0.6] Failed Translation Request

Post by Cooldude2606 »

TL;DR LuaPlayer.request_translation will fail if the locale string contains empty strings.

Reproduction
1) Setup the files for minimal reproduction, see below.
2) Run the first command, it will output "foo:bar:baz" and "translated" is true.
3) Run the second command, it will output "foo::baz" but "translated" is false.
4) Run the third command, it will output "foobaz" and "translated" is true.

The Issue
It is expected that an invalid locale string will display an error when printed, such as "Unknown key" and this would also cause a translation request to fail. However in the case described above the locale string is valid and is printed without error but the translation request fails. This is inconsistent behaviour because one is successful while the other fails. Additionally, it only fails when using a locale key, it will not fail during concatenation. If for some reason this locale string is not valid, then it is not documented that this would cause a failure and no error message is printed.

Files
--- Developer for Explosive Gaming and Clusterio. Please contact me via our Discord. ---
Genhis
Factorio Staff
Factorio Staff
Posts: 694
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis][2.0.6] Failed Translation Request

Post by Genhis »

Thanks for the report, this is fixed for the next release.
Post Reply

Return to “Resolved Problems and Bugs”