更改

添加46字节 、 2022年7月11日 (一) 18:56
导入41个版本
第22行: 第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 = require( 'Module:CGroup/' .. name )
+
local data = mw.loadData( 'Module:CGroup/' .. name )
 
local pieces = {}
 
local pieces = {}
 
if data.content then
 
if data.content then
第109行: 第109行:  
local code = Tc .. Gc .. Lc
 
local code = Tc .. Gc .. Lc
 
if code ~= '' then
 
if code ~= '' then
local hash = code:len()
+
local hash = require( 'Module:Crc32lua' ).crc32( mw.dumpObject( args ) )
code = frame:expandTemplate{
+
code = frame:extensionTag{
title = 'topicon',
+
name = 'indicator',
args = {
+
content = '[[File:Zh conversion icon m.svg|35px| 本页使用了标题或全文手工转换|link=]]',
id = 'noteTA-topicon-' .. hash,
+
args = { name = string.format( 'noteTA-%x', hash ) },
image = 'Zh conversion icon m.svg',
  −
alt = ' 本页使用了标题或全文手工转换',
  −
link = '',
  −
size = '30px',
  −
},
   
} .. tostring( mw.html.create( 'div' )
 
} .. tostring( mw.html.create( 'div' )
:attr( 'id', 'noteTA-' .. hash )
+
:attr( 'id', string.format( 'noteTA-%x', hash ) )
 
:attr( 'class', 'noteTA' )
 
:attr( 'class', 'noteTA' )
 
:wikitext( code ) )
 
:wikitext( code ) )