Some mods use error() as a way to tell the player that they installed the mod incorrectly
example:
The issue is that there is no way to localize this string, which would make these mods impossible to install in other languages
I suggest either adding localization support for error() directly or adding a separate function called localized_error()
Localization for error()
- micromario
- Fast Inserter
- Posts: 114
- Joined: Thu Apr 05, 2018 11:53 am
- Contact:
Re: Localization for error()
Why not just ignore what the user settings are and use defaults if they're wrong?
Actually, why do the settings even allow invalid values? You can define the valid range of a setting to just *not allow* being the wrong thing and it will never be the wrong thing.
This seems suspiciously like an XY problem: https://en.wikipedia.org/wiki/XY_problem
Actually, why do the settings even allow invalid values? You can define the valid range of a setting to just *not allow* being the wrong thing and it will never be the wrong thing.
This seems suspiciously like an XY problem: https://en.wikipedia.org/wiki/XY_problem
If you want to get ahold of me I'm almost always on Discord.
- micromario
- Fast Inserter
- Posts: 114
- Joined: Thu Apr 05, 2018 11:53 am
- Contact:
Re: Localization for error()
this is a modpack not a mod which means I have to set settings for other mods
for example one of the mods I use in the pack is called amator's coal and steam which has a setting to enable mod compatibility with angels
the setting is off by default but I need the user to enable it or else my custom recipes will not load correctly
edit: I think I know what you mean. I could just restrict the valid values
this still wouldn't work for booleans since there is no allowed_values property
for example one of the mods I use in the pack is called amator's coal and steam which has a setting to enable mod compatibility with angels
the setting is off by default but I need the user to enable it or else my custom recipes will not load correctly
edit: I think I know what you mean. I could just restrict the valid values
this still wouldn't work for booleans since there is no allowed_values property
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: Localization for error()
error(LocalisedString) already works as far as i know, it was a part of my old hack for translating things in the debugger before localised_print!
Edit: just tested, apparently it's only translated in control, wonder how i never noticed that!
Edit: just tested, apparently it's only translated in control, wonder how i never noticed that!