yl_canned_food_mtg/texts.lua
malfal 43377500e1 Update texts.lua
After fixing the all_good warning message in yl_api_nodestages, there were two new warning messages introduced at startup from internal.lua:

WARNING[ServerStart]: key settings_dont_match does not exist
WARNING[ServerStart]: key get_filepath does not exist

Plus there was this error when playing without one or more of the optional dependencies ethereal, farming redo, and mobs_animals:

WARNING[ServerStart]: key recipe_not_good does not exist
WARNING[ServerStart]: recipe_not_good

So I added three lines to the bottom of texts.lua to fix or improve these warnings (although I am not 100% sure of the wording for the get_filepath message that appears to only show up when the debug checkbox is checked? I did my best to apply context to the warnings, but edit messages as you see fit.)
2025-03-08 04:47:52 +01:00

58 lines
2.1 KiB
Lua

local S = minetest.get_translator(yl_canned_food_mtg.modname)
local texts = {}
--function yl_canned_food_mtg.t(key, ...) return S(texts[key], ...) or "" end
function yl_canned_food_mtg.t(key, ...)
if (texts[key] == nil) then
minetest.log("warning","key " .. (key or "") .. " does not exist")
return key
end
return S(texts[key], ...) or ""
end
-- Fixed texts
texts["log_prefix"] = "[MOD] @1 : @2"
-- Translateable texts
texts["information_additional"] = "Craft and eat yl_canned_food in mtg"
texts["unified_inventory_register_craft_type_description"] = "Place in a dark room"
texts["chatcommand_admin_description"] = "Admin Chatcommand description"
texts["chatcommand_admin_parameters"] = "<name> <privilege>"
texts["chatcommand_admin_success_message"] = "Sucess message"
texts["chatcommand_admin_fail_message"] = "Fail message"
texts["chatcommand_player_description"] = "Player Chatcommand description"
texts["chatcommand_player_parameters"] = "<name> <privilege>"
texts["chatcommand_player_success_message"] = "Sucess message"
texts["chatcommand_player_fail_message"] = "Fail message"
texts["api_sent_x_to_y"] = "Sent @1 to @2"
texts["privs_example_description"] = "Can do example task"
texts["privs_example_grant_logmessage"] = "User @1 granted priv @2 to user @3"
texts["privs_example_revoke_logmessage"] =
"User @1 revoked priv @2 from user @3"
-- Errormessages
texts["error_not_a_string"] = "@1 not a string"
texts["error_player_not_online"] = "@1 not an online player"
texts["error_not_a_colorspec"] = "@1 not a ColorSpec"
texts["error_not_a_position"] = "@1 not a position"
texts["error_function_not_available"] = "@1 not available"
texts["error_cannot_open_file"] = "Error opening file: @1"
texts["error_cannot_read_file"] = "Error reading file: @1"
texts["error_name_not_found"] = "Name not found: @1"
texts["error_priv_not_found"] = "Priv not found: @1"
texts["settings_dont_match"] = "\"Legacy naming mode\" and \"Data source\" settings don't match between yl_canned_food and yl_canned_food_mtg"
texts["get_filepath"] = "User supplied JSON file for @1 is @2"
texts["recipe_not_good"] = "Missing optional dependency to add a recipe for @1"