[1.1.21] localised_description field for settings doesn't support parameters in LocalisedString properly

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
kirazy
Filter Inserter
Filter Inserter
Posts: 416
Joined: Tue Mar 06, 2018 12:18 am
Contact:

[1.1.21] localised_description field for settings doesn't support parameters in LocalisedString properly

Post by kirazy »

I have a setting constructed in the following manner:

Code: Select all

{
        type = "bool-setting",
        name = "reskins-angels-belts-use-angels-tier-colors",
        setting_type = "startup",
        order = "bb",
        default_value = false,
        localised_description = {"mod-setting-description.reskins-angels-belts-use-angels-tier-colors", {"mod-setting-name.reskins-angels-use-angels-tier-colors"}},
        -- hidden = true,
}
The issue is that in the settings window, the description in the game is showing the parameter variable and not the intended result. The localised string works properly when printed in game:
Image

The relevant locale entries are:

Code: Select all

[mod-setting-name]
reskins-angels-use-angels-tier-colors=Use Angel's tier colors

[mod-setting-description]
reskins-angels-belts-use-angels-tier-colors=Belts and related entities will use Angel's tier coloring when "__1__" is enabled.\n\nOverridden by "Enable Custom Colors".
Edit: Interestingly, the parametized localization works if I set it to the localised_name field:
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [1.1.21] localised_description field for settings doesn't support parameters in LocalisedString properly

Post by Bilka »

Whatever is adding the "Default: Disabled" to the tooltip may be messing with the locale, have you tried it with that mod(?) disabled?
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
kirazy
Filter Inserter
Filter Inserter
Posts: 416
Joined: Tue Mar 06, 2018 12:18 am
Contact:

Re: [1.1.21] localised_description field for settings doesn't support parameters in LocalisedString properly

Post by kirazy »

Alright. That fixes that issue. Now to figure out how to concatenate localised_descriptions when they may or may not exist. Shouldn't be too difficult, I imagine. Thanks.

Edit: There, all fixed. Issue seems obvious in hindsight, but thanks for directing me where to look!

Post Reply

Return to “Resolved Problems and Bugs”