]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/mainmenu/pkgmgr.lua
Make advanced settings noiseparams strings translatable (#8062)
[dragonfireclient.git] / builtin / mainmenu / pkgmgr.lua
index cea373c9f5e7858d3eb2ab7f446417b9d70c05d6..7863f1ca1a893fa65d5bfca93a16a368101d4a56 100644 (file)
@@ -391,7 +391,10 @@ function pkgmgr.get_worldconfig(worldpath)
                if key == "gameid" then
                        worldconfig.id = value
                elseif key:sub(0, 9) == "load_mod_" then
-                       worldconfig.global_mods[key] = core.is_yes(value)
+                       -- Compatibility: Check against "nil" which was erroneously used
+                       -- as value for fresh configured worlds
+                       worldconfig.global_mods[key] = value ~= "false" and value ~= "nil"
+                               and value
                else
                        worldconfig[key] = value
                end
@@ -561,7 +564,7 @@ function pkgmgr.preparemodlist(data)
                retval[#retval + 1] = {
                        type = "game",
                        is_game_content = true,
-                       name = fgettext(gamespec.name .. " mods"),
+                       name = fgettext("$1 mods", gamespec.name),
                        path = gamespec.path
                }
        end
@@ -595,7 +598,7 @@ function pkgmgr.preparemodlist(data)
                                end
                        end
                        if element ~= nil then
-                               element.enabled = core.is_yes(value)
+                               element.enabled = value ~= "false" and value ~= "nil" and value
                        else
                                core.log("info", "Mod: " .. key .. " " .. dump(value) .. " but not found")
                        end