Line 5: |
Line 5: |
| local mMessageBox = require('Module:Message box') | | local mMessageBox = require('Module:Message box') |
| local TNT = require('Module:TNT') | | local TNT = require('Module:TNT') |
− | local lang = mw.getCurrentFrame():preprocess('{{int:lang}}')
| |
| | | |
| local p = {} | | local p = {} |
| | | |
| local function format(msg, ...) | | local function format(msg, ...) |
− | return TNT.formatInLanguage(lang, 'I18n/Uses TemplateStyles', msg, ...) | + | return TNT.format('I18n/Uses TemplateStyles', msg, ...) |
| end | | end |
| | | |
Line 29: |
Line 28: |
| end | | end |
| | | |
− | function p._main(args) | + | function p._main(args, cfg) |
| local tStyles = mTableTools.compressSparseArray(args) | | local tStyles = mTableTools.compressSparseArray(args) |
| local box = p.renderBox(tStyles) | | local box = p.renderBox(tStyles) |
Line 98: |
Line 97: |
| local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil | | local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil |
| if cfg['protection_conflict_category'] and tsProt ~= currentProt and not addedLevelCat then | | if cfg['protection_conflict_category'] and tsProt ~= currentProt and not addedLevelCat then |
| + | addedLevelCat = true |
| cats[#cats + 1] = cfg['protection_conflict_category'] | | cats[#cats + 1] = cfg['protection_conflict_category'] |
| end | | end |