From deea6597da9c23fc65d48e3a50e22ade18c7a794 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 25 Aug 2020 09:56:43 +0100 Subject: [PATCH 1/2] update translation detection --- depends.txt | 2 +- init.lua | 23 ++++++----------------- intllib.lua | 3 +++ 3 files changed, 10 insertions(+), 18 deletions(-) create mode 100644 intllib.lua diff --git a/depends.txt b/depends.txt index d0aea36..9648cd2 100644 --- a/depends.txt +++ b/depends.txt @@ -1,5 +1,5 @@ default mobs -intllib? lucky_block? toolranks? +intllib? diff --git a/init.lua b/init.lua index 6def31f..9f8b5f6 100644 --- a/init.lua +++ b/init.lua @@ -1,23 +1,11 @@ -local path = minetest.get_modpath("mobs_monster") - --- Intllib -local S -if minetest.global_exists("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - S = intllib.make_gettext_pair() - else - -- Old method using text files. - S = intllib.Getter() - end -else - S = function(s) return s end -end +-- Load support for intllib. +local path = minetest.get_modpath(minetest.get_current_modname()) +local S = minetest.get_translator and minetest.get_translator("mobs_monster") or + dofile(path .. "/intllib.lua") mobs.intllib = S -- Monsters - dofile(path .. "/dirt_monster.lua") -- PilzAdam dofile(path .. "/dungeon_master.lua") dofile(path .. "/oerkki.lua") @@ -28,6 +16,7 @@ dofile(path .. "/lava_flan.lua") -- Zeg9 dofile(path .. "/mese_monster.lua") dofile(path .. "/spider.lua") -- AspireMint +-- Lucky Blocks dofile(path .. "/lucky_block.lua") -print ("[MOD] Mobs Redo Monsters loaded") +print (S("[MOD] Mobs Redo Monsters loaded")) diff --git a/intllib.lua b/intllib.lua new file mode 100644 index 0000000..adb0f88 --- /dev/null +++ b/intllib.lua @@ -0,0 +1,3 @@ +-- Support for the old multi-load method +dofile(minetest.get_modpath("intllib").."/init.lua") + From a42877ef7841e969411f9ad9ec4adfab65748f5b Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 25 Aug 2020 10:53:02 +0100 Subject: [PATCH 2/2] added 5.x translations --- locale/mobs_monster.de.tr | 37 ++++++++++++++++++++++++++++++++++ locale/mobs_monster.fr.tr | 34 +++++++++++++++++++++++++++++++ locale/mobs_monster.it.tr | 38 +++++++++++++++++++++++++++++++++++ locale/mobs_monster.ms.tr | 35 ++++++++++++++++++++++++++++++++ locale/mobs_monster.tr.tr | 39 ++++++++++++++++++++++++++++++++++++ locale/mobs_monster.zh_CN.tr | 36 +++++++++++++++++++++++++++++++++ locale/mobs_monster.zh_TW.tr | 36 +++++++++++++++++++++++++++++++++ locale/template.txt | 28 +++++++++++++------------- 8 files changed, 269 insertions(+), 14 deletions(-) create mode 100644 locale/mobs_monster.de.tr create mode 100644 locale/mobs_monster.fr.tr create mode 100644 locale/mobs_monster.it.tr create mode 100644 locale/mobs_monster.ms.tr create mode 100644 locale/mobs_monster.tr.tr create mode 100644 locale/mobs_monster.zh_CN.tr create mode 100644 locale/mobs_monster.zh_TW.tr diff --git a/locale/mobs_monster.de.tr b/locale/mobs_monster.de.tr new file mode 100644 index 0000000..f2efe48 --- /dev/null +++ b/locale/mobs_monster.de.tr @@ -0,0 +1,37 @@ +# German Translation for mobs_monster mod +# Deutsche Übersetzung der mobs_monster Mod +# last update: 2016/June/10 +# Author: Xanthin + +#dirtmonster.lua +Dirt Monster=Erdmonster + +#dungeonmaster.lua +Dungeon Master=Kerkermeister + +#init.lua +[MOD] Mobs Redo 'Monsters' loaded=[MOD] Mobs Redo 'Monsters' geladen + +#lava_flan.lua +Lava Flan=Lavaflan +Lava orb=Lavakugel +Lava Pickaxe=Lavaspitzhacke + +#mese_monster.lua +Mese Monster=Mesemonster + +#oerkki.lua +Oerkki=Oerkki + +#sandmonster.lua +Sand Monster=Sandmonster + +#spider.lua +Spider=Spinne +Cobweb=Spinnennetz + +#stonemonster.lua +Stone Monster=Steinmonster + +#treemonster.lua +Tree Monster=Baummonster diff --git a/locale/mobs_monster.fr.tr b/locale/mobs_monster.fr.tr new file mode 100644 index 0000000..c4f8f3a --- /dev/null +++ b/locale/mobs_monster.fr.tr @@ -0,0 +1,34 @@ +# last update: 2016/June/10 + +#dirtmonster.lua +Dirt Monster= Monstre de terre + +#dungeonmaster.lua +Dungeon Master=Maître des donjons + +#init.lua +[MOD] Mobs Redo 'Monsters' loaded=[MOD] Mobs Redo 'Monstres' chargé + +#lava_flan.lua +Lava Flan=Flan de lave +Lava orb=Orbe de lave +Lava Pickaxe=Pioche de lave + +#mese_monster.lua +Mese Monster=Monstre de Mese + +#oerkki.lua +Oerkki=Oerkki + +#sandmonster.lua +Sand Monster=Monstre de sable + +#spider.lua +Spider=Araignée +Cobweb=Toile d'arraignée + +#stonemonster.lua +Stone Monster=Monstre de pierre + +#treemonster.lua +Tree Monster=Monstre de bois diff --git a/locale/mobs_monster.it.tr b/locale/mobs_monster.it.tr new file mode 100644 index 0000000..bbaa1b6 --- /dev/null +++ b/locale/mobs_monster.it.tr @@ -0,0 +1,38 @@ +# ITALIAN LOCALE FILE FOR THE MOBS MONSTER MODULE +# Copyright (c) 2014 Krupnov Pavel and 2016 TenPlus1 +# This file is distributed under the same license as the MOBS MONSTER package. +# Hamlet , 2017. +# + +#dirtmonster.lua +Dirt Monster=Mostro di terra + +#dungeonmaster.lua +Dungeon Master=Padrone delle segrete + +#init.lua +[MOD] Mobs Redo 'Monsters' loaded=[MOD] Mobs Redo 'Monsters' caricato + +#lava_flan.lua +Lava Flan=Sformato di lava +Lava orb=Sfera di lava +Lava Pickaxe=Piccone di lava + +#mese_monster.lua +Mese Monster=Mostro di mese + +#oerkki.lua +Oerkki=Oerkki + +#sandmonster.lua +Sand Monster=Mostro di sabbia + +#spider.lua +Spider=Ragno +Cobweb=Ragnatela + +#stonemonster.lua +Stone Monster=Mostro di pietra + +#treemonster.lua +Tree Monster=Albero mostro diff --git a/locale/mobs_monster.ms.tr b/locale/mobs_monster.ms.tr new file mode 100644 index 0000000..0824e80 --- /dev/null +++ b/locale/mobs_monster.ms.tr @@ -0,0 +1,35 @@ +# Malay translations of mobs_monster mod +# using template from 2016/June/10, translated on 2018/February/05 + +#dirtmonster.lua +Dirt Monster=Raksasa Tanah + +#dungeonmaster.lua +Dungeon Master=Penjaga Kurungan Bawah Tanah + +#init.lua +[MOD] Mobs Redo 'Monsters' loaded=[MODS] Mobs Redo 'Monsters' telah dimuatkan + +#lava_flan.lua +Lava Flan=Raksasa Lava +Lava orb=Bola Lava +Lava Pickaxe=Beliung Lava + +#mese_monster.lua +Mese Monster=Raksasa Mese + +#oerkki.lua +Oerkki=Oerkki + +#sandmonster.lua +Sand Monster=Raksasa Pasir + +#spider.lua +Spider=Labah-labah +Cobweb=Sarang Labah-labah + +#stonemonster.lua +Stone Monster=Raksasa Batu + +#treemonster.lua +Tree Monster=Raksasa Pokok diff --git a/locale/mobs_monster.tr.tr b/locale/mobs_monster.tr.tr new file mode 100644 index 0000000..b1d8fb6 --- /dev/null +++ b/locale/mobs_monster.tr.tr @@ -0,0 +1,39 @@ +# Türkçe çeviri by Admicos +# Turkish translation by Admicos + +# Son düzenleme: 26 Nisan 2017 +# Last edit: 26 April 2017 + + +#dirtmonster.lua +Dirt Monster=Toprak Canavarı + +#dungeonmaster.lua +Dungeon Master=Zindan başı + +#init.lua +[MOD] Mobs Redo 'Monsters' loaded=[MOD] Mobs Redo 'Canavarlar' yüklendi + +#lava_flan.lua +Lava Flan=Lav Flan +Lava orb=Lav küre +Lava Pickaxe=Lav kazması + +#mese_monster.lua +Mese Monster=Mese Canavarı + +#oerkki.lua +Oerkki=Oerkki + +#sandmonster.lua +Sand Monster=Kum Canavarı + +#spider.lua +Spider=Örümcek +Cobweb=Örümcek ağı + +#stonemonster.lua +Stone Monster=Taş Canavarı + +#treemonster.lua +Tree Monster=Ağaç Canavarı diff --git a/locale/mobs_monster.zh_CN.tr b/locale/mobs_monster.zh_CN.tr new file mode 100644 index 0000000..b05247e --- /dev/null +++ b/locale/mobs_monster.zh_CN.tr @@ -0,0 +1,36 @@ +# Template for translations of mobs_monster mod +# last update: 2016/June/10 + +#dirtmonster.lua +Dirt Monster=泥土怪 + +#dungeonmaster.lua +Dungeon Master=地穴之主 + +#init.lua +[MOD] Mobs Redo 'Monsters' loaded=[模组] Mobs Redo 'Monsters' 已加载 + +#lava_flan.lua +Lava Flan=岩浆饼 +Lava orb=岩浆球 +Lava Pickaxe=岩浆镐 +Obsidian Flan=黑耀石饼 + +#mese_monster.lua +Mese Monster=黄石怪 + +#oerkki.lua +Oerkki=奥尔基 + +#sandmonster.lua +Sand Monster=沙怪 + +#spider.lua +Spider=蜘蛛 +Cobweb=蜘蛛网 + +#stonemonster.lua +Stone Monster=石头怪 + +#treemonster.lua +Tree Monster=树怪 diff --git a/locale/mobs_monster.zh_TW.tr b/locale/mobs_monster.zh_TW.tr new file mode 100644 index 0000000..8c5e2fc --- /dev/null +++ b/locale/mobs_monster.zh_TW.tr @@ -0,0 +1,36 @@ +# Template for translations of mobs_monster mod +# last update: 2016/June/10 + +#dirtmonster.lua +Dirt Monster=泥土怪 + +#dungeonmaster.lua +Dungeon Master=地穴之主 + +#init.lua +[MOD] Mobs Redo 'Monsters' loaded=[模組] Mobs Redo 'Monsters' 已加載 + +#lava_flan.lua +Lava Flan=岩漿餅 +Lava orb=岩漿球 +Lava Pickaxe=岩漿鎬 +Obsidian Flan=黑耀石餅 + +#mese_monster.lua +Mese Monster=黃石怪 + +#oerkki.lua +Oerkki=奧爾基 + +#sandmonster.lua +Sand Monster=沙怪 + +#spider.lua +Spider=蜘蛛 +Cobweb=蜘蛛網 + +#stonemonster.lua +Stone Monster=石頭怪 + +#treemonster.lua +Tree Monster=樹怪 diff --git a/locale/template.txt b/locale/template.txt index eb2d347..3eac761 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -2,35 +2,35 @@ # last update: 2016/June/10 #dirtmonster.lua -Dirt Monster = +Dirt Monster= #dungeonmaster.lua -Dungeon Master = +Dungeon Master= #init.lua -[MOD] Mobs Redo 'Monsters' loaded = +[MOD] Mobs Redo 'Monsters' loaded= #lava_flan.lua -Lava Flan = -Lava orb = -Lava Pickaxe = -Obsidian Flan = +Lava Flan= +Lava orb= +Lava Pickaxe= +Obsidian Flan= #mese_monster.lua -Mese Monster = +Mese Monster= #oerkki.lua -Oerkki = +Oerkki= #sandmonster.lua -Sand Monster = +Sand Monster= #spider.lua -Spider = -Cobweb = +Spider= +Cobweb= #stonemonster.lua -Stone Monster = +Stone Monster= #treemonster.lua -Tree Monster = +Tree Monster=