Module talk:Cycling race/archive3

Active discussions

Function teamroster : display start time (P580), end time (P582) and end cause (P1534)

Hi Molarus, I was a little far to Wikipedia & Co this week due to an amount of work. With Anthony59999, we have start to fill team rosters, and it works very well. I am interested if we can display in small and grey start time (P580), end time (P582) and end cause (P1534) if these values exists. A future request will concern the possibility to display the source (I remember you create code for this) because it is typically a data we must source. Jérémy-Günther-Heinz Jähnick (talk) 09:24, 23 March 2016 (UTC)

It is possible to write the code for one Wiki, but for twenty wikis it is to much code: References is like a second infobox. At the moment module cycling race has a size of 110 kb and it looks like the size of the module is getting bigger and bigger. I think 150kb and more is possible. That is too much, the size of the module should be below 100 kb. Maybe a solution is that in 2017 we will get at meta a central place for lua modules that every wiki can use. This way, it would be possible to split the module into several small modules. Therefore, I think references will be possible in 2017.
About the three properties: Since there will be no references soon, do you want that information in the table? Would you tell me where I should show that information? --Molarus 13:06, 23 March 2016 (UTC)
No problems for the references. In this case, it is better to wait a central system is created, this way, we will not have to manage this and other domains will use it rapidly.
Interesting this idea to have an unique module here and no longer copies to update.
I also forget position held (P39) for trainee (Q2328847). You have a good exemple on AG2R La Mondiale 2015 (Q18384639), and datas on ProCyclingStats. Note that we can use other sources to list by exemple the trainees. The idea is to put these informations in the table, without the year for dates because these datas are from the season depicted. Jérémy-Günther-Heinz Jähnick (talk) 13:44, 23 March 2016 (UTC)
This is a proposal, see example at this page. The word "trainee" is taken from Q2328847. If there is no translation for "trainee", the en:translation is taken. Missing is the code for the different ways to show the dates. I didn´t show P1534, because we had something like that before (winner is no winner no more) and it was enough to show that in Wikidata. What do you think? If it is OK, I will add the code for the dates. PS: I have changed something else in the code to reduce the size of the code. --Molarus 18:01, 23 March 2016 (UTC)
It works, I do a test on FR Wiki. I prefer having end cause (P1534). It is rare we have to use it, but it is always interesting to know if the cyclist was doped, died or simply change of team. For trainee, I will have translations. Jérémy-Günther-Heinz Jähnick (talk) 18:11, 23 March 2016 (UTC)
Are you aware that I have to add "end cause: doping"? Three words! I would rather see that information in the text, not in the table. I will add code for the dates now. --Molarus 13:48, 24 March 2016 (UTC)
It is also possible to add just doping, as we can have death (Q4), end of sports career (Q3428243) or change of team (Q23498196). Users can add these informations in the text, it is good, but when I see that even EN Wiki had problems to update their 2016 rosters, I think it is interesting to give the beginning of a response. This way, users will have translations to add at the kit to translate for the causes this month, and then their users will understand and will can go on Wikidata to find the sources and use them to write text on their Wikipedia. We use Cycling race on languages like FO, FI or LB, where the number of Wikimedians is very low and the amount of work in consequence very important. An unique word will never resume all we can write on these affairs, but we can guess the readers will decide to go on the article of the cyclists if they want more informations (even if in some languages like RO, we don't have articles about cyclists). Jérémy-Günther-Heinz Jähnick (talk) 14:34, 24 March 2016 (UTC)
Ok, just one word. We can change that later back or add a "br". At the moment english is the only fallback, that is missing in the item "retraite sportive". No idea what this means. And maybe "doping in sport" should be changed to "doping"? --Molarus 15:04, 24 March 2016 (UTC)
Yes, I try to do a translation with Google, but the result wasn't good. It concern a cyclist that decide to takes its retirement but only from sport and not for other works. For doping, it was just a try, I think we will have items like fired for doping, suspended by the UCI for doping... if the doping is not discovered, the cyclist don't left the team, here the idea is the cyclist is fired by its team, or the UCI take a decision to suspend him for a period. Sometimes a cyclist is fired by its team and months after the UCI take a decision to suspend him, but the end cause (P1534) is the fact that the cyclist is fired by its team. Jérémy-Günther-Heinz Jähnick (talk) 15:15, 24 March 2016 (UTC) Note that if it takes a little place, it is not a problem because when we will display team, the table will have only one column. For the moment, with Anthony59999 we made only around ten teams. It is a long work, and I think I will write a documentation about it tomorrow, I don't go on the change of team (Q23498196) due to security problems in this country and because I must bring two of my bikes for repairs. I will discuss with Anthony59999 to define a list of cases that a cyclist can left its team. He is more competent than me on the subject. Jérémy-Günther-Heinz Jähnick (talk) 15:22, 24 March 2016 (UTC) PS : I don't open a new section, on fr:Critérium du Dauphiné 2016 I see we have again this problem of point between the day and the month for listofstages. Jérémy-Günther-Heinz Jähnick (talk) 17:13, 24 March 2016 (UTC)
listofstages-problem is done. --Molarus 19:14, 24 March 2016 (UTC)
Thank you. I receive new properties today for sources, I will update Wikipedias templates. Jérémy-Günther-Heinz Jähnick (talk) 09:29, 25 March 2016 (UTC)

Names of the teams

So, I want to ask you, why the names of the teams on Macedonian Wikipedia is written with english names, even when I translate them on Wikidata items and even when I had an article about them? --Ehrlich91 (talk) 16:35, 25 March 2016 (UTC)

Because we take the official name (P1448) of each team, and no the label. But it could be a good adaptation to exclude JA, MK and RU for latin languages and take only MK values for MK and RU values for RU. It is not possible to take the label because it arrives that teams change their name during the season. I let Molarus for the technical aspect, I am not competant for this. Jérémy-Günther-Heinz Jähnick (talk) 17:50, 25 March 2016 (UTC)
I don´t know where we show the name of the team? Which function are you talking about? --Molarus 16:49, 26 March 2016 (UTC) I have found the name of the team, it is the team winner in the infobox. Winner is always something like en:2015 Movistar Team season, that is an article about the season of the team, not the team itself. We add an alias text to the link, the official name. As far as I have seen (function WPlink), if there is no "official name", we take the french label or print an error message.
About the alias text: I could take the label of the season article and delete the number dddd (four digits) from the label. We do this for next and previous races already. But I don´t think there will be mkWiki translations for this and taking the french label doesn´t help. We need an link to the team in the season article, but there is no such link because we have no property for teams. Therefore I see no solution for this problem. --Molarus 18:22, 26 March 2016 (UTC)
I´m wrong. We have P361 (part of) in the season item that links to the team. We could say, if there is no season article then link to the team article and if there is no team item in the season item, print the official name. What do you think? This way we don´t always have a mk translation, but there is one if there is a team WParticle with a mk translation. And we would have most of the time a link in the infobox to a Wikipedia article - season article or team article. --Molarus 18:51, 26 March 2016 (UTC)
Good idea. Be careful on a point : team can change of name during the season, like Roompot Oranje Peloton 2015 (Q19831195). Again a time, it is very rare but it arrives (we start to have a long history with exceptions). Jérémy-Günther-Heinz Jähnick (talk) 12:08, 27 March 2016 (UTC)
We have no code for this case. Maybe with the new solution I don´t have to write code for that, because there are lot of fallbacks for labels. --Molarus 16:38, 29 March 2016 (UTC)
I think that it was something like this, I don`t have articles about seasons of the teams, so it`s not a big problem. Thanks for answers --Ehrlich91 (talk) 18:53, 28 March 2016 (UTC)

I have found an example, see fr:Tour d'Italie 1996. The team winner is Q23016267 (Carrera-Longoni Sport 1996). At frWiki the name "Carrera-Longoni Sport" is shown. If I take P361 (part of) I will get item Q247013 (fr:Carrera). The frwiki article of this team is fr:Équipe cycliste Carrera. Since there is no fr saison article about "Carrera-Longoni Sport 1996" we would link in the infobox instead to the fr team article "Équipe cycliste Carrera" and use as alias text "Carrera". If there is no Wikipedia article about this team, I would only show "Carrera". "Carrera-Longoni Sport" would be seen only if there is no fallback label, which will never happen. Is that OK? Or I could use the value of property "official name" "= Carrera-Longoni Sport" as alias for the latin script wikis and for the non latin script wikis the label for the team if there is one? If there is non label, I would take the official name.

There are these two options: One without "official name" and one with "official name". --Molarus 17:58, 29 March 2016 (UTC)

We must take the official name, because sometimes, the name of the team became completely different, see fr:Équipe cycliste Join-S-De Rijke or fr:Équipe cycliste Topsport Vlaanderen-Baloise. For this case, we cannot write Topsport Vlaanderen-Baloise for a race made by the team in 1996 because it is an anachronism, the name was in 1996 Vlaanderen 2002. Naming the article Carrera is a mistake, the team never wear this name. I am not competent for non latin languages. Jérémy-Günther-Heinz Jähnick (talk) 08:49, 30 March 2016 (UTC)
The new code is only at Wikidata, but I have tested the code at frWiki and lbwiki too. I have changed some more code to reduce the size of the code. Now, instead of wiki == "//" it is wiki == "fr". And there are more possibilities to reduce the size of the code, for example I´m switching the Wikidata links off, but I can change that to switching Wikidata links on. This way the code is smaller, because there are less Wikis that want to see the Wikidata links. Another possibility is to move all the time formatting code into one new function. --Molarus 22:21, 30 March 2016 (UTC)
It is more easy to add a language. Good idea for Wikidata links.
It is also a good idea for time formatting. In the future, when we can directly call Wikidata modules from Wikipedias, we can imagine that dates formatting will become an independant functions on its own page, and be used by other modules in other domains.


Unfortunately there is a rule about russian/cyrillic names on dewiki which says that the name of an article of a person with a russian/cyrillic name has to be the full name (with middle-name), like de:Alexander Wassiljewitsch Kolobnew. This needs lots of space or a second row in listofstage or infobox, e.g. de:Algarve-Rundfahrt 2016. Is there any way to show Alexandr Kolobnev instead of Alexander Wassiljewitsch Kolobnew in the infobox? --Chris XC3000 (talk) 20:03, 30 March 2016 (UTC)

It is possible to add an alias text for deWiki to the link to the Wikipedia article which would be the de:label and maybe it is even possible to do this depending on the nationality of the rider. I will try this tomorrow. --Molarus 20:29, 30 March 2016 (UTC)
@Chris XC3000: : it is not a problem to write three names, in Portugal and Spain in one hand and in Scandinavia on second hand, it is not rare that cyclists has three names, sometimes four. Jérémy-Günther-Heinz Jähnick (talk) 08:44, 31 March 2016 (UTC)
Of course, some people, e.g. de:Nairo Alexander Quintana Rojas, have more than two names. But I don't think that it is an good idea to write the complete name into an infobox. --Chris XC3000 (talk) 09:05, 31 March 2016 (UTC)
Now Russians (p27= Russia) get the label as alias text in the infobox at deWiki. Maybe you have to check the de:labels, because for example "Alexander Wassiljewitsch Kolobnew" turned to "Alexandr Kolobnev". And you have got the update from yesterday, that shows the team article if you have no saison article for the team winner. See "Teamwertung" in article "Algarve-Rundfahrt 2016". --Molarus 20:49, 31 March 2016 (UTC)
Thank you, nice work. Is it possible to add some more countries. I'm thinking about Belarus (Q184), Ukraine (Q212) and Kazakhstan (Q232)?--Chris XC3000 (talk) 10:21, 1 April 2016 (UTC)
Done. I havn´t tested the code, but should work. --Molarus 17:54, 1 April 2016 (UTC)
Can you add this feature in listofwinners, too?--Chris XC3000 (talk) 10:47, 19 April 2016 (UTC)
I will look into this. --Molarus 11:36, 19 April 2016 (UTC)
Done. See de:Tour of Almaty. --Molarus 10:14, 20 April 2016 (UTC)
Thanks. Great work!--Chris XC3000 (talk) 10:18, 20 April 2016 (UTC)

died during competition (Q23498248)

Antoine Demoitié (Q15792007) and Daan Myngheer (Q17580305) died as a result of their injuries which where coused by a race accident. In my oppinion the statement died in competition is not correct. I don't think it is neccesery to name the reson of death in the tabele. But there should be a note in the table.

Maybe the table could look like this:

Rider Date of birth
Antoine Demoitié (✝ March, 27) October 16, 1990
Daan Myngheer (died on March, 28 ) April 13, 1993

See also:

--Chris XC3000 (talk) 09:14, 2 April 2016 (UTC)

Corrected, it was not clear. I rename the property to be good with the description that says in French that the death is linked to a competition. We have different qualifiers to a death : death (Q4) and died during training (Q23498247). The idea is to make possible to do a link (if there is a link) between the cyclists and the sport that caused its death. Here, they died, but it is not a classical death. (sorry for the late, I spend three days here). Jérémy-Günther-Heinz Jähnick (talk) 08:34, 4 April 2016 (UTC)
Imho it is not a good idea to create a single item for that much possibilities of leaving a team. I think it is better to have only a few items like death (Q4) or end of sports career (Q3428243). The exact reason for leaving o team or the resaon of death could then be specified individually in each wiki.
It also causes a very big table, because of the length of the statement (see de:Roubaix Lille Métropole#Mannschaft)--Chris XC3000 (talk) 14:35, 5 April 2016 (UTC)
A day, we will be able to display previous teams, and the table will have a different form.
I agree with you for this idea, but you forget that this program can also be used on small Wikipedias, and they have a real lack of persons to update datas. So the best solution is to contact them for asking a translation this year and know that it will be OK for them in the future. I apply team rosters on Wikipedias, and I really see all the problems. Even on FR Wiki it is not rare that a cyclist left a team or join it and we don't have written the information. I can also speak of teams that don't have the 2016 roster, in FR Wiki but also on EN Wiki. We all have big progresses to make in this domain. Jérémy-Günther-Heinz Jähnick (talk) 19:56, 5 April 2016 (UTC)

2016 E3 Harelbeke

I`m little late with articles about this spring cycling races, so today when I finished article about 2016 E3 Harelbeke I saw something wrong in the infobox, for the previous edition of the race writes |32015|, this has something with the name of race, some error related with the number in the name of the race? --Ehrlich91 (talk) 21:26, 11 April 2016 (UTC)

I have changed the code from taking the number out of the text to calculating the number from the date. And the first race gets no previous race. I have updated the code in frWiki and tested the code in mkWiki. They have the same error at mk:Е3 Харелбеке 2016. When the code will be updated in mkWiki, the error will go away too. --Molarus 05:55, 12 April 2016 (UTC)
I saw while I wrote this that there is a problem with the code if the item has no time data. Now, in this case, the old way has to be used. --Molarus 06:04, 12 April 2016 (UTC)
We have had problems with this race. The code have been modified but I don't have updated all Wikipedias. And we have at this day another problem when a previous edition is cancelled and we have a year without race. Jérémy-Günther-Heinz Jähnick (talk) 16:11, 13 April 2016 (UTC)
I think the old code would have worked with this problem, because it takes the alias text from the label. This way the code shouldn´t mind which year the previous or next race has been. But I have not tested that. Therefore I have repaired the old code and tested the code in frWiki and mkwiki. The last time we talked about this problem was in March, when I corrected this problem for 'Grand Prix E3 2012'. I don´t understand why the code from March was wrong now. --Molarus 19:21, 13 April 2016 (UTC)

For "Coupe Sels 2015" the new (old) code shows 2013 as previous race. --Molarus 19:27, 13 April 2016 (UTC)

Yes, I just make an update and the problem is solved. It will be a good thing that next year we will have only one module to maintain and no longer copies. Jérémy-Günther-Heinz Jähnick (talk) 19:53, 15 April 2016 (UTC)

Associate a team to a cyclist

Hi Molarus. At the previous section, we were speaking about teams. With Anthony59999, we start to enter teams for cyclists with member of sports team (P54) (because when a cyclist change of team, we can mention this information on its item, on the item of the previous team and on the item of the next team, with the source). It is just the beginning, and we start with 2016 teams. On another part, official name (P1448) give the different names of a team always with dates. Is it possible to write a function that associate a team to a cyclist for the different winners of a race ? I have in my head that it will be interesting because we will surely the next month prepare the functions to make classifications, and we will have things to learn. As example, if a cyclist run for a particular team (as a national team), it will be interesting to add member of sports team (P54) as qualifier, so the function should be able to write first if there is a value in the item and then if there is a value in the item of the cyclist. Same idea for the trainees, because some of them make races with their main team and others with the team where they are trainee, I think at fr:Nils Politt last year. Jérémy-Günther-Heinz Jähnick (talk) 12:21, 27 March 2016 (UTC)

I guess you are speaking of saison items, not team items. In Q21955186 (Katusha 2016) you will find P527 (has part) and many cyclist. P527 wants as inverse property P361 (part of). That means, the riders should have a P361 (part of) Q21955186 (Katusha 2016). If there is no saison item, an additional P54 in the riders item could be possible.
Do you speak about a new infobox for rider articles or what? --Molarus 17:29, 29 March 2016 (UTC)
Yes and no, it is to add the team to cyclists on this infobox as example. To list teams, we use only member of sports team (P54) (it is like part of (P361), but very specific for sportsmen, as we have BALaT person/organisation id (P1901) that list participating teams instead of has part (P527) that is already in use for list the stages). In our case, for the first, we will have Stijn Steels and below {Topsport Vlaanderen-Baloise), because we know the point in time (P585) of the race, the member of sports team (P54) of the cyclist at this date, and thanks to official name (P1448) we know the name of the team at this data. In this cas, it is not very important, but this team exists since 1994, it is not impossible that we have another name in few years.
I have also in idea to begin the functions for classifications next month, in april. Contacts already give me translations, and I will take time to continue to add teams to cyclists. The difference with ProCyclingStats is we will be able to give the teams of cyclists that are not in the three first divisions (in my opinion, it is very long because it is the beginning to enter and verify all these datas, but when we will do the work for the next season, it will be more fast and efficient, because each day we will learn that five or six cyclist go to new and other teams, we will add these informations faster and can give sources for this). (I am not at home at the end of the week, I pass three days on a race if the weather is good). Jérémy-Günther-Heinz Jähnick (talk) 20:55, 29 March 2016 (UTC)
a) An option would be to add this info with the UCI-code (P1998) as alias text, for example "TSV" for "Topsport Vlaanderen-Baloise", for not adding a lot of new table rows into the infobox. But we don´t read team items so far in the infobox, which means that we would make the module again slower by reading maybe 6 new items.
b) Classification tables should use a lot of existing functions, because the lua module has already more then 100 kb. A lot of new code would be bad for the module.
c) Would you have a look at the previous section please? --Molarus 02:43, 30 March 2016 (UTC)
The time to display articles is not a problem, we have generally good connexions in Europe. The UCI code has around 20 years, and some teams for races 1.2 or 2.2 don't have an UCI code. Or sometimes, we are not able to find the UCI code five years ago. So I think that giving the official name (P1448) of the team at this period is better. An idea for the future will be to work with organizers of races to create articles about old editions. Thanks to Wikidata, one unique person will can work in contact for a race, and all the Wikipedias that use Cycling race will be able to take these results to make their articles, but also create partnership.
I think classifications will be a big part (gros morceau in French), so we can create Module:Cycling race/classifications. For the templates on Wikipedia, we will invoke Cycling race/classifications instead of Cycling race but we will can name the functions generalclassification as example. For a classical user, there will have no differences.
Done. The global idea is to be able to do work on a race of 1916 or a race of 2016, even if entering all datas on Wikidata will take years. Jérémy-Günther-Heinz Jähnick (talk) 09:28, 30 March 2016 (UTC)

Maybe we could use the UCI code if available and I will use a switch - similar to the wikidata link - to allow the wikis to switch this feature on and off. I will start tomorrow with the code for the teams in the infobox. --Molarus 20:57, 31 March 2016 (UTC)

The code to detect the right "official name" is missing
The data inserting from WP article should be at the last place.
UCI-code as alternative alias code is missing.
--Molarus 20:06, 1 April 2016 (UTC)
As I was testing the code in frWiki I have found a time problem. 2012 is stored in Wikidata as "2012-00-00". That means start time and end time could both written in Wikidata as "2012-00-00", but sometimes Wikidata time for P54 (member of sports team) and P1448 (official name) has a month and a day like "2012-08-30". Therefor I have to change "2012-00-00" to "2012-01-01" (start time) and "2012-12-31" (end time). I hope this will solve the problem. --Molarus 01:17, 5 April 2016 (UTC)
Sorry Molarus, I have had work these days. I go at my reunion this afternoon and I will take the time after to read all. Jérémy-Günther-Heinz Jähnick (talk) 08:18, 5 April 2016 (UTC)
Ok. I am interested if you have some examples. Jérémy-Günther-Heinz Jähnick (talk) 19:58, 5 April 2016 (UTC)
The code is updated at WDwiki and frWiki. The solution as described above works, but I have seen, that some start times and end times are not stored in Wikidata as "2012-00-00" but as "2012-01-01". I guess the Wikidata developers corrected this error some time ago, but the wrong data is still in some items. That means, if there should be seen a team in the infobox, but there is no team to be seen, just save the year once again in Wikidata. Or I could add code that an end time of "2012-01-01" should be transformed into "2012-12-31"?
At the moment this feature works only in frWiki and Wikidata. If we are sure the code is OK, we could add more Wikis (line 437) or we just make that standard for all wikis. --Molarus 01:19, 6 April 2016 (UTC)
Hi Molarus. I will do tests on FR Wiki during one or two weeks to detect all possible problems. It is again a big step forward. Jérémy-Günther-Heinz Jähnick (talk) 08:46, 6 April 2016 (UTC)
Interesting. On the fr:Triptyque des Monts et Châteaux 2016 I illustrated few days ago, Maximilian Schachmann arrive third but we have for team Équipe cycliste Klein Constantia instead of having Klein Constantia like the other cases. Adrien Costa is membre of Axeon-Hagens Berman, but for this race, he run under the colours of the national team of the USA, mentionned as qualifier of its victory. Is it possible to take a member of sports team (P54) written in qualifier, and is it possible if the instance of (P31) of the team is under-23 national cycling team (Q20738667) or elite national cycling team (Q23726798) to take its country (P17) for name, because we know it is a national team. It is a specific case of cyclists that are together just for one race. I will encounter this case on saturday. Jérémy-Günther-Heinz Jähnick (talk) 10:33, 6 April 2016 (UTC)

I have looked into all french articles and I found some errors (already corrected most) and some questions.

fr:Kuurne-Bruxelles-Kuurne 2015 The third winner is Q931556 who has two P54 without any start and end time.
fr:Le Samyn des Dames 2015 has the team Q2081454 "AA Cycling Team" that has only a nl Wikipedia article. The article had no french label so it showed the message "label missing". This will be a question when we move to more wikis.
function listofstages, the timetrials show the saison article, fr:Czech Cycling Tour 2015, fr:La Méditerranéenne 2016, fr:Tour d'Égypte 2016
fr:Tour du Qatar féminin 2016 Error in Meilleure équipe
fr:Circuit Het Nieuwsblad féminin 2016 Error in third winner
Missing Wikidata item: fr:Tour international d'Oranie 2016, fr:Tour international de Constantine 2016

--Molarus 11:41, 6 April 2016 (UTC)

I have looked into the problem with the function listofstages. You have wrote in December: For teams, it is more complicated, with the example of Verandas Willems 2015 (Q19516702) : we should when it is a team (and it is rare, only when it is a team time trial) take the official name (P1448) of the team (if exist), and link to its wikipedia article if exist, like Saison 2015 de l'équipe cycliste Verandas Willems (see fr:Paris-Arras Tour 2015). I guess it should link to the saison article if exist and otherwise to the team article. I wonder if there is still code for this in the module? At least I can´t find '2348250' in the code (Q2348250 = team time trial). Maybe we should do the code this time different. Instead of adding the "official name" into the saison item we could go to the team item "Vérandas Willems" and get the "official name" there. --Molarus 03:32, 8 April 2016 (UTC)
I was wrong, it was only a five minute problem. FrWiki and WDWiki is uptodate. I would say, the next step is to deliver the code for the teams to all Wikis. At the moment in line 412 the code says, that only Wikidata and frWiki see the teams in the infobox. I propose that all Wikis should have the new code. I have tested the code additionally in DEWiki and EOWiki. If you give the OK, I will change the code so that all Wikis could see the teams. --Molarus 16:48, 11 April 2016 (UTC)
Now the code should work on all wikis. --Molarus 09:26, 13 April 2016 (UTC)
Hi, sorry for the latte, I have had reunions, races then photos to upload.
In fact, it is again too soon. For some teams, it rests me to transfer the informations about previous names on Wikidata, that permits to display the good name of team.
It rest also the problem of cyclist running for a national team (under-23 national cycling team (Q20738667) or elite national cycling team (Q23726798)) during a race like 2015 Ronde van Vlaanderen Beloften (Q19795851). The idea is to give the team just below the name of the cyclist and the program take this value in priority if it exists.
A little problem on fr:Coupe Sels 2015 where we have no edition in 2014 (due to the construction of a tramline) and where the previous edition was 2013. Jérémy-Günther-Heinz Jähnick (talk) 11:17, 13 April 2016 (UTC)
It is no problem to write as start- and endtime only the year, I have written code for that. The code shouldn´t tell the user how to do things, it is the other way round.
I have seen that you have added in the item for "2015 Ronde van Vlaanderen Beloften" to the winners the property P54. I don´t think it is a good idea to write "équipe d'Australie espoirs de cyclisme sur route 2015" into the infobox. This means two additional rows per cyclist. Is that what you want? --Molarus 18:07, 14 April 2016 (UTC)
No, for national teams (élite and espoirs), I want we write the name of the country (P17). It is a specific case where a team composed for the event run under the colours of a country. ProCyclingStats for example is not able to display that. Jérémy-Günther-Heinz Jähnick (talk) 08:37, 15 April 2016 (UTC)
The items of countries are very big, but maybe it is OK for just three countries per article. And formating "small" for teams and nations. --Molarus 09:57, 15 April 2016 (UTC)
I will try something else: "Tour des Flandres espoirs 2015" has in P361 (part of) the item Q18413670 (UCI Coupe des Nations U23 2015). If that is true, then I will build as alias text for "équipe d'Australie espoirs de cyclisme sur route 2015" "AUSU23 2015". "AUS" is the UCI-code, "U23" comes from "UCI Coupe des Nations U23" and the year is known.
What do you think if we don´t try to link to Wikipedia articles like "équipe d'Australie espoirs de cyclisme sur route 2015", but to fr:UCI Coupe des Nations U23 2015 for all three winners, but with different alias text? The advantage is, that we have those articles, while I don´t think we will ever get Wikipedia articles like "équipe d'Australie espoirs de cyclisme sur route 2015".
I would like to have the information that a rider is member of "AUSU23 2015" in the rider item, not in the race item. This would mean, that there could be two teams at the same time and I have to write code to detect if the team is a ProTeam or a U23 team. It will be difficult to code, but I think the information belongs to the rider item. What do you think? PS: I am not sure, but maybe we don´t need items like "équipe d'Australie espoirs de cyclisme sur route 2015" at all? I could take the UCI-Code from the country item. --Molarus 15:10, 15 April 2016 (UTC)

I think it would be nice if there is an option to show the UCI-Codes (or Country codes) instead of the full team names in the Infbox.--Chris XC3000 (talk) 20:26, 14 April 2016 (UTC)

I think it will be better to use text at 80 % (small) for teams. Jérémy-Günther-Heinz Jähnick (talk) 08:37, 15 April 2016 (UTC)
I proposed that some time ago myself, but now I think the name is better, because most people will get some information from looking at the name while I doubt that people will get any information from looking at the UCI-code.--Molarus 09:57, 15 April 2016 (UTC)

references, first step

I have inserted the first code for references, which should only be shown in Wikidata. Nno other Wiki should see anything or get error messages because of this new code. The references will be shown the way frWiki would show them. The main functionality is in function references (lines 92 - 133). At the moment only the palmares will show references for properties P854 (url), P1476 (titel of the webpage) and P577 (publication date of the webpage). --Molarus 11:16, 13 April 2016 (UTC)

I already see the first error: publication date is june 2015, but WD is showing mai 2015. Problem is, that the formatDate mediawiki-function don´t work together with WDdate like "1982" or "May 1982". We had this problem with teams in the infobox already and therefore I know how to correct that. --Molarus 11:25, 13 April 2016 (UTC)

/Conf subpage

Molarus, don't you think, that all those l10nDef parts should be in some kind of /Conf subpage? Then the code would be at least a little bit cleaner. It may take some time, but I think it would be worth it. --Edgars2007 (talk) 19:22, 13 April 2016 (UTC)

It is possible to move those data into the templates in the local Wikipedias. I think this would be the optimum, because this way each wiki gets only the data it actually needs. That could be done with the same code that allows to add additional data into the infobox by the users. See for example on this page where I´m adding additional time data for the winners in the infobox. And "Special 1" shows the way it could be done. I would write in the french template something like "|winner = Vainqueur" and in the Spanish template "|winner = Ganador". At the moment, I see still some possibilities to make the code smaller and faster. Otherwise the code will reach 150 kB and will be a lot slower. The main possibility to make the code faster, I see in caching some flags, because many flags are used more then once.
Another topic is that in 2017 maybe we will get the central place for Lua modules at meta and then it would be an option to split the module into many modules. At the moment I see no use in splitting the module. By the way, I would rather split the module into one module for one table. --Molarus 20:35, 13 April 2016 (UTC)
Yes, only X wiki's data at X wiki is a good option. But it also should be better done in /Conf subpage at wiki (at least, it's done with other modules, see, for example, en:Module:Documentation and en:Module:Documentation/config). Well, (wikitext) size in kB doesn't have anything to do with how fast the code works, it depends on code itself (how good and efficient it is written), at least it should be like that. At least, it isn't the main factor. Anyway, this was simply a suggestion. --Edgars2007 (talk) 15:44, 15 April 2016 (UTC)
I know that it is done this way everyway, but I don´t like that. I think it makes the code more difficult to maintain, because the code is spread over lots of files. This is the way it will be done if you are using software libraries, but there are no libraries for this module. Maybe step by step the functions that could move into a library evolves, but it is to early, I think. I could imagine a library for different Wikidata lua functions in the future. For example the flag function and the references function could be a module sometimes, because it could be used by many coders (but these functions are not done so far). By the way, I have discovered the page some times ago, where they have lots of good code examples. I have found code for the switch statement see here too, and I have taken this for as an example for the new date function. Maybe I find more examples for good lua code there. And maybe we will find a good way for profiling Lua code. About caching flag data: I have thought about using a global list for that. Maybe you have a better idea? --Molarus 17:14, 18 April 2016 (UTC)
OK, yes, if the code isn't stable, then having messages in /conf page wouldn't be very nice solution from your point of view. Catching flags - hmm, no, nothing comes to my mind. Defining them (the most popular ones) as local variables could "save some time" (read that somewhere in manual), but probably that is for other usecases. --Edgars2007 (talk) 11:37, 20 April 2016 (UTC)
I suppose flags should be developed as independent module for other uses, too. It should not use Wikidata for now (the data is not changing that much). --Papuass (talk) 12:38, 20 April 2016 (UTC)

I have written the code for the en:Cache (computing) in function flag. I have seen with the mw.log function, that the code is caching the flags for each Wikipedia table apart: For example, a flag in function listofstages is not reused in function listofwinners. This way the code is a bit faster, for example on this page 15 flags are reused but it could be 17 flags. Maybe this is a security feature, I don´t know. If it is not, could someone help me with the code (lines 1650 - end)? --Molarus 22:55, 20 April 2016 (UTC)

Teams (listofstages)

In de:Tour de San Luis 2016 listofstages, the winner of the first stage is shown as Etixx-Quick Step 2016. There is also missing a link to de:Etixx-Quick Step. But it works fine in the Infobox. Is it possible to fix this?--Chris XC3000 (talk) 14:53, 15 April 2016 (UTC)

The problem is solved, I just update the copy of the module. Jérémy-Günther-Heinz Jähnick (talk) 19:55, 15 April 2016 (UTC)
Thanks--Chris XC3000 (talk) 20:47, 15 April 2016 (UTC)

Giro d’Italia Femminile

I saw a problem in fr:WP for this article. I think the reason is that the race for 2016 is added in Wikidata, but the race results are not available (race will be in july 2016) and so the table show nothing at all. I have reverted the french article. See this page at the top. --Molarus 16:47, 18 April 2016 (UTC)

No, Les Meloures create articles but because the precise day for older versions was not know, the display was not correct, even with just the month, so he delete the info on Wikidata, that caused the bug. Maybe we can adapt the program when we have the case of a stage race where only the month is know. Jérémy-Günther-Heinz Jähnick (talk) 09:40, 19 April 2016 (UTC)
I see, a missing date was the problem. I will look into the code to understand the problem better. --Molarus 11:09, 19 April 2016 (UTC)
It seems that the code just wants a year, either from the start time of a single day race or a multi day race. I have changed the code so that if there is no date in the item I assume the year is zero.
I have seen that adding only month and year will show nonsense in the infobox. I have found a good source: here with lots of good data and inserted all the missing dates and added this page as references. --Molarus 17:34, 19 April 2016 (UTC)

+ function func_date

I have added the new function func_date. This function is the first step to move all the date functions into one place. A problem is the function func_month, which tells all the month names for lots of wikis. The new function could replace this function too, but I´m not sure if people will accept that. --Molarus 16:53, 18 April 2016 (UTC)

Btw isn't it better to take the month names from wikidata: January (Q108), February (Q109), ..., December (Q126)?--Chris XC3000 (talk) 17:14, 18 April 2016 (UTC)
I hope to get the names from the Lua Language library. I´m not sure, but I hope this function is a lot faster then getting the data from Wikidata. Another point is, that this library gives short names for months too, e.g. "Feb" for February, which Wikidata will not. But we already have seen, that this function gives the wrong names for some languages (fi and pl names), why I have to correct them. Another problem is similar to the problem with the flags, where we would ask wikidata for maybe twenty flags or month names. Wikidata says that asking for an item is an "expensive" function. Therefore asking for maybe twenty times for an "expensive" month name is bad. At least this is what I have understood from Wikidata:Arbitrary access: "Please be careful with how many items you use for a single page. If it is too many pages, loading might get slow." --Molarus 17:31, 18 April 2016 (UTC)
I don't think it's necessary to ask more than one or two times about a month name, because it's always the same month name. It is similar with flags. In the last years the stage and jersey winners (at Grand Tours) are from 10-15 different countries.--Chris XC3000 (talk) 07:22, 19 April 2016 (UTC)
We show the birthdays in function teamroster and therefore we could have max. 12 names of month to show and additional 12 Wikidata items to read. If we wouldn´t reuse a month name, we would have more then 30 additional wikidata items to read. I will write code that we will be able to reuse a flag data, therefore the code will be faster soon. For example this page is calling 213 "expensive" wikidata functions at the moment. This is the reason why the Lua-code for the tables on this side need 1,89 seconds to be calculated by the wikidata computers. Maybe with the improved flag function there will be 10 or 20 "expensive" wikidata functions less and this page will be maybe 0,2 seconds faster. --Molarus 11:26, 19 April 2016 (UTC)

Function teamroster : display the previous team

Hi Molarus. I am a little less active since few days due to work but I continue developments and illustrating races. Is it possible to make a third column on the table of teamroster where we display the team where were the cyclists at the previous season ? On Wikidata, we start little to little to enter member of sports team (P54) for previous years, and I think it will be interesting to start to display this information when it exists. I can provide we will have specific case, when for example a cyclist is trainee at the end of the previous season. Jérémy-Günther-Heinz Jähnick (talk) 18:49, 22 April 2016 (UTC)

Something like fr:Saison_2015_de_l'équipe_cycliste_AG2R_La_Mondiale#Coureurs_et_encadrement_technique? I would prefer "previous team" as header not 'Équipe 2014'. Maybe the place is a problem. Could I delete the birthday? I mean, what is the reason we show that at a team article? Maybe the age of the riders is useful, which we could calculate and show in the article. And a column "age" with for example "20" as value would be small. --Molarus 20:06, 22 April 2016 (UTC)
Non, just an other column name previous team. The table will be different, instead of having two columns, we will only have one column, as we provide at the beginning. Jérémy-Günther-Heinz Jähnick (talk) 09:05, 23 April 2016 (UTC)
In my opinion, an additional column, named: Joined the Team, (which shows the year when the rider joined the team) could be useful--Chris XC3000 (talk) 09:47, 23 April 2016 (UTC)
Yes, for that we have the place, because we don't write the name of the country contrary to the french Wikipedia, but I see specific problems when a cyclist is fired from his team for doping and finally come months or years after. It rests interesting, we will have specific cases to solve. Jérémy-Günther-Heinz Jähnick (talk) 11:34, 23 April 2016 (UTC)

About "previous team": We could add in which year the team change was. To get the previous team, I have to look into the previous year to see if the team changed. If not, I have to go another year back. This way I will have the information when the rider changed the team. --Molarus 14:09, 23 April 2016 (UTC)

Looking in member of sports team (P54) is also possible.--Chris XC3000 (talk) 15:41, 23 April 2016 (UTC)
Yes, we start little to little to fill member of sports team (P54). It will take a very long time but it is a good investment for the future. Jérémy-Günther-Heinz Jähnick (talk) 18:26, 23 April 2016 (UTC)
I´m looking into P54, but to get the previous team I think I have to do this.
You could have a first look at Module talk:Version 2, but the teams are wrong. And "fired for doping" needs a reference. I could add the code for that too, because we already have some code for references (which is switched on only for WDWiki). Well, I´m not happy with the look of the table. Maybe the birthday could be written next to the rider in size 80%, while the note (e.g.: (1 Jan–20 Aug)) gets a column on its own. This way a long note could be written in two rows. Maybe this way we could have a two column table again. --Molarus 23:43, 23 April 2016 (UTC)
Maybe it's better to show the notes above the tabe; like en:2015 Team Sky season#2015 roster.--Chris XC3000 (talk) 08:04, 24 April 2016 (UTC)
I will think about a possible code for that. At least I have found a better way to get the previous team: I´m reading the start time when the rider joined the current team, subtract one and look what team the rider had been at that time. I think the code for that is correct, still missing is to get the official name of the old team. I have added the year when the rider was member of the old team. --Molarus 11:46, 25 April 2016 (UTC)
We have a specific case with trainees like François Bidard (Q20817476). Jérémy-Günther-Heinz Jähnick (talk) 15:35, 25 April 2016 (UTC)
The problem seems to be that this rider has two P54 at the same time. Is it correct to take that team, where the qualifier for trainee is set, because this is a professional team? --Molarus 16:39, 25 April 2016 (UTC)
fr:Nils Politt was trainee last year at Katusha, but do with them only a stage race. He did the other races with its team. This is a good example to understand the situation : some cyclists have two teams. Jérémy-Günther-Heinz Jähnick (talk) 11:05, 26 April 2016 (UTC)
I understand that: There are "Équipes amateurs" and "Équipes professionnelles", as shown in the french infobox. My question is which team should I show in the table? Or maybe both? Wikidata says, that Q2360572 (Stölting Service Group) was a "UCI Continental Team" while Q847200 (Katusha) was a "UCI WorldTeam". Maybe I should prefer the "UCI WorldTeam" / "UCI ProTeams" / "Groupe Sportif 1" / ... - teams in the table? We have items for those categories, e.g Groupe Sportif I = Q20653563, therefore I could look into the category of a team at a certain time in case of there are two teams at the same time. --Molarus 20:50, 26 April 2016 (UTC)
Yes, we made no distinctions between teams. In the future, we even will add junior teams, to have all the life of the cyclists.

I have changed the algorithm again. Now I take all the teams with a start time smaller then the current time and I choose the team with the highest start time to shown in the table. The number in the table is the end time of that team. For François Bidard the time 2015 is shown, interesting. I will test the new algorithm with more team items. --Molarus 01:16, 28 April 2016 (UTC)

Yes, I see that. Jérémy-Günther-Heinz Jähnick (talk) 08:18, 28 April 2016 (UTC)
Now the "official name" works too. I have seen that if there is no "previous team" the heading is still there. Should I didn´t show the heading if there is no "previous team"? I have tested a bit in WDWiki and in frWiki, looks good. Tomorrow I will try to move some text below the table, maybe only P1534 (end cause) plus the name of the rider plus a reference. If I remember correct we said some time ago, that P1534 (end cause) could have more possible values but Q23531302 (fired for doping). There was also the case where a rider died. That is somewhere in the archive. --Molarus 21:14, 28 April 2016 (UTC)
I have one item by case, but sometimes, cases are precise, so we have different items, that are grouped in the kit to translate. Sometimes, a cyclist is suspended by the UCI for doping, but has already left his team because he had been fired, so the end cause (P1534) is only the fact that he is fired by its team. The word is similar in english that in french : nuance.
In reality, we will always have a column for the previous team, because when a team is founded, it takes cyclists that already were in the roster of other teams. The difference is for the moment we are starting to enter these informations on Wikidata, so we have all the work to do (even if we save time by doing this way, we start to have no needs to want the team of a cyclist when he is on a podium, and the work is done for several languages).
On another hand, I will verify if all datas on the kit to translate have a value in English and propose on a commons talk space to add translations in other languages.
Douglas Fugazi call me to say that on es:Tour de Romandía 2016 there is a problem with that end time (P582) in the infobox : 26 de abril – 1 de abril de 2016. The race finish the 1st of may. I verify, and we don't have this bug on other languages. Jérémy-Günther-Heinz Jähnick (talk) 09:00, 29 April 2016 (UTC)
I can´t edit the module in esWiki, therefore you have to copy the module from WDWiki to esWiki or correct that by hand. In line 320 I have written lang:formatDate( "F", b1 ) but "b2" is correct. That means the month (that is done by 'F') for the start time (b1) was shown, correct is for the end time (b2). I have seen that I have done more of this type of error, in brWiki, eoWiki and euWiki too. I saw that they had a version from March, therefore it is an older error. I have corrected that in all three wikis. Sorry.
Module talk:Version 2 shows now the values of P1534 (end cause) below the table. If there is no property, nothing will we shown. Language is the local language or english. If there is a second rider with a P1534 this will be shown behind the first text. Maybe this is a problem, because there is no line break. Maybe a multi line solution is better? For this example there is no gain in space ("trainee" shouldn´t be below the table, I think), but it looks good to me and I have seen in the Kit that we have something similar for P793 (significant event) for table listofstages and P1478 (has immediate cause). As far as I remember, we are showing that information only in Wikidata, not in Wikipedia. Maybe that is an option for that table too? Please tell me if the text below table teamroster is OK and which design I should choose. References are working now too, but I have changed a lot in the function references, therefore it will be not easy to transfer that function back into module cycling race, but this way I can improve that function too. --Molarus 01:19, 30 April 2016 (UTC)
It is very good. I think we can do a test on FR Wiki for the new version of teamroster. This way Anthony59999 will surely indicates me specific cases. Ok for reason at the bottom of the table.
Yes for significant event (P793) and has immediate cause (P1478). Jérémy-Günther-Heinz Jähnick (talk) 21:22, 30 April 2016 (UTC)
Now, with a link from Lloyd Mondory in the table to the text about Lloyd Mondory below the table. It is working with an "anchor" (without using fr:Modèle:Ancre or similar templates). I write below the table <span id="note">ref: </span>, which tells Wikipedia where it should jump to. I´m not 100% sure that this works, but I think we should have this. I will move all the new code into module Cycling_race maybe on sunday and monday, depends on how difficult this will be.
I´m not sure there is a Wikipedia article at frWiki that uses P1534 (end cause), but I can test the module with my user page in frWiki for item "AG2R La Mondiale 2015". --Molarus 23:23, 30 April 2016 (UTC)
No, we are far to use all possible properties. But on FR Wiki some persons are causing problems to avoid to use Wikidata. It is a short term strategy because we will all finish to use Wikidata, but for the moment it is a big loss of time, that is why I prefer working on programs on Wikidata (it is also more logic to give this possibility of use in more than one language, to make a network effect). Jérémy-Günther-Heinz Jähnick (talk) 14:20, 1 May 2016 (UTC)
I have tested the code in frWiki, but not moved the code to frWiki. I would like to switch on references in frWiki too. Could you have a look into how the references should look for Q18384639 (Lloyd Mondory)? The reference for Lloyd Mondory has four properties. Maybe they could be shown like "(en) « Lloyd Mondory handed four-year ban for EPO », sur (consulté le 30 april 2016),‎ 30 octobre 2015." I´m not sure if I will be able to write the "(en)" at the beginning, but the information should be available in WD. I think, more references will be an argument pro Wikidata. --Molarus 23:23, 1 May 2016 (UTC)
Yes, it works. The most Wikipedias uses Wikidata, the most references we will have. I am interested for the (en). Jérémy-Günther-Heinz Jähnick (talk) 16:09, 2 May 2016 (UTC)

The code can be copied to frWiki in my view, but there might still be some errors in the code. For example, I have inserted a few hours ago a new P54 and the data didn´t show up in the table, so I had to correct the code again. The point is, that in the second half of this month (mai) I will be away from home and I don´t know how much time I will have to be online. About the code for the references: At the moment the code works only with one reference for one Wikidata statement, but we will have more than one reference for one Wikidata statement. For example, frWiki would prefer french references over english references. PS: The references will show up only at frWiki and WDWiki, nowhere else. Adding more wikis means writing code for each wiki to print the references in the way each wiki wants them. I will need a reference example, similar to the french example. Maybe I can write a kind of standard reference, but similar to the translations, that is only for a short time. --Molarus 20:33, 2 May 2016 (UTC)

Maybe en:Template:Cite web could help you. Perhaps the overwrite function is useful for different languages.--Chris XC3000 (talk) 21:43, 2 May 2016 (UTC)
I think we should have the references in Wikidata at this moment, because this way the wikis will get at least some references.
I have thought about that template too, but at the moment it would not improve the code. It is an option if we want references other then a weblink too.
And I have one problem myself. At the moment we write into the team item some time data and trainee data, but we have the same kind of data in the rider items too. I don´t know if the code is able to work correct if the code would get all the time and trainee data from the rider items and none from the team item? I guess not. Same problem with the "is fired" item. For example Carlos Betancur: In the team item there is the start and end data: 1 1 2015 - 20 8 2015. In the rider item there is the data that he was at AG2R La Mondiale from 2013 - 20 8 2015. That is the same information written twice. PS: I would prefer that all this data is in the rider items, but we could say: If there is no time and trainee data in the team item, look into the rider item if there is one. --Molarus 05:49, 3 May 2016 (UTC)

References are switched on for frWiki, enWiki and deWiki. There is also fallback code for the other wikis, but not switched on. The example with Wanty–Groupe Gobert 2016 shows, that some Wikidata references are bad and I guess that editors could have a problem to understand that the references are from Wikidata and how to improve them. There is another problem. If we have only a weblink as references, i´m not sure how to show that weblink or maybe we should not show that reference at all? --Molarus 09:28, 5 May 2016 (UTC)

I have copied the code to frWiki and corrected some new and some old errors, but now it looks good. See fr:Tour de Cologne 2015 for the references in the infobox. I don´t know where the "archive"-link came from, I guess that is done on its own. Please tell me anytime to switch the references for all wikis on. Maybe later for the section "Race details" too? And there are more possible properties for references, see Help:Sources. --Molarus 04:55, 7 May 2016 (UTC)

Hi. I have finished the Quatre jours de Dunkerque. I am here for the week. It is good. I think we will can make tries on FR and DE Wiki during two weeks, and give this possibility Wikis after Wikis thanks to our contacts. The archive link come from FR Wiki. I take the time this week to do tests but I already know it is very good. Thank you. Jérémy-Günther-Heinz Jähnick (talk) 09:20, 10 May 2016 (UTC)

Those two wikis already have the update and it looks good, but the code was more difficult than I thought. fiWiki got the update too, but the new code is not working (Flagged revisions). I should have asked the user in fiwiki to approve the new versions. Then I have found some old problems in function teamroster: The function breaks when some properties are missing in the items (e.g. no start time of the season and no team members). Maybe this is the reason why this function is not used much? At Module talk:Version 2, I´m developing the code for this. By the way, I will be offwiki most of the time from next Monday to the end of the month. --Molarus 09:47, 10 May 2016 (UTC)
If the function is few used, it is because it can takes time to enter all datas, especially when we have not again all items for cyclists. But more generally, few users update rosters, especially in small Wikipedias. With the time, these problems will be solved. As example, we enter 2016 teams for cyclists, the next season, we will lost less time because we will only have to add another entry if the cyclist change its team. Other example, in less the three months, teams will have their trainees, so items will be created, and we will already have them in 2017 when a part of these cyclists will enter in teams.
Can you put in the middle the title of the columns Cycliste, Date de naissance & Équipe précédente ? Jérémy-Günther-Heinz Jähnick (talk) 10:25, 10 May 2016 (UTC)
OK, but I don´t like that. --Molarus 12:27, 10 May 2016 (UTC)
Sorry, that is so ugly. I will not do that. --Molarus 19:54, 10 May 2016 (UTC)
A few minutes ago, I have inserted the team members for AG2R La Mondiale 2014 (Q14942523) and I saw that you have always sorted the members in the way that the trainees are at the bottom of the table. Maybe we could start with a sorting algorithm for this feature, which we need for sorting for the names anyway. And I will try no to insert the additional data into this item. The code should read data, for example who is a trainee, from the rider items too. I think the code should be able to use both items to get the additional data. --Molarus 10:15, 10 May 2016 (UTC)
Yes, it is a good idea. Jérémy-Günther-Heinz Jähnick (talk) 11:08, 10 May 2016 (UTC)
Is it possible to use in teamroster the word note instead of ref when a cyclist left the team for example ? Jérémy-Günther-Heinz Jähnick (talk) 12:43, 10 May 2016 (UTC)
At the bottom of the table the translations for "note" (Q489850) could be used, but what about the word "ref" in the table? In german, I would write "Anmerkung" at the bottom and "Anm." as abbreviation in the table. --Molarus 14:18, 10 May 2016 (UTC)
I write here little problems I found when I make transferts. Jérémy-Günther-Heinz Jähnick (talk) 11:59, 12 May 2016 (UTC)
There is an option to correct that. The code has to test if there is a local article even if there is no wikilink. I think something like that is possible, but I don´t know if there is an efficient way to code that. My guess is, that this error will stay as long as we print "red links". --Molarus 09:44, 13 May 2016 (UTC)
So we can come to black letters instead red links. Anthony59999 has found two similar cases on fr:Saison 2016 de l'équipe cycliste SEG Racing Academy. Few months ago, we have had a similar problem with testing this possibility. The best solution is to avoid red links. Jérémy-Günther-Heinz Jähnick (talk) 11:05, 13 May 2016 (UTC)
There is a solution (with mw.title at line 1040 and 1041) and better than I have thought. It is live at frWiki and WDWiki. Since mw.title has to work only for "red links", this part of the code will not slow down the code for the "blue links". At the moment, I´m printing those "red links" black, but it could be even possible to turn them into "red links" with different names, like "Guillaume Delvaux (cyclist)". This would need a lot more code, because I would have to detect if this is a cyclist or something else. Maybe at another time. --Molarus 14:50, 13 May 2016 (UTC)

There is a new update of function teamroster at WDWiki. It reads data from rider item and season item, the season item data is preferred. There are more changes: I don´t show jobs as trainee for "previews team" anymore. If the job was from 2012 to 2014 and the season is 2013, the year "2013" is printed, not 2014 as before. See for example 'Pierre-Roger Latour' at "Module talk:Version 2". And if there is no P527 in the season item the code doesn´t break anymore. PS: If there is an error in the code, I will try to fix it, but no updates until end of Mai. --Molarus 15:55, 14 May 2016 (UTC)

I see that. Not displaying a team for the stage was a recent request of Anthony59999. On my side, I continue tests. Few minutes ago, I enter cyclists for a 1964 team. Jérémy-Günther-Heinz Jähnick (talk) 16:39, 14 May 2016 (UTC)

Use red links for articles that doesn't exist

I think that those articles that doesn't exist yet on local Wikipedia should be red links. I know that some names would be wrong if not translated on Wikidata, but it's easier to create an article from a red link than if no link at all. --Stryn (talk) 15:23, 3 May 2016 (UTC)

There will be a problem with some links if they have the same name as already existing article about other topic. --Papuass (talk) 15:30, 3 May 2016 (UTC)
We show for articles that don´t exists english or french Wikidata labels. I don´t know if local articles should have that names. For cyrillic writing wikis this is even wrong. --Molarus 15:42, 3 May 2016 (UTC)
Oh, yes, I didn't remember that. I asked because on the Finnish Wikipedia user removed the information coming from Wikidata because of "it looks better without template and you can see red links". --Stryn (talk) 16:38, 3 May 2016 (UTC)
Maybe it's better for languages which use the en:Cyrillic script to show the russian label as first fallback?--Chris XC3000 (talk) 16:45, 3 May 2016 (UTC)
I think redlinks should be shown if there exists a local label.--Chris XC3000 (talk) 16:53, 3 May 2016 (UTC)
But keep in mind that on Wikidata can have many labels with the exact same name. --Stryn (talk) 16:58, 3 May 2016 (UTC)
Ok, then redlinks should be shown if there exists a local label and if there is no other article with the same name.
But maybe it is to complex to check if there already exists an article with the same name.--Chris XC3000 (talk) 17:09, 3 May 2016 (UTC)
No, the check itself is pretty trivial and is almost non-expensive. --Edgars2007 (talk) 17:12, 3 May 2016 (UTC)

The latest version of this module is with "red links" for fiWiki, deWiki and WDWiki. I have changed function WPlink for this feature and it seems function listofwinners don´t use this function or there is a different reason for that. I have not looked why some teams are red and others are not. We could change the "red link" version to be the new standard or we could say that most wikis get that and only some don´t want that or we revert the "red version" update. What is missing, I will do after your decision. --Molarus 22:34, 4 May 2016 (UTC)

I have tested a new version of the "red link" feature in mkWiki where only makedonien labels are changed into red links, which looks really good. I think you are right that this is an improvement. This feature is now switched on for all wikis, but WDWiki. I will look into table listofwinners. If you object this, please let me know. --Molarus 07:07, 6 May 2016 (UTC)
de, fr and fi have the latest update. Done, imho. --Molarus 05:29, 7 May 2016 (UTC)

Little problem for teamroster

Hi @Papuass: : a problem occurred today when I update the copy of CA Wiki, see ca:Bic (equip ciclista). I am not sure but I think it comes from your edits. As you can see, the table become too large, I think by experience it is just a detail in the code. Jérémy-Günther-Heinz Jähnick (talk) 09:18, 26 May 2016 (UTC)

@Jérémy-Günther-Heinz Jähnick: I think I fixed it. --Papuass (talk) 09:27, 26 May 2016 (UTC)
Perfect. I update the copy at CA Wiki, and the problem is solved. Jérémy-Günther-Heinz Jähnick (talk) 10:43, 26 May 2016 (UTC)

Problem with Lloyd Mondory (Q707108)

There is a user who has changed P1534 to P1643 in item Q707108 more then once. Maybe he/she does that in more items? I don´t want to start an edit war. Should we allow in the Module both properties? --Molarus 11:58, 28 May 2016 (UTC)

end cause (P1534), departure transaction (P1643), Lloyd Mondory (Q707108). Good initiative from Casper Tinan (talkcontribslogs). When I write the documentation, I don't know this property. But this property is better.
I ask the question to Casper Tinan : est-ce que tu penses que departure transaction (P1643) pourrait être utilisé comme qualificateur lorsque nous listons un à un les coureurs d'une équipe avec has part (P527). Les valeurs que nous utilisons sont death (Q4), died during training (Q23498247), died during competition (Q23498248), end of sports career (Q3428243), change of team (Q23498196), fired for doping (Q23531302), suspended by the UCI for doping (Q23531338). Jérémy-Günther-Heinz Jähnick (talk) 15:42, 1 June 2016 (UTC)
Merci de m'avoir notifié. Le problème est qu'on a deux propriétés avec grosso modo la même signification. departure transaction (P1643) est spécifique au milieu du sport, fait partie de longue date des qualificateurs autorisés pour member of sports team (P54) et est historiquement la plus utilisée tandis que end cause (P1534) est plus généraliste. A ce stade, j'ai harmonisé en reprenant la plus utilisée mais on pourrait aussi tout transférer vers end cause (P1534) et demander la suppression de departure transaction (P1643). Il faut juste éviter d'utiliser les deux car ça complexifie la tâche des créateurs d'infobox. Casper Tinan (talk) 20:59, 1 June 2016 (UTC).
Merci Casper Tinan (talkcontribslogs). Par hasard, je suis tombé à l'instant sur acquisition transaction (P1642), qui est donc l'opposé de departure transaction (P1643). Comme tu t'en doutes, si on arrivait à entrer dans Wikidata une raison pour laquelle un coureur sort de l'équipe, on ne savait pas encore quoi utiliser pour le cas d'un coureur qui entre dans l'équipe (j'ai d'ailleurs ce cas aujourd'hui). Ton avis va donc être suivi (je t'ai notifié parce qu'on avait déjà discuté ensemble de propriétés à utiliser et de manières de remplir Wikidata).
Little translation for you Molarus. Casper Tinan explains in French that departure transaction (P1643) is specific in sports where end cause (P1534) is more general. They are in use to say the same thing. But at this moment, I just have found acquisition transaction (P1642), I am interested because I don't have until this a property to explain the reason a cyclist enter the team. And finally, I say at Casper Tinan I call him because by the past I already found advice thanks to him. Jérémy-Günther-Heinz Jähnick (talk) 12:00, 2 June 2016 (UTC)
Just tell me someday what you have decided. By the way, I saw P2121 (prize money) that could be relevant for us too. --Molarus 15:22, 2 June 2016 (UTC)
In a first time, keep end cause (P1534) and modify the code to take acquisition transaction (P1642) and departure transaction (P1643). In a second time, end cause (P1534) will can disappear because I will modify little to little the statements. Jérémy-Günther-Heinz Jähnick (talk) 08:59, 5 June 2016 (UTC)
I respond here, yes, it is also possible and a good idea to keep the two possibilities. Jérémy-Günther-Heinz Jähnick (talk) 10:20, 8 June 2016 (UTC)
The code is updated in this Wiki. It should be OK, but I have to test that in frWiki to be sure. It is not difficult to delete P1534 out of the code, we will see later if that is better or not. --Molarus 13:44, 8 June 2016 (UTC)

As I was testing the code, I have seen that Casper Tinan (talkcontribslogs) used P1634 to tell that a rider has reached the end of his career. But this information was not shown in the article. The reason was that happened at the normal end of the year. We have assumed so far that note-thinks happen after 1 January or before 31 December. I have changed that. I´m not sure if the note should be with or without brackets.

I couldn´t test P1642 (acquisition transaction) because I have not found an example, but since the code is the same as for the other two properties, I see no problem. This update is only on WDwiki so far. --Molarus 02:06, 9 June 2016 (UTC)


Is it possible to represent in listofstages the column stages centered and in teamroster the column Date of birth flush right?--Chris XC3000 (talk) 11:38, 28 April 2016 (UTC)

Rounding error

Hello everyone, I tryed to use Modèle:Cycling race/generalclassification and found out a small rounding mistake. When calculating back the time in h/min/s from the seconds of "race time", it subtracts sometimes (not always) one second. Exemple: the race time is 3 h 24 min 38 s, so 3*3600+24*60+38=12278. I type 12278 in race time, and Modèle:Cycling race/generalclassification returns me 3 h 24 min 37 s. I suppose it is an issue with the +/-1 of all those properties. Note that it doesn't systematically happens. Psemdel (talk) 10:14, 18 June 2016 (UTC)

Thanks for telling me, the math was still wrong (I tried to correct it yesterday already). At least with 12278 the right time shows now. I have corrected the code at WDWiki and frWiki. --Molarus 11:38, 18 June 2016 (UTC)
No problem. It is beta testing ;). Psemdel (talk) 15:44, 18 June 2016 (UTC)


In de:Tour de Romandie 2016#Etappenübersicht stage 2 ends in Morgins (Q2908954), but on dewiki there is no article about this village. However Morgins (Q2908954) is a village in the municipality of Troistorrents (Q68823) and there exist an article about Troistorrents on dewiki. I think it would be great, if we could use the "Overwrite-Function" (from the infobox) in listofstages, too.--Chris XC3000 (talk) 12:27, 28 April 2016 (UTC)

I think this is a good idea which I will do (not now). I have seen this problem too at the first Tour de France. The race started either in Paris or at a cafe in a small village near Paris. Same problem with "Rund um Köln", that ends always in Cologne, but in deWP we could give a link to a more specific place, maybe de:Altstadt-Süd. I think the exact place is Harry-Blum-Platz, but we have no such article in deWP. --Molarus 16:06, 28 April 2016 (UTC)
Hey Molarus, do you have this topic in your mind?--Chris XC3000 (talk) 12:21, 2 June 2016 (UTC)
This is on my mind (better, it is on this page), but it will not be done soon. I think there is a backlog (Rückstand) of maybe one or two months of work. And it rather looks as the backlog is getting bigger, not smaller. --Molarus 14:32, 2 June 2016 (UTC)

Maybe the "Overwrite-Function" for function listofstages could work like this for entering data into the table:
"| Villes étapes or Etappenorte or Ciutats d'etapa : 0 or 1 or 2a or 3 : a or b = abc"
The second parameter is P1545 (series ordinal) and tells the line where the village is changed. a or b means first or second village.
For the rest data we could use - similar to the infobox - this:
"| Special 1 or Special 2 : 0 or 1 or 2a or 3: left or central or right = any text".
The second parameter (series ordinal) is the line after which the text will be written. The third parameter is the formatting of the text.
Jérémy and Chris XC3000 would you both take a look into this, maybe sometime next week I can start with coding this. Molarus 06:49, 25 June 2016 (UTC)

My suggestion would be:
"|Stage 1 : Villes étapes or Etappenorte or Ciutats d'etapa : a or b= abc" (I would prefer "Start oder Ziel" instead of "a or b" but I think it's difficult to implement.)
"|Stage 1 : Villes étapes or Etappenorte or Ciutats d'etapa= def" (like Stage 1 en:2016 Giro d'Italia#Route and stages)
"|Stage 2 : Etappensieger or ainqueur d'étape= Stage canceled"
"|Stage 3 : typeofstage= [[File:Hillystage.svg|Hügelige Etappe]]"
"|Restday : (after) Stage 9 : Date = 11 July; Villes étapes or Etappenorte or Ciutats d'etapa=Restday in Andorra; typeofstage= [[File:Stage rest day.svg]]"
--Chris XC3000 (talk) 10:42, 25 June 2016 (UTC)
It would be "|Stage 1 or Etappe 1 or 1re étape : a or b = abc". It doesn´t matter if there is a "1" or "1er". The problem with "Start or Ziel" is that we don´t have the translations for both words. Positive is that this way we would need one parameter less. We don´t have the translation for "Restday" either, therefore "Special 1: Stage 9 or Etappe 9 = abc". Maybe the text could be "= text" or "= text 1 : text 2". We can´t give only one day, because it could last longer, therefore no date to show. And the date is not needed, because we have the date before and after the rest day. Formatting would be done by the table: The en,de,fr table, for example, show the first part of the text at the place of the two villages and the second part at the winners place. We don´t have to tell the module the stage rest icon, that would be in the code.
About the time this will need: Now classification needs only finetuning and I could use a lot of the code from the infobox, therefore I think I can write the code next week. --Molarus 15:45, 25 June 2016 (UTC)
It is more easy to create the article about the village of Morgins (Q2908954). Note that in a future, cities will surely had infobox that take datas from Wikidata. For cancelled races, we already discuss of this subject. The process is ready, and one day informations will be taken on Wikidata for Wikipedia. The fact is we have more important developments (I think at the classifications). Jérémy-Günther-Heinz Jähnick (talk) 11:31, 25 June 2016 (UTC)

Maybe I have the code, at least it is the first working code. It is a bit different than I have planed. See at Module talk:Version 2. At the moment, there are no translations (maybe I shouldn´t try to code translations, because this feature will not be used much) and there is no "="-sign in the wikicode. The command that changes the place has as second parameter "a" or "b", the sentence without "a" or "b" is the rest command. It is possible that the second parameter will always be a command, for example, it could be "text" for the restday, "typeofstage" for a different icon, and so on. "Place a" wouldn´t work, because that would be two words, it had to be something like "placeA" or "locationB" (en:WP says: The term location generally implies a higher degree of certainty than place) and maybe "winnerA" to print "Stage canceled". Extending the code would not be much work. Please comment Jérémy, Chris XC3000 and everyone else. Molarus 16:11, 29 June 2016 (UTC)

I don't like the a,b solution, it's neither intuitive nor self explanatory. Same with the sentence without "a" or "b" is the rest command. This soulution is clear to me, but if a user will see this the first time I'm afraid he won't understand how this works. By the way in line 2124 there is the translation for rest day.
I think this could be a better way:

| Stage 1 : Villes_étapes_A : abc
| Stage 2 : Villes_étapes_B : cde
| Stage 3 : Villes_étapes_AB : lmn
| Stage 4 : Vainqueur_d'étape : xyz

--Chris XC3000 (talk) 19:28, 29 June 2016 (UTC)
If I´m going to use translations for the second parameter, then for the first parameter too. I will try to code that. --Molarus 07:50, 30 June 2016 (UTC)
I think the code is done. I have tested the translations for brwiki, frwiki and dewiki. Getting the text for the restday in the middle between the two lines was a bit tricky. I´m not sure if that looks only on my screen good. Comments? More wishes? --Molarus 21:00, 30 June 2016 (UTC)
The code is not done. There could be a prologue and stages called 2a or 2b. And as an option to input the date for a rest day. I have seen the translation for 'rest day' in function typeofstage. I´m not sure about using that in the wikicode, because editors can´t see what they have to write. Maybe we could show the icon for a rest day? --Molarus 23:56, 30 June 2016 (UTC)
Myabe it's better if text for rest day is left-aligned (linksbündig). It should be possible to change all icons--Chris XC3000 (talk) 07:10, 1 July 2016 (UTC)
The translations are out of the code, now it is english. And I dont say "stage 1" or "2era stage" or "prolog", now it is "row 1" and "after row 1". This way the code is easier. The second parameters are "location [a/b/ab]", "date", "icon", "text", "winner [a/b]" and "distance". The file data looks this way: [[File:Stage rest day.svg|any text]] and I´m transforming that to "[[File:Stage rest day.svg|border|right|20px|any text]]". The possibility to strike a distance and add a new one is a good idea. Icons could be changed and the new row could get one too.
So far I have done only a little bit testing, because first I wanted to hear if that is right this way. Another question is that this is a feature that some editors are going to use, but people don´t know about it. Should we turn that into an official feature written in the documentation or not? And I have to do some improvement for the "additional line" to look better. Part of this problem is the date column, which looks ugly when the additional date is larger then the other dates. Maybe that is something the editors should care about? --Molarus 15:36, 1 July 2016 (UTC)
It's looking great. Changing date is only meaningful if you change all the dates, like de:Giro_d’Italia_2015#Etappen.Übersicht.
I think this should turn into an official feature written in the documentation. I my opinion this feature could take down reserves against wikidata. Btw a few days ago I discovered another wikidata project: de:Vorlage:Infobox_Computer-_und_Videospiel.
Is de:Vorlage:FNBox working in the module? It would be nice, but it's not necessary.--Chris XC3000 (talk) 16:26, 1 July 2016 (UTC)
Thu, 05. May (doc.) Something like this would allow to show dates like the one in Giro d’Italia 2015, no problem to code that. The big advantage of lua, it is a real programming language, not like wikicode. About that template FNBox: It is similar to what we have for the roaster table. I think it is possible to insert a template at the wiki into the cycling module. We already have added a template into a WD statement to print something like 1er in the picture legend of the infobox. But I´m not sure if that template would work too. --Molarus 17:11, 1 July 2016 (UTC)

code is at wdWiki and deWiki. --Molarus 19:05, 2 July 2016 (UTC)

I have written the documentation at de:Vorlage:Cycling race/listofstages new and added the new feature. By the way, the new feature is already in use at de:Paris–Nizza_2016#Etappen and at de:Tour_de_France_2016#Etappenplan in deWiki. I think, it is a good improvement. PS: A small documentation is in the code in english at function listofstages. --Molarus 19:10, 6 July 2016 (UTC)

Function teamroster : request for a sort by alphabet

This last days, I give Template:Cycling race/teamroster (Q23013328) at 20 Wikipedias. It permits me to discuss with contacts. I have a request from @Ehrlich91: (MK Wiki) to sort the cyclists by the alphabetical order. In this country, they have a different alphabet (the russian user can be interested by this solution). In the same time, I have a similar request from @Psemdel: on FR Wiki.

A property sortkey was created, but deleted very rapidly. The solution I see is to use family name (P734), given name (P735). This second property is interesting only when cyclists wear the same family name. family name (P734) has the advantage to be translatable in other alphabets. At this time it is very rare we use it in cyclists items, but it is not a problem to start to use it. This way, we will have cases to solve with names or nordic people. I also notify @Anthony59999: (I have another request in link, but I prefer wait a little, I must again discuss with users of that). Jérémy-Günther-Heinz Jähnick (talk) 19:02, 11 March 2016 (UTC)

I don´t think there is any sorting at all, at least I have not seen any. And at Module:Cycling team this problem is listed at the TODO list. We have done sorting already in this module for function listofwinners. That was sorting the winners after the year of the race.
I´m not sure if a different alphabetical order is a problem at all, because characters have a number and sorting is done after this number. It is getting difficult if the numbers are not ordered properly. Take for example A and Á. I don´t know if Á is between A and B or if Á is behind Z. A solution for that would be an ordered list (or better one for Latin script and one for Cyrillic script) of all characters (except for Japanese).
Another problem could be seen at Module:Cycling_team the "Topsport Vlaanderen-Baloise 2016" example. There are persons named like "Aimé De Gendt" Is "De" part of the surname or should this person be sorted after "Gendt"? If "De" is part of the surname then it is obvious that I can´t take the last word to sort. A possible solution could be to take the last word to sort if there is no P734 (surname) in the item of the rider. Since we already look into the item of the rider to get the birthday, it is no problem to look for this property too.
Maybe there are more problems in sorting the names for this function. I would say it should be done within three days. PS: Tomorrow I will start with the code for the mk:map-problem and if I get no problem, this will be done within a few hours. But it is possible that there are problems and then I will need more time. --Molarus 00:30, 12 March 2016 (UTC)
You have all your time. I regularly say to contacts that the all development of a function takes one month, and that this new function will evolve during the weeks to come. For names, we generally sort them by the first letter, ex : De Gendt, Van Asbroek. It was the same when I was at school, we had in the classroom De and Van, and they were sorted like other names. ProCyclingStats do that. With the time, saying that a person is from a city is a little lost, we just say it is a family name. Some names are noble, but is a rare in cycling. Moreover, in France, it has disappear since 200 years. Sometimes, the name evolves during the years, my german name Jähnick is written in France Jannick even if I am the only one in my family to use the german shape and the german pronunciation. My best friend's name is Driel (a commune in NL), but originally was van Driel...
It will be the first sorting by name. If you want, I can prepare you a list. Note that it can be different even between latin languages, but specific letters are not so frequent. Jérémy-Günther-Heinz Jähnick (talk) 10:42, 12 March 2016 (UTC)
A list is not necessary, because for writing the code a small list with only some characters is enough and maybe it is possible without such a list. I guess that this is a standard problem and maybe there is a standard solution for this problem to find at the internet.
Another idea is to have special code for some standard name parts like "Van" or "De" that will tell the sorting function that the family name begins here. This way we will reduce the number of names where a property is needed. Later we can add more name parts into this list.
By the way, I found this article: en:Surname --Molarus 11:49, 12 March 2016 (UTC)
No easy way to detect which is name, surname. See Luis Leon Sanchez, Edvald Boasson Hagen, etc. --Papuass (talk) 21:20, 12 March 2016 (UTC)
Yeah. The more I read about that topic, the more problems I see. Maybe sorting info in the article is a solution? We could say in the wikipedia article something like "|sort = 1,2,5,4,3,6,7,8,9". This way we could sort the riders in many ways, maybe after how many points each rider has. @Papuass: If you don´t know what I´m talking about, we have a new feature since yesterday. See at section "Tour de France 2015" of this page in edit mode. --Molarus 03:12, 13 March 2016 (UTC)
Papuass (talkcontribslogs) There are no problems, there are only solutions. As you know, we need the nationality of a cyclist to define the flag we will use in the article. Two days ago, I entered datas on Wikidata when I had the case of Ján Svorada (Q536359). This cyclist change its nationality and I must search informations. Now the work is done, and I sometimes have this type of case, or different dates of birth. For names, we will must do the work in some case to define what word is family name (P734) ans what word is given name (P735) with sources to add at the item if necessary. Jérémy-Günther-Heinz Jähnick (talk) 10:58, 13 March 2016 (UTC)
A sorted table is nice to have, not more. As a longtime editor I have seen that the standards in deWP went so high, that what was fun years ago has turned to a lot of work nobody wants to do anymore. The time of the editors is the most valuable gift we get. We should not waste that for unnecessary things, therefore we have to find a solution so that the software will do 95+% of the work. If that is not possible then I see no chance for this feature. --Molarus 15:48, 13 March 2016 (UTC)
Add family name (P734) is fast, and for given name (P735) we do it always. It is typically a task I can do in tandem with another user. For 2016 cyclists, we already have all items for cyclists. When we will know trainee in few month we will go fast to add a family name (P734), especially if the item already exists. Jérémy-Günther-Heinz Jähnick (talk) 16:56, 13 March 2016 (UTC)
Maybe a way is not to expect that everything is sorted 100% right, but if we have some information we should use that and if there is no information we don´t sort (That is better than sorting wrong). Therefore, a step by step approach. I will think about an algorithm that can do that. --Molarus 09:14, 14 March 2016 (UTC)

I have been working for some time now on the sorting problem. At the moment names like "A B" gets sorted, missing is code for names like "A B C", "A B C D",... The code works for latin script and Macedonian script. I am machine translating names that have no Macedonian translation, then sorting with the lua sorting function is no problem. I guess, my machine translating is not very well. I have created a table from WP article en:Romanization_of_Macedonian for some characters, missing are for example: x, y, é, á,.. Those missing characters will not be seen, therefore I might have to expand the translation table for é, á,.. (done, but some special characters might still be missing). The result could be seen at Module_talk:Version_2#Lampre-Merida_2015. It works for latin scripts too, but the result is that the trainees are not at the end of the table anymore. ruWiki seems to have lots of translations, therefore sorting for ruWiki shouldn´t be difficult. About jaWiki, I have no idea.

I will go on with the code for names with more then 2 parts, but I don´t know if we could give this code to the wikis, because I don´t know what the editors in mkWiki will say to machine translated names. At least, it was fun to develop. PS: An option would be to sort those names with a Macedonian translation and show in the table first the sorted Macedonien riders and after that the sorted/unsorted riders with non-kyrillic names. --Molarus 23:08, 13 June 2016 (UTC)

I think @Ehrlich91: would be interested. It is not a problem for trainees : by the past, they were written at the bottom of the table just because we want to add their previous team in the current year where for other riders we wanted to display their team in year-1. For name with 3 or 4 words, we can use family name (P734) and given name (P735), even suggest to Wikidata users to add this information to items (yesteday for example an user do this work for a pair of items). Note that in some cases I don't know yet if it is on the middle a given name or a family name. Jérémy-Günther-Heinz Jähnick (talk) 09:10, 14 June 2016 (UTC)
@Jérémy-Günther-Heinz Jähnick: @Molarus: Thanks to both of you. This will be very helpful for me, and also finally to implement these modul on Macedonian Wikipedia. Molarus please tell me, how I can help you. --Ehrlich91 (talk) 20:05, 14 June 2016 (UTC)

I´m translating non-cyrillic characters to cyrillic characters with this table: transl = {[" "]=" ", ["A"]="А", ["a"]="а", ["B"]="Б", ["b"]="б", ["C"]="Ц", ["c"]="ц", ["D"]="Д", ["d"]="д", ["E"]="Е", ["e"]="е", ["F"]="Ф", ["f"]="ф", ["G"]="Г", ["g"]="г", ["H"]="Х", ["h"]="х", ["I"]="И", ["i"]="и", ["J"]="Ј", ["j"]="ј", ["K"]="К", ["k"]="к", ["L"]="Л", ["l"]="л", ["M"]="М", ["m"]="м", ["N"]="Н", ["n"]="н", ["O"]="О", ["o"]="о", ["P"]="П", ["p"]="п", ["Q"]="К", ["q"]="к", ["R"]="Р", ["r"]="р", ["S"]="С", ["s"]="с", ["T"]="Т", ["t"]="т", ["U"]="У", ["u"]="у", ["V"]="В", ["v"]="в", ["W"]="В", ["w"]="в", ["Y"]="Ј", ["y"]="и", ["Z"]="З", ["z"]="з" } I know that is not 100% correct. The result is seen at Module_talk:Version_2#Lotto_NL-Jumbo_2016 I´m sure some translations are bad. But how bad? The problem is that sorting non-cyrillic characters and cyrillic characters together makes nonsense. I have changed the code so that I´m translating every name now. I have already seen, that for example "nn" should be used as "n", for not producing "Беннетт". --Molarus 21:16, 14 June 2016 (UTC)

This can not be used in my language because we use transcription for every language. So, on example "Michael" on English in Macedonian is „Мајкл“, but on German in Macedonian is „Михаел“. Because of that, I try to translate every name with correct names today or tomorrow from every UCI World Tour team. Thanks for your effort. --Ehrlich91 (talk) 16:48, 15 June 2016 (UTC)
Agree, sorting should be done based on Wikidata labels. Latvian language is also affected by this. Even though we use latin alphabet, we still transliterate names using different rules for each language (based on International phonetic alphabet, exceptions exist). For example "Ruben Zepuntke" becomes "Rubens Cepunkte", but "Haimar Zubeldia" becomes "Aimars Subeldija". --Papuass (talk) 18:01, 15 June 2016 (UTC)
Without translation it is not possible to sort the names together. We could show the sorted and translated names first and then the sorted names without a translation. Maybe we could add a line, a different background color, or something else into the table to show where this "second" table begins. I will throw the translation out of the code and try the new path. --Molarus 19:02, 15 June 2016 (UTC)
You can see at Module_talk:Version_2#Lotto_NL-Jumbo_2016 that the team table is now parted into two. The first part has riders with a local translation, the second part has no local translation. I have tested that in mkWiki and it really looks as it should do. Names like "Alberto Bettiol (fr)" are in the second part of the table. The next step would be to sort both parts and add something to show that there are two parts. What do you say? --Molarus 20:49, 15 June 2016 (UTC)
I have another question: I had written code for the old version that the sorting feature is switched on in the Wikipedia article (similar to the infobox) or in the code for a whole Wiki. For example frWiki would use this feature only for some articles, not for all, I guess. This way the code would be faster in frWiki. But in mkWiki, lvWiki and ruWiki a always on solution could be better. What do you say about that and Jérémy, please, say something to both questions too. --Molarus 21:24, 15 June 2016 (UTC)

I think I have found a solution for sorting the table. At least it works where I have tested the code (WDWiki, mkWiki and lvWiki). Next step will be to improve the code which detects the first name and the surname. --Molarus 06:11, 19 June 2016 (UTC)

@Molarus: I finally done every single name of the UCI World Tour teams, so can you please explain how to use templates in the articles with sorting. --Ehrlich91 (talk) 16:31, 2 July 2016 (UTC)
@Ehrlich91 I have stopped coding that, because I thought there is no big interest for that. Maybe 90% was done, only the code for working with names consisting of more then 2 parts was missing (what is first name, what family name?). Over the weekend I will have done the code for adding commands in the article to function listofstages (same as for the infobox) and put that into the module at WDwiki. Then, it will be possible to add for example a rest day into the table. Therefore, if I don´t have to correct any problems with the new classifications table, I will again look into the sorting code. My plan was that mkWiki and lvWiki (ruWiki?) would sort as standard, while the other Wikis have to tell that in the article. Riders, which have no translation will be sorted in the table below the riders with a translation. I had a problem with telling what is a translation and what is not, because Wikidata has changed the behavior a few days ago because of extension articleplaceholder. Now there will always be shown a name, even if there is no translation. I guess that something like "rider name (en)" is gone because of this. But maybe wikidata developers will change that back in a few weeks. --Molarus 16:54, 2 July 2016 (UTC)
Now it is possible to see at Module talk:Version 2 the mk rider names sorted. That is done in function WPlink, where I have changed "local Label = entity:getLabel() (...)" to "local Label = entity:getLabel('mk') (...)". 'lv' would show the lv rider names sorted. 'ru' would not work. Rider names that consist of more than two parts could be sorted wrong, but the two part names should be sorted right. Is that right? --Molarus 14:53, 3 July 2016 (UTC)
This look good, I can use on Macedonian Wikipedia. --Ehrlich91 (talk) 18:13, 3 July 2016 (UTC)
@Ehrlich91 I think I have found the right code for the problem with names with more than two parts. At Module:Version 2 you can see starting at line 30 the code for function "name". That is the function that decide if a part of a name is a part of the first name or of the family name. I have found two solutions for that. The first solution is a general solution, which looks into Wikidata and reads the properties for first name and family name. Actually I´m counting the number of first names and the family names, not more. But those data is not complete, sometimes there are two first names, but WD has only one. The second solution is a special solution that looks for special name parts. For example there are many riders from the Netherland who have a "De" or "Van" in their name. I´m looking for that parts and then I know that the family name begins. I have used for them 'Де', 'де' and 'Ван', 'ван'. Maybe you have seen more such small parts while translating rider names? I will look into more team items to see how good the code already is.
The next step is the sorting of lvWiki. At the moment I can´t remember if the code sort lv names as good as mk names. I could already give you the code while I´m still looking into the code for lvWiki, if you like, and you would get an update later when all of the code works. --Molarus 12:45, 5 July 2016 (UTC)
Yeah, I`m familiar with all of this options of the names and surnames, because I wrote more than hundreds articles about cyclists :) Yeah, it will be nice to have it the code and to try, how it works :) --Ehrlich91 (talk) 18:36, 5 July 2016 (UTC)

