1
0
mirror of https://gitlab.com/rubenwardy/awards.git synced 2025-07-13 21:30:25 +02:00

translate client-side

This commit is contained in:
2022-07-23 23:00:20 +02:00
parent c6151abbe9
commit 0a1a02b8c4
19 changed files with 1279 additions and 4144 deletions

View File

@ -1,6 +1,6 @@
-- Copyright (c) 2013-18 rubenwardy. MIT.
local S = awards.gettext
local S = awards.get_translator
function awards.get_formspec(name, to, sid)
local formspec = ""
@ -32,7 +32,7 @@ function awards.get_formspec(name, to, sid)
end
local status = "%s"
if sitem.unlocked then
status = S("%s (unlocked)")
status = "%s ".. S("(unlocked)")
end
formspec = formspec .. "textarea[0.5,3.1;4.8,1.45;;" ..
@ -115,14 +115,14 @@ function awards.show_to(name, to, sid, text)
minetest.chat_send_player(to, S("You have not unlocked any awards."))
return
end
minetest.chat_send_player(to, string.format(S("%ss awards:"), name))
minetest.chat_send_player(to, S("@1s awards:", name))
for str, _ in pairs(data.unlocked) do
local def = awards.registered_awards[str]
if def then
if def.title then
if def.description then
minetest.chat_send_player(to, string.format(S("%s: %s"), def.title, def.description))
minetest.chat_send_player(to, string.format("%s: %s", def.title, def.description))
else
minetest.chat_send_player(to, def.title)
end