From beb56cb6c85d9d9624d080045cb4a367bb8e4c72 Mon Sep 17 00:00:00 2001 From: Sheriff-Unit-3 <210896603+Sheriff-Unit-3@users.noreply.github.com> Date: Sat, 30 May 2026 20:25:12 -0500 Subject: [PATCH 1/5] Add support for translations Translations were translated with AI. All code was done with a human hand, translation files were generated with `xgettext` and `msginit` commands. --- .vscode/settings.json | 8 ++++++++ init.lua | 13 +++++++------ locale/ice.de.po | 30 ++++++++++++++++++++++++++++++ locale/ice.es.po | 30 ++++++++++++++++++++++++++++++ locale/ice.fr.po | 30 ++++++++++++++++++++++++++++++ locale/ice.it.po | 30 ++++++++++++++++++++++++++++++ locale/ice.pot | 30 ++++++++++++++++++++++++++++++ mod.conf | 1 + 8 files changed, 166 insertions(+), 6 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 locale/ice.de.po create mode 100644 locale/ice.es.po create mode 100644 locale/ice.fr.po create mode 100644 locale/ice.it.po create mode 100644 locale/ice.pot diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2b56c15 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "Lua.diagnostics.globals": [ + "core", + "doors", + "default", + "walls" + ] +} \ No newline at end of file diff --git a/init.lua b/init.lua index 6ae8015..29fcb41 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,9 @@ +local S, PS = core.get_translator("ice") -- Ice Brick -minetest.register_node("ice:brick", { - description = "Ice Brick", +core.register_node("ice:brick", { + description = S("Ice Brick"), tiles = { "ice_brick_tb.png", "ice_brick_tb.png", @@ -15,7 +16,7 @@ minetest.register_node("ice:brick", { sounds = default.node_sound_ice_defaults(), }) -minetest.register_craft{ +core.register_craft{ output = "ice:brick", recipe = { {"default:ice", "default:ice"}, @@ -28,14 +29,14 @@ minetest.register_craft{ walls.register( "ice:wall", - "Ice Brick Wall", + S("Ice Brick Wall"), "ice_brick_sides.png", "ice:brick", default.node_sound_ice_defaults() ) -- Fix groups (ice is not stone) -minetest.override_item("ice:wall", { +core.override_item("ice:wall", { groups = {cracky = 3, cools_lava = 1, slippery = 3, wall = 1} }) @@ -44,7 +45,7 @@ minetest.override_item("ice:wall", { doors.register("ice:door", { tiles = {"ice_door.png"}, - description = "Ice Door", + description = S("Ice Door"), inventory_image = "ice_door_inv.png", groups = {cracky = 3, cools_lava = 1, slippery = 3}, sounds = default.node_sound_ice_defaults(), diff --git a/locale/ice.de.po b/locale/ice.de.po new file mode 100644 index 0000000..743afab --- /dev/null +++ b/locale/ice.de.po @@ -0,0 +1,30 @@ +# German translations for PACKAGE package. +# Copyright (C) 2026 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Automatically generated, 2026. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-05-30 19:51-0500\n" +"PO-Revision-Date: 2026-05-30 19:51-0500\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: init.lua:6 +msgid "Ice Brick" +msgstr "Eisstein" + +#: init.lua:32 +msgid "Ice Brick Wall" +msgstr "Eissteinwand" + +#: init.lua:48 +msgid "Ice Door" +msgstr "Eistür" diff --git a/locale/ice.es.po b/locale/ice.es.po new file mode 100644 index 0000000..2b172e2 --- /dev/null +++ b/locale/ice.es.po @@ -0,0 +1,30 @@ +# Spanish translations for PACKAGE package. +# Copyright (C) 2026 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Automatically generated, 2026. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-05-30 19:51-0500\n" +"PO-Revision-Date: 2026-05-30 19:51-0500\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: init.lua:6 +msgid "Ice Brick" +msgstr "Ladrillo de Hielo" + +#: init.lua:32 +msgid "Ice Brick Wall" +msgstr "Muro de Ladrillo de Hielo" + +#: init.lua:48 +msgid "Ice Door" +msgstr "Puerta de Hielo" diff --git a/locale/ice.fr.po b/locale/ice.fr.po new file mode 100644 index 0000000..84c933b --- /dev/null +++ b/locale/ice.fr.po @@ -0,0 +1,30 @@ +# French translations for PACKAGE package. +# Copyright (C) 2026 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Automatically generated, 2026. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-05-30 19:51-0500\n" +"PO-Revision-Date: 2026-05-30 19:51-0500\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: init.lua:6 +msgid "Ice Brick" +msgstr "Brique de glace" + +#: init.lua:32 +msgid "Ice Brick Wall" +msgstr "Mur de brique de glace" + +#: init.lua:48 +msgid "Ice Door" +msgstr "Porte de glace" diff --git a/locale/ice.it.po b/locale/ice.it.po new file mode 100644 index 0000000..b8383bc --- /dev/null +++ b/locale/ice.it.po @@ -0,0 +1,30 @@ +# Italian translations for PACKAGE package. +# Copyright (C) 2026 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Automatically generated, 2026. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-05-30 19:51-0500\n" +"PO-Revision-Date: 2026-05-30 19:51-0500\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: init.lua:6 +msgid "Ice Brick" +msgstr "Mattonella di ghiaccio" + +#: init.lua:32 +msgid "Ice Brick Wall" +msgstr "Muro di mattonella di ghiaccio" + +#: init.lua:48 +msgid "Ice Door" +msgstr "Porta di ghiaccio" diff --git a/locale/ice.pot b/locale/ice.pot new file mode 100644 index 0000000..d30a0fa --- /dev/null +++ b/locale/ice.pot @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-05-30 19:51-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: init.lua:6 +msgid "Ice Brick" +msgstr "" + +#: init.lua:32 +msgid "Ice Brick Wall" +msgstr "" + +#: init.lua:48 +msgid "Ice Door" +msgstr "" diff --git a/mod.conf b/mod.conf index a68967a..162186c 100644 --- a/mod.conf +++ b/mod.conf @@ -1,3 +1,4 @@ name = ice description = Adds more ice nodes depends = default, walls, doors +min_minetest_version = 5.10 \ No newline at end of file From 9c6a7768a4982bfa9352744d9b913c795dbdf50e Mon Sep 17 00:00:00 2001 From: Sheriff-Unit-3 <210896603+Sheriff-Unit-3@users.noreply.github.com> Date: Sat, 30 May 2026 20:47:30 -0500 Subject: [PATCH 2/5] Add core to .luacheckrc --- .luacheckrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.luacheckrc b/.luacheckrc index ea3c1e8..76e8184 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -2,6 +2,7 @@ unused_args = false globals = { "minetest", + "core", } read_globals = { From d3fdddb2a25150c859651c2c8a656e24ba085c0c Mon Sep 17 00:00:00 2001 From: Sheriff-Unit-3 <210896603+Sheriff-Unit-3@users.noreply.github.com> Date: Sat, 30 May 2026 23:55:18 -0500 Subject: [PATCH 3/5] Remove `.vscode` dir, remove unused variable Add license info to locale files. --- .vscode/settings.json | 8 -------- init.lua | 2 +- locale/ice.de.po | 6 +++--- locale/ice.es.po | 6 +++--- locale/ice.fr.po | 6 +++--- locale/ice.it.po | 6 +++--- locale/ice.pot | 6 ++---- 7 files changed, 15 insertions(+), 25 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 2b56c15..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Lua.diagnostics.globals": [ - "core", - "doors", - "default", - "walls" - ] -} \ No newline at end of file diff --git a/init.lua b/init.lua index 29fcb41..b343b72 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,4 @@ -local S, PS = core.get_translator("ice") +local S = core.get_translator("ice") -- Ice Brick diff --git a/locale/ice.de.po b/locale/ice.de.po index 743afab..a4a119a 100644 --- a/locale/ice.de.po +++ b/locale/ice.de.po @@ -1,6 +1,6 @@ -# German translations for PACKAGE package. -# Copyright (C) 2026 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# German translations for ice mod. +# Copyright (C) 2026 +# This file is distributed under GPL-3.0.. # Automatically generated, 2026. # msgid "" diff --git a/locale/ice.es.po b/locale/ice.es.po index 2b172e2..b30108d 100644 --- a/locale/ice.es.po +++ b/locale/ice.es.po @@ -1,6 +1,6 @@ -# Spanish translations for PACKAGE package. -# Copyright (C) 2026 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# Spanish translations for ice mod. +# Copyright (C) 2026 +# This file is distributed under GPL-3.0. # Automatically generated, 2026. # msgid "" diff --git a/locale/ice.fr.po b/locale/ice.fr.po index 84c933b..86939b3 100644 --- a/locale/ice.fr.po +++ b/locale/ice.fr.po @@ -1,6 +1,6 @@ -# French translations for PACKAGE package. -# Copyright (C) 2026 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# French translations for ice mod. +# Copyright (C) 2026 +# This file is distributed under GPL-3.0. # Automatically generated, 2026. # msgid "" diff --git a/locale/ice.it.po b/locale/ice.it.po index b8383bc..2c8f74b 100644 --- a/locale/ice.it.po +++ b/locale/ice.it.po @@ -1,6 +1,6 @@ -# Italian translations for PACKAGE package. -# Copyright (C) 2026 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# Italian translations for ice mod. +# Copyright (C) 2026 +# This file is distributed under GPL-3.0. # Automatically generated, 2026. # msgid "" diff --git a/locale/ice.pot b/locale/ice.pot index d30a0fa..0a6761f 100644 --- a/locale/ice.pot +++ b/locale/ice.pot @@ -1,7 +1,5 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. +# Copyright (C) 2026 +# This file is distributed under GPL-3.0. # #, fuzzy msgid "" From efa90366601e6d4ad430fafd3b197422bf4c7edf Mon Sep 17 00:00:00 2001 From: Sheriff-Unit-3 <210896603+Sheriff-Unit-3@users.noreply.github.com> Date: Wed, 3 Jun 2026 17:31:14 -0500 Subject: [PATCH 4/5] Change some German and Spanish translations Make recomended changes by co-author. Co-authored-by: SwissalpS 161979+SwissalpS@users.noreply.github.com --- locale/ice.de.po | 6 +++--- locale/ice.es.po | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/ice.de.po b/locale/ice.de.po index a4a119a..6b22f00 100644 --- a/locale/ice.de.po +++ b/locale/ice.de.po @@ -19,12 +19,12 @@ msgstr "" #: init.lua:6 msgid "Ice Brick" -msgstr "Eisstein" +msgstr "Ziegel aus Eis" #: init.lua:32 msgid "Ice Brick Wall" -msgstr "Eissteinwand" +msgstr "Ziegelmauer aus Eis" #: init.lua:48 msgid "Ice Door" -msgstr "Eistür" +msgstr "Tuer aus Eis" diff --git a/locale/ice.es.po b/locale/ice.es.po index b30108d..9baaf07 100644 --- a/locale/ice.es.po +++ b/locale/ice.es.po @@ -19,12 +19,12 @@ msgstr "" #: init.lua:6 msgid "Ice Brick" -msgstr "Ladrillo de Hielo" +msgstr "Ladrillo de hielo" #: init.lua:32 msgid "Ice Brick Wall" -msgstr "Muro de Ladrillo de Hielo" +msgstr "Pared/muro de ladrillo de hielo" #: init.lua:48 msgid "Ice Door" -msgstr "Puerta de Hielo" +msgstr "Puerta de hielo" From 0c50e688fac054e40bbf799d792f6595d4baa85b Mon Sep 17 00:00:00 2001 From: Sheriff U3 <210896603+Sheriff-Unit-3@users.noreply.github.com> Date: Wed, 3 Jun 2026 22:51:31 -0500 Subject: [PATCH 5/5] Use Muro in es translation --- locale/ice.es.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/ice.es.po b/locale/ice.es.po index 9baaf07..521783d 100644 --- a/locale/ice.es.po +++ b/locale/ice.es.po @@ -23,7 +23,7 @@ msgstr "Ladrillo de hielo" #: init.lua:32 msgid "Ice Brick Wall" -msgstr "Pared/muro de ladrillo de hielo" +msgstr "Muro de ladrillo de hielo" #: init.lua:48 msgid "Ice Door"