Module:TNTTools: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
no edit summary
No edit summary
No edit summary
Line 2:
 
local TNT = require('Module:TNT')
local SD = require('Module:SimpleDebug')
 
function p.TNTTabFull (TNTTab)
if (string.sub(TNTTab, 1, 5)) ~= 'I18n/' then
TNTTab = 'I18n/'..TNTTab
Line 14 ⟶ 15:
 
function p.GetSTransWithParams (TNTTab, S, ...)
return TNT.format (p.TNTTabFull(TNTTab), S, {...}) or ''
end
 
function p.TabTransCS (TNTTab, S, CaseSensitive)
CaseSensitive = ((CaseSensitive ~= nil) and (CaseSensitive == true)) or true
local Wds = TNT.format (p.TNTTabFull(TNTTab), S)
if not CaseSensitive then
Wds = string.lower (Wds)
Line 27 ⟶ 28:
 
function p.TabTransMT (TNTTab, S, MaxTrans)
local FN = p.TNTTabFull(TNTTab)
local tab = mw.text.split (TNT.format (FN, S), '|')
if #tab > MaxTrans then
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu