# to the program, eg. "minetest.exe --config ../minetest.conf.example".
# Further documentation:
-# http://wiki.minetest.net/
+# https://wiki.minetest.net/
]]
# octaves = %s,
# persistence = %s,
# lacunarity = %s,
-# flags = %s
+# flags =%s
# }
]]
end
if entry.comment ~= "" then
for _, comment_line in ipairs(entry.comment:split("\n", true)) do
- insert(result, "# " .. comment_line .. "\n")
+ if comment_line == "" then
+ insert(result, "#\n")
+ else
+ insert(result, "# " .. comment_line .. "\n")
+ end
end
end
+ if entry.type == "key" then
+ local line = "See https://github.com/minetest/irrlicht/blob/master/include/Keycodes.h"
+ insert(result, "# " .. line .. "\n")
+ end
insert(result, "# type: " .. entry.type)
if entry.min then
insert(result, " min: " .. entry.min)
end
insert(result, "\n")
if group_format == true then
+ local flags = entry.values[10]
+ if flags ~= "" then
+ flags = " "..flags
+ end
insert(result, sprintf(group_format_template, entry.name, entry.values[1],
entry.values[2], entry.values[3], entry.values[4], entry.values[5],
entry.values[6], entry.values[7], entry.values[8], entry.values[9],
- entry.values[10]))
+ flags))
else
local append
if entry.default ~= "" then
local translation_file_header = [[
// This file is automatically generated
-// It conatins a bunch of fake gettext calls, to tell xgettext about the strings in config files
+// It contains a bunch of fake gettext calls, to tell xgettext about the strings in config files
// To update it, refer to the bottom of builtin/mainmenu/dlg_settings_advanced.lua
fake_function() {]]
for _, entry in ipairs(settings) do
if entry.type == "category" then
insert(result, sprintf("\tgettext(%q);", entry.name))
+ elseif entry.type == "key" then --luacheck: ignore
+ -- Neither names nor descriptions of keys are used since we have a
+ -- dedicated menu for them.
else
if entry.readable_name then
insert(result, sprintf("\tgettext(%q);", entry.readable_name))
--file = assert(io.open("settings_translation_file.cpp", "w"))
file:write(create_translation_file())
file:close()
-