「モジュール:String」の版間の差分

en:Module:String oldid=970815276 より更新
bsd>RexxS
(separate annotations for str.match from those for str._match)
bsd>ネイ
(en:Module:String oldid=970815276 より更新)
15行目: 15行目:
     error_category: If an error occurs, specifies the name of a category to
     error_category: If an error occurs, specifies the name of a category to
         include with the error message.  The default category is
         include with the error message.  The default category is
         [Category:Errors reported by Module String].
         [Category:モジュールStringのエラー].


     no_category: If set to 'true' or 1, no category will be added if an error
     no_category: If set to 'true' or 1, no category will be added if an error
540行目: 540行目:
function str._error( error_str )
function str._error( error_str )
local frame = mw.getCurrentFrame()
local frame = mw.getCurrentFrame()
local error_category = frame.args.error_category or 'Errors reported by Module String'
local error_category = frame.args.error_category or 'モジュールStringのエラー'
local ignore_errors = frame.args.ignore_errors or false
local ignore_errors = frame.args.ignore_errors or false
local no_category = frame.args.no_category or false
local no_category = frame.args.no_category or false
548行目: 548行目:
end
end


local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>'
local error_str = '<strong class="error">モジュールStringのエラー: ' .. error_str .. '</strong>'
if error_category ~= '' and not str._getBoolean( no_category ) then
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str
error_str = '[[Category:' .. error_category .. ']]' .. error_str
匿名利用者