I have a problem with Russian sorting. As you can see at Module talk:Version 2, I´m sorting "Laurens De Vreese" or Russian "Лоренс Де Фриз" not after the "De" but the "Vreese". I´m not sure if that is right, but in ruWiki they write for example ru:Анда, Габриэль де for "Gabriel de Anda". The "de" is not part of the family name "Anda". It is also interesting that the last name in the team table is "Эрос КапеккиКапекки, Эрос". Should I transform all Russian names in something like "family name, first name"? Beside that, I think the code is done. --Molarus 22:12, 7 July 2016 (UTC)

Code is done, update is in WDWiki. I have tested the code in lvWiki, mkWiki, ruWiki and deWiki. A bit strange is in ruWiki that names are written in both ways: "family name, given name" and "given name family name". It is no problem for sorting. --Molarus 00:34, 9 July 2016 (UTC)

Unfortunately, I don`t have any knowledge in Russian, so I can`t help you. So, please write me, when will be officially inserted and updated on Macedonian Wikipedia, so I can use it :) --Ehrlich91 (talk) 19:56, 10 July 2016 (UTC)
Jérémy is the one who does the official things. If you don´t want to wait, you can copy and paste yourself the code to mkWiki. I have seen that you have one article where you are showing lots of team tables. This article has now an error because there are too many expensive lua functions (max. 500). I don´t remember the exact number, I think two from six or seven tables are not going to be shown anymore. --Molarus 21:48, 10 July 2016 (UTC)


