Module talk:Cycling race

Active discussions

See also:

There is no automatic archiving set up for this talk page.

test the moduleEdit

Converted tableA to use MW HTML libraryEdit

Hello, I converted tableA function to use HTML_library. I think it made the function more readable. I think it does not take too much resources. Learning it took not that much time and you can mix this API with plain HTML. I propose to use this more in this module. --Papuass (talk) 16:09, 11 December 2019 (UTC)

This will not have a huge impact of how the module works, but it will make easier to work with code and ensure that all tables look the same (right now they do not). I think this was one of reasons why enwiki decided to stop using it. --Papuass (talk) 11:34, 12 December 2019 (UTC)
Hello, it is true that the output of the module right now looks like <td><th>blabla</td></th>, which is less readable than | ||blabla. However with some HTML, it will look like the first, I suppose. I will read it and maybe make a try, but I am not convinced it will solve the readability problem. Psemdel (talk) 10:05, 27 December 2019 (UTC)
here an example of such coding. Psemdel (talk) 10:12, 27 December 2019 (UTC)
I know it is not a complete solution, but at least it makes it easier to not forget to close some HTML tags. --Papuass (talk) 10:35, 27 December 2019 (UTC)
I cannot read sorry, I thought you wanted it to be done. It was a good idea, it is quite clear now. Psemdel (talk) 12:43, 31 December 2019 (UTC)
  Done I will try on new_classification. Psemdel (talk) 16:44, 31 December 2019 (UTC)

  Done I did it for all functions. I also tried to make the code better. I suppose, we can still improve by looking for code written twice. There can still be some typo here and there. Psemdel (talk) 17:56, 6 January 2020 (UTC)

Great job, that made code a bit smaller and now it is easier to improve. --Papuass (talk) 08:42, 7 January 2020 (UTC)

UCI ProTeamEdit

In connection with the change in the status of teams, he created another Pro Team (Q78464255). When the name of the World Teams changed, we indicated both the old and the new. Until the season has begun and the team seasons for 2020 have been created:

  • Q20638319 UCI ProTeam (2005-2014) — current UCI WorldTeam (2015–.....) (Q6154783)
  • Q78464255 UCI ProTeam (2019-.....) — former, ex-UCI ProContinental Team (2005-2019) (Q382927)

And add to the module if we use. Only a big request with separate (new) values from the translation (transcription) local function headoftableIII(x), and not use the ones already there. For ru-wiki, I made them all hyperlinks so that they lead to the necessary article about the status of the team. — GAN (talk) 13:51, 14 December 2019 (UTC)

I created UCI Women’s WorldTeam (Q80425135), I hope it was not already there. Psemdel (talk) 11:08, 31 December 2019 (UTC)
Psemdel, je suis paumé là pour le coup. Par exemple, je voudrais afficher dans l'infobox pour Saison 2005 de l'équipe cycliste MrBookmaker-Sports Tech la notion d'équipe continentale professionnelle et non UCI ProTeam. Car actuellement c'est anachronique. Maintenant on a 3 éléments wikidata qui s'appelle UCI ProTeam, c'est très complexe à comprendre. Bordurie (talk) 19:33, 3 January 2020 (UTC)
@Bordurie:, j'avoue que là l'UCI s'est surpassé! L'idée de GAN, c'est que ce n'est pas la catégorie qui a changé de nom, mais une nouvelle catégorie. Autrement dit, il faut changer tous les items des équipes conti. Psemdel (talk) 15:09, 4 January 2020 (UTC)
@Psemdel: So can you update the code in order to when the team have Q78464255 (if no articles created here) use the link for Q382927? Due here at Q382927 all wikis have article to UCI Pro Continental and UCI ProTeam. Repf72 (talk) 01:56, 9 January 2020 (UTC)
Yes, it can be done. Psemdel (talk) 20:27, 9 January 2020 (UTC)

Reuse of code at Danish WikipediaEdit

For your information: I have copied some code from the module to other modules at dawiki. The iterator statements and the functions getStatementForTime and flag is used in da:Modul:Flag. The table flags is used in da:Modul:Flag/data.

I used these modules in another little module da:Modul:Wikidata løbshistorie which creates a child infobox with history data for races: First edition, Editions, First winner, Most wins, Most recent. You may want to look at it for inspiration or your own use. If you have any questions I will try to help. --Dipsacus fullonum (talk) 22:58, 19 January 2020 (UTC)

On WP:fr we have also something similar: fr:Module:Infobox/Descriptif course cycliste2 (probably not so well coded as you do). Psemdel (talk) 13:12, 9 February 2020 (UTC)

Propolsal: Move tables of constants to separate data module(s)Edit

I propose that all large tables with only constant strings, numbers and boolean values are moved into one or two data modules. This will be all the l10nDef and other translation tables, the flags table, the jersey and jersey color tables, the classes tables, the formats table, the blacklist tables, the UCI tables for the calendar and maybe other tables.

