Modul:Cycling race: Forskelle mellem versioner

Content deleted Content added
update
m opdatering
Linje 99:
["Q29594434"] ="#87CEEB" , -- Jersey green lines volta.svg (General)
["Q30132459"] ="#FFFF99" , -- Jersey yellow-bluebar.svg (General)
["Q85230888"] ="#FFD030" , -- Jersey orange.svg (General Tour Colombia)
["Q24645209"] ="#90EE90" , -- Jersey green.svg (Points)
["Q25831179"] ="#FFFFFF" , -- Jersey white.svg (Points)
Line 136 ⟶ 137:
["Q50822370"] ="#FFC0CB" , -- Jersey red lines volta.svg (Mountain)
["Q56246573"] ="#C0C0C0" , -- Jersey black white dotted.svg (Mountain)
["Q85231689"] ="#99CBFF" , -- Jersey blue.svg (Mountain)
["Q26858731"] ="#FFFFFF" , -- Jersey white.svg (Combinated)
["Q28823004"] ="#FFFF99" , -- Jersey combined.svg (Combinated)
Line 165 ⟶ 167:
["Q56002706"] ="#87CEEB" , -- MaillotCyan.PNG (Best young)
["Q50822410"] ="#99CBFF" , -- Jersey blue lines volta.svg (Best young)
["Q85231184"] ="#FFFFFF" , -- Jersey white.svg (Best young)
["Q26953919"] ="#8FBC8F" , -- Jersey dark green.svg (Combativity)
["Q29957114"] ="#87CEEB" , -- MaillotCyan.PNG (Combativity)
Line 531 ⟶ 534:
-- local date = '+2016-05-20'
-- local mode = 'small'
local format = formats[wiki] or formats['']
 
if string.sub(date,7,8)=='00' then --manage the 30 November issue
local lang = contentLanguage
if mode=='long' then
 
if string.sub(date,7,8)=='00' then --manage the 30 November issue
 
if mode=='long' then
return lang:formatDate( "Y", date )
else
Line 574 ⟶ 581:
--=== B) Link functions ===
local function getOfficialName(teamID, timeOfRace,season) -- for team
--return officialName, isLocal
local slavicWikis = {mk = true, ru = true}
local wikiisslavic = slavicWikis[wiki]
 
