diff --git a/init.lua b/init.lua index 022ccea..84e84f3 100644 --- a/init.lua +++ b/init.lua @@ -12,6 +12,8 @@ local sound_sets = {} -- all the sounds and their settings local sound_set_order = {} -- needed because pairs loops randomly through tables local set_nodes = {} -- all the nodes needed for sets +-- translation +local S = minetest.get_translator("ambience") -- add set to list ambience.add_set = function(set_name, def) @@ -307,8 +309,8 @@ end) -- sound volume command minetest.register_chatcommand("svol", { - params = "", - description = "set sound volume (0.1 to 1.0)", + params = S(""), + description = S("set sound volume (0.1 to 1.0)"), privs = {}, func = function(name, param) @@ -325,15 +327,15 @@ minetest.register_chatcommand("svol", { playing[name].svol = svol - return true, "Sound volume set to " .. svol + return true, S("Sound volume set to @1", svol) end }) -- music volume command (0 stops music) minetest.register_chatcommand("mvol", { - params = "", - description = "set music volume (0.1 to 1.0, 0 to stop music)", + params = S(""), + description = S("set music volume (0.1 to 1.0, 0 to stop music)"), privs = {}, func = function(name, param) @@ -359,7 +361,7 @@ minetest.register_chatcommand("mvol", { playing[name].mvol = mvol - return true, "Music volume set to " .. mvol + return true, S("Music volume set to @1", mvol) end }) diff --git a/locale/ambience.eo.tr b/locale/ambience.eo.tr new file mode 100644 index 0000000..7bf35f4 --- /dev/null +++ b/locale/ambience.eo.tr @@ -0,0 +1,7 @@ +# textdomain: ambience += +set sound volume (0.1 to 1.0)=agordi sonlaŭtecon (0.1 ĝis 1.0) +Sound volume set to @1=Sonlaŭteco agordita al @1 += +set music volume (0.1 to 1.0, 0 to stop music)=agordi muziklaŭtecon (0.1 ĝis 1.0; malŝalti muzikon per 0) +Music volume set to @1=Muziklaŭteco agordita al @1 diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..5016ce5 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,7 @@ +# textdomain: ambience += +set sound volume (0.1 to 1.0)= +Sound volume set to @1= += +set music volume (0.1 to 1.0, 0 to stop music)= +Music volume set to @1=