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:
@ -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("%s’s awards:"), name))
|
||||
minetest.chat_send_player(to, S("@1’s 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
|
||||
|
Reference in New Issue
Block a user