בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,365
רעדאגירונגען
מוטי (שמועס | ביישטייערונגען) ק (הגהה) צייכן: מאנועל צוריקשטעל |
(עבר הזמן) צייכן: אַנולירונג |
||
| (20 מיטלסטע ווערסיעס פון 5 באַניצער נישט געוויזן.) | |||
| שורה 1: | שורה 1: | ||
local Ref = {} | local Ref = {} | ||
local function hasHebrew(text) | |||
return mw.ustring.find(text, "[א-ת]") | |||
end | |||
function parseRef(frame) | function parseRef(frame) | ||
| שורה 7: | שורה 12: | ||
local refDic = {} | local refDic = {} | ||
local args = argModule.getArgs(frame) | local args = argModule.getArgs(frame) | ||
local refName = args['שם'] | local refName = args['שם'] or args['name'] or args['נאמען'] | ||
local refGroup = args['קבוצה'] | local ibid = args['דארט'] | ||
local refGroup = args['קבוצה'] or args['group'] | |||
local direction = args['כיוון'] | local direction = args['כיוון'] | ||
if direction and direction ~= 'ימין' and direction ~= 'שמאל' then | if direction and direction ~= 'ימין' and direction ~= 'שמאל' then | ||
warnings = '<span class="error">פרמטר כיוון שגוי</span>[[ | warnings = '<span class="error">פרמטר כיוון שגוי</span>[[קאטעגאריע:דפים עם שגיאות בהערה]]' | ||
end | end | ||
if args[2] then | if args[2] then | ||
warnings = '<span class="error"><sup> פרמטר שני בהערה: </sup></span>[[ | warnings = '<span class="error"><sup> פרמטר שני בהערה: </sup></span>[[קאטעגאריע:דפים עם שגיאות בהערה]]' | ||
end | end | ||
| שורה 23: | שורה 29: | ||
if text then | if text then | ||
text = frame:preprocess(args[1]) | text = frame:preprocess(args[1]) | ||
if not text == nil then text = trim(trim) end | |||
if text:match("%.%.$") then | |||
text =text:sub(1, -2) | |||
end | |||
if not text:match("[!\"'()%,%-.:;?`]$") then | |||
text = text .. "." | |||
end | |||
end | |||
if refName and #refName then refDic['name'] = refName end | if refName and #refName then refDic['name'] = refName end | ||
if ibid and #ibid then refDic['extends'] = ibid end | |||
if refGroup and #refGroup then refDic['group'] = refGroup end | if refGroup and #refGroup then refDic['group'] = refGroup end | ||
if direction and direction=='שמאל' then refDic['dir'] = 'ltr' end | if direction and direction=='שמאל' then refDic['dir'] = 'ltr' end | ||
if direction and direction=='ימין' then refDic['dir'] = 'rtl' end | if direction and direction=='ימין' then refDic['dir'] = 'rtl' end | ||
if text and not hasHebrew(text) then | |||
refDic['dir'] = 'ltr' | |||
end | |||
if text and #text>0 then | if text and #text>0 then | ||
רעדאגירונגען