diff --git a/technic/machines/HV/nuclear_reactor.lua b/technic/machines/HV/nuclear_reactor.lua index 431b2ee..83568cb 100644 --- a/technic/machines/HV/nuclear_reactor.lua +++ b/technic/machines/HV/nuclear_reactor.lua @@ -15,7 +15,7 @@ local fuel_type = "technic:uranium_fuel" -- The reactor burns this local digiline_meltdown = technic.config:get_bool("enable_nuclear_reactor_digiline_selfdestruct") local digiline_remote_path = minetest.get_modpath("digiline_remote") -local S = technic.getter +local S = minetest.get_translator("technic") local reactor_desc = S("@1 Nuclear Reactor Core", S("HV")) local cable_entry = "^technic_cable_connection_overlay.png" diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 98a0537..a608560 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -1,5 +1,5 @@ -local S = technic.getter +local S = minetest.get_translator("technic") local tube_entry = "^pipeworks_tube_connection_metallic.png" local cable_entry = "^technic_cable_connection_overlay.png" @@ -22,7 +22,7 @@ local function set_quarry_formspec(meta) local formspec = "size[6,4.3]".. "list[context;cache;0,1;4,3;]".. "item_image[4.8,0;1,1;technic:quarry]".. - "label[0,0.2;"..S("%s Quarry"):format("HV").."]".. + "label[0,0.2;"..S("@1 Quarry", "HV").."]".. "field[4.3,3.5;2,1;size;"..S("Radius:")..";"..radius.."]" if meta:get_int("enabled") == 0 then formspec = formspec.."button[4,1;2,1;enable;"..S("Disabled").."]" @@ -46,11 +46,11 @@ end local function set_quarry_demand(meta) local radius = meta:get_int("size") local diameter = radius*2 + 1 - local machine_name = S("%s Quarry"):format("HV") + local machine_name = S("@1 Quarry", "HV") local do_purge = meta:get_int("purge_on") == 1 if meta:get_int("enabled") == 0 or do_purge then local infotext = do_purge and - S("%s purging cache") or S("%s Disabled") + S("@1 purging cache") or S("%s Disabled") meta:set_string("infotext", infotext:format(machine_name)) meta:set_int("HV_EU_demand", 0) elseif meta:get_int("dug") == diameter*diameter * (quarry_dig_above_nodes+1+quarry_max_depth) then diff --git a/technic/machines/LV/lamp.lua b/technic/machines/LV/lamp.lua index a4605f2..ac64ed4 100644 --- a/technic/machines/LV/lamp.lua +++ b/technic/machines/LV/lamp.lua @@ -3,7 +3,7 @@ -- Illuminates a 7x7x3(H) volume below itself with light bright as the sun. -local S = technic.getter +local S = minetest.get_translator("technic") local desc = S("@1 Lamp", S("LV")) local active_desc = S("@1 Active", desc) diff --git a/technic/machines/LV/led.lua b/technic/machines/LV/led.lua index 3786ab7..6b18bb9 100644 --- a/technic/machines/LV/led.lua +++ b/technic/machines/LV/led.lua @@ -1,7 +1,7 @@ -- LED -- Intended primarily as a core component for LED lamps. -local S = technic.getter +local S = minetest.get_translator("technic") local desc = S("@1 LED", S("LV")) local active_desc = S("@1 Active", desc) diff --git a/technic/machines/LV/music_player.lua b/technic/machines/LV/music_player.lua index 3bbb441..3a17304 100644 --- a/technic/machines/LV/music_player.lua +++ b/technic/machines/LV/music_player.lua @@ -1,7 +1,7 @@ -- LV Music player. -- The player can play music. But it is high ampage! -local S = technic.getter +local S = minetest.get_translator("technic") minetest.register_alias("music_player", "technic:music_player") minetest.register_craft({ @@ -23,7 +23,7 @@ end local run = function(pos, node) local meta = minetest.get_meta(pos) local eu_input = meta:get_int("LV_EU_input") - local machine_name = S("%s Music Player"):format("LV") + local machine_name = S("@1 Music Player", "LV") local demand = 150 local current_track = meta:get_int("current_track") @@ -38,19 +38,19 @@ local run = function(pos, node) end if meta:get_int("active") == 0 then - meta:set_string("infotext", S("%s Idle"):format(machine_name)) + meta:set_string("infotext", S("@1 Idle", machine_name)) meta:set_int("LV_EU_demand", 0) return end if eu_input < demand then - meta:set_string("infotext", S("%s Unpowered"):format(machine_name)) + meta:set_string("infotext", S("@1 Unpowered", machine_name)) if music_handle then minetest.sound_stop(music_handle) music_handle = nil end elseif eu_input >= demand then - meta:set_string("infotext", S("%s Active"):format(machine_name)) + meta:set_string("infotext", S("@1 Active", machine_name)) if not music_handle then music_handle = play_track(pos, current_track) end @@ -72,7 +72,7 @@ local function set_display(meta) meta:set_string("formspec", "size[4,4.5]".. "item_image[0,0;1,1;technic:music_player]".. - "label[1,0;"..S("%s Music Player"):format("LV").."]".. + "label[1,0;"..S("@1 Music Player", "LV").."]".. "button[0,1;1,1;track1;1]".. "button[1,1;1,1;track2;2]".. "button[2,1;1,1;track3;3]".. @@ -86,11 +86,11 @@ local function set_display(meta) "label[0,4;"..minetest.formspec_escape( meta:get_int("active") == 0 and S("Stopped") or - S("Current track %s"):format(meta:get_int("current_track"))).."]") + S("Current track @1", "current_track")).."]") end minetest.register_node("technic:music_player", { - description = S("%s Music Player"):format("LV"), + description = S("@1 Music Player", "LV"), tiles = {"technic_music_player_top.png", "technic_machine_bottom.png", "technic_music_player_side.png", "technic_music_player_side.png", "technic_music_player_side.png", "technic_music_player_side.png"}, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, @@ -99,7 +99,7 @@ minetest.register_node("technic:music_player", { sounds = default.node_sound_wood_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) - meta:set_string("infotext", S("%s Music Player"):format("LV")) + meta:set_string("infotext", S("@1 Music Player", "LV")) set_display(meta) end, on_receive_fields = function(pos, formanme, fields, sender) diff --git a/technic/machines/LV/solar_panel.lua b/technic/machines/LV/solar_panel.lua index b3daedc..4d9c030 100644 --- a/technic/machines/LV/solar_panel.lua +++ b/technic/machines/LV/solar_panel.lua @@ -2,7 +2,7 @@ -- They can however also be used separately but with reduced efficiency due to the missing transformer. -- Individual panels are less efficient than when the panels are combined into full arrays. -local S = technic.getter +local S = minetest.get_translator("technic") minetest.register_craft({ @@ -23,7 +23,7 @@ local run = function(pos, node) -- To take care of some of it solar panels do not work outside daylight hours or if -- built below 0m local pos1 = {x=pos.x, y=pos.y+1, z=pos.z} - local machine_name = S("Small Solar %s Generator"):format("LV") + local machine_name = S("Small Solar @1 Generator", "LV") local light = minetest.get_node_light(pos1, nil) local time_of_day = minetest.get_timeofday() @@ -39,7 +39,7 @@ local run = function(pos, node) technic.EU_string(charge_to_give))) meta:set_int("LV_EU_supply", charge_to_give) else - meta:set_string("infotext", S("%s Idle"):format(machine_name)) + meta:set_string("infotext", S("@1 Idle", machine_name)) meta:set_int("LV_EU_supply", 0) end end @@ -51,7 +51,7 @@ minetest.register_node("technic:solar_panel", { technic_machine=1, technic_lv=1}, connect_sides = {"bottom"}, sounds = default.node_sound_wood_defaults(), - description = S("Small Solar %s Generator"):format("LV"), + description = S("Small Solar @1 Generator", "LV"), active = false, drawtype = "nodebox", paramtype = "light", @@ -63,7 +63,7 @@ minetest.register_node("technic:solar_panel", { on_construct = function(pos) local meta = minetest.get_meta(pos) meta:set_int("LV_EU_supply", 0) - meta:set_string("infotext", S("Small Solar %s Generator"):format("LV")) + meta:set_string("infotext", S("Small Solar @1 Generator", "LV")) end, technic_run = run, }) diff --git a/technic/machines/LV/water_mill.lua b/technic/machines/LV/water_mill.lua index e26224e..394209e 100644 --- a/technic/machines/LV/water_mill.lua +++ b/technic/machines/LV/water_mill.lua @@ -2,7 +2,7 @@ -- It is a LV EU supplier and fairly low yield (max 180EUs) -- It is a little over half as good as the thermal generator. -local S = technic.getter +local S = minetest.get_translator("technic") local cable_entry = "^technic_cable_connection_overlay.png" @@ -53,7 +53,7 @@ local run = function(pos, node) meta:set_int("LV_EU_supply", eu_supply) meta:set_string("infotext", - S("Hydro %s Generator"):format("LV").." ("..production_level.."%)") + S("Hydro @1 Generator", "LV").." ("..production_level.."%)") if production_level > 0 and minetest.get_node(pos).name == "technic:water_mill" then @@ -67,7 +67,7 @@ local run = function(pos, node) end minetest.register_node("technic:water_mill", { - description = S("Hydro %s Generator"):format("LV"), + description = S("Hydro @1 Generator", "LV"), tiles = { "technic_water_mill_top.png", "technic_machine_bottom.png"..cable_entry, @@ -83,14 +83,14 @@ minetest.register_node("technic:water_mill", { sounds = default.node_sound_wood_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) - meta:set_string("infotext", S("Hydro %s Generator"):format("LV")) + meta:set_string("infotext", S("Hydro @1 Generator", "LV")) meta:set_int("LV_EU_supply", 0) end, technic_run = run, }) minetest.register_node("technic:water_mill_active", { - description = S("Hydro %s Generator"):format("LV"), + description = S("Hydro @1 Generator", "LV"), tiles = {"technic_water_mill_top_active.png", "technic_machine_bottom.png", "technic_water_mill_side.png", "technic_water_mill_side.png", "technic_water_mill_side.png", "technic_water_mill_side.png"}, diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index 9c9db27..68d5424 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -1,4 +1,4 @@ -local S = technic.getter +local S = minetest.get_translator("technic") local desc = S("Administrative World Anchor") diff --git a/technic/machines/other/coal_alloy_furnace.lua b/technic/machines/other/coal_alloy_furnace.lua index 14700ce..be0e80f 100644 --- a/technic/machines/other/coal_alloy_furnace.lua +++ b/technic/machines/other/coal_alloy_furnace.lua @@ -1,7 +1,7 @@ -- Fuel driven alloy furnace. This uses no EUs: -local S = technic.getter +local S = minetest.get_translator("technic") minetest.register_craft({ output = 'technic:coal_alloy_furnace', diff --git a/technic/machines/other/coal_furnace.lua b/technic/machines/other/coal_furnace.lua index 53a0f8b..7cfd438 100644 --- a/technic/machines/other/coal_furnace.lua +++ b/technic/machines/other/coal_furnace.lua @@ -1,4 +1,4 @@ -local S = technic.getter +local S = minetest.get_translator("technic") if minetest.registered_nodes["default:furnace"].description == "Furnace" then minetest.override_item("default:furnace", { description = S("Fuel-Fired Furnace") }) diff --git a/technic/machines/other/frames.lua b/technic/machines/other/frames.lua index 421c3a9..e021697 100644 --- a/technic/machines/other/frames.lua +++ b/technic/machines/other/frames.lua @@ -1,4 +1,4 @@ -local S = technic.getter +local S = minetest.get_translator("technic") local infinite_stacks = minetest.settings:get_bool("creative_mode") and minetest.get_modpath("unified_inventory") == nil diff --git a/technic/machines/other/injector.lua b/technic/machines/other/injector.lua index 6bd5a83..ce9070c 100644 --- a/technic/machines/other/injector.lua +++ b/technic/machines/other/injector.lua @@ -1,5 +1,5 @@ -local S = technic.getter +local S = minetest.get_translator("technic") local fs_helpers = pipeworks.fs_helpers diff --git a/technic/machines/power_monitor.lua b/technic/machines/power_monitor.lua index 7e8b850..5d82a89 100644 --- a/technic/machines/power_monitor.lua +++ b/technic/machines/power_monitor.lua @@ -2,7 +2,7 @@ -- The power monitor can be used to monitor how much power is available on a network, -- similarly to the old "slave" switching stations. -local S = technic.getter +local S = minetest.get_translator("technic") local cable_entry = "^technic_cable_connection_overlay.png" diff --git a/technic/machines/supply_converter.lua b/technic/machines/supply_converter.lua index 2ecd610..ddc24d6 100644 --- a/technic/machines/supply_converter.lua +++ b/technic/machines/supply_converter.lua @@ -9,7 +9,7 @@ local digilines_path = minetest.get_modpath("digilines") -local S = technic.getter +local S = minetest.get_translator("technic") local cable_entry = "^technic_cable_connection_overlay.png" @@ -30,9 +30,9 @@ local function set_supply_converter_formspec(meta) formspec = formspec.."button[0,1;5,1;mesecon_mode_0;"..S("Controlled by Mesecon Signal").."]" end if meta:get_int("enabled") == 0 then - formspec = formspec.."button[0,1.75;5,1;enable;"..S("%s Disabled"):format(S("Supply Converter")).."]" + formspec = formspec.."button[0,1.75;5,1;enable;"..S("@1 Disabled", S("Supply Converter")).."]" else - formspec = formspec.."button[0,1.75;5,1;disable;"..S("%s Enabled"):format(S("Supply Converter")).."]" + formspec = formspec.."button[0,1.75;5,1;disable;"..S("@1 Enabled", S("Supply Converter")).."]" end meta:set_string("formspec", formspec) end @@ -172,10 +172,10 @@ local run = function(pos, node, run_stage) technic.EU_string(input), from, technic.EU_string(input * efficiency), to)) else - meta:set_string("infotext",S("%s Has No Network"):format(machine_name)) + meta:set_string("infotext",S("@1 Has No Network", machine_name)) end else - meta:set_string("infotext", S("%s Has Bad Cabling"):format(machine_name)) + meta:set_string("infotext", S("@1 Has Bad Cabling", machine_name)) if to then meta:set_int(to.."_EU_supply", 0) end diff --git a/technic/machines/switching_station.lua b/technic/machines/switching_station.lua index b671585..7904474 100644 --- a/technic/machines/switching_station.lua +++ b/technic/machines/switching_station.lua @@ -7,7 +7,7 @@ technic.redundant_warn = {} local mesecons_path = minetest.get_modpath("mesecons") local digilines_path = minetest.get_modpath("digilines") -local S = technic.getter +local S = minetest.get_translator("technic") local cable_entry = "^technic_cable_connection_overlay.png" diff --git a/technic/tools/cans.lua b/technic/tools/cans.lua index 52d5eab..8f3aa36 100644 --- a/technic/tools/cans.lua +++ b/technic/tools/cans.lua @@ -1,4 +1,4 @@ -local S = technic.getter +local S = minetest.get_translator("technic") local function set_can_wear(itemstack, level, max_level) local temp diff --git a/technic/tools/chainsaw.lua b/technic/tools/chainsaw.lua index 84afcba..9c61d96 100644 --- a/technic/tools/chainsaw.lua +++ b/technic/tools/chainsaw.lua @@ -11,7 +11,7 @@ local chainsaw_efficiency = 0.92 -- Drops less items local tree_max_radius = 10 local tree_max_height = 70 -local S = technic.getter +local S = minetest.get_translator("technic") --[[ Format: [node_name] = dig_cost @@ -203,8 +203,7 @@ local function chainsaw_dig(player, pos, remaining_charge) end if cutter.stopped_by_safe_cut then - minetest.chat_send_player(player_name, S("The chainsaw could not dig all nodes" .. - " because the safety mechanism was activated.")) + minetest.chat_send_player(player_name, S("The chainsaw could not dig all nodes because the safety mechanism was activated.")) end minetest.sound_play("chainsaw", { diff --git a/technic/tools/mining_lasers.lua b/technic/tools/mining_lasers.lua index 47fcc17..694852a 100644 --- a/technic/tools/mining_lasers.lua +++ b/technic/tools/mining_lasers.lua @@ -6,7 +6,7 @@ local mining_lasers_list = { } local allow_entire_discharging = true -local S = technic.getter +local S = minetest.get_translator("technic") minetest.register_craft({ output = "technic:laser_mk1", @@ -94,7 +94,7 @@ end for _, m in pairs(mining_lasers_list) do technic.register_power_tool("technic:laser_mk"..m[1], m[3]) minetest.register_tool("technic:laser_mk"..m[1], { - description = S("Mining Laser Mk%d"):format(m[1]), + description = S("Mining Laser Mk@1", m[1]), inventory_image = "technic_mining_laser_mk"..m[1]..".png", range = 0, stack_max = 1, diff --git a/technic/tools/prospector.lua b/technic/tools/prospector.lua index 14e518c..16e50c0 100644 --- a/technic/tools/prospector.lua +++ b/technic/tools/prospector.lua @@ -1,4 +1,4 @@ -local S = technic.getter +local S = minetest.get_translator("technic") technic.register_power_tool("technic:prospector", 300000) diff --git a/technic/tools/sonic_screwdriver.lua b/technic/tools/sonic_screwdriver.lua index ceb52a1..0c01a64 100644 --- a/technic/tools/sonic_screwdriver.lua +++ b/technic/tools/sonic_screwdriver.lua @@ -1,6 +1,6 @@ local sonic_screwdriver_max_charge = 15000 -local S = technic.getter +local S = minetest.get_translator("technic") technic.register_power_tool("technic:sonic_screwdriver", sonic_screwdriver_max_charge) diff --git a/technic/tools/tree_tap.lua b/technic/tools/tree_tap.lua index ae68b56..049e265 100644 --- a/technic/tools/tree_tap.lua +++ b/technic/tools/tree_tap.lua @@ -1,5 +1,5 @@ -local S = technic.getter +local S = minetest.get_translator("technic") local mesecons_materials = minetest.get_modpath("mesecons_materials") minetest.register_tool("technic:treetap", { diff --git a/technic/tools/vacuum.lua b/technic/tools/vacuum.lua index a715d99..0547726 100644 --- a/technic/tools/vacuum.lua +++ b/technic/tools/vacuum.lua @@ -3,7 +3,7 @@ local vacuum_max_charge = 10000 -- 10000 - Maximum charge of the vacuum c local vacuum_charge_per_object = 100 -- 100 - Capable of picking up 50 objects local vacuum_range = 8 -- 8 - Area in which to pick up objects -local S = technic.getter +local S = minetest.get_translator("technic") technic.register_power_tool("technic:vacuum", vacuum_max_charge)