Page 1 of 1
Add a return type to helpers.check_prototype_translations()
Posted: Tue Nov 26, 2024 10:14 am
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.
Re: Add a return type to helpers.check_prototype_translations()
Posted: Fri Sep 12, 2025 12:52 pm
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.
Re: Add a return type to helpers.check_prototype_translations()
Posted: Fri Sep 12, 2025 1:38 pm
by KiwiHawk
What about if the function accepted a language?
Re: Add a return type to helpers.check_prototype_translations()
Posted: Fri Sep 12, 2025 1:42 pm
by Bilka
The game doesn't load anything besides the current locale.
Re: Add a return type to helpers.check_prototype_translations()
Posted: Fri Sep 12, 2025 6:42 pm
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.