Add plural forms

This commit is contained in:
Wuzzy 2024-11-27 01:10:35 +01:00
parent 384e6bb962
commit e4818468b8
2 changed files with 4 additions and 2 deletions

View File

@ -21,5 +21,7 @@ are required for food items to be recognized as such.
## Version ## Version
1.0.0 1.0.0
This mod requires Luanti 5.10.0 or later.
## License ## License
MIT License. MIT License.

View File

@ -1,4 +1,4 @@
local S = minetest.get_translator("tt_base") local S, PS = minetest.get_translator("tt_base")
local function get_min_digtime(caps) local function get_min_digtime(caps)
local mintime local mintime
@ -104,7 +104,7 @@ tt.register_snippet(function(itemstring)
if def._tt_food then if def._tt_food then
desc = S("Food item") desc = S("Food item")
if def._tt_food_hp then if def._tt_food_hp then
local msg = S("+@1 food points", def._tt_food_hp) local msg = PS("+@1 food point", "+@1 food points", def._tt_food_hp, def._tt_food_hp)
desc = desc .. "\n" .. msg desc = desc .. "\n" .. msg
end end
end end