diff --git a/README.md b/README.md index f3a3cc2..09fe58a 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ Change log: - 2.9 - Added MineClone2 recipes for protection block but no official support as yet - 3.0 - Added PlayerFactions support, 'protector_hud_interval' setting and listing in advanced settings for mod values. - 3.1 - Ability to hide protection blocks using /protector_hide and /protector_show , italian local added (thanks Hamlet) +- 3.2 - Defaults to Minetest translation if found, otherwise intllib fallback if loaded, locale files updated for both. Lucky Blocks: 10 diff --git a/init.lua b/init.lua index 93ec483..4a39c4c 100644 --- a/init.lua +++ b/init.lua @@ -10,8 +10,9 @@ default = default or { -- Load support for intllib. local MP = minetest.get_modpath(minetest.get_current_modname()) -local S = dofile(MP .. "/intllib.lua") local F = minetest.formspec_escape +local S = minetest.get_translator and minetest.get_translator("protector") or + dofile(MP .. "/intllib.lua") -- Load support for factions local factions_available = minetest.global_exists("factions") diff --git a/locale/de.txt b/locale/protector.de.tr similarity index 100% rename from locale/de.txt rename to locale/protector.de.tr diff --git a/locale/es.txt b/locale/protector.es.tr similarity index 100% rename from locale/es.txt rename to locale/protector.es.tr diff --git a/locale/fr.txt b/locale/protector.fr.tr similarity index 100% rename from locale/fr.txt rename to locale/protector.fr.tr diff --git a/locale/it.txt b/locale/protector.it.tr similarity index 100% rename from locale/it.txt rename to locale/protector.it.tr diff --git a/locale/ru.txt b/locale/protector.ru.tr similarity index 100% rename from locale/ru.txt rename to locale/protector.ru.tr diff --git a/locale/tr.txt b/locale/protector.tr.tr similarity index 100% rename from locale/tr.txt rename to locale/protector.tr.tr