The data modules can then be loaded into Module:Cycling race with the mw.loadData function which will mean that the tables will only be loaded and parsed once for each page instead for as now in every use of {{#invoke:}}.

You could put all data into one data module, but I think two might be better: Module:Cycling race/data for data which are used by all users, and Module:Cycling race/l10n for localization data. You could then save more memory by removing the localization data for all other languages than your own and only make localization updates at your local wiki. That have obvious advantages, but may also make maintenance harder when new functionality is added or changed. I think both solutions will give significant faster loading of pages which have many tables made by different parts of the module. I would to hear your opinions about this. --Dipsacus fullonum (talk) 00:56, 21 January 2020 (UTC)

I would support that but I am interested in suggestions how to ensure that all modules are copied to other wikis. This would also allow to keep only relevant translations on every wiki (one of problems enwiki users indicated when they decided to remove this module). --Papuass (talk) 19:22, 21 January 2020 (UTC)
I have considered the translations more. I think it is necessary to keep all translations to all languages here at Wikidata. Otherwise it would be too much trouble when new texts to be translated are made. But that doesn't mean that every wiki needs to have all the translations. You could remove the unneeded translations when you copy the module from Wikidata to your local wiki. To test the possibilities I made a small module in a sandbox in da:Modul:Sandkasse/Dipsacus fullonum/Modul:Sandkasse (permanent link to current verson). It is rather crude and may not work correctly, but shows the idea. It is used at da:User:Dipsacus fullonum/sandkasse/skabelon. --Dipsacus fullonum (talk) 13:16, 22 January 2020 (UTC)
You already make this offer a few time ago. At that point, I was quite sceptic, because we lose the "everything is updated at once" that mentioned Papuass. However, I am ready to change my mind as:
  • A big critic that we get all the time about this code, is that it is too long (for sure). Most of the lines are however those "data".
  • You explain, it would save memory. There, I trust your good computer science knowledge.
  • 2 years ago, the code changed all the time, requiring an easy update step. Now, I think the code has reached a mature state. I don't have idea for new functions. We improved the structure this winter, to make it more clear. I expect (hope) the number of updates to decrease quite significantly in this year. Psemdel (talk) 13:40, 9 February 2020 (UTC)
The amount of data will be the same, so it not save memory as such. It will make pages load faster if they have many templates which use Module:Cycling race because it takes considerable time to create and initialise tables in lua, and that will only be done once if the data is in a separate data module. --Dipsacus fullonum (talk) 18:20, 9 February 2020 (UTC)
I started some experiment, but it needs some work. Psemdel (talk) 16:44, 29 March 2020 (UTC)
In details, I made a Module like that [[1]], I call it in [[2]] with
local l10n = mw.loadData("Module:Psemdel2")

but it sends me an error " data for mw.loadData contains unsupported data type 'function'." Any idea? Psemdel (talk) 20:05, 29 March 2020 (UTC)

@Psemdel: The error message in very clear. As described in the manual data loaded with the mw.loadData function may not contain functions but only constants (strings, numbers, booleans and tables). So only the tables and data can be moved to a data module, while the functions using the data cannot. I suggest making a generic translate function which takes a table of translations as one of its arguments. The data module may look like this
return
{
  startlist = {"Liste des participants", "Num", "Coureur","Pos","Directeur sportif :", "AB", "HD", "NP", "DQ", "route", "chrono", "et", "sans équipe", "afficher", "masquer" }

  startlisttable = {"Liste des participants", "Num", "Coureur", "Équipe", "Pos" }

  race_reference = {"Source : ", "Sources : " }
}
It can then be used like this:
local l10n = mw.loadData("Module:Psemdel2")
local function translate(translations, index)
	return translations[index]
end

local translated_text = translate(l10n.startlist, 5) .. translate(l10n.startlisttable, 3)
  .. translate(l10n.race_reference, 1) .. 'etc.'
--Dipsacus fullonum (talk) 20:59, 29 March 2020 (UTC)
PS. The translate function can even be obmitted:
local l10n = mw.loadData("Module:Psemdel2")
local function translate(translations, index)
	return translations[index]
end

local translated_text = l10n.startlist[5] .. l10n.startlisttable[3]
  .. l10n.race_reference[1] .. 'etc.'
But then error handling may be harder. --Dipsacus fullonum (talk) 21:05, 29 March 2020 (UTC)
I can read now, sorry, without example in the doc, it is always difficult to understand how it works/should work. I will work further when I have some time. Psemdel (talk) 06:45, 30 March 2020 (UTC)
  Done Psemdel (talk) 13:29, 31 March 2020 (UTC)

Adaptation for french wikinewsEdit

Hi,

Could someone adapt that module for french wikinews. There are two changes to make :

  • Color of tables for french wikinews should be #BCE1FF instead of #FFDF80
  • Links to others articles should not use [[ ... | ... ]] but {{w| ... | ... }}

Thanks --Mattho69 (talk) 20:02, 8 March 2020 (UTC)

@Mattho69: We don't do wikinews here. And why the second point? Psemdel (talk) 11:08, 22 March 2020 (UTC)

We need a new item "postponed" when a cycling race is postponedEdit

Hi Guys. I'm checking Kit to translate but I didn't find an item when a cycling race is POSTPONED (not cancelled at all) to another date. This item is important because Giro de Italia 2020 was postponed (not cancelled) and I need show that caption within /listofwinners to Giro de Italia list of winners by year, but I need add an item within the property winner when the race was postponed. Does anyone agreeing with me? Let me know. Thanks! --Douglasfugazi (talk) 01:18, 14 March 2020 (UTC)

Ok Psemdel (talk) 11:07, 22 March 2020 (UTC)

New bib (like jersey)Edit

Hello,

I have create a bib for team's classification Q87718074, but the background color of listofstagesclassification don't change from white to the same yellow of yellow jersey (general classification). Can you do it ?

Thanks, AirSThib (talk), the 16:05, 14 March 2020 (UTC).

1. This jersey is already there. Wikidata:WikiProject Cycling/Kit to translate/Jerseys. All of them without the phrase "leader after the stage."
2. The holder of a jersey with a color number is not highlighted by the module.

GAN (talk) 16:25, 14 March 2020 (UTC)

@GAN: Thanks for your answer ; I haven't see this item. So I have highlighted the column and it's a success ! Thanks, AirSThib (talk), the 16:43, 14 March 2020 (UTC).

30th NovemberEdit

Just for info, I found out why there is/was the 30th November bug. For recalling, in wikidata there is let's say 2013 and the date is displayed 30 November 2012 :/. In fact, it happens if the month is "00" (instead of "01") and the day also "00". Psemdel (talk) 11:12, 22 March 2020 (UTC)

@Psemdel: I that case the real bug is that the precision field of the date value isn't tested. If the precision is "year", the values for month and day may be 0 or any other value and should never have been used. --Dipsacus fullonum (talk) 22:39, 26 March 2020 (UTC)
I agree, that the bug was on our side. I implemented a test to see if month is 00. Maybe a test with the property precision would be better. Don't hesitate to modify. Psemdel (talk) 18:47, 31 March 2020 (UTC)
I just found the code and I will modify it. Dates are often encoded as "YYYY-00-00" when the precision is year, but month and day can be any values so test for the value '00' isn't adequate. --Dipsacus fullonum (talk) 21:28, 31 March 2020 (UTC)

UnitTestsEdit

To handle previous issue and improve the reliability of the module, especially concerning names, I introduced some UnitTests: Module:Cycling race/Test, results are in the discussion page. So we can test the small functions separately. More tests should be implemented. Of course for the big functions, it won't work, but still it is an improvement. Psemdel (talk) 12:02, 26 March 2020 (UTC)

Without parameter?Edit

Is it possible to change this module so that it also works without a q-value as parameter? Then it would use the q-value for the page it is included on.--Pirker (talk) 16:58, 9 July 2020 (UTC)

The infobox work according this principle. It is less flexible, as you cannot display on a page information from another page: for instance the stages of a Tour. You can have a look here: [3], [4]. I cannot say exactly which part of the code do that. Psemdel (talk) 11:44, 28 October 2020 (UTC)

RaceidEdit

Hi! Anyone know how to get a proper ProCyclingStats race ID at PCS's website? I created Q98148687 but couldn't find "raceid" at their website as typical link there is like https://www.procyclingstats.com/race/puchar-ministra-obrony-narodowej/2020 ([5]). 99kerob (talk) 14:42, 8 August 2020 (UTC)

The 'instance of' property is being overusedEdit

Please see Wikidata talk:WikiProject Cycling#The 'instance of' property is being overused. I've started a discussion there which would heavily affect this module. –IagoQnsi (talk) 01:28, 13 August 2020 (UTC)

I see it now. So to sum up:
Current Proposed
instance of (P31) Amstel Gold Race (Q478174)
instance of (P31) UCI 1.UWT (Q22231106)
instance of (P31) cycling race (Q15091377)
sports season of league or competition (P3450) Amstel Gold Race (Q478174)
competition class (P2094) UCI 1.UWT (Q22231106)

It seems reasonable to me. What is your opinion on the topic? Psemdel (talk) 15:45, 22 October 2020 (UTC) Inventar of the things to change in the module then:

  • raceLink, insert P3450
  • getMainRaceLink, insert P2094 and P3450
  • fn_race, for UCI test insert P3450
  • fn_getClassInfo, to be rewritten in accordance with fn_race.
  • maybe nationalchampionships_main
  • stageinfobox, insert P3450
  • infobox, insert P3450

For Infobox on WP:fr :

  • Module:Infobox/Cycliste, no change
  • Module:Infobox/Descriptif course cycliste2, use P279 for the class, it should be harmonized.
I implemented the feature in the module. If we decide to use other properties, the change won't be long... Psemdel (talk) 13:14, 23 October 2020 (UTC)

In all rationality, the "teamCats" (UCI World Tour, Professionnal...), should be also moved from P31. P2094 instead maybe? Psemdel (talk) 08:50, 24 October 2020 (UTC) When we speak property P5138 instead of P361 for the team season could be an idea. Psemdel (talk) 19:33, 30 October 2020 (UTC)

Still no opinion on this topic? Psemdel (talk) 18:56, 30 November 2020 (UTC)

UCI ProSeriesEdit

To display the title of the ProSeries calendar add in Module:Cycling_race/l10n at the end of calendar_translate text , "UCI ProSeries"GAN (talk) 11:47, 17 September 2020 (UTC)

Wikidata:WikiProject Cycling/Kit to translate/National teamsEdit

All possible variants of national teams for all countries. A part may have duplicates, since it was not possible to double-check everything. — GAN (talk) 10:32, 27 September 2020 (UTC)

Infobox for raceEdit

Is there any plans to create an infobox for race (in addition to the one for race edition) with number of editions, last winner, name history, category etc.? Pirker (talk) 14:08, 30 September 2020 (UTC)

The fr-wiki has a separate template module with this functionality. — GAN (talk) 14:35, 30 September 2020 (UTC)
It would be great to add that here the same way as other parts of module are added. I would love to use it on pl.wiki but importing it from fr.wiki is too hard for "non-technical" user like me :(. 99kerob (talk) 15:29, 14 October 2020 (UTC)
It is separated, because it uses Module:Infobox (Q13107716), which is separated from this module. It also makes it easy to replace information from wikidata with local information in wikipedia. Infobox is however available for all wikis, so, normally (edit: I had a look, the code does look different in pl and fr...), you can just copy/paste the code from fr-wiki to WP:pl. Psemdel (talk) 15:27, 22 October 2020 (UTC)
I don't really know how long it would be to program such a function. If it is reasonable, I will give it a try. Psemdel (talk) 08:52, 24 October 2020 (UTC)
So I added a new function raceinfobox. Thanks to GAN for the checking. I also added new unit tests. The "get_local_content" is present, but I am no expert from this point. PS: I try to optimize a few things tomorrow. Psemdel (talk) 12:10, 30 October 2020 (UTC)
@Psemdel: Thanks for your work! So it is not ready yet? Will you write an instruction how to import that at each wiki when you will finish? For now I simply copied French subpage into Polish Wiki but it doesn't work there (I guess that pl:Moduł:Cycling race needs to be updated but I don't want to mess it up ;). 99kerob (talk) 14:03, 30 October 2020 (UTC)
@99kerob:, yes wait until tomorrow, I just noticed small things (a translation is missing for instance). And yes, a documentation is needed. I ping when I am done. Psemdel (talk) 15:24, 30 October 2020 (UTC)
@99kerob:, I improved the code according to Dipsacus fullonum's one. It should be ok. Psemdel (talk) 10:10, 31 October 2020 (UTC)

@Psemdel: I updated the module and copied all the translations. Does not work. Throws an error related to the race category https://ru.wikipedia.org/wiki/Шаблон:Cycling_race/raceinfobox and https://ru.wikipedia.org/wiki/Шаблон:Cycling_race/calendarcustom And you can't manually set your image. Even on fr-wiki {{Cycling race/raceinfobox|Q1810324 |Image = Crystal Clear app kworldclock.png}} {{Cycling race/infobox|Q1810324 |Image = Crystal Clear app kworldclock.png}} added translation for the line "number of races for a specific year"

The
if not details[1].content
where missing. But still not correct. To be continued. Psemdel (talk) 20:53, 3 November 2020 (UTC)
  Done Psemdel (talk) 21:35, 3 November 2020 (UTC)

To answer GAN:

  • I would place the block of official names in front of the winners
On WP:fr we put it below the "name" so all information about names is at the same place
Then at least swap the list of names and the logo (you can show how to put the list of names down - I'll try to change it locally in the ru-wiki). And you can make it possible to resize the image manually. The default 300px is sometimes a lot. Race names by date are not sorted. The template for cycling teams in the French wiki is similar in structure, but there the previous names are located at the bottom of the template

GAN (talk) 07:20, 1 November 2020 (UTC)

  Done Sorting and names before winners. Psemdel (talk) 20:53, 3 November 2020 (UTC)
  • make right after the main title and in front of the image the ability to add arbitrary text on a white background
Why?
Still not sure what is needed?
  • Can a display be made for multiple winners of team races?
Actually it is working, it is just that I used team season as winner, so Specialized-Lululemon 2012 != Specialized-Lululemon 2013. Given the number of TTT in a season, I don't invest time in that.
Clear. With teams, you can also try using for seasons — GAN (talk) 07:20, 1 November 2020 (UTC)
  • Support for more languages (including Russian) for official titles. Russian races are officially called in Russian.
On WP:ru the russian name will be displayed. On WP:fr not, because "nobody" can read that over here.
  • Main title format for infoboxes -> font size, position and size of the icon. The main color of all templates. You can make it possible to set these parameters at once for all infoboxes for a particular wiki.
I inserted the silver theme from WP:da (good idea). Which setting do you want exactly? Psemdel (talk) 10:10, 31 October 2020 (UTC)
|style="background:#FFDF80; font-size:15px;" | [[File:Cycling (road) pictogram.svg|left|27px]] '''ABCabc'''
ABCabc
  Done Size slightly reduced (260px instead 300 px). Psemdel (talk) 20:53, 3 November 2020 (UTC)

There were problems with admins related to the design of templates.GAN (talk) 07:20, 1 November 2020 (UTC)

I may have forgot one #FFDF80. I don't really see what is the problem, if the different wiki use different background color :D. Psemdel (talk) 19:07, 1 November 2020 (UTC)
The problem is not because of the background color, but because of the wide and large header of the text :) — GAN (talk) 21:38, 1 November 2020 (UTC)
  Done

@Psemdel:

https://c.radikal.ru/c13/2011/c2/527831f143cet.jpg The mod version is the same on all three wikis. But race categories are displayed differently
classLink = classLink(classID) causes an error in ru-wiki, so I had to replace classLink = classLink

GAN (talk) 18:17, 1 November 2020 (UTC)

I will have a look, but I cannot say when. Psemdel (talk) 19:07, 1 November 2020 (UTC)
@GAN: I already write about that at my discussion. Race categories are displayed differently because category is "hidden" from infobox if particular Wiki don't have an article about that circuit - if at ru.wiki you will create article for example about UCI Africa Tour missed categories for Tour de Senegal will appear at infobox automatically (I created missed articles about UCI Continental Series at pl.wiki yesterday at it is now working that way). I think that should be changed and in such case when such Wikipedia don't have an article about circuit linked at Wikidata just info about category without a link should be displayed in infobox instead of hiding that info. 99kerob (talk) 20:26, 1 November 2020 (UTC)
@99kerob: Happened. But some of the articles have not yet been created for the convenience of checking the solution to the problem. — GAN (talk) 21:38, 1 November 2020 (UTC)
@Psemdel, GAN: I don't know why (I guess it has something in common with last GAN's edits) but now exact problem happened to Template:Cycling race/victories at pl.wiki which is strange because a few days ago it worked fine. Now info about categories for races that has a link as a P:P361 to circuit that don't have an article at pl.wiki (for example UCI Europe Tour 2018) just disappeared and made a terrible effect on many pages - see for example pl:Uno-X Pro Cycling Team. I don't know how but it should be corrected ASAP as template is used in over 30 pages. 99kerob (talk) 19:55, 3 November 2020 (UTC)
There is a problem with the module when compared to its old version. Now in the draft Psemdel I write in detail with examples. — GAN (talk) 20:03, 3 November 2020 (UTC)
There was a confusion between a variable name and function name (LUA does not make the difference). Moreover pl:Uno-X Pro Cycling Team has no class, no chance that a class is displayed. Psemdel (talk) 20:53, 3 November 2020 (UTC)

Cycling-init-botEdit

Hi every one, I've got a big news Today. Wikidata has lots of advantages for the display of cycling-data, however it also creates some boring and redundant tasks, such as creating team season for instance. In 2017, I programmed myself a bot/script in Python to automatize all these things (I am not the only one, Repf72 has also one, if I am right). The code was always open, but still I cannot expect from all wikipedia cycling contributors to know Python. That's why I programmed this year a web site: https://cycling-init-bot.toolforge.org/ for this purpose. You can for instance import rankings or start list directly. As written on the main page, I will grant the rights progressively to the new users. All feedbacks are welcome, there is surely still many points to improve. Psemdel (talk) 15:27, 22 October 2020 (UTC)

Women UCI classes?Edit

Most of the UCI classes are the same for men and women: 1.1, 2.1... It makes understanding of the data somewhat difficult. As we are anyhow thinking of moving the classes from P31 to something else, it may be the right time to think over. Should we create 1.1 (Women),... Of course, this won't be displayed (this is easily solved, there are not so many classes). What do you think? Psemdel (talk) 07:21, 31 October 2020 (UTC)

(I move that here)
To define women's races, I can offer d:P2094 --> d:Q920057
But in the men's calendar it is now more difficult:
  • five continental tours. Races in which they have the same categories
  • several races (French in South America and Russian near China) that were included in different continental tours
  • a race can be included in several calendars at once. For example, a national cup or a U23 category race in an adult and youth cup
  • the race can change the category, but not change the calendar. Was one-day, but became multi-day or vice versa
(it's like for a cycling team - a team category and a usi code)
Therefore, I would suggest separately display the category separated by commas (,) and separately the calendar through "
" :using for example "d:P642"
GAN
Ok, so this solution was too easy. We have to look for the circuit/calendar, understood. UCI is not ruled from computer scientists. I already use P642 for that, so it is definitely ok. P2094 for the class or for women cycling? We will have to decide those points as written above, and use some bots to put it clean. It will become the chaos otherwise. Psemdel (talk) 09:47, 31 October 2020 (UTC)
you can still make a request to add new elements "d" --- "calendar / tournament" which includes the race and "UCI race category" — GAN (talk) 10:02, 31 October 2020 (UTC)

P1813 and Aleksandr Vlasov/Alexander Wlassow/Aleksandr WłasowEdit

Hi! I noticed a problem at module for a small group of cyclists whose "original" names are written in cyryllic. In different languages there are used different types of transcription from cyryllic into latin alphabet (for example Александр Власов will be "Aleksandr Vlasov" in English, "Alexander Wlassow" in German and "Aleksandr Własow" in Polish)". In most cases it is solved by displaying a name from a label for each cyclist. But there is a problem when such cyclist has also set an info like official name or short name because module don't use a specific language for each Wikipedia but he first one set at Wikidata - for example Q3341512 has set both an official name in French ("Nikita Stalnov") and Polish ("Nikita Stalnow") which are different (as we use different transcriptions from cyryllic) but on Polish Wikipedia French version instead of Polish one is displayed as it was added earlier on Wikidata. Same problem appeared also for Vlasov but I solved it by deleting these claims. In case of Stalnov it can't be done that way as he changed his surname (he was using one surname until 2014 and other one since 2015) and it can't be displayed properly via a label. 99kerob (talk) 15:38, 3 November 2020 (UTC)

@99kerob:, it is an interesting case. I don't see any easy solution. Name is really the most difficult topic: no name is bad, bad name is bad also. Psemdel (talk) 19:04, 3 November 2020 (UTC)
I tried something in the code, (detection of "vna" and "vitch" in the russian label). I have however no mean to test on wiki fr. Psemdel (talk) 16:02, 7 November 2020 (UTC)

Season 2021Edit

In addition to races, created a list for teams

GAN (talk) 18:04, 17 November 2020 (UTC)

If the export function from UCI website works again, it will be even possible like last year for me to create the women races at once. But it is not working for month now at my place... Psemdel (talk) 19:52, 20 December 2020 (UTC)
@Psemdel: This? https://dropmefiles.com/CLtm6GAN (talk) 10:13, 21 December 2020 (UTC)
No, I mean there is an export (to excel) button on the UCI website. So you can export the result, and then reimport then with whatever you want (an API would be more elegant, but I don't know if there is one). I use my bot to do that. Unfortunately this export button make an 404 for 3 month now on Chrome, and for 3 weeks on Firefox at my place... Psemdel (talk) 18:59, 21 December 2020 (UTC)
Is this button here? I made this file using it in Firefox. — GAN (talk) 19:24, 21 December 2020 (UTC)
Almost the same, but in ranking (then there is no pdf) or in result. And then it does not work. Psemdel (talk) 16:52, 31 December 2020 (UTC)

Text style in infobox headlinesEdit

The headline in infoboxes as created by the function infoInitTab() have the CSS style font-size:175%; The big letters are criticized on dawiki where the headline in infoboxes is usually font-size:125%; font-weight:bold;. I have looked at other Wikipedias and it seems that it is normal elsewhere as well. Will anyone protest if I change infoInitTab to this? --Dipsacus fullonum (talk) 18:19, 30 November 2020 (UTC)

No problem for me. Psemdel (talk) 18:55, 30 November 2020 (UTC)

Rider infoboxEdit

I inserted an alpha version of rider infobox. Still some works to do:

  •   Done Managed team does not work
  •   Done Test the use of local data
  •   Done Documentation

Other to do for the next weeks:

  •   Done Implement the changes from GAN
  •   Done I implemented a distinction between road/mountain bike... though the use of qualifiers P642. It works fine for rider infobox, but I should also adapt the other functions.
  • "Slavic" plurals (singular = 1, 2-4 = plural type 1, >5 = plural type 2...)
Ok, I fear that I will introduce more mistake than solve them...

When the changes are done, many tests to do. So be patient before copying to your Wikipedia! Psemdel (talk) 12:09, 31 December 2020 (UTC)

  • @Psemdel: Awesome news! How can I help with testing? 99kerob (talk) 12:16, 31 December 2020 (UTC)
@99kerob:, thank you for the feedback. In 1 or 2 weeks when everything is finished, I ping you. Then, you should try using the new function on one rider and see what happens in Polish, if it is fine for a second rider and so on. There are always so many cases to consider that a few cycles are necessary. Psemdel (talk) 16:06, 31 December 2020 (UTC)
@99kerob:, it should work.

Discussions:

  • Does the infobox needs a minimum width?
  • Do we display the flags? On WP:fr we normally display the nationality of the rider, but it is difficult to get the conversion France --> French in all languages, at least I don't know any easy way. So I display the country now. With flag is nice, but there is a huge problem with USSR (red flag :D) for all those who born there.
  • Do we display the country of birth? On WP:fr we relly on hyperlink to clarify.
  • Do we split between amateur and pro team? It is son on WP:fr and WP:en.

Technical issue: how to display "Between the title and the photo to add. You need to manually add a short name in your native language with the language specified" Psemdel (talk) 13:33, 9 January 2021 (UTC)

  • @Psemdel: I tried it in my draftbox at pl.wiki for some cyclists. It looks really nice. Some things to discuss:
    • What is "Lateralisation"? Is it a parameter to declare if person is left- or right-handed? ;) I thing that we don't need such parameter in infobox (same as blood group) - definitely not important for a cyclist, I have never seen such info in any infobox
I agree and comment it out.
    • "Awards" looks really strange - check for example how it looks for Lance Armstrong. This parameter on Wikidata contains completely different things as national orders, sport awards etc. Wikidata miss a lot of data for this parameter (compare article about Lance at en.wiki to Wikidata item), moreover even if we will add all missed data section with Lance's awards in infobox will be much longer that other parts of infobox (at pl.wiki I guess that it could be even longer than whole article ;)). Do we really need such parameter?
Obviously, it looks weird. I freeze input from Wikidata on that.
    • Some time ago at pl.wiki we decided to delete "weight" parameter from all sportpersons infoboxes as this is a parameter which change a lot for each person during their life. Is it possible to hide this parameter just for our Wiki?
I insert a parameter for that. On WP:fr we normally have also no weight.
    • Parameter "Managerial teams" is for a teams that such cyclist was a sports director? I guess so but I cannot find any example which will display this parameter in infobox so I want to clarify that ;). If yes which parameter at Wikidata we should use at (former) cyclist's item to display that in infobox?
    • If we want to separate amateur and pro teams teams marked as club cycling team should be also displayed in "amateur teams" section (it is even a subclass for amateur cycling team at Wikidata) - now they are displayed in same section as UCI teams
    • Speciality is now imported from P:P413. If this parameter is missed (for most items it is missed) shouldn't we just use P:P641 instead?
I don't know what is the traduction in polish, but in French P641 is only sport. So we would have "cycling" all the time, which is not useful in my opinion.
    • In case of an age of cyclist there is a French word "ans" which should be translated through "l10n" subpage
That is the point where I wanted the "slavic plural". Good that you remind it.
    • If athlete joined a team during a season a number for month is displayed which looks quite weird for me (for example "4.2017-2018" in case of Stanisław Aniołkowski). Wouldn't it be better to display it in way "[name of the month] year-year", which will in this case "kwiecień 2017-2018" for pl.wiki? We rather use that way at our wiki
It is difficult to read then, as the column is narrow. You can insert it, but I won't do it. It depends on the language. In German, it is quite normal to give the number of the month instead of its name for instance.
    • At pl.wiki we also have a link to Commons at bottom of infoboxes (check for example: pl:Piotr Brożyna). Is it possible to add it too? A small link on the left side of the screen above interwikis are quite hard to catch for users
It is normally displayed on the left bar, if it is documented in wikidata (not the case for Piotr Brożyna). But ok, I can add it.
    • For country of birth I think that we don't need, hyperlink to the place is a good solution, country will make it really difficult (for example if someone was born in Tallinn in 1987 right country will be Soviet Union, not Estonia which will make a lot of troubles)
    • Flags are difficult topic ;). Some people likes them, some not, I don't have any strong opinion on them
    • For nationalities I just translated that parameter as "country" so it can be displayed that way, I don't see a problem here 99kerob (talk) 19:37, 9 January 2021 (UTC)