Hi Molarus. I continue tests for teamroster. Anthony59999 explain me that on Topsport Vlaanderen-Baloise 2016 (Q21968189), team stages are not excluded for Thomas Sprengers (Q3525587), Dries Van Gestel (Q19628790) and Kenneth Van Rooy (Q18625165). On my side, I test it on a big number of teams, and even on a 1954 season, on fr:Équipe cycliste Saint-Raphaël.

I have time at the beginning of this month, only two races to do (and it depend the weather). Are you interested to begin the program for general classification ? It start to become interesting because we start days after days to have teams for cyclists. Jérémy-Günther-Heinz Jähnick (talk) 15:49, 1 June 2016 (UTC)

I think I have corrected the problem with the stagiaire team. Code is changed at WDWiki and frWiki.
About classification: Do you think about something like the table 'Classement final' at fr:Milan-San_Remo_2016#Classement_final? At least we could start thinking about how to move that information into Wikidata. For example in "Tour de France 1903" there is the property P710 (participant) with qualifier "ranking". In your documentation you have choosen the property P2321 (general classification) for that. We could show all participants sorted after the "ranking" (regardless of how many participants are inserted). Later, we could add time data. Is there already a property for the time data available? Many Wikis show this information, although I know that the big Wikis show a lot of additional classification tables, so they will not get much benefit of that table.
I think stageclassification is similar to generalclassification, that means, most of the code should be similar. I think, both functions should be developed together. --Molarus 00:59, 2 June 2016 (UTC)
Thank you for the stagiaires.
fr:Milan-San_Remo_2016#Classement_final is a good example. To enter informations on Wikidata, I have the example of Q20017698. And also something of specific : at some races as 2016 Ronde van Vlaanderen Beloften (Q20080416), cyclists runs under the colors of under-23 national cycling team (Q20738667) (under the age of 23) or elite national cycling team (Q23726798). It is not rare that for some race, one or two teams are national teams, see 2016 Triptyque des Monts et Châteaux (Q20650122). For these case, I need to add a statement when I enter the classification, for exemple member of sports team (P54) : French men's U23 national road cycling team 2016 (Q21705192). Here, the program should detect first we have a value on the item for member of sports team (P54) and take it. And for under-23 national cycling team (Q20738667) and elite national cycling team (Q23726798), the idea is just to display the name of the country at the place of the name of the team. As you can see, ProCyclingStats is not again able to work with this specific case. For time data, for the first ranked, we have since one month race time (P2781). My hope is the development team invents the way to enter the time in hours, minutes and seconds. For other cyclists, we speak of gap, and I don't have launch a property proposal. If you wish, I can launch it today. We will surely have at the creation only seconds, but it will surely evolves. Then, for stages races, we have distinctive jerseys (I will ask a property for this). On this race, you can see the result. On FR Wiki, we use fr:Modèle:Maillot. For Wikidata, I had developed few days ago with Anthony59999 another system : Wikidata:WikiProject Cycling/Kit to translate/Jerseys. Each jersey have its item, and in its item, we can find a statement to image (P18) and a media legend (P2096) that gives an information translatable to describe the jersey and its function.
stageclassification and generalclassification are similare, the difference is the first use the values given for stage classification (P2417) and the second the values given for general classification of race participants (P2321). We can imagine in the future similar functions for display the ranking of teams or the ranking at a team time trial, or more easy, for rankings of the classification for young cyclists, best sprinters... Note that one race out of ten is a stage race. generalclassification will always be the most important function. Jérémy-Günther-Heinz Jähnick (talk) 09:30, 2 June 2016 (UTC)
"Paris-Roubaix espoirs 2016" shows the problem: We have the first three winners for the infobox and now we add the first ten winners for the classification table in another statement. I would prefer to merge both statements. I mean, the infobox could use "ranking" "1" as good as "of" "overall winner general classification". We have to add a bit more code, because we would not know the order of "ranking" and "race time". Actually the code would be able to work with at least three different qualifiers: "of", "ranking" and "race time".
About "race time": We should not expect the editors to calculate the seconds of a race. But maybe we could add three "race time" qualifiers: One for the hour, one for the minute and one for the second. And maybe later we will get a better software for something like "point of time" with a higher precision.
I´m sure there are more things to discuss, but they are the once I see now. --Molarus 11:46, 2 June 2016 (UTC)
Yes and no. It is not very long to make statement for winners, and on another part, users that will do the classifications will not be the sames that do the item. But you can do as you want. I prefer the traditionnal solution. I think we will not stop at the ten first. The table will display the ten first and then, user will can unroll. This way, when we have a big number of race to create, we will can only add the ten first, and during the winter add datas little to little.
For race time, the problem is not very big, I always have a calculator on the desk and we will use the property only one time by item. But the question will come from the gap, especially for grand tours (generally, all cyclists finished in five or six times). I will launch the subject to the developpers. The question is when we will be able to enter an hour like a date.
For me, it is good. Because we have work on other function for six months now (already !), we start to have a part of the work that is done, for exemple associate a flag to a cyclist or a correct name team to a cycling. When we look back, it is interesting to see that the biggest success was teamroster and no the infobox. I think that classification will become the biggest success. I will launch the property proposal for the gap and for the jersey. Jérémy-Günther-Heinz Jähnick (talk) 12:18, 2 June 2016 (UTC)
A property of its own is easier to code, therefore we will do it as you have proposed.
About the time: We can decide that later. And to get a new property will last for many weeks, even months. I stopped working there when things got slow (maybe 2 years ago). In those days, you could have a new property within days.
I will start coding at Module:Version 2 and slow down entering information for the team roster (I have entered some data for UCI WorldTeams). By the way, I have seen that in frWiki there are some team articles that have more then one team roster in the article. We could add code so that the "previous team" column could get switched off by the editor, similar to the overwrite function for the infobox, writing "Équipe précédente = 0" or "Previous team = 0". But not now.
--Molarus 15:13, 2 June 2016 (UTC)
For teamroster, I work in two times : I build rosters by listing members of the team. And sometimes, when I want to change my work, I list the teams of cyclists one after one. I see this as a long terme work. On the future, with all the datas we have on Wikidata, I hope that users will takes the risk to write articles about season teams, event season from 1950 to 1980. And with the similar lines for tables and infobox, and the giant steps made by Google Translate, we will have duos or trios of users that work together to write a good articles, and other Wikipedias that will make translations. It already arrives for fr:Liège-Bastogne-Liège 2015 translated from English. The difference here is we start to save time because we work together with datas, this permits to users to lost less time and to have the possibility to write articles. On FR Wiki, there are always debates about Wikidata, it is more the fact of small groups. They says that in the future articles were no longer written when it is the contrary we all prepare : spending less time on code and updates to spend more time to write articles (I no longer discuss with these people, because it is a loss of time. I prefer working with users like you or Anthony59999 or users that translate functions). For the property, I remember wait only a week as a big number of months. The idea is to call users, it permits to have very fast five or six persons that gives an opinion. Jérémy-Günther-Heinz Jähnick (talk) 15:32, 2 June 2016 (UTC)
I have added some riders to teams and I saw the difference in the way the teams choose their riders. I think it is interesting to see how the teams evolve over time. At the moment, I´m afraid, most cycling articles tell a lot of data, but what the data tells, is missing. As far as I know, a cycling team is composed of different types of riders. I guess, the reason is that the team can win this way different prizes. Someone who can win a stage in the mountain or a time race. In frWiki I guess "Spécialité" in the rider infobox tells this. I think this is property P413, which is used for some riders. What do you think about showing this property in the team roster? Maybe in brackets behind the name? --Molarus 18:01, 3 June 2016 (UTC)
These are mostly descriptive give beloved of riders and the media like to repeat, the reality is that in all the levels are different races so that victory is always played in fine between a small number of people. And when an experienced rider wins, is that in general it stayed warm in the pack, protected by his teammates. Sometimes some earn a little by chance in having made ​​the right choice. When some earn up prizes is that they set themselves the goal to win. More specialties, there is above all the riders who are helped by their teammates and are for a few weeks or months in a very good state of health and fitness. If the team Verandas Willems 2016 (Q22062004) wins as many wins and especially honors seats this season, it is because the sporting director has recruited runners who would get along very well together. What is striking in this team is to see how the riders get along very well. All that to say that even if some riders specialize in their training, their performance also depends on many other factors. Jérémy-Günther-Heinz Jähnick (talk) 09:16, 5 June 2016 (UTC)
Thanks for the explanation. --Molarus 13:46, 5 June 2016 (UTC)

