From 39da8cc8fdf28cb32e54d89b2c1186fb18b00f99 Mon Sep 17 00:00:00 2001 From: crabman77 Date: Sat, 27 Jun 2015 15:18:34 +0200 Subject: [PATCH] added missing translation --- baits.lua | 4 ++-- bobber.lua | 2 +- bobber_shark.lua | 4 ++-- functions.lua | 8 ++++---- locale/fr.txt | 12 ++++++++++++ locale/template.txt | 12 ++++++++++++ 6 files changed, 33 insertions(+), 9 deletions(-) diff --git a/baits.lua b/baits.lua index 84b175d..e9eb124 100755 --- a/baits.lua +++ b/baits.lua @@ -2,7 +2,7 @@ --fish bait --bait_corn minetest.register_craftitem("fishing:bait_corn", { - description = "Bait corn", + description = fishing_setting.func.S("Bait Corn"), inventory_image = "fishing_bait_corn.png", }) @@ -10,7 +10,7 @@ fishing_setting.baits["fishing:bait_corn"] = { ["bait"] = "fishing:bait_corn", [ --bait_bread minetest.register_craftitem("fishing:bait_bread", { - description = "Bait Bread", + description = fishing_setting.func.S("Bait Bread"), inventory_image = "fishing_bait_bread.png", }) diff --git a/bobber.lua b/bobber.lua index 4df8db5..9d79bdc 100755 --- a/bobber.lua +++ b/bobber.lua @@ -80,7 +80,7 @@ local FISHING_BOBBER_ENTITY={ local name = self.prize[1]..":"..self.prize[2] local desc = self.prize[4] if fishing_setting.settings["message"] == true then minetest.chat_send_player(playername, fishing_setting.func.S("You caught "..desc), false) end - fishing_setting.func.add_to_trophies(clicker, self.prize[2]) + fishing_setting.func.add_to_trophies(clicker, self.prize[2], desc) local wear_value = fishing_setting.func.wear_value(self.prize[3]) if inv:room_for_item("main", {name=name, count=1, wear=wear_value, metadata=""}) then inv:add_item("main", {name=name, count=1, wear=wear_value, metadata=""}) diff --git a/bobber_shark.lua b/bobber_shark.lua index c8d14f4..f79e61b 100755 --- a/bobber_shark.lua +++ b/bobber_shark.lua @@ -77,8 +77,8 @@ local FISHING_BOBBER_SHARK_ENTITY={ else local name = self.prize[1]..":"..self.prize[2] local desc = self.prize[4] - if fishing_setting.settings["message"] == true then minetest.chat_send_player(playername, "You caught "..desc, false) end - fishing_setting.func.add_to_trophies(clicker, self.prize[2]) + if fishing_setting.settings["message"] == true then minetest.chat_send_player(playername, fishing_setting.func.S("You caught "..desc), false) end + fishing_setting.func.add_to_trophies(clicker, self.prize[2], desc) local wear_value = fishing_setting.func.wear_value(self.prize[3]) if inv:room_for_item("main", {name=name, count=1, wear=wear_value, metadata=""}) then inv:add_item("main", {name=name, count=1, wear=wear_value, metadata=""}) diff --git a/functions.lua b/functions.lua index 6e59560..3254600 100755 --- a/functions.lua +++ b/functions.lua @@ -110,11 +110,11 @@ end -- show notification when player catch tresor function fishing_setting.func.notify(f_name, tresor) - local title = "Good luck to "..f_name ..", He catch the tresor, "..tresor[4].."!" + local title = fishing_setting.func.S("Good luck to %s, He catch the tresor, %s!"):format(f_name, tresor[4]) for _, player in ipairs(minetest.get_connected_players()) do local player_name = player:get_player_name() if player_name == f_name then - minetest.chat_send_player(player_name, "You catch the tresor, "..tresor[4].."!") + minetest.chat_send_player(player_name, fishing_setting.func.S("You catch the tresor, %s!"):format(tresor[4])) else minetest.chat_send_player(player_name, title) end @@ -201,7 +201,7 @@ local inc = function(value, field, min, max) elseif field == "+10" then v = value + 10 elseif field == "+60" then - v = value + 60 + v = value + 60 elseif field == "-1" then v = value - 1 elseif field == "-10" then @@ -314,7 +314,7 @@ minetest.register_on_joinplayer(function(player) end) -function fishing_setting.func.add_to_trophies(player, fish) +function fishing_setting.func.add_to_trophies(player, fish, desc) local player_name = player:get_player_name() if not player_name then return end if fish == "fish" or fish == "shark" or fish == "pike" or fish == "clownfish" or fish == "bluefish" then diff --git a/locale/fr.txt b/locale/fr.txt index df70fbe..974fb9a 100755 --- a/locale/fr.txt +++ b/locale/fr.txt @@ -1,4 +1,8 @@ +# Template +Bait Corn = Appats au Mais +Bait Bread = Appats au Pain + ### bobber.lua ### You didn't catch anything. = Vous n'avez rien attrape. The bait is still there. = L'appat est toujours la. @@ -53,6 +57,14 @@ You win a new trophie, you have catched %s shark. = Vous gagnez un trophee, vous You win a new trophie, you have catched %s pike. = Vous gagnez un trophee, vous avez attrape %s brochets. You win a new trophie, you have catched %s clownfish. = Vous gagnez un trophee, vous avez attrape %s poissons clown. You win a new trophie, you have catched %s bluefish. = Vous gagnez un trophee, vous avez attrape %s poissons bleu. +Good luck to %s, He catch the tresor, %s! = %s a de la chance, Il attrappe le tresor, %s! +You catch the tresor, %s! = Vous attrappez le tresor, %s! +Yeah, %s catch a Fish. = Wouah, %s a attrappe un poisson +Yeah, %s catch a Clownfish. = Wouah, %s a attrappe un poisson clown. +Yeah, %s catch a Bluefish. = Wouah, %s a attrappe un poisson bleu. +Yeah, %s catch a Northern Pike. = Wouah, %s a attrappe un brochet. +Yeah, %s catch a small Shark. = Wouah, %s a attrappe un requin. + ### material.lua ### View information about hunger fish = Afficher les informations sur la faim des poissons diff --git a/locale/template.txt b/locale/template.txt index 6454b47..28a50d4 100755 --- a/locale/template.txt +++ b/locale/template.txt @@ -1,3 +1,8 @@ +# Template +### baits.lua ### +Bait Corn = +Bait Bread = + ### bobber.lua ### You didn't catch anything. = @@ -51,6 +56,13 @@ You win a new trophie, you have catched %s shark. = You win a new trophie, you have catched %s pike. = You win a new trophie, you have catched %s clownfish. = You win a new trophie, you have catched %s bluefish. = +Good luck to %s, He catch the tresor, %s! = +You catch the tresor, %s! = +Yeah, %s catch a Fish. = +Yeah, %s catch a Clownfish. = +Yeah, %s catch a Bluefish. = +Yeah, %s catch a Northern Pike. = +Yeah, %s catch a small Shark. = ### material.lua ###