更改

添加92字节 、 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:extensionTag{
 
code = frame:extensionTag{
title = 'indicator',
+
name = 'indicator',
content = '[[File:Zh conversion icon m.svg|35px|本页使用了标题或全文手工转换]]',
+
content = '[[File:Zh conversion icon m.svg|35px|本页使用了标题或全文手工转换|link=]]',
args = { name = 'noteTA-' .. hash },
+
args = { name = string.format( 'noteTA-%x', hash ) },
 
} .. 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 ) )