وحدة:Navseasoncats/ملعب: الفرق بين النسختين

[نسخة منشورة][نسخة منشورة]
تم حذف المحتوى تمت إضافة المحتوى
طلا ملخص تعديل
طلا ملخص تعديل
سطر 6:
local testcasecolon = ''
local testcases = (currtitle.subpageText == 'testcases')
if testcases then testcasecolon = ':' end
local navborder = true
local misctrackingcats = {
سطر 58:
--Used by all nav*().
function catlink( catname, displaytext )
--mw.log("catname:'" .. catname .. "',displaytext:'" .. displaytext .. "'")
catname = mw.text.trim(catname or '')
displaytext = mw.text.trim(displaytext or '')
سطر 172:
--[[ Formerly separated templates/modules ]]
--[[==========================================================================]]
 
 
--[[============================={{ navyear }}==============================]]
السطر 315 ⟵ 314:
return navy..'|}'
end
 
 
--[[============================{{ navdecade }}=============================]]
السطر 504 ⟵ 502:
return navd..'|}'
end
 
 
--[[============================{{ navhyphen }}=============================]]
السطر 702 ⟵ 699:
return navh..'|}'
end
 
 
--[[============================{{ navordinal }}============================]]
 
 
function navordinal( firstpart, ord, lastpart, minimumord, maximumord , keykey )
السطر 716 ⟵ 711:
local temporal = string.match(firstpart, 'القرن') or -- century
string.match(firstpart, 'الألفية') -- millennium
mw.log("minimumordkeykey:'" .. (minimumordkeykey or "") .. "'")
mw.log("maximumord:'" .. (maximumord or "") .. "'" )
mw.log("ord:'" .. ord .. "'")
mw.log("lastpart:'" .. (lastpart or "") .. "'")
mw.log("firstpart:'" ..(firstpart or "") .. "'")
mw.log("temporal:'" .. (temporal or "") .. "'")
local tspace = ' ' --assume a trailing space after ordinal
السطر 734 ⟵ 725:
-- "1st-century BC" format
--local lastpartNoBC = mw.ustring.gsub(lastpart, '%sBC?', '') --easier than splitting lastpart up in 2; AD never used
local lastpartNoBC = mw.ustring.gsub(lastpart, '%sق م?' , '') --easier than splitting lastpart up in 2; AD never used
local BCe = parentBC or ''
local BCe = parentBC or 'ق م'
local switchADBC = 1 -- 1=AD parent
if parentBC then switchADBC = -1 end -- -1=BC parent; possibly adjusted later
السطر 776 ⟵ 767:
if switchADBC == -1 then --parentBC looking at the BC side
if o >= 1 then --the common case
BC = ' ' .. BCe
elseif o == 0 then --switch to the AD side
BC = ''
السطر 808 ⟵ 799:
end
navo = navo..'*'..catlink(
--string.gsub( ccccat, "ق م" ,"" )
ccccat
,'القرن '.. oth .. BCdisp )..'\n'
else
navo = navo..hidden
السطر 816 ⟵ 807:
elseif BC == '' and minord <= osign and osign <= maxord then --e.g. >= "1st parliament"
navo = navo..'*'..catlink( ccccat
, 'القرن '.. oth )..'\n'
else --either out-of-range (hide), or non-temporal + BC = something might be wrong (2nd X parliament BC?); handle exceptions if/as they arise
navo = navo..hidden