Thanks for the feedback, I look in detail tomorrow. Psemdel (talk) 19:46, 9 January 2021 (UTC)
  • @Psemdel: I copied your changes into Polish Wiki but it causes a problem with rider infobox (check pl:Wikipedysta:99kerob/brudnopis100), probably because phrase "age" is missed in "Module:Cycling race/l10n". I have also one more suggestion for rider infobox: we should also use "P1559" for non-Latin names and surnames (for example for Russian cyclist we should also have in infobox his name and surname written in cyryllic). 99kerob (talk) 15:02, 15 January 2021 (UTC)
    • I would suggest the following order of output: first "birth name (P1477)" and then "name in native language (P1559)". As these values may differ. "P1559" is more likely for people who have changed their last name and / or first name. — GAN (talk) 15:27, 15 January 2021 (UTC)
      • @99kerob: Added age WD and pl-wiki. Check your draft. — GAN (talk) 15:49, 15 January 2021 (UTC)
      • The module has a 50th translation for the rider template translate("riderinfobox",50). The module has a 50th translation for the rider template. And I counted fewer translations for this section. "thinking emoticon". — GAN (talk) 15:49, 15 January 2021 (UTC)
Yes I had to add 2 new translations for those plural. About P1559 why not, so for the top of the infobox? The number of properties that we use for names is really huge. Psemdel (talk) 09:45, 16 January 2021 (UTC)
        • @Psemdel:I would leave the top line for free text addition. To be able to indicate, if necessary, the name of the rider in a third language (for example, Asian names in Latin) or the name of the folk language by which he is known in the races.
