Modulo:TNT: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nuovo modulo, importato da http://www.mediawiki.org/wiki/Module:TNT
 
Yurik (discussione | contributi)
Nessun oggetto della modifica
Riga 1:
--
-- ATTENTION:
-- ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Module:TNT
-- Please do notNOT modify itrename anywherethis else,module as- it mayhas getto copiedbe andidentical overrideon yourall changeswikis.
-- This code is Suggestions can be mademaintained at https://www.mediawiki.org/wiki/Module_talkModule:TNT
-- Please do not modify it anywhere else, as it may get copied and override your changes.
--
-- ATTENTION: This code isSuggestions can be maintainedmade at https://www.mediawiki.org/wiki/ModuleModule_talk:TNT
-- Please do NOT rename this module - it has to be identical on all wikis
--
-- DESCRIPTION:
-- This module allows templates to use translations from the shared Datasets on Commons
--
-- Example:For example, Thisthis will use dataset https://commons.wikimedia.org/wiki/Data:Original/Template:Graph:LinesGraphs.tab
-- to translate message with ID "source-table" with an argument $1 = "tablename" to a wikitext
--
-- {{#invoke:TNT | msg | Original/Template:Graph:LinesGraphs.tab | source-table | tablename}}
--
 
Riga 28 ⟶ 30:
end
 
for _, row in pairs(mw.ext.data.get(dataset).data) do
local id2, msg = unpack(row)
if id2 == id then
local result = mw.message.newRawMessage(msg, unpack(params))
return result:plain()
end
end
end