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.
Add a return type to helpers.check_prototype_translations()
Add a return type to helpers.check_prototype_translations()
Dev for Bob's mods, Angel's mods, Sea Block, Circuit Processing, Science Cost Tweaker. Contributor to Helmod.
Buy me a coffee
Buy me a coffee
Re: Add a return type to helpers.check_prototype_translations()
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.
Re: Add a return type to helpers.check_prototype_translations()
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
Buy me a coffee
Re: Add a return type to helpers.check_prototype_translations()
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.
Re: Add a return type to helpers.check_prototype_translations()
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.