جز
بدون خلاصۀ ویرایش
جز (۱ نسخه واردشده) |
fa.wikipedia>Jeeputer جزبدون خلاصۀ ویرایش |
||
خط ۲۱: | خط ۲۱: | ||
local display = args['label ' .. k] or args['l' .. k] | local display = args['label ' .. k] or args['l' .. k] | ||
local page = display and | local page = display and | ||
mw.ustring.format('%s|%s', mw.ustring.gsub(v, '|.*$', ''), display) or v | |||
pages[#pages + 1] = page | pages[#pages + 1] = page | ||
end | end | ||
خط ۴۳: | خط ۴۳: | ||
local currentTitle = mw.title.getCurrentTitle() | local currentTitle = mw.title.getCurrentTitle() | ||
if #args == 0 then args = {currentTitle.text} end | if #args == 0 then args = {currentTitle.text} end | ||
local firstPage = | local firstPage = mw.ustring.gsub(args[1], '|.*$', '') | ||
-- Find the pagetype. | -- Find the pagetype. | ||
local pageType = mHatnote.findNamespaceId(firstPage) == 0 and 'مقالهٔ' or 'صفحهٔ' | local pageType = mHatnote.findNamespaceId(firstPage) == 0 and 'مقالهٔ' or 'صفحهٔ' | ||
خط ۵۴: | خط ۵۴: | ||
if (curNs == 14) or (curNs == 15) then --category/talk namespaces | if (curNs == 14) or (curNs == 15) then --category/talk namespaces | ||
mainForm = isPlural and | mainForm = isPlural and | ||
' | '%sهای اصلی این [[راهنما:رده|رده]]، %s هستند.' | ||
or | or | ||
' | '%s اصلی این [[راهنما:رده|رده]]، %s است.' | ||
else | else | ||
mainForm = isPlural and '%s اصلی: %s' or '%s اصلی: %s' | mainForm = isPlural and '%s اصلی: %s' or '%s اصلی: %s' | ||
end | end | ||
local text = | local text = mw.ustring.format(mainForm, pageType, list) | ||
-- Process the options and pass the text to the _rellink function in | -- Process the options and pass the text to the _rellink function in | ||
-- [[Module:Hatnote]]. | -- [[Module:Hatnote]]. |