تغییرات
پرش به ناوبری
پرش به جستجو
جزسطر ۱:
سطر ۱:
− -- برای فارسیسازی بهتر، بعضی از قسمتهای این پودمان تغییر کردهاست. لطفاً هنگام بهروزرسانی به توضیحات پودمان توجه کنید.
سطر ۳۴:
سطر ۳۳:
− +
سطر ۴۲:
سطر ۴۱:
− -- برای فارسیسازی بهتر، ساختار خطای نمایشی خط زیر تغییر کردهاست+
−
سطر ۳۱۰:
سطر ۳۰۸:
− +
سطر ۳۷۸:
سطر ۳۷۶:
− +
سطر ۴۴۷:
سطر ۴۴۵:
− +
سطر ۴۸۵:
سطر ۴۸۳:
+
+
+
سطر ۸۷۲:
سطر ۸۷۳:
− +
سطر ۹۴۳:
سطر ۹۴۴:
− +
Fix logic error
-- This module implements {{documentation}}.
-- This module implements {{documentation}}.
expectType = expectType or 'string'
expectType = expectType or 'string'
if type(msg) ~= expectType then
if type(msg) ~= expectType then
error('پیام: خطای نوع در متن cfg.' .. cfgKey .. ' (' .. expectType .. ' انتظار میرفت، ' .. type(msg) .. ' بدست آمد)', 2)
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
end
if not valArray then
if not valArray then
local function getMessageVal(match)
local function getMessageVal(match)
match = tonumber(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
return valArray[match] or error('پیام: هیچ مقداری برای کلید $' .. match .. ' در متن cfg.' .. cfgKey .. ' یافت نشد', 4)
end
end
if templateTitle.exists and sandboxTitle.exists then
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
local compareUrl = mw.uri.fullUrl(
'ویژه:مقایسهٔ صفحات',
'Special:ComparePages',
{page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
{page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
)
local testcasesTitle = env.testcasesTitle
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.namespace == mw.site.namespaces.Module.id then
if testcasesTitle.contentModel == "Scribunto" then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local links
local links
local content = args.content
local content = args.content
if not content then
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
local linksData = p.makeStartBoxLinksData(args, env)
if not title or not docTitle then
if not title or not docTitle then
return nil
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
end
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
-- for Modules, add testcases run link if exists
if subjectSpace == 828 and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
end
end
local subpagesLink = makeWikilink(
local subpagesLink = makeWikilink(
'ویژه:نمایه پیشوندی/' .. templateTitle.prefixedText .. '/',
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
message('subpages-link-display', {pagetype})
)
)