Module:NoteTA: Difference between revisions
From Test Wiki
Content deleted Content added
Add tracking category |
commonswiki:Module:NoteTA>Taiwania Justo Update from master using #Synchronizer Tag: Recreated |
||
| Line 22: | Line 22: | ||
local moduleTitle = mw.title.makeTitle( 'Module', 'CGroup/' .. name ) |
local moduleTitle = mw.title.makeTitle( 'Module', 'CGroup/' .. name ) |
||
if moduleTitle and moduleTitle.exists then |
if moduleTitle and moduleTitle.exists then |
||
local data = |
local data = mw.loadData( 'Module:CGroup/' .. name ) |
||
local pieces = {} |
local pieces = {} |
||
if data.content then |
if data.content then |
||
| Line 56: | Line 56: | ||
:attr( 'class', 'noteTA-group' ) |
:attr( 'class', 'noteTA-group' ) |
||
:wikitext( code ) ) |
:wikitext( code ) ) |
||
if args.G31 ~= nil then |
|||
code = code .. '[[Category:NoteTA模板参数使用数量超过限制的页面|G]]' |
|||
end |
|||
end |
end |
||
return code |
return code |
||
| Line 84: | Line 87: | ||
:attr( 'class', 'noteTA-local' ) |
:attr( 'class', 'noteTA-local' ) |
||
:wikitext( code ) ) |
:wikitext( code ) ) |
||
if args[31] ~= nil then |
|||
code = code .. '[[Category:NoteTA模板参数使用数量超过限制的页面|L]]' |
|||
end |
|||
end |
end |
||
return code |
return code |
||
| Line 106: | Line 112: | ||
code = frame:extensionTag{ |
code = frame:extensionTag{ |
||
name = 'indicator', |
name = 'indicator', |
||
content = '[[File:Zh conversion icon m.svg|35px|本 |
content = '[[File:Zh conversion icon m.svg|35px|本页使用了标题或全文手工转换|link=|class=skin-invert]]', |
||
args = { name = string.format( 'noteTA-%x', hash ) }, |
args = { name = string.format( 'noteTA-%x', hash ) }, |
||
} .. tostring( mw.html.create( 'div' ) |
} .. tostring( mw.html.create( 'div' ) |
||
:attr( 'id', string.format( 'noteTA-%x', hash ) ) |
:attr( 'id', string.format( 'noteTA-%x', hash ) ) |
||
:attr( 'class', 'noteTA' ) |
:attr( 'class', 'noteTA' ) |
||
:wikitext( code ) |
:wikitext( code ) ) |
||
if mw.title.getCurrentTitle():inNamespace( 'Template' ) then |
|||
) .. '[[Category:Pages using deprecated NoteTA template| ]]' |
|||
code = code .. '[[Category:放置于模板的noteTA]]' |
|||
end |
|||
end |
end |
||
return code |
return code |
||