From ba2bdf83684e92bc344a4d3c25548db673ab6130 Mon Sep 17 00:00:00 2001
From: SmallJoker <SmallJoker@users.noreply.github.com>
Date: Sun, 28 Apr 2024 18:41:52 +0200
Subject: [PATCH] technic_cnc: Use client-side translation API (#636)

---
 technic_cnc/init.lua |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/technic_cnc/init.lua b/technic_cnc/init.lua
index 3c4da3e..3b33fe7 100644
--- a/technic_cnc/init.lua
+++ b/technic_cnc/init.lua
@@ -3,15 +3,11 @@
 technic_cnc = {}
 
 technic_cnc.technic_modpath = minetest.get_modpath("technic")
+technic_cnc.getter = minetest.get_translator("technic_cnc")
 
 technic_cnc.use_technic = technic_cnc.technic_modpath
                           and minetest.settings:get_bool("technic_cnc_use_technic") ~= false
 
-if rawget(_G, "intllib") then
-	technic_cnc.getter = intllib.Getter()
-else
-	technic_cnc.getter = function(s,a,...)if a==nil then return s end a={a,...}return s:gsub("(@?)@(%(?)(%d+)(%)?)",function(e,o,n,c)if e==""then return a[tonumber(n)]..(o==""and c or"")else return"@"..o..n..c end end) end
-end
 
 dofile(modpath.."/cnc.lua")
 dofile(modpath.."/cnc_api.lua")

--
Gitblit v1.8.0