پودمان:For: تفاوت میان نسخه‌ها

۱۶۸ بایت اضافه‌شده ،  ‏۳۰ دسامبر ۲۰۲۱
جز
۱ نسخه واردشده
(don't add talk pages and pages in the user namespace to Category:Hatnote templates with errors – this is similar to Module:Other uses of and Module:Hatnote)
 
جز (۱ نسخه واردشده)
 
(۲ نسخهٔ میانی ویرایش شده توسط ۲ کاربر نشان داده نشد)
خط ۱۷: خط ۱۷:
if (not use) then
if (not use) then
return mHatnote.makeWikitextError(
return mHatnote.makeWikitextError(
'no context parameter provided. Use {{other uses}} for "other uses" hatnotes.',
'پارامتر زمینه ارائه نشده‌است. برای پیغام «دیگر کاربردها» از الگوی {{دیگر کاربردها}} استفاده کنید.',
'Template:For#Errors',
'الگو:برای',
args.category
args.category
)
)
خط ۲۷: خط ۲۷:
local title = mw.title.getCurrentTitle()
local title = mw.title.getCurrentTitle()
local skipCat = title.isTalkPage or title.namespace == 2 --don't categorise talk pages and userspace
local skipCat = title.isTalkPage or title.namespace == 2 --don't categorise talk pages and userspace
local oddCat = skipCat and '' or '[[Category:Hatnote templates using unusual parameters]]'
local oddCat = skipCat and '' or '[[رده:الگو:سرنویس که از پارامترهای غیر معمول استفاده می‌کند]]'
local category = yesNo(args.category)
local category = yesNo(args.category)
return mHatnote._hatnote(
return mHatnote._hatnote(
خط ۳۳: خط ۳۳:
{selfref = args.selfref}
{selfref = args.selfref}
) .. (
) .. (
(use == 'other uses') and ((category == true) or (category == nil)) and
(use == 'دیگر کاربردها') and ((category == true) or (category == nil)) and
oddCat or ''
oddCat or ''
)
)
۴۱۵٬۰۷۸

ویرایش