לדלג לתוכן
תפריט ראשי
תפריט ראשי
העברה לסרגל הצד
הסתרה
ניווט
עמוד ראשי
ברוכים הבאים
שינויים אחרונים
פורטלים
ערך אקראי
צור קשר/תרומה
קהילה
עזרה
ייעוץ
אולם דיונים
לוח מודעות
ספר אורחים
חב"דפדיה
חיפוש
חיפוש
מראה
יצירת חשבון
כניסה לחשבון
כלים אישיים
יצירת חשבון
כניסה לחשבון
דפים לעורכים שלא נכנסו לחשבון
מידע נוסף
תרומות
שיחה
עריכת הדף "
יחידה:TemplateTranslation
"
יחידה
שיחה
English
קריאה
עריכת קוד מקור
גרסאות קודמות
כלים
כלים
העברה לסרגל הצד
הסתרה
פעולות
קריאה
עריכת קוד מקור
גרסאות קודמות
כללי
דפים המקושרים לכאן
שינויים בדפים המקושרים
דפים מיוחדים
מידע על הדף
מראה
העברה לסרגל הצד
הסתרה
אזהרה:
אינכם מחוברים לחשבון. כתובת ה־IP שלכם תוצג בפומבי אם תבצעו עריכות כלשהן. אם
תיכנסו לחשבון
או
תיצרו חשבון
, העריכות שלכם תיוחסנה לשם המשתמש שלכם ותקבלו גם יתרונות אחרים.
בדיקת אנטי־ספאם.
אין
למלא שדה זה!
local p = {} function defaultize(args, ilist) -- set default values for output parameters local newargs = {} for _, v in ipairs(ilist) do if type(v) == 'table' and v[1] then if args[v[1]] then newargs[v[1]] = tostring(args[v[1]]) end else newargs[v] = tostring(args[v] or '') end end return newargs end function serialize(template, args, olist, options) -- convert array of output parameters to string representation local separator = '\n' if options.linear then separator = '' end local lastimplicitnumber if options.implicitnumbers then lastimplicitnumber = 0 end local out = '{{' .. template .. separator local argintro, itemintro if options.linear then argintro = '' end -- merely by convention and for convenience for _, u in ipairs(olist) do local v if type(u) == 'table' and u[1] then if args[u[1]] and args[u[1]] ~= '' then v = u[1] else v = nil end else v = u end if v and args[v] then if argintro ~= '' then itemintro = ' |' else itemintro = '|' end -- we check previous arg's whitespace and follow suit if options.implicitnumbers and type(v) == 'number' and v == lastimplicitnumber+1 then argintro = '' lastimplicitnumber = v else argintro = ' ' .. v .. ' = ' end out = out .. itemintro .. argintro .. args[v] if argintro ~= '' then out = out .. separator end end end out = out .. '}}' return out end function call(frame, name) -- does the actual transformation by using the respective submodule local submodule = require ('Module:TemplateTranslation/' .. _G.language .. '/' .. name) local template, args, result = name, {}, nil if submodule then args = defaultize(frame.args, submodule.ikeys or {}) if submodule['transform'] then result = submodule['transform'](frame, args) else result = nil end end if result then template = result[1] or template args = result[2] or args end return serialize(template, args, submodule.okeys or {}, submodule.options or {}) end local name for _, name in ipairs(_G.templates) do -- create an associative array of lambda functions, corresponding to one supported template each p[name] = function(frame) return call(frame, name) end end return p
תקציר
?
לתשומת ליבך: תרומתך לאתר חב"דפדיה תפורסם לפי תנאי הרישיון GNU Free Documentation License 1.2 (אפשר לעיין בדף
חב"דפדיה:זכויות יוצרים
לפרטים נוספים). אם אינך רוצה שעבודתך תהיה זמינה לעריכה על־ידי אחרים, שתופץ לעיני כול, ושאחרים יוכלו להעתיק ממנה תוך ציון המקור – אין לפרסם אותה פה.
כמו־כן, שמירת העריכה משמעה הבטחה שכתבת את הטקסט הזה בעצמך או העתקת אותו ממקור בנחלת הכלל (שאינו מוגבל בזכויות יוצרים) או מקור חופשי דומה.
אין לשלוח חומר מוגבל בזכויות יוצרים ללא רשות!
ביטול
עזרה בעריכה
(נפתח בחלון חדש)
הדף הבא מוכלל בדף זה:
יחידה:TemplateTranslation/תיעוד
(
עריכה
)