Add a return type to helpers.check_prototype_translations()

Things that we aren't going to implement
User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 304
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Add a return type to helpers.check_prototype_translations()

Post by KiwiHawk »

Can you please change `helpers.check_prototype_translations()` to return a boolean? Or an integer with the number of errors. I'm calling it as part of Angel's unit tests. I currently have no way of making the test fail if untranslated strings are detected!

With the update to 2.0, we have a lot of recipes missing locale as recipes no longer inherit the name of their `main_product` unless the recipe and item/fluid have the same name.
Dev for Bob's mods, Angel's mods, Sea Block, Circuit Processing, Science Cost Tweaker. Contributor to Helmod.

Buy me a coffee
Bilka
Factorio Staff
Factorio Staff
Posts: 3645
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Add a return type to helpers.check_prototype_translations()

Post by Bilka »

As far as I'm aware this is not possible because the result is not deterministic because it depends on the current locale.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 304
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Re: Add a return type to helpers.check_prototype_translations()

Post by KiwiHawk »

What about if the function accepted a language?
Dev for Bob's mods, Angel's mods, Sea Block, Circuit Processing, Science Cost Tweaker. Contributor to Helmod.

Buy me a coffee
Bilka
Factorio Staff
Factorio Staff
Posts: 3645
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Add a return type to helpers.check_prototype_translations()

Post by Bilka »

The game doesn't load anything besides the current locale.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
curiosity
Filter Inserter
Filter Inserter
Posts: 690
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Add a return type to helpers.check_prototype_translations()

Post by curiosity »

KiwiHawk wrote: Fri Sep 12, 2025 1:38 pm What about if the function accepted a language?
Though IDK if this was changed in 2.0, but identity is not guaranteed for locale, unlike the rest of the mod files. It's ignored when computing mod checksum and such.
Post Reply

Return to “Won't implement”