I will add a parameter
-Display of the place (city) of birth and / or death. The module displays the current city name. And there should be the name of the city at the time of the person's birth / death. (We display the names of all teams at the time of the race, not at the moment.) This is relevant for many cities of the former USSR. (Zabelinskaya should have Leningrad instead of St. Petersburg).
-The ru-wiki has a module for such a mapping. He displays the name of the city and the entire geochain (district / region / region / country) where it was then located on the specified date.
The whole module already exist on WP:fr using such existing modules, here we have to develop again to become independent from the WP.
- {{#invoke:Psemdel1|riderinfobox|Q1903470}} About division into amateur and professional teams. Seven lines instead of two without separation.

GAN (talk) 13:36, 16 January 2021 (UTC)

It is an exception. For such a case, you can still insert the information manually. Psemdel (talk) 14:20, 16 January 2021 (UTC)
@99kerob: I added a "subtitle" field for the name of a rider in original language that appears on WP:ru. So the "subtitle" was added in the translation list which is in Moduł:Cycling race/l10n. I stop touching to the translation thing. Psemdel (talk) 11:47, 23 January 2021 (UTC)
@Psemdel: Thanks, now it works. Few other things before I finally start using that infobox in articles at pl.wiki:
  • I found one other untranslated thing - if athlete was a "trainee" it is displayed in infobox like "team name" ("stagiaire") where "stagiaire" is untranslatable. 99kerob (talk) 08:15, 24 January 2021 (UTC)
  Done I missed that. Psemdel (talk) 15:25, 24 January 2021 (UTC)
  • Also in case of "P1477" or "P1559" written in Russian it is not displayed in infobox - for example in Vlasov case. 99kerob (talk) 08:18, 24 January 2021 (UTC)
Vlasov has presently a P1559 in "ru" cyrillic. It is not displayed for the languages that don't understand this alphabet. It means every one except "ru" and "mk" presently.
  • At pl.wiki we are adding medals into infoboxes by using pl:Szablon:Medalista infobox - is there any chance to make it working with your infobox? I tried to copy section with medals into "medale=" section but these two just doesn't cooperate at this point ;). Check pl:Wikipedysta:99kerob/brudnopis100 how it looks for Hirschi. Maybe it is possible for module to simply don't display not needed parts of code of "Medalista infobox" ("{| class="infobox" |- | colspan="2" style="text-align:center; background:#EAECF0; font-weight:bold;" | Dorobek medalowy |- | colspan="2" style="padding:0;" |" at the top and "|- |}" at the bottom)? If it is not possible or will be too difficult to make an exception for pl.wiki at infobox I will just use version 2 instead (displaying medals outside "module infobox"). 99kerob (talk) 08:41, 24 January 2021 (UTC)
It is a table in a table with different css. It is possible but, the template should be modified for this purpose.
It is in two teams at the same time. Still have no solution for that. Psemdel (talk) 15:31, 24 January 2021 (UTC)
To explain a bit more, I fill a table with for each month, the team, the name of team and the category of the team.When it changes I make a new row. But here you have two teams at the same time (which can happens only for trainee). It makes a bit of chaos. I will think if I should create a table trainee... As a reminder by women there is no trainee, I never think about that to be honest. Psemdel (talk) 15:38, 24 January 2021 (UTC)
I will try to solve that in the coming week.
  • @99kerob, Psemdel: Is it possible for a trainee to alternately play for two teams during his internship? As far as I know, a trainee in cycling is a kind of analogue of renting in football. On bike statistics sites for trainees, they write two lines: the date when he left the main team and the date when he joined the new team as an intern.
-See how Lorrenzo Manzin (cyclingarchives.com) teams are recorded for 2014. Two until 31-07 and from 01-08 (Trainee) entries with the indication "trainee".
-Do this only for trainees. Moreover, the "team roster" template uses the same data to display when the rider played for the teams.
A very good point. Teamroster must "chose" between two teams. One more thing to implement.
-There are also trainees in women's cycling. Look 2.17.008 (USI regulations) Examples:
- Alice Towers procyclingstats.com and cqranking.com
- Kate Wootton cqranking.com
- Maeva Squiban procyclingstats.com and cqranking.com

GAN (talk) 19:36, 24 January 2021 (UTC)

It happens hardly ever. And for women, what is the difference between a trainee not paid, and a full time job not paid... Let's say it is less in focus. Psemdel (talk) 19:45, 24 January 2021 (UTC)
I thought a bit longer on this trainee topic, as I thought it would be necessary to solve it. But the more I am thinking, the more I see that the whole algorithm based on the fact, that there can be only one team for a rider at one moment. Then another part of the algorithm identifies when this team change (id/name/category). Only easy way would be too display it as the Mountain bike, so trainee would be a completely different category. But it makes no sense at all in my opinion. Moreover, as written a bit above, two teams at the same time will lead to problem with all other functions (they will pick one of both on random principle). Eventually, it may be noticed that even when a rider is full time professionnal, he can keep its club. So in fact, they always have 2 teams, but nobody care. Just keep the professionnal team as Gan proposed, I think it is really a very minor distortion of the reality. Psemdel (talk) 19:32, 25 January 2021 (UTC)

Gan's changeEdit

@GAN:, so when I look more closely to your code, I see 2 main changes:

  • Introduction of InfoboxChamp. Could you display somewhere, what happens when we use infobox instead of InfoboxChamp, as they are just a copy paste from each other?
  • Changes in listofwinners

Any other main changes? Psemdel (talk) 14:44, 9 January 2021 (UTC)

It shows what elements of Wikidata are used and there are examples:
- The main difference in the display of the venue of different titles, including for races / medals
- Season - only one "location" line for a continent and / or countries. Everything without flags.
The championship is now three separate lines: the country with the flag, the city, the stadium / location. And there may still be several countries where the championship was held on different dates.
Thank you for the documentation. But really, Infoboxseason and InfoboxChamp are pure copy/paste from infobox! Same for listofwinners_custom and listofwinners_main! That is very bad practice to have code in double (and it takes space). Also next time, please merge regularly with the master, here I have to look for what changed in between, that is really not efficient. And why is there no winners in InfoboxChamp?
The change from
[ 'Q28092831' ]=translate("listofwinners",17), -- rookie
to
[ 'Q28092831' ]=translate("listofwinners",2), -- rookie
is also a big change, as it changes completely the display. What happens if we want the different rankings in one table. Psemdel (talk) 14:02, 10 January 2021 (UTC)
-Code in double format - that's the only way I can. My level is worse than yours. :)
-What is "merge regularly with the master"?
-There are no winners "InfoboxChamp" so as not to overload the template. More than 10 medals are currently being played at the Road World Championship. This is more than 30 people. If everyone displays what will happen then?
My level is also not extraordinary to be honest, Dipsacus fullonum is way better for instance. So I suppose, I will have to make the adaptation to avoid that... For winners, ok but then you should have deleted that part of the code. Dead code is confusing for the reader. Concerning "merge with the master". It is vocabulary from version management. What I call the master is the real module, here, Module:Cycling race. My Module:Psemdel1 or your Module:GAN-Cycling-race are branches. They come from the master but are independent from the master. Our goal is to improve the master. So "sometimes", when we think that the changes we made in our branches are correct (this should be normally validated by tests), we replace the original master code through our changes. This step is called "merge". It works fine when the master stays as it is between 2 merges. But if you wait too long, the master changes also and then we have to spend time sorting out what is the best code... Wikidata and Wikipedia have a very good version management (history) but have no way to make branches in a clean way. So if I don't know that you develop in parallel, it is very probable that our versions won't be compatible. The only way to merge is manual copy/paste also, which can lead to mistakes. That's why it is better to make small steps, so everybody can see here the last version. Psemdel (talk) 14:46, 10 January 2021 (UTC)
So I imported the module from wikidata to WP:fr, it seems to work. Of course, I had to change all templates on WP:fr and also adapt the l10n module. So be careful! Psemdel (talk) 16:27, 16 January 2021 (UTC)
@Repf72:, the problem with listofstagesclassification by Giro 2020 (ranking that are only therefore for the general ranking) is solved. Hope there is no side effect. Psemdel (talk) 14:33, 17 January 2021 (UTC)
@Psemdel: Can I turn off leaderboard autocomplete for the last stage? For example, at the Tour de France, "supercombative" is not determined at the last stage. But this cell is populated with the value from the totals. {{#invoke:Psemdel1|listofstagesclassification|Q50411777}} and fr:Tour_de_France_2020#Évolution_des_classements --> 21e étape --> Marc Hirschi — GAN (talk) 14:49, 17 January 2021 (UTC)
Are you sure, there is no combative the last stage? One exception more... Psemdel (talk) 14:54, 17 January 2021 (UTC)
@Psemdel: Regulations tour de france 2019 --> Page 13 in French and page 33 in English. Right column, second paragraph from the bottom. And in the 1950s, there were two classifications of supercombatives. Regulation text from en-wiki: In addition, there was a combativity award given after each stage to the cyclist considered most combative. The decision was made by a jury composed of journalists who gave points. The cyclist with the most points from votes in all stages led the combativity classificationGAN (talk) 15:22, 17 January 2021 (UTC)
Correct, I will add the exception (thank you ASO). Psemdel (talk) 15:25, 17 January 2021 (UTC)
The first thing of course if there is no combative on the last stage is to leave the database blank so.
Actually, it is not that bad, I just inserted an exception for the combativity, which shall never be extrapolated (actually logical). Psemdel (talk) 19:44, 18 January 2021 (UTC)

Calendar dataEdit

For calendar and riderranking, I moved the

	["europe"] = { -- Q1194340
		['2021']= 'Q103964987', ['2020'] = 'Q74842812',
... 
		['2007'] = 'Q1780660',['2006'] = 'Q1455600',['2005'] = 'Q1431816'
		},

To /data. Be aware, that I replaced the "2010-11" through "2011", because it makes no sense at all in my opinion. Check if it impacts your templates on your local wikipedia. Psemdel (talk) 13:48, 23 January 2021 (UTC)

Rider rankingEdit

I imported that template at pl.wiki today and plan to use it in our articles but have one question: why for male cyclists places in UCI World Ranking isn't displayed there? You check that even at fr.wiki's list of examples where Marianne Vos has all data presented but Amund Grøndahl Jansen has only data from continental tours and nothing about UCI World Ranking (he has data about that ranking for 2018-2020 seasons at Wikidata but it isn't displayed at teamplate). 99kerob (talk) 17:45, 30 January 2021 (UTC) @Psemdel:

@99kerob: I have been importing the ranking the last 3 weeks (as written here somewhere the UCI export of ranking in Excel file was down until the beginning of the month), right now the UCI world ranking 2018 is being imported see here. I hope I am done by the end of the week. For the women, I did the work last year. Normally, I write about women cycling you know. Psemdel (talk) 18:07, 30 January 2021 (UTC)
I read again your message, and you are right, something is missing. Psemdel (talk) 18:09, 30 January 2021 (UTC)
I got confused between World Tour and World Ranking, now it should be ok. Psemdel (talk) 19:02, 30 January 2021 (UTC)

ProblemsEdit

Hi again @Psemdel, GAN: ;). I use module more and more and noticed some problems:

  • name of the month in data at Polish language should be conjugated (writing it in basic form is a language mistake) so in both Rider and Race infoboxes it should be displayed: "stycznia" instead of "styczeń", "lutego" instead of "luty", "marca" instead of "marzec", "kwietnia" instead of "kwiecień", "maja" instead of "maj", "czerwca" instead of "czerwiec", "lipca" instead of "lipiec", "sierpnia" instead of "sierpień", "września" instead of "wrzesień", "października" instead of "październik", "listopada" instead of "listopad" and "grudnia" instead of "grudzień"
See answer from GAN. Russian has also some declinations for the month. If it is still not correct, I will adapt.
  • according to ProCyclingStats we have more than one (for some teams even three of them) sports-directors for 2021 Paris-Nice race but startlist part of module displays only first one for each team , next ones are not displayed at all
Yes, I had also the problem actually. I will fix that.
  Done, was easy.
  • I noticed also one other problem with a startlist - at yesterday's African RR Champs some cyclists have really weird starting numbers not "compatible" with other cyclist from their NT (for example South African guys had numbers 23-30 and last one had 92) which causes a problem with displaying it with a startlist part of module as it automatically separates that last one rider to "another" team as his number is "too different" from other ones on his team
Here, I have really no idea. The principle is that the riders are sorted through number and then the algorithm checks that that last team = next team. I mean normally all riders of a team have consecutive numbers..
I should rewritte the algorithm, but I will look at that.
  • rider ranking part of module is broken for Yonathan Monsalve as it gets an error like this: "Błąd Lua w module „Moduł:Cycling_race”, w linii 7643: attempt to index field '?' (a nil value).". It is the only one article that this occured so far (I am slowly adding both rider ranking and cyclist infobox to articles at pl.wiki but will take some time to do that as I am the only one user doing so there)
I get the same error. Let's have a look.
  Done Ok, was a mistake in 2011-2012.
  • and last one is not an error but possible feature - do you plan to create team infobox which will be working similar way to cyclist infobox? I would love to use such one as it will be really useful ;)

99kerob (talk) 09:05, 7 March 2021 (UTC)

Never thought about that but why not (we already have something like that on WP:fr). When I find some time... Psemdel (talk) 12:19, 7 March 2021 (UTC)
@99kerob: Names of months. Formulas for displaying dates (including months) are used for all languages. For the Polish Wiki, the names of the months in the module are spelled out in full words in two places. Search for these places through a manual search (or on lines 585 and 646). It needs to be done manually with — GAN (talk) 09:53, 7 March 2021 (UTC)
@GAN: It was already done long time ago as I can see (for example in line 640 to 644 at pl.wiki we have:

"elseif wiki == "pl" then local date_pl = {"stycznia", "lutego", "marca", "kwietnia", "maja", "czerwca", "lipca", "sierpnia", "września", "października", "listopada", "grudnia"} endtime = lang:formatDate( "j ", eTime ) .. date_pl[tonumber(lang:formatDate( "n", eTime ))] .. lang:formatDate( " Y", eTime )" but it is still displayed as "styczeń", "luty" etc. (check for example: pl:Strade Bianche 2021 - it is "6 marzec 2021" in infobox and should be "6 marca 2021". 99kerob (talk) 10:01, 7 March 2021 (UTC)

  • Composition of teams. I would suggest making a separate, slightly modified table for the national teams.:
- next to the name of the team / star, display its flag
Why not.
  Done
- Make UCI-cod a link to the country
No, in French we have a link to the national selection. As back-up maybe.
@Psemdel: I suggest the following (links to fr-wiki for clarity)
France
FRA
National team link
UCI-cod as text
  France
FRA
National team link
UCI-cod as a reference to the country (not the national team)
  Done

GAN (talk) 13:22, 7 March 2021 (UTC)

- remove the flags and the abbreviation of the country in brackets from the riders in the list. They are all from the same country.
Good idea, have to think how it goes.
  Done
- disable grouping by numbers. Now if there are no numbers, then the grouping goes by teams. On ITT, numbers can be distributed according to the start time.
As written above, it is a whole different algorithm. And I don't have a property start time.
@99kerob: For ITT and such small start list, you can use startlisttable here. It is not ugly if the numbers are messed up.

GAN (talk) 09:53, 7 March 2021 (UTC)

  • @Psemdel, GAN: Two more things from me:
    • Can you add a small icon of Commons linking to proper category to all other infoboxes in a way it currently works at Rider infobox?
  Done Why not. Psemdel (talk) 16:39, 2 April 2021 (UTC)

Nikita StalnovEdit

  • There is a problem with displaying names of Nikita Stalnov in rider infobox at pl.wiki as his surnames are written differently in French and Polish (Poland use different transcription for all Cyryllic languages) - in such case at pl.wiki only Polish version (Umierbiekow/Stalnow) should be displayed as French one (Umerbekov/Stalnov) is simply wrong in Polish language. 99kerob (talk) 12:47, 2 April 2021 (UTC)
    • @99kerob: pl:Wikipedysta:99kerob/brudnopis100 do you mean "Skrócone imię i nazwisko"?
      • @GAN: Exactly. 99kerob (talk) 13:52, 2 April 2021 (UTC)
        • @99kerob: I did not transfer this template to ru-wiki. Most likely, you need to bind the language to a specific Wiki somewhere in the data output settings. So that other languages are not displayed. — GAN (talk) 15:41, 2 April 2021 (UTC)
I will have a look. It is not an easy topic. Psemdel (talk) 16:42, 2 April 2021 (UTC)
If it is too hard to do maybe easier way will be to just delete this parameter in an infobox? P1813 is used quite rarely for cyclists on Wikidata and not really much needed in a Rider infobox. 99kerob (talk) 17:58, 2 April 2021 (UTC)
For women, it is needed, as they often change name during their life. Psemdel (talk) 08:49, 3 April 2021 (UTC)
Should be better now. Psemdel (talk) 09:41, 3 April 2021 (UTC)

Team infoboxEdit

A template for a cycling team has been added to the module. Ability to add jersey using the "2" argument in any way. The number of seasons that the template displays is the number of elements specified in has part (P527). Please support a new element for the specified "bike" template. — GAN (talk) 22:30, 4 April 2021 (UTC)

  • I imported it into pl.wiki and trying it here. My thoughts:
    • If team had only one status (like Mazowsze Serce Polski being an UCI Continental Team all the time) years next to it should be displayed too (now years are displayed only if team had at least 2 statuses like Astana)
    • For general director also years are missing (at least in case of Vinokurov in Astana)
      • I agree. Only one person can be listed, but he did not hold the position for the entire period. — GAN (talk) 09:36, 5 April 2021 (UTC)
    • Info about country should be imported from main Wikidata item and all countries should be displayed there with years, not only one (for example Astana had 3 different countries as they registered place but only Kazakhstan is displayed in infobox)
      • I put "normal" rank instead of "not recommended" for Switzerland and Luxembourg. Now displays. — GAN (talk) 09:36, 5 April 2021 (UTC)
    • Past/current/next season part of infobox is displayed in a weird way - for example for Astana we have both articles about 2020 and 2021 season at pl.wiki so in infobox 2020 should be displayed as past one and 2021 as current one but there is only 2021 displayed as past one. 99kerob (talk) 07:40, 5 April 2021 (UTC)
      • The reason is the date indicated in start time (P580). If it is less than the current one, then the season is considered to have already passed. Likewise in the racing template. — GAN (talk) 09:36, 5 April 2021 (UTC)

Lua error in Module:Cycling_race at line 1271: translation missing in Module:Cycling race/l10n of your wikipediaEdit

I was wondering if someone can help me with this error message on https://www.wikidata.org/wiki/Wikidata:WikiProject_Cycling/Documentation/infobox. Did I miss something? Thanks in advance EricSabell72 (talk) 13:25, 8 April 2021 (UTC)

  • @EricSabell72: If you're talking about the module error on the Wikidata page. This is most likely due to the transfer of almost all translations to the additional module. If the error is on the Wikipedia language page, then you need to look there for the local version of the module. — GAN (talk) 13:39, 8 April 2021 (UTC)
Return to "Cycling race" page.