local p1448 = getStatementForTime(teamID, 'P1448', timeOfRace) -- P1448 is official name
if p1448 then
Line 595 ⟶ 606:
if name then return name, true end
end
if not wikiisslavic then
return p1448.mainsnak.datavalue.value.text, false --then prefer label
end
end
local label=wikibase.getLabel(teamID)
if season and season==true then
if label then return string.sub(label,1,label:len()-5),true end --
else
return label, true -- No official name, try label
end
end
Line 2.588 ⟶ 2.601:
local function listofstagesclassification_translate(x)
local l10nDef = {
["ar"]={"لا أحد","النهائي"},
["fr"]={"non attribué","Classements finals"},
["en"]={"not attributed","Final"},
Line 2.615 ⟶ 2.629:
"الدراجين في النهاية", "متوسط السرعة", "الكلفة", "نتائج المرحلة", "الفائز", "الثاني", "الثالث", "متمرس",
"التصنيف العام بعد المرحلة", "القائد", "الثاني", "الثالث",
"التصنيفات الثانوية بعد المرحلة", "النقاط", "الجبل", "سباقات السرعة", "شاب", "تصنيف القتال", "ممتزجة", "سباقات السرعةسرعة متوسطة", "الانتظام",
"فريق", "فريق حسب النقاط", "صورة", "أسطورة", "بطاقة", "عرض الاقسام", "توثيق",
"سيما كوبي", "سيما بانتاني", "أزوري دي إيطاليا", "فوجاBreakaway", بيناريلو"الارتفاع"},
["en"] = {"Race details", "Race", "Type", "Date", "Dates", "Distance", "Country", "Countries",
"Journey origin", "Lieu d'arrivée", "Starting riders",
Line 2.923 ⟶ 2.937:
local function headoftable(x) -- En-tête du tableau listant les étapes
local l10nDef={
["ar"] = {"المرحلة", "التاريخ", "الدورة", "المسافة (كم)", "الفائز بالمرحلة", "القائد العام", "الارتفاع (م)"},
["fr"] = {"Étape", "Date", "Villes étapes", "Distance (km)", "Vainqueur d'étape", "Leader du classement général","Dénivelé (m)"},
["en"] = {"Stage", "Date", "Course", "Distance - km (mi)", "Stage winner", "Overall leader","Elevation (m)"},
Line 2.960 ⟶ 2.974:
local function headoftableII(x) -- En-têtes des tableaux générant les classements
local l10nDef = {
["ar"] = {"العداء", "البلد", "الفريق", "الوقت", "إزاحة الوقت", "السرعة", "النقاط", "تصنيف الفرق ضد الساعة", "التصنيف العام", "تصنيف النقاط", "تصنيف الجبال", "تصنيف أفضل عداء", "تصنيف أفضل شاب", "تصنيف الفرق حسب الوقت", "ترتيب الفرق حسب النقاط", "تصنيف المجموعة", "تصنيف أفضل مقاتل", "التصنيف تحت 23","UCIتصنيف RankingUCI"},
["fr"] = {"Coureur", "Pays", "Équipe", "Temps", "Écart de temps", "Vitesse moy.", "Points", "Classement de l'étape", "Classement général", "Classement par points", "Classement de la montagne", "Classement des sprints", "Classement du meilleur jeune", "Classement par équipes", "Classement par équipes aux points", "Classement du combiné", "Classement de la combativité", "Classement du meilleur jeune", "Classement UCI"},
["en"] = {"Rider", "Country", "Team", "Time", "Time Gap", "Speed", "Points", "Stage classification", "General classification", "Points classification", "Mountains classification", "Sprints classification", "Best young classification", "Teams classification", "Points classification for teams", "Combination classification", "Combative classification", "U23 classification", "UCI Ranking"},
Line 2.990 ⟶ 3.004:
local function headoftableIII(x) -- En-tête du tableau listant les équipes participantes (P1923)
local l10nDef = {
["ar"] = {"اسم الفريق", "البلد", "الرمز", "فريق عالمي", "فرق عالمية", "فريق برو", "فرق برو", "فريق قاري محترف", "فرق قارية محترفة", "فريق قاري", "فرق قارية", "فريق وطني", "فرق وطنية", "فريق إقليمي ونادي", "فرق إقليمية وأندية", "فريق دراجات محترف", "فرق دراجات محترفة", "فريق هواة دراجات", "فرق هواة دراجات", "مجموعة رياضية أولى", "مجموعات رياضية أولى", "مجموعة رياضية ثانية", "مجموعات رياضية ثانية", "مجموعة رياضية ثالثة", "مجموعات رياضية ثالثة", "فريق مختلط", "فرق مختلطة", "فريق إناث محترف", "فرق إناث محترفة", "فريق هواة دراجات إناث", "فرق هواة دراجات إناث هواة"},
["fr"] = {"Nom de l'équipe", "Pays", "Code", "WorldTeam", "WorldTeams", "ProTeam", "ProTeams", "Équipe continentale professionnelle", "Équipes continentales professionnelles", "Équipe continentale", "Équipes continentales", "Équipe nationale", "Équipes nationales", "Équipe régionale et de club", "Équipes régionales et de clubs", "Équipe cycliste professionnelle", "Équipes cyclistes professionnelles", "Équipe cycliste amateur", "Équipes cyclistes amateurs", "Groupe sportif I", "Groupes sportifs I", "Groupe sportif II", "Groupes sportifs II", "Groupe sportif III", "Groupes sportifs III", "Équipe mixte", "Équipes mixtes", "Équipe féminine professionnelle", "Équipes féminines professionnelles", "Équipe cycliste amateur féminine", "Équipe cycliste amateur féminines"},
["en"] = {"Team name", "Country", "Code", "WorldTeam", "WorldTeams", "ProTeam", "ProTeams", "Professional continental team", "Professional continental teams", "Continental team", "Continental teams", "National team", "National teams", "Regional and club team", "Regional and club teams", "Professional cycling team", "Professional cycling teams", "Amateur cycling team", "Amateur cycling teams", "Trade Team I", "Trade Teams I", "Trade Team II", "Trade Teams II", "Trade Team III", "Trade Teams III", "Mixed team", "Mixed teams", "Professional woman team", "Professional women teams", "Women's amateur cycling team", "Women's amateur cycling teams"},
Line 3.022 ⟶ 3.036:
local function listofwinners_translate(x) -- En-tête du tableau du palmarès d'une course cycliste
local l10nDef = {
["ar"] = {"السنة", "الفائز", "الثاني", "الثالث","النقاط", "الجبال", "سباقات السرعة", "شاب", "تصنيف القتال", "ممتزجة", "الفرق","سباقات سرعة متوسطة", "انتظام", "نقاط الفريق", "Breakaway", "أزوري دي إيطاليا", "صاعد","الهواة","الجنسية"},
["ar"] = {"السنة", "الفائز", "الثاني", "الثالث"},
["fr"] = {"Année", "Vainqueur", "Deuxième", "Troisième","Classement par points", "Meilleur grimpeur", "Meilleur sprinteur", "Meilleur jeune", "Super-combatif", "Meilleur au combiné", "Meilleure équipe","Étapes volantes", "Régularité", "Meilleure équipe aux points",
"Fuga", "Azzurri d'Italia", "Néophyte", "Amateur","Nationalité"},
Line 3.536 ⟶ 3.550:
end
end
if notwiki == "ar" and calendarID then== return"" and ( frame.args["test"] endor frame.args.test) then
calendarID = frame.args["test"] or frame.args.test
end
if not calendarID or calendarID == "" then return "" end
if display_code == 1 then
tempdic=tempdic1
Line 4.343 ⟶ 4.360:
local raceID = frame.args[1]
local teams = {} -- values will be {teamLink, teamCat, sortkey, index}
local WDlink_on = (wiki == "mk" or wiki == "ja")
 
local timeOfRace, errorMessage = gettimeOfRace(raceID)
Line 5.265 ⟶ 5.283:
local wikiisslavic = slavicWikis[wiki]
local WDlink_on = wiki == "mk" or wiki == "ja" or wiki == "ru" or wiki == "he"
local itableEndText = 1''
 
 
local function getreason(riderReason, riderRef, p527)
Line 5.487 ⟶ 5.507:
date1 = trans(date1,'01','01')
_, _, y1, m1, d1 = string.find(date1, "(%d+)-(%d+)-(%d+)")
if y1==nil then y1='2040' errorbool=2 end
if v.qualifiers and v.qualifiers["P582"] and v.qualifiers["P582"][1].snaktype == 'value' then
date2temp=v.qualifiers["P582"][1].datavalue.value.time
date2=date2temp
else
if y1==nil then y1='2040' errorbool=2 end
date2='+'..y1..'-12-31T00:00:00Z'
end
Line 5.573 ⟶ 5.593:
local temp
local iii = 1
for _i, v in pairs (riderTable) do
local i = 1
for _, v in pairs (riderTable) do
sortkey=v[1]
riderName=v[2]
Line 5.603 ⟶ 5.622:
if wiki == "ar" then note = '، [[#tr_'..i..frame.args[1]..'|'..getSquadTableColumn(4)..']]' end
end
local temp
tCell:wikitext( ' ('..riderStart..'–'..riderEnd.. (riderPosition or '')..note..')')
if riderStart~=nil and riderEnd~=nil then
tCell:wikitext( temp=' ('..riderStart..'–'..riderEnd.. (riderPosition or '')..note..')')
elseif riderStart~=nil then
temp=' ('..riderStart..'–'..(riderPosition or '')..note..')'
else
temp=' ('..'–'..(riderPosition or '')..note..')'
end
outputTabletCell:wikitext('<br>'temp)
elseif riderReason then
tCell:tag('span'):cssText("font-size:80%; color:#686868")
Line 5.634 ⟶ 5.661:
tCell:wikitext(riderTeam.. timeTeam..errortext)
end
--tableEndText is not a table
 
if riderReason ~= nil or errortext ~= '' then
local temp=errortext
Line 5.643 ⟶ 5.670:
end
if iii == 1 then
outputTable:wikitext(tableEndText = tableEndText.. getSquadTableColumn(5)..': '.. riderName.. temp)
else
tableEndText = tableEndText.. '<span style="color:white">'.. getSquadTableColumn(5)..': </span>'.. riderName.. temp
outputTable:tag('span'):css('color','white')
:wikitext(getSquadTableColumn(5))
outputTable:wikitext(riderName.. temp)
end
iii = iii + 1
if riderRef ~= nil then tableEndText = tableEndText..
local tRef=frame:extensionTag{name='ref', content=riderRef, args = {name='tr_'..iiii..frame.args[1]}} end
tableEndText = tableEndText.. '<br>'
outputTable:node(tRef)
end
outputTable:wikitext('<br>')
end
end
Line 5.665 ⟶ 5.688:
UCIlink="https://www.uci.org/road/teams"
end
 
outputTable:tag('tr'):tag('td'):addClass("navigation-only")
:attr('data-sort-value','zz')
Line 5.676 ⟶ 5.699:
:tag('small'):wikitext(race_reference_translate(wiki, 1).."["..UCIlink..' UCI]')
return tostring(outputTable)..tableEndText
end
 
Line 6.098 ⟶ 6.121:
return table_first .. tostring(tTitleRow) .. table_center
elseif beginyear > 0 then
return table_center .. table_last"</table>"
else
return table_first .. tostring(tTitleRow) .. table_center .. "</table>"
Line 6.960 ⟶ 6.983:
local countryID = p27.mainsnak.datavalue.value.id
if countryID then
if wiki =~= "ar" then
riderLink = flag(countryID, timeOfRace) ..' '..riderLink.. ucicodeCountry(countryID)
riderLink = riderLink .. ucicodeCountry(countryID)
if wiki == "ar" then
riderLink = flag(countryID, timeOfRace) ..' '..riderLink
end
riderLink = flag(countryID, timeOfRace) ..' '.. riderLink.. ucicodeCountry(countryID)
end
end