diff --git a/init.lua b/init.lua index 1143b49..d9fd3b7 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,5 @@ - -- 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_tapestries") - -else - -- internationalization boilerplate - MP = minetest.get_modpath(minetest.get_current_modname()) - S, NS = dofile(MP.."/intllib.lua") - -end +local S = minetest.get_translator("castle_tapestries") -- cottages support local use_cottages = minetest.get_modpath("cottages") diff --git a/intllib.lua b/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/locale/castle_tapestries.fr.tr b/locale/castle_tapestries.fr.tr new file mode 100644 index 0000000..e816384 --- /dev/null +++ b/locale/castle_tapestries.fr.tr @@ -0,0 +1,6 @@ +# textdomain:castle_tapestries + +Tapestry Top=Haut de tapisserie +Tapestry=Tapisserie +Tapestry (Long)=Tapisserie (longue) +Tapestry (Very Long)=Tapisserie (très longue) diff --git a/locale/it.po b/locale/it.po deleted file mode 100644 index 3d86b13..0000000 --- a/locale/it.po +++ /dev/null @@ -1,35 +0,0 @@ -# ITALIAN LOCALE FILE FOR THE CASTLE TAPESTRIES MODULE -# Copyright (C) 2017 Philipbenr And DanDuncombe -# This file is distributed under the same license as the CASTLE TAPESTRIES package. -# Hamlet , 2017. -# -msgid "" -msgstr "" -"Project-Id-Version: Castle Tapestries\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-25 14:32-0700\n" -"PO-Revision-Date: 2017-09-20 00:41+0100\n" -"Last-Translator: Hamlet \n" -"Language-Team: \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" -"Language: it\n" -"X-Generator: Poedit 1.6.10\n" - -#: init.lua:14 -msgid "Tapestry Top" -msgstr "Cima dell'arazzo" - -#: init.lua:64 -msgid "Tapestry" -msgstr "Arazzo" - -#: init.lua:94 -msgid "Tapestry (Long)" -msgstr "Arazzo (lungo)" - -#: init.lua:124 -msgid "Tapestry (Very Long)" -msgstr "Arazzo (molto lungo)" diff --git a/locale/template.pot b/locale/template.pot deleted file mode 100644 index 0a0745a..0000000 --- a/locale/template.pot +++ /dev/null @@ -1,33 +0,0 @@ -# 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: 2017-02-25 14:32-0700\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: init.lua:14 -msgid "Tapestry Top" -msgstr "" - -#: init.lua:64 -msgid "Tapestry" -msgstr "" - -#: init.lua:94 -msgid "Tapestry (Long)" -msgstr "" - -#: init.lua:124 -msgid "Tapestry (Very Long)" -msgstr "" diff --git a/mod.conf b/mod.conf index a930eec..ed189c5 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = castle_tapestries depends = default, unifieddyes, wool -optional_depends = intllib, cottages +optional_depends = cottages description = This is a mod for creating medieval tapestries, as found in castles.