The first version of the new tables are here and in Module talk:Version 2 to see. The next step will be one function to fill both tables. This way we could add more classification tables, without adding much new code. At least that is what I´m planing to do. We will see if that is possible to do. --Molarus 19:51, 3 June 2016 (UTC)

About the national teams: In the item of "2016 Ronde van Vlaanderen Beloften" (Q20080416) in property "part of" the item Q21093842 (UCI Coupe des Nations U23 2016) is inserted. I can´t look for that item, because for each year there will be another item. Therefore I have to look where this item is pointing to. Maybe Q1536617 (UCI Under 23 Nations' Cup)? It seems, this is for men only, maybe there is one for women too? I have seen that there are more competitions between nations. Therefore I will look into property "part of" and look into where the value is pointing to. If it is pointing to an item which is part of a list of items, I will not show the team but the name of the country of the rider. To do that, for example Q21093842 (UCI Coupe des Nations U23 2016) should get the property P31 (instance of) Q1536617 (UCI Under 23 Nations' Cup). Do you agree? By the way, if I´m in a stage item, I have to go first to the race item. I guess I can detect that by looking for a "series ordinal". --Molarus 19:27, 6 June 2016 (UTC)

At the beginning, I had also a similar idea, but on the terrain the situation is very different : at the fr:Triptyque des Monts et Châteaux 2015, we had the case where we have nation teams and brand teams. It is the biggest part of cases. For Ronde van Vlaanderen Beloften, we can imagine another function generalclassificationII where the program only takes countries instead of brand teams, or a specific parameter. But I prefer having only one function and spending my time to add P54. On the race you speak, the Centre mondial du cyclisme participate, so a such program will not work perfectly.
For classifications, I need the flag associated with the name of the country. It is just a detail but users say me it will be more easy for person that don't know the flags... Jérémy-Günther-Heinz Jähnick (talk) 09:09, 7 June 2016 (UTC)
In fr:Triptyque_des_Monts_et_Châteaux_2015#.C3.89quipes the article says, that 25 teams participate (neuf équipes continentales, six équipes nationales et dix équipes régionales et de clubs), not twenty as the race item says. Number twenty is the french national team. By the way, the infobox says 20 teams, which is wrong. I have corrected that in the article and in the one for 2016 too (overwrite function of our Lua-module). What I see too, the Wikidata flag in the infobox header is disappeared, at this page too. Either an error in the code or the WDflag was deleted in commons.
About a solution: Maybe we should look for something different. What do you think about adding the items of the national teams to the classification (at e.g. Q22752188#P2321), next to the ranking and the time? For example: French national team, Q17577069. There are more: Special:WhatLinksHere/Q20738667. I don´t know which property we could use, maybe P54. That would be similar to adding to the team data, that a rider of the team was a stagiaire. --Molarus 13:57, 7 June 2016 (UTC) Now I see that this is what you have proposed at "I need to add a statement when I enter the classification, ...". Sorry, I misunderstood that. And if the value is "national cycling team U23" (Q20738667) or "national cycling team (Q23726798)" don´t show this information, but the country name of the rider. OK, now I know the next steps.
About a column country: The country items are really huge and I would have to load them just to get the name of the country. It is OK to do that for the above, but for telling in which country a rider was born? I think the flag is enough and to get more info the reader can click to the rider article. --Molarus 14:11, 7 June 2016 (UTC)
No, it is at the bottom, more discret. One user made blackmail and want a desappear of the logo, unfortunately he has been excluded from Wikidata Cycling for his blackmail.
Regarding the country's name with the name of the country, some contributors are very hassle (to be polite) and think it must always be like before and never evolve. In this case, another contributor that was the problem in this connection was also excluded from Wikidata Cycling because these reverts recovering from the obsolete and not sourced information, which is vandalism. In this case, there was also the delay caused by this person for a few months and a tracking of my contributions.
The main obstacle to the development of Wikidata is not code complexity but rather certain personalities. I could mention a few other cases. Experience has shown me that he never acted to contributors who work on Wikipedia data. Jérémy-Günther-Heinz Jähnick (talk) 18:17, 7 June 2016 (UTC)
For the history, on project Wikidata was created on FR Wiki to create and develop programs. But the creators let enter in this projects opposants to Wikidata, they gradually used all the means to win and take power, and now the project is considered dead for a few months, entangled in endless debates. There are even currently two developers who are stuck in writing, one for asking a question about Wikidata while opponents had demanded a topic ban for his part weeks ago, and another to have added an infobox some seek to ban by all means. Jérémy-Günther-Heinz Jähnick (talk) 18:45, 7 June 2016 (UTC)
I have found the WDicon, maybe that is not the best second place but I don´t care. Since the situation is this in fr:WP, I will add the country column. Better that than more trouble. By the way, we could change the code that only frWiki doesn´t see the WD icon and only frWiki sees the country of the riders.
I have found fr:Projet:Wikidata and read the discussion (with google translate). The discussions are polite, at least compared with german discussions. And I would support most arguments, because Wikidata is a mess (outside cycling). This was the reason why I wanted the overwrite-function and why I started to look into SPARQL-queries. (Wikidata:WikiProject Cycling/SPARQL) With queries it is possible to look into thousands of Wikidata items with one click to find errors in the data. As far as I have seen, it is not necessary to use these tools for the cycling project and the data in WD is most of the time correct. The number of participating teams is an example where Wikidata is wrong and will not be corrected. Maybe you will make a decision about the properties in the section above and then Lloyd Mondory will be OK again. My proposal is to accept both properties. It will be maybe 10 lines of code more. You can search in the code for "P39" to find the code which would be expanded.
At Module talk:Version 2 I have the classification table for "Triptyque des Monts et Châteaux 2016". For testing the code the rank values are unsorted and the rider with rank 6 is missing. And I have added to Adrien Costa (rank 5) the info that he is a member of the Team USA. I have found this info at the web site of the race for the last stage. My problem is this: I´m not sure if the item I have inserted to P54 Q23709272 is the right one. Maybe it is a U23 team and I don´t know if a U23 team was riding at that race? At least this is a good example to test if the code will works right. By the way, do you know of any Wikipedia article for a national team? If not, the code don´t have to look for a Wikipedia article and just write the country name. --Molarus 19:22, 7 June 2016 (UTC)
No, it is better to share always the same code. I consider that in the future we will see our work as one unique Wikipedia translated in different languages. At some places, we have again some "nationalisms" that are expressed, but it don't comes from users that have this huge work of updates but from users that pretend to speak "in the name of the community" but they are generally alone. I have the example of one person on NL Wiki that propose always to delete the different functions, but nothing has been deleted... He also refuse to speak in a comprehensive language. It is on NL Wiki that I found the maximum of bad faith. Following this affair on FR Wiki, four persons were sanctioned by me, they are excluded from decision-making processes concerning our project.
Since the launch of the project, I actually took the party to talk directly with the contributing editors about their needs, specificities of their languages, and present their novelties. I am very careful that the debate did not come to be forfeited by persons who are not relevant because it generally results in a very bad mood even though programs work perfectly. A contributor might be very frustrated to be prohibited from using the data and it might demotivate. On some Wikipedias, cycling is only handled by one or two people, a departure would be catastrophic for the readership that would be forced to read articles in other languages ​, which is contrary to the project we are working on that precisely to erase the barriers of language.
If discussions are polished on the French Wikipedia, is because at the slightest wrong word some people always flock with administrators to request a penalty. Contributors so pay attention to what they say until the day the anger finally burst. If cycling on Wikidata is doing well, it's a bit thanks to me : outside of Wikipedia, I work in politics. I am in a territory of one million inhabitants where many victories will take place within four years of arriving. For me the question is not to win because we will win, but what we will do once we have won, and that's how I work on project preparation might exist in ten years, mainly based on the third industrial revolution. It always means to project into the future while still having some unresolved unknown. In Wikidata, it is similar. The goal is to avoid doing the same work to another could handle all possible subjects. It then involves taking the lead in calling for the creation of properties or to seek advice from experienced contributors, establish documentation for there to be a repository and a single way of working, and that the assembly can operate in many languages. The only solution was to work together, which requires that everyone shares the same program. The general idea is to predict the future with crital ball to find all the new trends before they happen and so always have an edge. On the french Wikipedia, there has been no strategic vision for the long term. And there is a chronic inability to question or to go see what is happening elsewhere. I am a positivist, I regularly try to contact contributors to explain some views and some successes, but there is no awareness. In essence, I ask them to close the Projet:Wikidata from FR Wiki and to move on Wikidata and work with developers from other countries, because use data is meaningful only if they are used by a large number of languages, allowing for better capacity for updates. The other side is to create a "strikt" project where those who caused harm to the use of Wikidata or developers are naturally unwanted. By analyzing the situation I predicted that their project would to sink.
The example of the German Wikipedia is very interesting with what we do on the cycling, I have never had problems to include content in DE Wiki, and I always found good contributors. I think there are several reason for this, first the "product" was already good, but we also took the time to talk to the contributors, to answer their questions, show them our sourcing was good and already mandatory, and finally it met a need (I remember the problem of lack of manpower to update the rosters). I also think they have controlled quality additions, and found that there was no problem. Jérémy-Günther-Heinz Jähnick (talk) 10:19, 8 June 2016 (UTC)
To give a little more information about Wikidata and the french Wikipedia , they still have not understood that an algorithm should respond to all scenarios and it was not shocking that it makes several hundred lines. If Cycling race is accepted , it is also thanks to the teamwork between us all when we try to solve every case. On FR Wiki , there are problems that are not resolved and which require making crafts while the idea is to just be a lambda contributor has to insert a single line of code.
For classifications, I can give you the exemple of the 2015 Tour de Pologne (Q19576833) where we have the Polish men's national road cycling team 2015 (Q20746368). Cyclist of this selections are not U23.
For Adrien Costa and its team, I take United States men's U23 national road cycling team 2016 (Q23709272). We can have articles for seasons of national teams, see the big work of Anthony59999 on fr:Saison 2015 de l'équipe de France espoirs de cyclisme sur route and fr:Saison 2016 de l'équipe de France espoirs de cyclisme sur route. Jérémy-Günther-Heinz Jähnick (talk) 10:34, 8 June 2016 (UTC)
Then "Triptyque des Monts et Châteaux 2015" is the best choice to test since there are articles about national teams. I will add the classification table into the item and then I will read your text about the situation of Wikidata in frWiki. --Molarus 13:44, 8 June 2016 (UTC)
About: share always the same code It is the same code, I would do that with "if wiki=='fr' then do this". We use this to print for example the date according to the local rules. I don´t mind if local wikis write the date different or have a bigger or a smaller WD icon and if that helps you keep the editors happy, I will do that. Remember that deWiki wanted special code that Russian names should not show the second given name. Those whishes can be done within hours, it is no big problem.
Well, my motivation for staying at Wikidata/Wikipedia is having fun or/and doing interesting things. My experience is that maybe one or two hours a day is OK, not more (there are exceptions, of course). And I have seen so many Wikipedians turning into trolls or get a burnout, which is not necessary, because they act first and think later. Maybe Wikipedia is so different to what people experience off-line.
By the way, I have seen yesterday this In-sight Display from Garmin. The video is interesting. And I have added to my page meta:User:Molarus/global.js the Magnus Manske tool, which adds to the Wikipedia links in the item a "ref" link. Clicking on the 'ref' link shows at the right side of the item the Wikipedia article from where you can click and drop references into the item. When I have time, someday, I will change the code to move this way team data, rider data or even data from into the item.
For today I have done enough. See you, --Molarus 14:42, 8 June 2016 (UTC)

time data: I have looked into Wikidata:Property proposal for the property P2781 where you asked for a "time recorded in a race". This description does not say that this property is only for the winner of the race. Therefore I added this property for all riders in Q19753550#P2321 (Triptyque des Monts et Châteaux 2015). I don´t like to show in each classification a time column, therefore the code will show the time column only if there is some time data. To show how it is done, I have set border to 1 (border will be 0 later). I´m calculating hours, minutes and seconds and print them. I´m not 100% sure that the math is correct, but I will test that later. The numbers like "51836s" are the numbers read from WD and will be shown only for testing.

There are still some things missing, for example the numbers in the first column will be like 1er, 2e for frWiki. Maybe we will have special numbers for other wikis too. For the time column I will need translations and maybe the winner will get a yellow background. The jerseys are missing. Maybe there is more missing.

By the way, I have looked into reasonator for Lilian Calmejane A good summery of our data. --Molarus 20:21, 10 June 2016 (UTC)

I respond fast, normaly I come on monday. The race time can be use for everybody, but for other cyclists we will display the time gap, I ask few days ago this property in Property proposals.
I will verify next week were users had specifities for the rank.
For the jerseyx, I will make a property proposal (I am late, ... again). The background will not be always yellow. For some stages race, the colour is different, but we will can associate a colour (or #FF00000 for example) to items of jerseys of general classification (note that I have again jerseys to create). Jérémy-Günther-Heinz Jähnick (talk) 20:52, 10 June 2016 (UTC)
Maybe a property jersey is to special, why not a property icon? As you can see at Special:ListProperties/commonsMedia we don´t have such a property. At the moment, I will use property P368 (test property) for developing the code. As far as I have seen, a rider could have more then one jersey and the background color depends on the jersey. It seems that the color is used if a rider with rank 1 gets one. And its seems that not all jerseys are connected with a color, only some. I´m not sure if we should hardwire the color and the jerseys. At least that is what I will code at the moment, no problem to change that later. --Molarus 12:58, 11 June 2016 (UTC)
Maybe I have 95% of the code for the jerseys and the background color for function "Classement général". There are two new functions: jersey_name and jersey_color. The first function is used to connect the jersey to the text which is shown when the mouse is over the jersey. For example the red jersey says: "Leader du classement général". jersey_color connects for example the red shirt to the background color "#FF8666" (kind of red). Both functions are functions that have different values for each local Wikipedia. I think that is necessary for the colors too. At the moment, I have only data for the red jersey, the red background color and a french text. I will add more data for testing the new code later. Please, don´t add data, because I will look if there is a more efficient way to store the date in both functions, then it is now.
Missing is code to decide which background color to show if a rider has more then one jersey. I don´t know the rules for that.
And I have done some testing, but not enough. For example, what happens when an unknown file is inserted into the classification. And I have to transfer the new code from the general table to the stage table. --Molarus 17:29, 11 June 2016 (UTC)
Finally, I am here today, the weather is not very good, the race is far (35 km of bike, then 3 hours of train, three trains, maybe 4 hours if one is late, and the same at the end of the day) and I am suffering lower back for nearly three weeks, which bothers my long trips. I start to read and I respond after. Jérémy-Günther-Heinz Jähnick (talk) 08:50, 12 June 2016 (UTC)
It is easy. The background colour is only in use un our case for the first of the general classification (because the name of the function is generalclassification), so the colour depend of the colour of the jersey of the leader of the general classification. We can imagine in the future having a property for making the classification of sprints, in this case, the colour will be determinated by the colour of the jersey of the leader of sprints classification.
It is not possible, we will only use the jerseys of Wikidata:WikiProject Cycling/Kit to translate/Jerseys. Jérémy-Günther-Heinz Jähnick (talk) 11:43, 12 June 2016 (UTC)
I have found articles like fr:Maillot rouge, es:Maillot blanco or de:Maillot Rojo. I would prefer those items instead of new items. --Molarus 17:25, 14 June 2016 (UTC)

It is not good. For the red jersey, it was in use for the Tour de France for points then for sprints, for the Vuelta, it was in use for the general, for the mountains, and for combinated... Each race has different jerseys. In fact, these articles are just about the colour of the jersey where we need to know the function then the colour. In this sense, it is better to take items that describe the colour of a jersey and its function. As you see on the photo, we also have similar jerseys that are in fact different. We also have four different jerseys that correspond in a blue colour. Note that is is not more complex. If you have a look on en:Cycling jersey, you will see that we generally find the same jerseys (yellow for general, green for points...), others a genrally used for a little number of races each year. With these new items, readers will know what is the function of jerseys for each race. Note that the property will be created surely tomorrow. Jérémy-Günther-Heinz Jähnick (talk) 09:07, 15 June 2016 (UTC)

I have updated the code on WDWiki to the new properties P2911 (time gap) and P2912 (distinctive jersey). I will do this table and the search feature at the same time. At the moment, I have not used P2096 (image legend), but the label of the item. And I don´t think something like "équipe du Royaume-Uni espoirs de cyclisme sur route 2015" looks good. Missing are the translations for "h m s" and maybe "en" (fr) for the time column. --Molarus 06:30, 16 June 2016 (UTC)
Hi Molarus. I made tests on fr:Modèle:Cycling race/generalclassification/Documentation.
  • For the first race, we have a problem to count the seconds for the 9th and the 10th, there is a second less in the display, but strangely it is not the case with the Tour of Oman for the 6th. Idem for Vincenzo Nibali.
  • There is a space between the + and the number of seconds.
  • When we have minutes, it is written +1 min +12 s instead of + 1 min 12 s.
  • For the Tour du Limbourg 2016, cyclists arrive in the same time that the first. Instead having + 0 s, we have nothing.
  • For the teams, it rest a problem. We have the correct link to articles, but not the correct name. We already have this problem by the past.
  • For the first, we don't write 1re but 1er if it is a man.
  • No, for teams representing a country, we can just write the name of the country. It is more easy. Jérémy-Günther-Heinz Jähnick (talk) 07:52, 16 June 2016 (UTC)
I continue to test the program on fr:Modèle:Cycling race/generalclassification/Documentation. I discover there is a bug when a winner wear more than one jersey, so I bring a correction in the way to enter datas on Wikidata:WikiProject Cycling/Kit to translate/Jerseys : distinctive jersey used in professional cycling (Q24257743) is not precise because it doesn't explain the type of classification, so I decide to play with sub-classes. Now, for each jersey, we know the image and the legend, the type of jersey, and its colour. I think at this point few days ago because it can be a problem for some translations if the type of classification isn't know. For general classification, we have now the subclass distinctive jersey worn by the leader of the general classification (Q24646146). Jérémy-Günther-Heinz Jähnick (talk) 13:49, 16 June 2016 (UTC)
The system with the jerseys and the background color works now at Module talk:Version 2. I have looked for the background color into different wikis. I was right, that different wikis use different background colors. For example frWiki have the color pink, while caWiki have lightpink. I will use the french background colors as fallback.
Lets see how much time I will need to improve the code, I guess it will last into next week. --Molarus 20:36, 16 June 2016 (UTC)
Euh no, the colour of the background (when we have jerseys so when it is a stage race) don't depend of the Wikipedia but depend of the colour of the jersey. If the jersey of the leader of the general classification is blue, we have a lightblue, idem for yellow, orange, red, pink... Jérémy-Günther-Heinz Jähnick (talk) 11:17, 17 June 2016 (UTC) I see the code, I misunderstand what you want to say. It is not a problem if you take value of CA Wiki for everybody is you judge the rendering is better. There is no formalism about colours, generaly we search the info on another article or we search on fr:Aide:Couleurs, but nothing had been written by the past. Thanks to your code, we will always have a background associated with a jersey. Again a time this will permit to save time. Jérémy-Günther-Heinz Jähnick (talk) 11:25, 17 June 2016 (UTC)

layout listofstages on small devices

On small devices the layout from listofstages is not good. If I visit on my mobile device. there are several issues: Gianluca Brambillas name is too long, the last a is behind the flag (same with Alexander Foliforov and Alejandro Valverde). Villes étapes of stage 9 need 4 rows. It should be possible that there is a line break in Vainqueur d'étape, Leader du classement général and the date. Maybe its better if the icon gets its own column. In the German version there should be the & shy; in the headline to get smaller columns--Chris XC3000 (talk) 07:34, 1 July 2016 (UTC). Here is a Screenshot.--Chris XC3000 (talk) 10:19, 3 July 2016 (UTC)

I could move the icons in Villes étapes into a column of its own, but this way the table would want even more space. The reason why only the Villes étapes want 4 rows, the other columns not, is that the others got the css command nowrap. I could add nowrap to Villes étapes too, but this way, the table would want even more space. Even a big screen might get problems to print that with an infobox at the right side. Without nowrap there would be lots of new lines everythere, it was this way at the beginning. An option might be - I don´t know if that is possible - a soft new line between "Mark" and "Cavendish", this way all the names would have two rows. Would that be better, I don´t know? To sum it up, I don´t know what to do about that problem. By the way, I even proposed months ago for this problem a different table layout, see Module_talk:Cycling_race/archive#Different_table_layout. In javasript/css3 it is possible to switch the layout depending on the srceen size, see [1], this is called "Responsive Webdesign". We could try if that is possible with lua too, because we add css into lua, for example "float rigt, text-align", but that is css 1 or 2 (I don´t know). It would be cool if css3 could be used. --Molarus 11:14, 3 July 2016 (UTC)
Maybe you could, if it's not much work, code a test version with an own column for the icons and no no wrap commands.--Chris XC3000 (talk) 17:03, 3 July 2016 (UTC)
Done, at Module_talk:Version_2#La_M.C3.A9diterran.C3.A9enne_2016. --Molarus 23:38, 3 July 2016 (UTC)
I think this is much better. All names are shown and there are less rows needed. But the icon is very, very small if I visit the page with my mobile device.--Chris XC3000 (talk) 07:33, 4 July 2016 (UTC)
The head of the table and the icons in stage locations are better, but the body of the table does not look good. Maybe it is possible that the code inserts a soft line break into the middle of rider names while the flag and the wd link gets a nowrap. The stage and the date column should get a nowrap too, while the Villes étapes could break where ever they want, but not between a village and a "(fr)". That would be maybe 2-3 days to do, but this week I will do the sorting code. About the icon: I guess you speak about the wd icon. There are only 3 wikis left that show these links to WD. It would be nice to increase them on a small device. This way I could test, if it is possible to write code for small devices. --Molarus 09:35, 4 July 2016 (UTC)
I talked about the type of stage icon. In my eyes it's not a problem if the stage and the date column have a wrap, especially if there are already two or more lines in Villes étapes.--Chris XC3000 (talk) 10:11, 4 July 2016 (UTC)
The type of stage icon is only shrinking in the mobile version, not in the desktop version, I don´t know what to do about that. I think, the reason is because there is no text in that column. I have tried to add an empty space into the column, but that doesn´t help. I have added a nowrap to the date column, not to the first column, because "1. Etappe" is to long, not to wrap. Again, it would be nice to change "1. Etappe" to "1." for a small screen. I would say, there is more work to do until that table looks good at small screens. --Molarus 11:43, 4 July 2016 (UTC)

@Chris XC3000 and everyone else: Maybe I have found the solution (see Module talk:Version 2). In mobile view the icons don´t shrink as fast as before. Now it seems they are collapsing fast for very, very small sizes instead. I have found in the documentation that it is possible to add a "width=20px" for the column. And the two winner columns now have a certain point (only after the first word) where a new line could happen and nowhere else. I think the table header should have some soft breaks for long words. At the moment the new design for small devices is done by hand, it is not self-acting. Anything still missing (besides the stage column)? --Molarus 00:32, 11 July 2016 (UTC)

Sounds good--Chris XC3000 (talk) 08:23, 11 July 2016 (UTC)

I have deleted this feature, because what looks good in WD looks different in Wikipedia. Basta! --Molarus 14:17, 14 July 2016 (UTC)

Support for ArticlePlaceholder

I am willing to try out ArticlePlaceholder in this module. I can do the coding part myself. This would work this way:

Latvian Wikipedia and some much smaller Wikipedias have ArticlePlaceholder extension enabled. This allows to see data from Wikidata if no article exists about topic. It is not very pretty, but you can get some basic facts. Example: We do not have article about Steven Kruijswijk yet, but when we visit special page lv:Special:AboutTopic/Q523376 we see some data. The same goes for small French or Italian villages (like Pinerolo). It is planned that in the future it will work for red links, not just the special page.

What I want to do is to make red links infobox/team roster/list of stages/ etc to go to these Special pages. I know it will create big mess in code, though. I suggest that we write a separate function which formats links and then call it in necessary places. I can try to work on it next week. --Papuass (talk) 13:12, 17 June 2016 (UTC)

It is very interesting, because we start to have a big number of items for cyclists (it is mandatory for rosters), but even for FR Wiki we don't have an article for each cyclist, see this article, where we stat to accumulate a big number of datas in more than the photos. With this possibility, by exposing datas, we can imagine acquiring new users that will sometimes make updates or corrections, or bring translations in latvian.
To go further, I make a test on this race. Here again it is interesting because technology will evolve in few time and it is for the moment more interesting to wait instead of creating articles. In a second time, creating such article will be faster. Jérémy-Günther-Heinz Jähnick (talk) 14:22, 17 June 2016 (UTC)
As far as I remember, the red links are created in function WPlink (line 1352). It is no big deal to change that. There is also the option to add the ArticlePlaceholder behind red links and black text (e.g. cycling teams), the way we did it with the links to Wikidata (Wikidata flags). That would be more difficult, I guess.
Another question is: How good is ArticlePlaceholder? I have seen that it is possible to add lua code into the ArticlePlaceholder at lv:Modulis:AboutTopic. Documentation is at [2]. This way you could improve the look of what the ArticlePlaceholder will show to the readers / editors. --Molarus 20:34, 17 June 2016 (UTC)
Thank you! Extending ArticlePlaceholder in local wiki is certainly an interesting possibility. For example, we could even show race infobox for articles which do not exist. --Papuass (talk) 13:11, 20 June 2016 (UTC)
At the moment I don´t know what is possible to do with ArticlePlaceholder? For example I don´t understand how to use the lua functions for the ArticlePlaceholder. What are your plans? --Molarus 19:32, 20 June 2016 (UTC)

Error in de:Veranclassic-AGO

The team table had shown an error in the references part of the table (discussion at de:Portal_Diskussion:Radsport#Vorlage:Cycling_race), should be fixed now . I remember that I have tested to have two similar references, one with an additional time data (see infobox at this page). It seems that this was not enough testing. While fixing the code, I have seen that we show only the first reference per statement, but there was a statement in this item with two references. The first reference was not very well, so I have deleted that reference. --Molarus 10:56, 29 June 2016 (UTC) The "note"-link doesn´t work anymore. Will be fixed soon. --Molarus 11:03, 29 June 2016 (UTC)


I have seen in frwiki this fr:Tour_de_l'île_de_Chongming_2016#.C3.89tapes listofstages table. The flags for Taipee are coming from Q216923 (Olympics flag for Taipee). I have nether thought of something like this, but it is possible --)) The reason is that flags which are not in the code are taken either from items "flag of country xyz" or from country items and someone has insert this special country as nationality of this rider. --))

Another point: In wikis other then frwiki in the column stages of function listofstages only numbers are printed. That was the fallback, not more. I have added code, so that dewiki is seeing now "Etappe x" instead of "x". That is done in function stageLink at line 2063. You will find there "(...) return a..". "..b.." "..word, "#"..word.." ".. x end". The first part behind return is the code for the alias text. a is the number of the stage, b is for stages with names like "a" or "b" and "word" is the name "stage", "Etappe", or... (the translations are already in the code) At deWiki they see now "2. Etappe". Therefore it is no problem to change that for more wikis. --Molarus 19:24, 2 July 2016 (UTC)

error in fr:3e étape du Tour de France 2016

I have seen an error in this article in table generalclassification. It was something like "could not compare dif with nil, error in line 411" I think that had happened while someone was typing data into WD about that race. I have changed the code in WDwiki and frWiki. Jérémy, did you see something like that before? I hope that problem is solved now and that I have not inserted a new problem. PS: Without changing the code, the error was gone after I have added "?action=purge" to the weblink, therefore I have known that it was an error that happened during inserting data into WD. --Molarus 18:29, 4 July 2016 (UTC)

From my experience, this kind of error appears most of the time because a date in not indicated somewhere (start date, end date). It is true that some error handling would be nice for the user. (many things would be nice actually, I know there are only 24 hours in a day). Psemdel (talk) 19:21, 4 July 2016 (UTC)

Chris XC3000 from deWiki found another error, the translations for the jerseys - other then frWiki - didn´t work, only the fr lables for the jerseys were shown. Corrections are life in deWiki and WDwiki. And the background colors of new jeseys have to be inserted into the code in function generalclassification. I don´t know if there are new jerseys, which have a background color in table generalclassification. --Molarus 09:44, 5 July 2016 (UTC)

Hi everybody. It is very very easy : Marianne use the race time for the second and the third when we must use the gap. Jérémy-Günther-Heinz Jähnick (talk) 15:38, 5 July 2016 (UTC)

Possible feature update for the infobox

At the moment we have two statements in Q15220420 (Tour de France 2015) to tell the infobox that Chris Froome was 'overall winner general classification' and 'winner of the mountain classification'. We could combine that in one statement with two qualifier. What do you think? --Molarus 13:11, 14 July 2016 (UTC)

Hi Molarus, it is not important.
But I am interested if in this infobox we can attribute a member of sports team (P54) for a cyclist that is on a podium and run for a national team, thing we done for classifications. Jérémy-Günther-Heinz Jähnick (talk) 10:07, 16 July 2016 (UTC)
Adding a P54 into the winner statements of the infobox (P1346)? In this case we could have (at least) two qualifier for a rider and don´t know which qualifier is the first qualifier. I have changed the code at module version 2 for the classification table so that the nationality of the rider is searched when the rider is running for a national team (in case no country column should be printed). This is the same code that would be needed for this feature to show something like "France espoirs" as the team name in the infobox.
Maybe fr:Triptyque des Monts et Châteaux 2015 could be used as an example for this feature, because Owain Doull was winner "Classement par points" for the "United Kingdom espoirs" team. In the infobox a team information is missing so far, because the rider item does not have a P54 statement.
I´m going to start coding that on Monday. --Molarus 17:11, 16 July 2016 (UTC)
I can already show the national team. Next step is to delete the code for adding a country item as alternative to a national team item (I´m using the same code for the classification table and for this feature: function national_team). And I have to make lots of tests. Without a big problem in the code, it will be done maybe in two days. --Molarus 20:54, 19 July 2016 (UTC)
The new code is at WDWiki and frWiki. The update influences the infobox and the classification tables, because both tables use the new function national_team. Now it is possible to add a P54 in the infobox data for the winners. It is also possible to add more then one P642 as qualifier for the winners. Problem with that is that not all wikis will get the new code soon and the wikis which do not have this update will not find a second P642 (and the P54). I have seen that frWiki did not have a few other updates, therefore please look if you see any errors. @Jérémy: I have added in the documentation of the infobox an english text about that feature. Could you add the fr and nl text? --Molarus 22:04, 22 July 2016 (UTC)


Since this week, I´m learning how to use the Wikidata:Pywikibot - Python 3 Tutorial. I´m doing this with An important part of this is learning to code in the programming language python. For this, I have written a small python code that prints some of the Wikidata data for the item 'Tour de France 2016' not as a table, but as text. I think, the next step should be to write a code for Pywikibot to compare data in WD with data in a wiki, maybe something like ProCyclingStats IDs.

Another point is that it should be possible that it is not only me that runs this bot. A possible option could be that we create a new editor like Cycling bot for which many editors have the password. I don´t know if that is allowed or not. And we will need a bot flag, when we add data with this bot. See Wikidata:Bots.

I don´t know how long I will need to learn until I am able to use this bot, but I think it is worth the time, because I don´t see another way to add all the cycling data into WD or test if our data is wrong or right. Maybe someone is interested in joining this effort? --Molarus 22:39, 22 July 2016 (UTC)

My first bot edit in WD: diff. It is a code that reads the ProCyclingStats ID (P1663) from all riders in a de:Wikipedia category and looks if this information is in Wikidata available. If it is not, you can tell the bot to enter that data into WD. At the moment I have run this code only for one rider. --Molarus 08:38, 28 July 2016 (UTC)
Spoiler: dewiki didn't have many riders without ProCyclingStats ID and now - none :) Currently importing also enwiki. One of my first Python scripts was basically the same — get FIS template and add the needed ID to correct property (it's switched by sector value). I would give you the code, but it's extremely buggy. Haven't yet created script, that does all job nicely. And for simple cases there always is HT. If you need some Python help, you can ask me. I'm not such Python expert currently, but I can give some answers, if needed. Till Rio Olympics (end) I probably won't have much time, but after that... --Edgars2007 (talk) 09:19, 28 July 2016 (UTC)
Actually, I have entered the template into the deWiki article by hand, therefore you have not missed any of them. At the moment, I think I can answer most Python questions myself. Python is not much different to Lua, therefore learning Python is not the problem and I don´t want to become a Python expert (now). I guess most of the easy bot jobs are already done, therefore I should try as next step a more difficult tasks. Maybe moving the official names of a team from frWP to WD. A feature of my code is that I´m going to see what the bot wants to enter into WD and I have to say "yes" to let the bot do it. I guess, as newcomer it is better not to let the bot do its work without supervising, because I don´t want to repair hundreds of wrong bot edits by hand. --Molarus 12:31, 28 July 2016 (UTC)

My bot has moved the first "official name" data to WD, see Q1103281. At the moment the bot waits about 20 seconds after inserting a statement, therefore the whole data needs more then a minute. --Molarus 17:38, 2 August 2016 (UTC)

I don't know how it is in PAWS, but with real Pywikibot you can set "put_throttle = 1" in user-config file. Of course, there should be some sleeping time, if you're using main account, but 20 seconds is a little bit too much :) --Edgars2007 (talk) 06:37, 6 August 2016 (UTC)
That changes the sleeping time, thanks. I think Pywikibot in PAWS is the same as on Tool Labs (or on the own computer), only has no usernames data, because I´m logging in with oauth-login. PAWS has some advantages and some disadvantages. One advantage is that I´m able to link to files in PAWS from Wikidata. Maybe someday I will move to Labs too, because I don´t think it is possible to build python tools in PAWS and I think we could use some maintenance tools for cycling data. Maybe some SPARQL-queries with a python tkinter user interface. --Molarus 14:44, 6 August 2016 (UTC)


Hi Molarus, I come today after a long period of work on the terrain (because it rains today).

Today, with the 2016 Vuelta a Burgos, Stage 2 (Q26209129) we have a team time trial. I am interested if we can begin little to little a new function to display the table. We have another example with the stage of last year on ProCyclingStats. For stage classification (P2417), we enter a team (Astana 2016 (Q21769847)). The program will find its official name (P1448) (that can change during the season) and its country (P17). Then, we have three qualifiers to add : race time (P2781), time gap (P2911) and speed (P2052). I don't have opinion if we have an interest to list the cyclist that take part to the TTT. If we list them, it will be displayed in small and we will use with (P1706), but just for this part I don't have an opinion (because we should have the list of the participating cyclist in each articles).

In few hours, I will enter on Wikidata the results for this stage. This way I will can prepare a documentation for this very particular and rare type of race. From tomorrow, I will return to work on the terrain, but try to pass on Wikidata one time each two days. Jérémy-Günther-Heinz Jähnick (talk) 10:02, 3 August 2016 (UTC)

I see, this is a special "Classement de l'étape"-table. The columns would be: number, team name, (country ?), temps and speed (or speed and temps). 'country' would be the flag and the written name, I guess. Are there any jerseys to show? --Molarus 13:15, 3 August 2016 (UTC)
Yes, we have the number, the team, the country, the time, the gap, and the speed. I update the item with the five first teams. We will not have jerseys for this table. Jérémy-Günther-Heinz Jähnick (talk) 16:13, 3 August 2016 (UTC)
You are using 'time gap' (P2911) and 'race time' (P2781) different then we used to in 'general classification' and 'stage classification'. I don´t understand why. --Molarus 17:14, 3 August 2016 (UTC)
Easy, for a TTT, race time are given for every team, in more that each time gap. It is bizarre but it is like that, that is why I say it is a specific classification. In the same order average speed is given for each team. Jérémy-Günther-Heinz Jähnick (talk) 17:55, 3 August 2016 (UTC)

I have started coding at Module talk:Version 2. The name of the function will be 'teamtimetrialclassification'. I don´t know what should be written at the top, 'Classement de l'étape'? And I will move the translations for 'time gap' and 'speed' from the two properties to function headoftablesII. --Molarus 17:48, 4 August 2016 (UTC)

Yes, it is 'Classement de l'étape'. The only difference with a classic stage is we take other datas. Jérémy-Günther-Heinz Jähnick (talk) 06:28, 6 August 2016 (UTC)

Jérémy, would you comment the table at Module talk:Version 2. Is that what you want? Missing is: Icon of nationality, unit of speed, the WDicon. And I don´t know what to write next to the numbers. --Molarus 22:59, 8 August 2016 (UTC)

For the speed, you can write 'Vitesse moyenne (en km/h)', this way it is written just one time, as the kilometers for listofstages.
The result is very very good. For numbers and for FR Wiki, it is the same, except for the first rank where we write '1re', because in this case, we say it is the première team, and not the premier (see fr:Genre grammatical, I don't know how it works for german, I am just able to prononciate). Jérémy-Günther-Heinz Jähnick (talk) 16:12, 9 August 2016 (UTC)

The new table is only at WDWiki (see the table above) and I have tested the code only in frWiki a bit. I have also changed the two old classification tables. The time column in both tables is now using the new function calculate_time(), which reduces the size but don´t increase the speed. Please, tell me later if you see an error at this column in frWiki. Have a look at the french translation "Vitesse moy.". I don´t know if you like that. And I have added 'km/h' (+ nl, mk and ru translations) next to the numbers, not in the heading. You maybe have seen that the two old classification tables do not show in WDWiki the country column. There is a switch in function classification for this, but I have not added something like that into the new table. If the table is OK for you, I will do more tests in Wikipedias other then frWiki. Maybe I should test the table also if some data is not entered into the ttt-item. --Molarus 17:36, 12 August 2016 (UTC)

Thank you. I put the function on FR Wiki. Jérémy-Günther-Heinz Jähnick (talk) 10:09, 17 August 2016 (UTC)
By the way, I have not tested that the table links to articles like "Saison 2016 de l'équipe cycliste Astana". I thought they should like to article "Astana". I wonder what will happen when there is no such saison article available. Maybe the code will print "Astana 2016" in black (the label). --Molarus 17:37, 17 August 2016 (UTC)
Hi Molarus. I made a test on fr:1re étape du Tour d'Espagne 2016. It works very well. Can you put in bold the first line ? Jérémy-Günther-Heinz Jähnick (talk) 10:28, 23 August 2016 (UTC)
Return to "Cycling race/archive3" page.