diff --git a/doors.lua b/doors.lua index 886af3d..ea3440c 100644 --- a/doors.lua +++ b/doors.lua @@ -1,6 +1,18 @@ --- internationalization boilerplate -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") + +-- Used for localization, choose either built-in or intllib. + +local MP, S, NS = nil + +if (minetest.get_modpath("intllib") == nil) then + S = minetest.get_translator("castle_gates") + +else + -- internationalization boilerplate + MP = minetest.get_modpath(minetest.get_current_modname()) + S, NS = dofile(MP.."/intllib.lua") + +end + if minetest.get_modpath("doors") then doors.register("castle_gates:oak_door", { diff --git a/gate_slots.lua b/gate_slots.lua index e2c6287..ef30ff9 100644 --- a/gate_slots.lua +++ b/gate_slots.lua @@ -1,6 +1,15 @@ --- internationalization boilerplate -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local MP, S, NS = nil + +if (minetest.get_modpath("intllib") == nil) then + S = minetest.get_translator("castle_gates") + +else + -- internationalization boilerplate + MP = minetest.get_modpath(minetest.get_current_modname()) + S, NS = dofile(MP.."/intllib.lua") + +end + -- copied from castle_masonry in case that mod is not loaded local get_material_properties = function(material) diff --git a/gates.lua b/gates.lua index ce47176..de6b807 100644 --- a/gates.lua +++ b/gates.lua @@ -1,6 +1,15 @@ --- internationalization boilerplate -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local MP, S, NS = nil + +if (minetest.get_modpath("intllib") == nil) then + S = minetest.get_translator("castle_gates") + +else + -- internationalization boilerplate + MP = minetest.get_modpath(minetest.get_current_modname()) + S, NS = dofile(MP.."/intllib.lua") + +end + minetest.register_alias("castle_gates:gate_edge", "castle_gates:wood_gate_edge") minetest.register_alias("castle_gates:gate_edge_handle", "castle_gates:wood_gate_edge_handle") diff --git a/locale/castle_gates.it.tr b/locale/castle_gates.it.tr new file mode 100644 index 0000000..79d34a0 --- /dev/null +++ b/locale/castle_gates.it.tr @@ -0,0 +1,16 @@ +# textdomain:castle_gates + +Oak Door=Porta di quercia +Jail Door=Porta della prigione +Jail Bars=Sbarre della prigione +@1 Portcullis Bars=Sbarre della saracinesca di @1 +@1 Portcullis Bottom=Estremità inferiore della saracinesca di @1 +@1 Gate Door=Porta di @1 del cancello +@1 Gate Door Edge=Estremità della porta di @1 del cancello +@1 Gate Door With Handle=Porta di @1 con maniglia del cancello +@1 Gate Door With Hinge=Porta di @1 con cardine del cancello +Wooden=legno +Steel=acciaio +Stonebrick=mattone di pietra +@1 Gate Slot=Alloggio di @1 del cancello +@1 Gate Slot Reverse=Rovescio dell'alloggio di @1 del cancello diff --git a/locale/it.po b/locale/it.po index 379d533..c6c3645 100644 --- a/locale/it.po +++ b/locale/it.po @@ -1,22 +1,22 @@ # ITALIAN LOCALE FILE FOR THE CASTLE GATES MODULE # Copyright (C) 2017 Philipbenr And DanDuncombe # This file is distributed under the same license as the CASTLE GATES package. -# Hamlet , 2017. +# Hamlet <54187342+h4ml3t@users.noreply.github.com> 2017, 2019. # msgid "" msgstr "" "Project-Id-Version: Castle Gates\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-04-14 22:15-0600\n" -"PO-Revision-Date: 2017-09-26 23:51+0100\n" -"Last-Translator: Hamlet \n" +"PO-Revision-Date: 2019-11-11 23:23+0100\n" +"Last-Translator: Hamlet <54187342+h4ml3t@users.noreply.github.com>\n" "Language-Team: \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.6.10\n" +"X-Generator: Poedit 2.2.1\n" #: doc.lua:11 msgid "Heavy wooden bars designed to prevent entry even to siege equipment." @@ -237,46 +237,40 @@ msgid "Jail Bars" msgstr "Sbarre della prigione" #: gates.lua:23 -#, fuzzy msgid "@1 Portcullis Bars" -msgstr "Sbarre della saracinesca" +msgstr "Sbarre della saracinesca di @1" #: gates.lua:53 -#, fuzzy msgid "@1 Portcullis Bottom" -msgstr "Estremità inferiore della saracinesca" +msgstr "Estremità inferiore della saracinesca di @1" #: gates.lua:113 -#, fuzzy msgid "@1 Gate Door" -msgstr "Segmento di cancello, porta o portone" +msgstr "Porta di @1 del cancello" #: gates.lua:145 -#, fuzzy msgid "@1 Gate Door Edge" -msgstr "Estremità di cancello, porta o portone" +msgstr "Estremità della porta di @1 del cancello" #: gates.lua:184 -#, fuzzy msgid "@1 Gate Door With Handle" -msgstr "Cancello, porta o portone con maniglia" +msgstr "Porta di @1 con maniglia del cancello" #: gates.lua:227 -#, fuzzy msgid "@1 Gate Door With Hinge" -msgstr "Cancello, porta o portone con cardine" +msgstr "Porta di @1 con cardine del cancello" #: gates.lua:256 msgid "Wooden" -msgstr "" +msgstr "legno" #: gates.lua:268 msgid "Steel" -msgstr "" +msgstr "acciaio" #: gate_slots.lua:36 msgid "Stonebrick" -msgstr "Mattoni di pietra" +msgstr "mattone di pietra" #: gate_slots.lua:45 msgid "@1 Gate Slot" @@ -285,4 +279,4 @@ msgstr "Alloggio di @1 per cancelli, porte, portoni e saracinesche" #: gate_slots.lua:70 msgid "@1 Gate Slot Reverse" msgstr "" -"Rovescio dell'alloggio di @1 per cancelli, porte, portoni e saracinesche." +"Rovescio dell'alloggio di @1 per cancelli, porte, portoni e saracinesche" diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..3817f39 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain:castle_gates + +Oak Door= +Jail Door= +Jail Bars= +@1 Portcullis Bars= +@1 Portcullis Bottom= +@1 Gate Door= +@1 Gate Door Edge= +@1 Gate Door With Handle= +@1 Gate Door With Hinge= +Wooden= +Steel= +Stonebrick= +@1 Gate Slot= +@1 Gate Slot Reverse= diff --git a/mod.conf b/mod.conf index 1ad7f80..bac9366 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1,4 @@ name = castle_gates +description = This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons. +depends = default +optional_depends = castle_masonry, doors, xpanes, intllib, doc diff --git a/screenshot.png b/screenshot.png index 54163c8..28fd97b 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/textures/castle_door_edge_mask.png b/textures/castle_door_edge_mask.png index 59ae96b..15fcf12 100644 Binary files a/textures/castle_door_edge_mask.png and b/textures/castle_door_edge_mask.png differ diff --git a/textures/castle_door_handle_mask.png b/textures/castle_door_handle_mask.png index 6417aaf..1200a6e 100644 Binary files a/textures/castle_door_handle_mask.png and b/textures/castle_door_handle_mask.png differ diff --git a/textures/castle_door_jail.png b/textures/castle_door_jail.png index 0d4f7bf..930cf3b 100644 Binary files a/textures/castle_door_jail.png and b/textures/castle_door_jail.png differ diff --git a/textures/castle_door_side_mask.png b/textures/castle_door_side_mask.png index 039803c..b28f16f 100644 Binary files a/textures/castle_door_side_mask.png and b/textures/castle_door_side_mask.png differ diff --git a/textures/castle_jail_door_inv.png b/textures/castle_jail_door_inv.png index 5121fb8..3ff9da1 100644 Binary files a/textures/castle_jail_door_inv.png and b/textures/castle_jail_door_inv.png differ diff --git a/textures/castle_jailbars.png b/textures/castle_jailbars.png index e2cc911..bd858a1 100644 Binary files a/textures/castle_jailbars.png and b/textures/castle_jailbars.png differ diff --git a/textures/castle_portcullis_mask.png b/textures/castle_portcullis_mask.png index ac5d8e2..8d12f83 100644 Binary files a/textures/castle_portcullis_mask.png and b/textures/castle_portcullis_mask.png differ