From 83198a853130ac9d77db416d139d250982e11e9b Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 8 Aug 2023 16:43:18 +0100 Subject: [PATCH] remove intllib --- depends.txt | 3 --- init.lua | 26 +++++++------------- locale/it_IT.po | 59 --------------------------------------------- locale/ms.po | 59 --------------------------------------------- locale/template.pot | 58 -------------------------------------------- locale/zh_CN.pot | 58 -------------------------------------------- locale/zh_CN.txt | 12 --------- locale/zh_TW.txt | 12 --------- mod.conf | 2 +- 9 files changed, 10 insertions(+), 279 deletions(-) delete mode 100644 depends.txt delete mode 100644 locale/it_IT.po delete mode 100644 locale/ms.po delete mode 100644 locale/template.pot delete mode 100644 locale/zh_CN.pot delete mode 100644 locale/zh_CN.txt delete mode 100644 locale/zh_TW.txt diff --git a/depends.txt b/depends.txt deleted file mode 100644 index 5ccba0d..0000000 --- a/depends.txt +++ /dev/null @@ -1,3 +0,0 @@ -mobs -lucky_block? -intllib? diff --git a/init.lua b/init.lua index b61bb38..14caea0 100644 --- a/init.lua +++ b/init.lua @@ -4,23 +4,14 @@ local MP = minetest.get_modpath(minetest.get_current_modname()) .. "/" -- Check for translation method local S -if minetest.get_translator ~= nil then +if minetest.get_translator then S = minetest.get_translator("mob_horse") -- 5.x translation function -else - if minetest.get_modpath("intllib") then - dofile(minetest.get_modpath("intllib") .. "/init.lua") - if intllib.make_gettext_pair then - S = intllib.make_gettext_pair() -- new gettext method - else - S = intllib.Getter() -- old text file method - end - else -- boilerplate function - S = function(str, ...) - local args = {...} - return str:gsub("@%d+", function(match) - return args[tonumber(match:sub(2))] - end) - end +else -- boilerplate function + S = function(str, ...) + local args = {...} + return str:gsub("@%d+", function(match) + return args[tonumber(match:sub(2))] + end) end end @@ -72,7 +63,8 @@ mobs:register_mob("mob_horse:horse", { view_range = 5, follow = { "farming:wheat", "default:apple", "farming:oat", - "farming:barley", "farming:corn"}, + "farming:barley", "farming:corn" + }, passive = true, hp_min = 12, hp_max = 16, diff --git a/locale/it_IT.po b/locale/it_IT.po deleted file mode 100644 index 2b77850..0000000 --- a/locale/it_IT.po +++ /dev/null @@ -1,59 +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. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-06 00:07+0800\n" -"PO-Revision-Date: 2020-05-11 13:43+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.1\n" -"Last-Translator: Hamlet \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Language: it_IT\n" - -#: init.lua -msgid "Horse" -msgstr "Cavallo" - -#: init.lua -msgid "Horse shoes fitted -" -msgstr "Ferri di cavallo indossati -" - -#: init.lua -msgid " speed: " -msgstr " velocità: " - -#: init.lua -msgid " , jump height: " -msgstr " , altezza di salto: " - -#: init.lua -msgid " , stop speed: " -msgstr " , velocità di arresto: " - -#: init.lua -msgid "Horse shoes only work on horses!" -msgstr "I ferri di cavallo funzionano solo sui cavalli!" - -#: init.lua -msgid "Steel HorseShoes (use on horse to apply)" -msgstr "Ferri di cavallo d'acciaio (usarli su un cavallo per applicarli)" - -#: init.lua -msgid "Bronze HorseShoes (use on horse to apply)" -msgstr "Ferri di cavallo di bronzo (usarli su un cavallo per applicarli)" - -#: init.lua -msgid "Mese HorseShoes (use on horse to apply)" -msgstr "Ferri di cavallo di mese (usarli su un cavallo per applicarli)" - -#: init.lua -msgid "Diamond HorseShoes (use on horse to apply)" -msgstr "Ferri di cavallo di diamante (usarli su un cavallo per applicarli)" diff --git a/locale/ms.po b/locale/ms.po deleted file mode 100644 index fa76d1a..0000000 --- a/locale/ms.po +++ /dev/null @@ -1,59 +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. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-06 00:07+0800\n" -"PO-Revision-Date: 2018-02-06 00:14+0800\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" -"Last-Translator: MuhdNurHidayat (MNH48) \n" -"Plural-Forms: nplurals=1; plural=0;\n" -"Language: ms\n" - -#: init.lua -msgid "Horse" -msgstr "Kuda" - -#: init.lua -msgid "Horse shoes fitted -" -msgstr "Ladam telah dipasang pada kuda -" - -#: init.lua -msgid " speed: " -msgstr " kelajuan: " - -#: init.lua -msgid " , jump height: " -msgstr " , ketinggian lompat: " - -#: init.lua -msgid " , stop speed: " -msgstr " , kelajuan berhenti: " - -#: init.lua -msgid "Horse shoes only work on horses!" -msgstr "Ladam hanya boleh dipakaikan pada kuda!" - -#: init.lua -msgid "Steel HorseShoes (use on horse to apply)" -msgstr "Ladam Kuda Keluli (guna pada kuda untuk pakaikan ia)" - -#: init.lua -msgid "Bronze HorseShoes (use on horse to apply)" -msgstr "Ladam Kuda Gangsa (guna pada kuda untuk pakaikan ia)" - -#: init.lua -msgid "Mese HorseShoes (use on horse to apply)" -msgstr "Ladam Kuda Mese (guna pada kuda untuk pakaikan ia)" - -#: init.lua -msgid "Diamond HorseShoes (use on horse to apply)" -msgstr "Ladam Kuda Intan (guna pada kuda untuk pakaikan ia)" diff --git a/locale/template.pot b/locale/template.pot deleted file mode 100644 index 7811c0e..0000000 --- a/locale/template.pot +++ /dev/null @@ -1,58 +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: 2018-02-06 00:07+0800\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 -msgid "Horse" -msgstr "" - -#: init.lua -msgid "Horse shoes fitted -" -msgstr "" - -#: init.lua -msgid " speed: " -msgstr "" - -#: init.lua -msgid " , jump height: " -msgstr "" - -#: init.lua -msgid " , stop speed: " -msgstr "" - -#: init.lua -msgid "Horse shoes only work on horses!" -msgstr "" - -#: init.lua -msgid "Steel HorseShoes (use on horse to apply)" -msgstr "" - -#: init.lua -msgid "Bronze HorseShoes (use on horse to apply)" -msgstr "" - -#: init.lua -msgid "Mese HorseShoes (use on horse to apply)" -msgstr "" - -#: init.lua -msgid "Diamond HorseShoes (use on horse to apply)" -msgstr "" diff --git a/locale/zh_CN.pot b/locale/zh_CN.pot deleted file mode 100644 index d09beda..0000000 --- a/locale/zh_CN.pot +++ /dev/null @@ -1,58 +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: 2018-02-06 00:07+0800\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 -msgid "Horse" -msgstr "马" - -#: init.lua -msgid "Horse shoes fitted -" -msgstr "马蹄铁 -" - -#: init.lua -msgid " speed: " -msgstr "速度:" - -#: init.lua -msgid " , jump height: " -msgstr ",跳跃高度" - -#: init.lua -msgid " , stop speed: " -msgstr ",停止速度:" - -#: init.lua -msgid "Horse shoes only work on horses!" -msgstr "马蹄铁只对马有效!" - -#: init.lua -msgid "Steel HorseShoes (use on horse to apply)" -msgstr "钢马蹄铁(用在马匹上)" - -#: init.lua -msgid "Bronze HorseShoes (use on horse to apply)" -msgstr "青铜马蹄铁(用在马匹上)" - -#: init.lua -msgid "Mese HorseShoes (use on horse to apply)" -msgstr "黄石马蹄铁(用在马匹上)" - -#: init.lua -msgid "Diamond HorseShoes (use on horse to apply)" -msgstr "钻石马蹄铁(用在马匹上)" diff --git a/locale/zh_CN.txt b/locale/zh_CN.txt deleted file mode 100644 index 783bd9b..0000000 --- a/locale/zh_CN.txt +++ /dev/null @@ -1,12 +0,0 @@ -#Mod: mob_horse - -Horse = 马 -Horse shoes fitted - = 马蹄铁 - - speed: = 速度: - , jump height: = ,跳跃高度: - , stop speed: = ,停止速度: -Horse shoes only work on horses! = 马蹄铁只对马有效! -Steel HorseShoes (use on horse to apply) = 钢马蹄铁(用在马匹上) -Bronze HorseShoes (use on horse to apply) = 青铜马蹄铁(用在马匹上) -Mese HorseShoes (use on horse to apply) = 黄石马蹄铁(用在马匹上) -Diamond HorseShoes (use on horse to apply) = 钻石马蹄铁(用在马匹上) diff --git a/locale/zh_TW.txt b/locale/zh_TW.txt deleted file mode 100644 index 3511d1d..0000000 --- a/locale/zh_TW.txt +++ /dev/null @@ -1,12 +0,0 @@ -#Mod: mob_horse - -Horse = 馬 -Horse shoes fitted - = 馬蹄鐵 - - speed: = 速度: - , jump height: = ,跳躍高度: - , stop speed: = ,停止速度: -Horse shoes only work on horses! = 馬蹄鐵只對馬有效! -Steel HorseShoes (use on horse to apply) = 鋼馬蹄鐵(用在馬匹上) -Bronze HorseShoes (use on horse to apply) = 青銅馬蹄鐵(用在馬匹上) -Mese HorseShoes (use on horse to apply) = 黃石馬蹄鐵(用在馬匹上) -Diamond HorseShoes (use on horse to apply) = 鑽石馬蹄鐵(用在馬匹上) diff --git a/mod.conf b/mod.conf index 31b31ba..f99705c 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = mob_horse depends = mobs -optional_depends = lucky_block, intllib +optional_depends = lucky_block description = Adds a rideable horse into game with horse shoe upgrades.