| 第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 = require( 'Module:Crc32lua' ).crc32( require( 'Module:MicroJSON' ).encode_object( args ) ) | + | local hash = require( 'Module:Crc32lua' ).crc32( mw.dumpObject( args ) ) |
| | code = frame:extensionTag{ | | code = frame:extensionTag{ |
| | name = 'indicator', | | name = 'indicator', |
| | content = '[[File:Zh conversion icon m.svg|35px|本页使用了标题或全文手工转换|link=]]', | | 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 ) ) |