پودمان:Labelled list hatnote: تفاوت میان نسخه‌ها

جز
تکمیل به‌روزرسانی (جزئی)
جز (۱ نسخه واردشده)
جز (تکمیل به‌روزرسانی (جزئی))
خط ۱۴: خط ۱۴:
-- Defaults global to this module
-- Defaults global to this module
local defaults = {
local defaults = {
label = 'See also', --Final fallback for label argument
label = 'همچنین نگاه کنید به', --Final fallback for label argument
labelForm = '%s: %s',
labelForm = '%s: %s',
prefixes = {'label', 'label ', 'l'},
prefixes = {'label', 'label ', 'l'},
خط ۳۵: خط ۳۵:
end
end
local page = display and
local page = display and
string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v
mw.ustring.format('%s|%s', mw.ustring.gsub(v, '|.*$', ''), display) or v
pages[#pages + 1] = page
pages[#pages + 1] = page
end
end
خط ۶۹: خط ۶۹:
if #pages == 0 then
if #pages == 0 then
return mHatnote.makeWikitextError(
return mHatnote.makeWikitextError(
'no page names specified',
'نام صفحه مشخص نشده‌است',
(options.template or defaults.template) .. '#Errors',
(options.template or defaults.template) .. '#خطاها',
options.category
options.category
)
)
خط ۸۵: خط ۸۵:
end
end
end
end
local text = string.format(
local text = mw.ustring.format(
options.labelForm or defaults.labelForm,
options.labelForm or defaults.labelForm,
label,
label,
کاربر ناشناس