Module talk:Cycling race/archive7
test the module
[edit]Converted tableA to use MW HTML library
[edit]Hello, I converted tableA function to use HTML_library. I think it made the function more readable. I think it does not take too much resources. Learning it took not that much time and you can mix this API with plain HTML. I propose to use this more in this module. --Papuass (talk) 16:09, 11 December 2019 (UTC)
- This will not have a huge impact of how the module works, but it will make easier to work with code and ensure that all tables look the same (right now they do not). I think this was one of reasons why enwiki decided to stop using it. --Papuass (talk) 11:34, 12 December 2019 (UTC)
- Hello, it is true that the output of the module right now looks like <td><th>blabla</td></th>, which is less readable than | ||blabla. However with some HTML, it will look like the first, I suppose. I will read it and maybe make a try, but I am not convinced it will solve the readability problem. Psemdel (talk) 10:05, 27 December 2019 (UTC)
- here an example of such coding. Psemdel (talk) 10:12, 27 December 2019 (UTC)
- I know it is not a complete solution, but at least it makes it easier to not forget to close some HTML tags. --Papuass (talk) 10:35, 27 December 2019 (UTC)
- I cannot read sorry, I thought you wanted it to be done. It was a good idea, it is quite clear now. Psemdel (talk) 12:43, 31 December 2019 (UTC)
- Done I will try on new_classification. Psemdel (talk) 16:44, 31 December 2019 (UTC)
- I know it is not a complete solution, but at least it makes it easier to not forget to close some HTML tags. --Papuass (talk) 10:35, 27 December 2019 (UTC)
Done I did it for all functions. I also tried to make the code better. I suppose, we can still improve by looking for code written twice. There can still be some typo here and there. Psemdel (talk) 17:56, 6 January 2020 (UTC)
- Great job, that made code a bit smaller and now it is easier to improve. --Papuass (talk) 08:42, 7 January 2020 (UTC)
UCI ProTeam
[edit]In connection with the change in the status of teams, he created another Pro Team (Q78464255). When the name of the World Teams changed, we indicated both the old and the new. Until the season has begun and the team seasons for 2020 have been created:
- Q20638319 UCI ProTeam (2005-2014) — current UCI WorldTeam (2015–.....) (Q6154783)
- Q78464255 UCI ProTeam (2019-.....) — former, ex-UCI ProContinental Team (2005-2019) (Q382927)
And add to the module if we use. Only a big request with separate (new) values from the translation (transcription) local function headoftableIII(x)
, and not use the ones already there. For ru-wiki, I made them all hyperlinks so that they lead to the necessary article about the status of the team. — GAN (talk) 13:51, 14 December 2019 (UTC)
- I created UCI Women’s WorldTeam (Q80425135), I hope it was not already there. Psemdel (talk) 11:08, 31 December 2019 (UTC)
- Psemdel, je suis paumé là pour le coup. Par exemple, je voudrais afficher dans l'infobox pour Saison 2005 de l'équipe cycliste MrBookmaker-Sports Tech la notion d'équipe continentale professionnelle et non UCI ProTeam. Car actuellement c'est anachronique. Maintenant on a 3 éléments wikidata qui s'appelle UCI ProTeam, c'est très complexe à comprendre. Bordurie (talk) 19:33, 3 January 2020 (UTC)
- @Bordurie:, j'avoue que là l'UCI s'est surpassé! L'idée de GAN, c'est que ce n'est pas la catégorie qui a changé de nom, mais une nouvelle catégorie. Autrement dit, il faut changer tous les items des équipes conti. Psemdel (talk) 15:09, 4 January 2020 (UTC)
- Psemdel, je suis paumé là pour le coup. Par exemple, je voudrais afficher dans l'infobox pour Saison 2005 de l'équipe cycliste MrBookmaker-Sports Tech la notion d'équipe continentale professionnelle et non UCI ProTeam. Car actuellement c'est anachronique. Maintenant on a 3 éléments wikidata qui s'appelle UCI ProTeam, c'est très complexe à comprendre. Bordurie (talk) 19:33, 3 January 2020 (UTC)
- @Psemdel: So can you update the code in order to when the team have Q78464255 (if no articles created here) use the link for Q382927? Due here at Q382927 all wikis have article to UCI Pro Continental and UCI ProTeam. Repf72 (talk) 01:56, 9 January 2020 (UTC)
- Yes, it can be done. Psemdel (talk) 20:27, 9 January 2020 (UTC)
Reuse of code at Danish Wikipedia
[edit]For your information: I have copied some code from the module to other modules at dawiki. The iterator statements
and the functions getStatementForTime
and flag
is used in da:Modul:Flag. The table flags
is used in da:Modul:Flag/data.
I used these modules in another little module da:Modul:Wikidata løbshistorie which creates a child infobox with history data for races: First edition, Editions, First winner, Most wins, Most recent. You may want to look at it for inspiration or your own use. If you have any questions I will try to help. --Dipsacus fullonum (talk) 22:58, 19 January 2020 (UTC)
- On WP:fr we have also something similar: fr:Module:Infobox/Descriptif course cycliste2 (probably not so well coded as you do). Psemdel (talk) 13:12, 9 February 2020 (UTC)
Propolsal: Move tables of constants to separate data module(s)
[edit]I propose that all large tables with only constant strings, numbers and boolean values are moved into one or two data modules. This will be all the l10nDef and other translation tables, the flags table, the jersey and jersey color tables, the classes tables, the formats table, the blacklist tables, the UCI tables for the calendar and maybe other tables.
The data modules can then be loaded into Module:Cycling race with the mw.loadData function which will mean that the tables will only be loaded and parsed once for each page instead for as now in every use of {{#invoke:}}.
You could put all data into one data module, but I think two might be better: Module:Cycling race/data for data which are used by all users, and Module:Cycling race/l10n for localization data. You could then save more memory by removing the localization data for all other languages than your own and only make localization updates at your local wiki. That have obvious advantages, but may also make maintenance harder when new functionality is added or changed. I think both solutions will give significant faster loading of pages which have many tables made by different parts of the module. I would to hear your opinions about this. --Dipsacus fullonum (talk) 00:56, 21 January 2020 (UTC)
- I would support that but I am interested in suggestions how to ensure that all modules are copied to other wikis. This would also allow to keep only relevant translations on every wiki (one of problems enwiki users indicated when they decided to remove this module). --Papuass (talk) 19:22, 21 January 2020 (UTC)
- I have considered the translations more. I think it is necessary to keep all translations to all languages here at Wikidata. Otherwise it would be too much trouble when new texts to be translated are made. But that doesn't mean that every wiki needs to have all the translations. You could remove the unneeded translations when you copy the module from Wikidata to your local wiki. To test the possibilities I made a small module in a sandbox in da:Modul:Sandkasse/Dipsacus fullonum/Modul:Sandkasse (permanent link to current verson). It is rather crude and may not work correctly, but shows the idea. It is used at da:User:Dipsacus fullonum/sandkasse/skabelon. --Dipsacus fullonum (talk) 13:16, 22 January 2020 (UTC)
- You already make this offer a few time ago. At that point, I was quite sceptic, because we lose the "everything is updated at once" that mentioned Papuass. However, I am ready to change my mind as:
- I have considered the translations more. I think it is necessary to keep all translations to all languages here at Wikidata. Otherwise it would be too much trouble when new texts to be translated are made. But that doesn't mean that every wiki needs to have all the translations. You could remove the unneeded translations when you copy the module from Wikidata to your local wiki. To test the possibilities I made a small module in a sandbox in da:Modul:Sandkasse/Dipsacus fullonum/Modul:Sandkasse (permanent link to current verson). It is rather crude and may not work correctly, but shows the idea. It is used at da:User:Dipsacus fullonum/sandkasse/skabelon. --Dipsacus fullonum (talk) 13:16, 22 January 2020 (UTC)
- A big critic that we get all the time about this code, is that it is too long (for sure). Most of the lines are however those "data".
- You explain, it would save memory. There, I trust your good computer science knowledge.
- 2 years ago, the code changed all the time, requiring an easy update step. Now, I think the code has reached a mature state. I don't have idea for new functions. We improved the structure this winter, to make it more clear. I expect (hope) the number of updates to decrease quite significantly in this year. Psemdel (talk) 13:40, 9 February 2020 (UTC)
- The amount of data will be the same, so it not save memory as such. It will make pages load faster if they have many templates which use Module:Cycling race because it takes considerable time to create and initialise tables in lua, and that will only be done once if the data is in a separate data module. --Dipsacus fullonum (talk) 18:20, 9 February 2020 (UTC)
- I started some experiment, but it needs some work. Psemdel (talk) 16:44, 29 March 2020 (UTC)
- In details, I made a Module like that [[1]], I call it in [[2]] with
- The amount of data will be the same, so it not save memory as such. It will make pages load faster if they have many templates which use Module:Cycling race because it takes considerable time to create and initialise tables in lua, and that will only be done once if the data is in a separate data module. --Dipsacus fullonum (talk) 18:20, 9 February 2020 (UTC)
local l10n = mw.loadData("Module:Psemdel2")
but it sends me an error " data for mw.loadData contains unsupported data type 'function'." Any idea? Psemdel (talk) 20:05, 29 March 2020 (UTC)
- @Psemdel: The error message in very clear. As described in the manual data loaded with the mw.loadData function may not contain functions but only constants (strings, numbers, booleans and tables). So only the tables and data can be moved to a data module, while the functions using the data cannot. I suggest making a generic translate function which takes a table of translations as one of its arguments. The data module may look like this
return
{
startlist = {"Liste des participants", "Num", "Coureur","Pos","Directeur sportif :", "AB", "HD", "NP", "DQ", "route", "chrono", "et", "sans équipe", "afficher", "masquer" }
startlisttable = {"Liste des participants", "Num", "Coureur", "Équipe", "Pos" }
race_reference = {"Source : ", "Sources : " }
}
- It can then be used like this:
local l10n = mw.loadData("Module:Psemdel2")
local function translate(translations, index)
return translations[index]
end
local translated_text = translate(l10n.startlist, 5) .. translate(l10n.startlisttable, 3)
.. translate(l10n.race_reference, 1) .. 'etc.'
- --Dipsacus fullonum (talk) 20:59, 29 March 2020 (UTC)
- PS. The translate function can even be obmitted:
local l10n = mw.loadData("Module:Psemdel2")
local function translate(translations, index)
return translations[index]
end
local translated_text = l10n.startlist[5] .. l10n.startlisttable[3]
.. l10n.race_reference[1] .. 'etc.'
- But then error handling may be harder. --Dipsacus fullonum (talk) 21:05, 29 March 2020 (UTC)
- I can read now, sorry, without example in the doc, it is always difficult to understand how it works/should work. I will work further when I have some time. Psemdel (talk) 06:45, 30 March 2020 (UTC)
- But then error handling may be harder. --Dipsacus fullonum (talk) 21:05, 29 March 2020 (UTC)
Adaptation for french wikinews
[edit]Hi,
Could someone adapt that module for french wikinews. There are two changes to make :
- Color of tables for french wikinews should be
#BCE1FF
instead of#FFDF80
- Links to others articles should not use
[[ ... | ... ]]
but{{w| ... | ... }}
Thanks --Mattho69 (talk) 20:02, 8 March 2020 (UTC)
- @Mattho69: We don't do wikinews here. And why the second point? Psemdel (talk) 11:08, 22 March 2020 (UTC)
We need a new item "postponed" when a cycling race is postponed
[edit]Hi Guys. I'm checking Kit to translate but I didn't find an item when a cycling race is POSTPONED (not cancelled at all) to another date. This item is important because Giro de Italia 2020 was postponed (not cancelled) and I need show that caption within /listofwinners to Giro de Italia list of winners by year, but I need add an item within the property winner when the race was postponed. Does anyone agreeing with me? Let me know. Thanks! --Douglasfugazi (talk) 01:18, 14 March 2020 (UTC)
New bib (like jersey)
[edit]Hello,
I have create a bib for team's classification Q87718074, but the background color of listofstagesclassification don't change from white to the same yellow of yellow jersey (general classification). Can you do it ?
Thanks, AirSThib (talk), the 16:05, 14 March 2020 (UTC).
- @AirSThib:
- 1. This jersey is already there. Wikidata:WikiProject Cycling/Kit to translate/Jerseys. All of them without the phrase "leader after the stage."
- 2. The holder of a jersey with a color number is not highlighted by the module.
— GAN (talk) 16:25, 14 March 2020 (UTC)
- @GAN: Thanks for your answer ; I haven't see this item. So I have highlighted the column and it's a success ! Thanks, AirSThib (talk), the 16:43, 14 March 2020 (UTC).
30th November
[edit]Just for info, I found out why there is/was the 30th November bug. For recalling, in wikidata there is let's say 2013 and the date is displayed 30 November 2012 :/. In fact, it happens if the month is "00" (instead of "01") and the day also "00". Psemdel (talk) 11:12, 22 March 2020 (UTC)
- @Psemdel: I that case the real bug is that the precision field of the date value isn't tested. If the precision is "year", the values for month and day may be 0 or any other value and should never have been used. --Dipsacus fullonum (talk) 22:39, 26 March 2020 (UTC)
- I agree, that the bug was on our side. I implemented a test to see if month is 00. Maybe a test with the property precision would be better. Don't hesitate to modify. Psemdel (talk) 18:47, 31 March 2020 (UTC)
- I just found the code and I will modify it. Dates are often encoded as "YYYY-00-00" when the precision is year, but month and day can be any values so test for the value '00' isn't adequate. --Dipsacus fullonum (talk) 21:28, 31 March 2020 (UTC)
- I agree, that the bug was on our side. I implemented a test to see if month is 00. Maybe a test with the property precision would be better. Don't hesitate to modify. Psemdel (talk) 18:47, 31 March 2020 (UTC)
UnitTests
[edit]To handle previous issue and improve the reliability of the module, especially concerning names, I introduced some UnitTests: Module:Cycling race/Test, results are in the discussion page. So we can test the small functions separately. More tests should be implemented. Of course for the big functions, it won't work, but still it is an improvement. Psemdel (talk) 12:02, 26 March 2020 (UTC)
Without parameter?
[edit]Is it possible to change this module so that it also works without a q-value as parameter? Then it would use the q-value for the page it is included on.--Pirker (talk) 16:58, 9 July 2020 (UTC)
- The infobox work according this principle. It is less flexible, as you cannot display on a page information from another page: for instance the stages of a Tour. You can have a look here: [3], [4]. I cannot say exactly which part of the code do that. Psemdel (talk) 11:44, 28 October 2020 (UTC)
Raceid
[edit]Hi! Anyone know how to get a proper ProCyclingStats race ID at PCS's website? I created Q98148687 but couldn't find "raceid" at their website as typical link there is like https://www.procyclingstats.com/race/puchar-ministra-obrony-narodowej/2020 ([5]). 99kerob (talk) 14:42, 8 August 2020 (UTC)
The 'instance of' property is being overused
[edit]Please see Wikidata talk:WikiProject Cycling#The 'instance of' property is being overused. I've started a discussion there which would heavily affect this module. –IagoQnsi (talk) 01:28, 13 August 2020 (UTC)
- I see it now. So to sum up:
It seems reasonable to me. What is your opinion on the topic? Psemdel (talk) 15:45, 22 October 2020 (UTC) Inventar of the things to change in the module then:
- raceLink, insert P3450
- getMainRaceLink, insert P2094 and P3450
- fn_race, for UCI test insert P3450
- fn_getClassInfo, to be rewritten in accordance with fn_race.
- maybe nationalchampionships_main
- stageinfobox, insert P3450
- infobox, insert P3450
For Infobox on WP:fr :
- Module:Infobox/Cycliste, no change
- Module:Infobox/Descriptif course cycliste2, use P279 for the class, it should be harmonized.
- I implemented the feature in the module. If we decide to use other properties, the change won't be long... Psemdel (talk) 13:14, 23 October 2020 (UTC)
In all rationality, the "teamCats" (UCI World Tour, Professionnal...), should be also moved from P31. P2094 instead maybe? Psemdel (talk) 08:50, 24 October 2020 (UTC) When we speak property P5138 instead of P361 for the team season could be an idea. Psemdel (talk) 19:33, 30 October 2020 (UTC)
- Still no opinion on this topic? Psemdel (talk) 18:56, 30 November 2020 (UTC)
- We should progress on the topic. Now we have both systems that can run parallel. It is confusing. I don't get the feeling there is a consensus on the topic. For instance P2094 is used for "women cycling" sometimes which makes it not available for the "classes"... Any other idea? Psemdel (talk) 15:14, 15 May 2021 (UTC)
- Still no opinion on this topic? Psemdel (talk) 18:56, 30 November 2020 (UTC)
UCI ProSeries
[edit]To display the title of the ProSeries calendar add in Module:Cycling_race/l10n
at the end of calendar_translate
text , "UCI ProSeries"
— GAN (talk) 11:47, 17 September 2020 (UTC)
All possible variants of national teams for all countries. A part may have duplicates, since it was not possible to double-check everything. — GAN (talk) 10:32, 27 September 2020 (UTC)
- @Rz98: Thank you for the edits. There are also national teams of the category elite "B" national cycling team (Q99658502), but I did not add them to the table so as not to stretch it. — GAN (talk) 09:41, 3 July 2021 (UTC)
- @GAN: Thank you for creating and maintaining these structures in the first place! I'm currently trying to understand what's there and how the data is structured. I have a question of understanding: Is this table specifically about road bicycle racing (Q3609), or more generally about cycle sport (Q2215841) (including road racing, but also cyclocross, MTB, track, etc)?
- The "national cycling teams" in the left-hand side column are all tagged sport (P641)cycle sport (Q2215841), except Hungary national cycling team (Q99646711), which has road bicycle racing (Q3609).
- The competition class teams in the remaining six columns (ME/WE/MU23/etc) are all tagged sport (P641)road bicycle racing (Q3609), except United States men's national road cycling team (Q7892551), which has cycle sport (Q2215841).
- For the national teams of Hungary and the USA, most likely there was a mistake - I fixed it. — GAN (talk) 12:05, 3 July 2021 (UTC)
- Is this intentional? E.g., to pick a hypothetical example, if one ever want to have a "Belgium men's elite national cyclocross team", would that become a part of Belgium national cycling team (Q86916217), tagged with sport (P641)cyclo-cross (Q335638), or would that go into an entirely different structure?
- National teams in other disciplines. Yes, they will enter the structure. It is only advisable to place them in a separate table (separate article), for convenience (mtb, track, cyclocross).
This list was originally created for ease of searching for prefabs when using "Module:Cycling race". Which is mainly used for road cycling. Therefore, there are only national road teams. — GAN (talk) 12:05, 3 July 2021 (UTC)
- National teams in other disciplines. Yes, they will enter the structure. It is only advisable to place them in a separate table (separate article), for convenience (mtb, track, cyclocross).
- PS: The "elite B" category seems to be used by Egypt only? -- Rz98 (talk) 11:09, 3 July 2021 (UTC)
- Elite "B" - on the Tour de France, sometimes several national teams competed from the old - en: 1939 Tour de France. I also met 2-3 national teams at African races. — GAN (talk) 12:05, 3 July 2021 (UTC)
- @Rz98: I marked the answers after your questions.
I can suggest the following structure option:
national cycling team:
- national road cycling team:
-- men
-- women
-- men's U23
-- women's U23
--.....
- national track cycling team:
-- men
-- women
--.....
-.....
— GAN (talk) 12:05, 3 July 2021 (UTC)
- @GAN: Thanks for the clarification, that's also what I imagined. Would it make sense to change the "national cycling teams" from cycle sport (Q2215841) to road bicycle racing (Q3609) then? (It would be relatively easy to automatize this.) -- Rz98 (talk) 13:23, 3 July 2021 (UTC)
- @Rz98: https://dropmefiles.com/gV1cl If you plan to create teams in other disciplines, then yes. If not, then decide for yourself. If you change, can you rename it to Russian at the same time? The file contains the necessary for this and the names of the main teams in other disciplines in Russian if you decide to create.— GAN (talk) 14:06, 3 July 2021 (UTC)
Infobox for race
[edit]Is there any plans to create an infobox for race (in addition to the one for race edition) with number of editions, last winner, name history, category etc.? Pirker (talk) 14:08, 30 September 2020 (UTC)
- The fr-wiki has a separate template module with this functionality. — GAN (talk) 14:35, 30 September 2020 (UTC)
- It would be great to add that here the same way as other parts of module are added. I would love to use it on pl.wiki but importing it from fr.wiki is too hard for "non-technical" user like me :(. 99kerob (talk) 15:29, 14 October 2020 (UTC)
- It is separated, because it uses Module:Infobox (Q13107716), which is separated from this module. It also makes it easy to replace information from wikidata with local information in wikipedia. Infobox is however available for all wikis, so, normally (edit: I had a look, the code does look different in pl and fr...), you can just copy/paste the code from fr-wiki to WP:pl. Psemdel (talk) 15:27, 22 October 2020 (UTC)
- I don't really know how long it would be to program such a function. If it is reasonable, I will give it a try. Psemdel (talk) 08:52, 24 October 2020 (UTC)
- So I added a new function raceinfobox. Thanks to GAN for the checking. I also added new unit tests. The "get_local_content" is present, but I am no expert from this point. PS: I try to optimize a few things tomorrow. Psemdel (talk) 12:10, 30 October 2020 (UTC)
- @Psemdel: Thanks for your work! So it is not ready yet? Will you write an instruction how to import that at each wiki when you will finish? For now I simply copied French subpage into Polish Wiki but it doesn't work there (I guess that pl:Moduł:Cycling race needs to be updated but I don't want to mess it up ;). 99kerob (talk) 14:03, 30 October 2020 (UTC)
- @99kerob:, yes wait until tomorrow, I just noticed small things (a translation is missing for instance). And yes, a documentation is needed. I ping when I am done. Psemdel (talk) 15:24, 30 October 2020 (UTC)
- @99kerob:, I improved the code according to Dipsacus fullonum's one. It should be ok. Psemdel (talk) 10:10, 31 October 2020 (UTC)
- So I added a new function raceinfobox. Thanks to GAN for the checking. I also added new unit tests. The "get_local_content" is present, but I am no expert from this point. PS: I try to optimize a few things tomorrow. Psemdel (talk) 12:10, 30 October 2020 (UTC)
- I don't really know how long it would be to program such a function. If it is reasonable, I will give it a try. Psemdel (talk) 08:52, 24 October 2020 (UTC)
- It is separated, because it uses Module:Infobox (Q13107716), which is separated from this module. It also makes it easy to replace information from wikidata with local information in wikipedia. Infobox is however available for all wikis, so, normally (edit: I had a look, the code does look different in pl and fr...), you can just copy/paste the code from fr-wiki to WP:pl. Psemdel (talk) 15:27, 22 October 2020 (UTC)
- It would be great to add that here the same way as other parts of module are added. I would love to use it on pl.wiki but importing it from fr.wiki is too hard for "non-technical" user like me :(. 99kerob (talk) 15:29, 14 October 2020 (UTC)
@Psemdel:
I updated the module and copied all the translations. Does not work. Throws an error related to the race category
https://ru.wikipedia.org/wiki/Шаблон:Cycling_race/raceinfobox and https://ru.wikipedia.org/wiki/Шаблон:Cycling_race/calendarcustom
And you can't manually set your image. Even on fr-wiki
{{Cycling race/raceinfobox|Q1810324
|Image = Crystal Clear app kworldclock.png}}
{{Cycling race/infobox|Q1810324
|Image = Crystal Clear app kworldclock.png}}
added translation for the line "number of races for a specific year"
- The
if not details[1].content
where missing. But still not correct. To be continued. Psemdel (talk) 20:53, 3 November 2020 (UTC)
To answer GAN:
- I would place the block of official names in front of the winners
- On WP:fr we put it below the "name" so all information about names is at the same place
- Then at least swap the list of names and the logo (you can show how to put the list of names down - I'll try to change it locally in the ru-wiki). And you can make it possible to resize the image manually. The default 300px is sometimes a lot. Race names by date are not sorted. The template for cycling teams in the French wiki is similar in structure, but there the previous names are located at the bottom of the template
— GAN (talk) 07:20, 1 November 2020 (UTC)
- Done Sorting and names before winners. Psemdel (talk) 20:53, 3 November 2020 (UTC)
- make right after the main title and in front of the image the ability to add arbitrary text on a white background
- Why?
- Still not sure what is needed?
- Can a display be made for multiple winners of team races?
- Actually it is working, it is just that I used team season as winner, so Specialized-Lululemon 2012 != Specialized-Lululemon 2013. Given the number of TTT in a season, I don't invest time in that.
- Clear. With teams, you can also try using for seasons — GAN (talk) 07:20, 1 November 2020 (UTC)
- Support for more languages (including Russian) for official titles. Russian races are officially called in Russian.
- On WP:ru the russian name will be displayed. On WP:fr not, because "nobody" can read that over here.
- Main title format for infoboxes -> font size, position and size of the icon. The main color of all templates. You can make it possible to set these parameters at once for all infoboxes for a particular wiki.
- I inserted the silver theme from WP:da (good idea). Which setting do you want exactly? Psemdel (talk) 10:10, 31 October 2020 (UTC)
|style="background:#FFDF80; font-size:15px;" | [[File:Cycling (road) pictogram.svg|left|27px]] '''ABCabc'''
ABCabc |
- Done Size slightly reduced (260px instead 300 px). Psemdel (talk) 20:53, 3 November 2020 (UTC)
There were problems with admins related to the design of templates. — GAN (talk) 07:20, 1 November 2020 (UTC)
- I may have forgot one #FFDF80. I don't really see what is the problem, if the different wiki use different background color :D. Psemdel (talk) 19:07, 1 November 2020 (UTC)
- The problem is not because of the background color, but because of the wide and large header of the text :) — GAN (talk) 21:38, 1 November 2020 (UTC)
- Done
@Psemdel:
- https://c.radikal.ru/c13/2011/c2/527831f143cet.jpg The mod version is the same on all three wikis. But race categories are displayed differently
classLink = classLink(classID)
causes an error in ru-wiki, so I had to replaceclassLink = classLink
— GAN (talk) 18:17, 1 November 2020 (UTC)
- I will have a look, but I cannot say when. Psemdel (talk) 19:07, 1 November 2020 (UTC)
- @GAN: I already write about that at my discussion. Race categories are displayed differently because category is "hidden" from infobox if particular Wiki don't have an article about that circuit - if at ru.wiki you will create article for example about UCI Africa Tour missed categories for Tour de Senegal will appear at infobox automatically (I created missed articles about UCI Continental Series at pl.wiki yesterday at it is now working that way). I think that should be changed and in such case when such Wikipedia don't have an article about circuit linked at Wikidata just info about category without a link should be displayed in infobox instead of hiding that info. 99kerob (talk) 20:26, 1 November 2020 (UTC)
- @99kerob: Happened. But some of the articles have not yet been created for the convenience of checking the solution to the problem. — GAN (talk) 21:38, 1 November 2020 (UTC)
- @Psemdel, GAN: I don't know why (I guess it has something in common with last GAN's edits) but now exact problem happened to Template:Cycling race/victories at pl.wiki which is strange because a few days ago it worked fine. Now info about categories for races that has a link as a P:P361 to circuit that don't have an article at pl.wiki (for example UCI Europe Tour 2018) just disappeared and made a terrible effect on many pages - see for example pl:Uno-X Pro Cycling Team. I don't know how but it should be corrected ASAP as template is used in over 30 pages. 99kerob (talk) 19:55, 3 November 2020 (UTC)
- There is a problem with the module when compared to its old version. Now in the draft Psemdel I write in detail with examples. — GAN (talk) 20:03, 3 November 2020 (UTC)
- There was a confusion between a variable name and function name (LUA does not make the difference). Moreover pl:Uno-X Pro Cycling Team has no class, no chance that a class is displayed. Psemdel (talk) 20:53, 3 November 2020 (UTC)
- There is a problem with the module when compared to its old version. Now in the draft Psemdel I write in detail with examples. — GAN (talk) 20:03, 3 November 2020 (UTC)
- @Psemdel, GAN: I don't know why (I guess it has something in common with last GAN's edits) but now exact problem happened to Template:Cycling race/victories at pl.wiki which is strange because a few days ago it worked fine. Now info about categories for races that has a link as a P:P361 to circuit that don't have an article at pl.wiki (for example UCI Europe Tour 2018) just disappeared and made a terrible effect on many pages - see for example pl:Uno-X Pro Cycling Team. I don't know how but it should be corrected ASAP as template is used in over 30 pages. 99kerob (talk) 19:55, 3 November 2020 (UTC)
- @99kerob: Happened. But some of the articles have not yet been created for the convenience of checking the solution to the problem. — GAN (talk) 21:38, 1 November 2020 (UTC)
Cycling-init-bot
[edit]Hi every one, I've got a big news Today. Wikidata has lots of advantages for the display of cycling-data, however it also creates some boring and redundant tasks, such as creating team season for instance. In 2017, I programmed myself a bot/script in Python to automatize all these things (I am not the only one, Repf72 has also one, if I am right). The code was always open, but still I cannot expect from all wikipedia cycling contributors to know Python. That's why I programmed this year a web site: https://cycling-init-bot.toolforge.org/ for this purpose. You can for instance import rankings or start list directly. As written on the main page, I will grant the rights progressively to the new users. All feedbacks are welcome, there is surely still many points to improve. Psemdel (talk) 15:27, 22 October 2020 (UTC)
Women UCI classes?
[edit]Most of the UCI classes are the same for men and women: 1.1, 2.1... It makes understanding of the data somewhat difficult. As we are anyhow thinking of moving the classes from P31 to something else, it may be the right time to think over. Should we create 1.1 (Women),... Of course, this won't be displayed (this is easily solved, there are not so many classes). What do you think? Psemdel (talk) 07:21, 31 October 2020 (UTC)
- (I move that here)
- To define women's races, I can offer d:P2094 --> d:Q920057
- But in the men's calendar it is now more difficult:
- five continental tours. Races in which they have the same categories
- several races (French in South America and Russian near China) that were included in different continental tours
- a race can be included in several calendars at once. For example, a national cup or a U23 category race in an adult and youth cup
- the race can change the category, but not change the calendar. Was one-day, but became multi-day or vice versa
- https://cqranking.com/men/asp/gen/race_history.asp?raceid=524 since 2005, the category has changed five times, but the calendar :has not changed.
- (it's like for a cycling team - a team category and a usi code)
- Therefore, I would suggest separately display the category separated by commas (,) and separately the calendar through "
" :using for example "d:P642" - GAN
- Ok, so this solution was too easy. We have to look for the circuit/calendar, understood. UCI is not ruled from computer scientists. I already use P642 for that, so it is definitely ok. P2094 for the class or for women cycling? We will have to decide those points as written above, and use some bots to put it clean. It will become the chaos otherwise. Psemdel (talk) 09:47, 31 October 2020 (UTC)
- you can still make a request to add new elements "d" --- "calendar / tournament" which includes the race and "UCI race category" — GAN (talk) 10:02, 31 October 2020 (UTC)
P1813 and Aleksandr Vlasov/Alexander Wlassow/Aleksandr Własow
[edit]Hi! I noticed a problem at module for a small group of cyclists whose "original" names are written in cyryllic. In different languages there are used different types of transcription from cyryllic into latin alphabet (for example Александр Власов will be "Aleksandr Vlasov" in English, "Alexander Wlassow" in German and "Aleksandr Własow" in Polish)". In most cases it is solved by displaying a name from a label for each cyclist. But there is a problem when such cyclist has also set an info like official name or short name because module don't use a specific language for each Wikipedia but he first one set at Wikidata - for example Q3341512 has set both an official name in French ("Nikita Stalnov") and Polish ("Nikita Stalnow") which are different (as we use different transcriptions from cyryllic) but on Polish Wikipedia French version instead of Polish one is displayed as it was added earlier on Wikidata. Same problem appeared also for Vlasov but I solved it by deleting these claims. In case of Stalnov it can't be done that way as he changed his surname (he was using one surname until 2014 and other one since 2015) and it can't be displayed properly via a label. 99kerob (talk) 15:38, 3 November 2020 (UTC)
- @99kerob:, it is an interesting case. I don't see any easy solution. Name is really the most difficult topic: no name is bad, bad name is bad also. Psemdel (talk) 19:04, 3 November 2020 (UTC)
- I tried something in the code, (detection of "vna" and "vitch" in the russian label). I have however no mean to test on wiki fr. Psemdel (talk) 16:02, 7 November 2020 (UTC)
Season 2021
[edit]In addition to races, created a list for teams
— GAN (talk) 18:04, 17 November 2020 (UTC)
- If the export function from UCI website works again, it will be even possible like last year for me to create the women races at once. But it is not working for month now at my place... Psemdel (talk) 19:52, 20 December 2020 (UTC)
- @Psemdel: This? https://dropmefiles.com/CLtm6 — GAN (talk) 10:13, 21 December 2020 (UTC)
- No, I mean there is an export (to excel) button on the UCI website. So you can export the result, and then reimport then with whatever you want (an API would be more elegant, but I don't know if there is one). I use my bot to do that. Unfortunately this export button make an 404 for 3 month now on Chrome, and for 3 weeks on Firefox at my place... Psemdel (talk) 18:59, 21 December 2020 (UTC)
- Is this button here? I made this file using it in Firefox. — GAN (talk) 19:24, 21 December 2020 (UTC)
- Almost the same, but in ranking (then there is no pdf) or in result. And then it does not work. Psemdel (talk) 16:52, 31 December 2020 (UTC)
- Is this button here? I made this file using it in Firefox. — GAN (talk) 19:24, 21 December 2020 (UTC)
- No, I mean there is an export (to excel) button on the UCI website. So you can export the result, and then reimport then with whatever you want (an API would be more elegant, but I don't know if there is one). I use my bot to do that. Unfortunately this export button make an 404 for 3 month now on Chrome, and for 3 weeks on Firefox at my place... Psemdel (talk) 18:59, 21 December 2020 (UTC)
- @Psemdel: This? https://dropmefiles.com/CLtm6 — GAN (talk) 10:13, 21 December 2020 (UTC)
Text style in infobox headlines
[edit]The headline in infoboxes as created by the function infoInitTab() have the CSS style font-size:175%;
The big letters are criticized on dawiki where the headline in infoboxes is usually font-size:125%; font-weight:bold;
. I have looked at other Wikipedias and it seems that it is normal elsewhere as well. Will anyone protest if I change infoInitTab to this? --Dipsacus fullonum (talk) 18:19, 30 November 2020 (UTC)
- No problem for me. Psemdel (talk) 18:55, 30 November 2020 (UTC)
Rider infobox
[edit]I inserted an alpha version of rider infobox. Still some works to do:
- Done Managed team does not work
- Done Test the use of local data
- Done Documentation
Other to do for the next weeks:
- Done Implement the changes from GAN
- Done I implemented a distinction between road/mountain bike... though the use of qualifiers P642. It works fine for rider infobox, but I should also adapt the other functions.
- "Slavic" plurals (singular = 1, 2-4 = plural type 1, >5 = plural type 2...)
- Ok, I fear that I will introduce more mistake than solve them...
When the changes are done, many tests to do. So be patient before copying to your Wikipedia! Psemdel (talk) 12:09, 31 December 2020 (UTC)
- @Psemdel: Awesome news! How can I help with testing? 99kerob (talk) 12:16, 31 December 2020 (UTC)
- @99kerob:, thank you for the feedback. In 1 or 2 weeks when everything is finished, I ping you. Then, you should try using the new function on one rider and see what happens in Polish, if it is fine for a second rider and so on. There are always so many cases to consider that a few cycles are necessary. Psemdel (talk) 16:06, 31 December 2020 (UTC)
- @99kerob:, it should work.
- @99kerob:, thank you for the feedback. In 1 or 2 weeks when everything is finished, I ping you. Then, you should try using the new function on one rider and see what happens in Polish, if it is fine for a second rider and so on. There are always so many cases to consider that a few cycles are necessary. Psemdel (talk) 16:06, 31 December 2020 (UTC)
Discussions:
- Does the infobox needs a minimum width?
- Do we display the flags? On WP:fr we normally display the nationality of the rider, but it is difficult to get the conversion France --> French in all languages, at least I don't know any easy way. So I display the country now. With flag is nice, but there is a huge problem with USSR (red flag :D) for all those who born there.
- Do we display the country of birth? On WP:fr we relly on hyperlink to clarify.
- Do we split between amateur and pro team? It is son on WP:fr and WP:en.
Technical issue: how to display "Between the title and the photo to add. You need to manually add a short name in your native language with the language specified" Psemdel (talk) 13:33, 9 January 2021 (UTC)
- @Psemdel: I tried it in my draftbox at pl.wiki for some cyclists. It looks really nice. Some things to discuss:
- What is "Lateralisation"? Is it a parameter to declare if person is left- or right-handed? ;) I thing that we don't need such parameter in infobox (same as blood group) - definitely not important for a cyclist, I have never seen such info in any infobox
- I agree and comment it out.
- "Awards" looks really strange - check for example how it looks for Lance Armstrong. This parameter on Wikidata contains completely different things as national orders, sport awards etc. Wikidata miss a lot of data for this parameter (compare article about Lance at en.wiki to Wikidata item), moreover even if we will add all missed data section with Lance's awards in infobox will be much longer that other parts of infobox (at pl.wiki I guess that it could be even longer than whole article ;)). Do we really need such parameter?
- Obviously, it looks weird. I freeze input from Wikidata on that.
- Some time ago at pl.wiki we decided to delete "weight" parameter from all sportpersons infoboxes as this is a parameter which change a lot for each person during their life. Is it possible to hide this parameter just for our Wiki?
- I insert a parameter for that. On WP:fr we normally have also no weight.
- Parameter "Managerial teams" is for a teams that such cyclist was a sports director? I guess so but I cannot find any example which will display this parameter in infobox so I want to clarify that ;). If yes which parameter at Wikidata we should use at (former) cyclist's item to display that in infobox?
- If we want to separate amateur and pro teams teams marked as club cycling team should be also displayed in "amateur teams" section (it is even a subclass for amateur cycling team at Wikidata) - now they are displayed in same section as UCI teams
- Speciality is now imported from P:P413. If this parameter is missed (for most items it is missed) shouldn't we just use P:P641 instead?
- I don't know what is the traduction in polish, but in French P641 is only sport. So we would have "cycling" all the time, which is not useful in my opinion.
- In case of an age of cyclist there is a French word "ans" which should be translated through "l10n" subpage
- That is the point where I wanted the "slavic plural". Good that you remind it.
- If athlete joined a team during a season a number for month is displayed which looks quite weird for me (for example "4.2017-2018" in case of Stanisław Aniołkowski). Wouldn't it be better to display it in way "[name of the month] year-year", which will in this case "kwiecień 2017-2018" for pl.wiki? We rather use that way at our wiki
- It is difficult to read then, as the column is narrow. You can insert it, but I won't do it. It depends on the language. In German, it is quite normal to give the number of the month instead of its name for instance.
- At pl.wiki we also have a link to Commons at bottom of infoboxes (check for example: pl:Piotr Brożyna). Is it possible to add it too? A small link on the left side of the screen above interwikis are quite hard to catch for users
- It is normally displayed on the left bar, if it is documented in wikidata (not the case for Piotr Brożyna). But ok, I can add it.
- For country of birth I think that we don't need, hyperlink to the place is a good solution, country will make it really difficult (for example if someone was born in Tallinn in 1987 right country will be Soviet Union, not Estonia which will make a lot of troubles)
- Flags are difficult topic ;). Some people likes them, some not, I don't have any strong opinion on them
- For nationalities I just translated that parameter as "country" so it can be displayed that way, I don't see a problem here 99kerob (talk) 19:37, 9 January 2021 (UTC)
- Thanks for the feedback, I look in detail tomorrow. Psemdel (talk) 19:46, 9 January 2021 (UTC)
- @Psemdel: I copied your changes into Polish Wiki but it causes a problem with rider infobox (check pl:Wikipedysta:99kerob/brudnopis100), probably because phrase "age" is missed in "Module:Cycling race/l10n". I have also one more suggestion for rider infobox: we should also use "P1559" for non-Latin names and surnames (for example for Russian cyclist we should also have in infobox his name and surname written in cyryllic). 99kerob (talk) 15:02, 15 January 2021 (UTC)
- I would suggest the following order of output: first "birth name (P1477)" and then "name in native language (P1559)". As these values may differ. "P1559" is more likely for people who have changed their last name and / or first name. — GAN (talk) 15:27, 15 January 2021 (UTC)
- @99kerob: Added age WD and pl-wiki. Check your draft. — GAN (talk) 15:49, 15 January 2021 (UTC)
- The module has a 50th translation for the rider template
translate("riderinfobox",50)
. The module has a 50th translation for the rider template. And I counted fewer translations for this section. "thinking emoticon". — GAN (talk) 15:49, 15 January 2021 (UTC)
- I would suggest the following order of output: first "birth name (P1477)" and then "name in native language (P1559)". As these values may differ. "P1559" is more likely for people who have changed their last name and / or first name. — GAN (talk) 15:27, 15 January 2021 (UTC)
- Yes I had to add 2 new translations for those plural. About P1559 why not, so for the top of the infobox? The number of properties that we use for names is really huge. Psemdel (talk) 09:45, 16 January 2021 (UTC)
- @Psemdel:I would leave the top line for free text addition. To be able to indicate, if necessary, the name of the rider in a third language (for example, Asian names in Latin) or the name of the folk language by which he is known in the races.
- I will add a parameter
- -Display of the place (city) of birth and / or death. The module displays the current city name. And there should be the name of the city at the time of the person's birth / death. (We display the names of all teams at the time of the race, not at the moment.) This is relevant for many cities of the former USSR. (Zabelinskaya should have Leningrad instead of St. Petersburg).
- -The ru-wiki has a module for such a mapping. He displays the name of the city and the entire geochain (district / region / region / country) where it was then located on the specified date.
- The whole module already exist on WP:fr using such existing modules, here we have to develop again to become independent from the WP.
- -
{{#invoke:Psemdel1|riderinfobox|Q1903470}}
About division into amateur and professional teams. Seven lines instead of two without separation.
— GAN (talk) 13:36, 16 January 2021 (UTC)
- It is an exception. For such a case, you can still insert the information manually. Psemdel (talk) 14:20, 16 January 2021 (UTC)
- @Psemdel, GAN: I copied your last edits on module into pl.wiki but it causes an error with rider infobox (check pl:Wikipedysta:99kerob/brudnopis100). 99kerob (talk) 11:09, 23 January 2021 (UTC)
- @99kerob: I added a "subtitle" field for the name of a rider in original language that appears on WP:ru. So the "subtitle" was added in the translation list which is in Moduł:Cycling race/l10n. I stop touching to the translation thing. Psemdel (talk) 11:47, 23 January 2021 (UTC)
- @Psemdel: Thanks, now it works. Few other things before I finally start using that infobox in articles at pl.wiki:
- @99kerob: I added a "subtitle" field for the name of a rider in original language that appears on WP:ru. So the "subtitle" was added in the translation list which is in Moduł:Cycling race/l10n. I stop touching to the translation thing. Psemdel (talk) 11:47, 23 January 2021 (UTC)
- I found one other untranslated thing - if athlete was a "trainee" it is displayed in infobox like "team name" ("stagiaire") where "stagiaire" is untranslatable. 99kerob (talk) 08:15, 24 January 2021 (UTC)
- Done I missed that. Psemdel (talk) 15:25, 24 January 2021 (UTC)
- Also in case of "P1477" or "P1559" written in Russian it is not displayed in infobox - for example in Vlasov case. 99kerob (talk) 08:18, 24 January 2021 (UTC)
- Vlasov has presently a P1559 in "ru" cyrillic. It is not displayed for the languages that don't understand this alphabet. It means every one except "ru" and "mk" presently.
- At pl.wiki we are adding medals into infoboxes by using pl:Szablon:Medalista infobox - is there any chance to make it working with your infobox? I tried to copy section with medals into "medale=" section but these two just doesn't cooperate at this point ;). Check pl:Wikipedysta:99kerob/brudnopis100 how it looks for Hirschi. Maybe it is possible for module to simply don't display not needed parts of code of "Medalista infobox" ("{| class="infobox" |- | colspan="2" style="text-align:center; background:#EAECF0; font-weight:bold;" | Dorobek medalowy |- | colspan="2" style="padding:0;" |" at the top and "|- |}" at the bottom)? If it is not possible or will be too difficult to make an exception for pl.wiki at infobox I will just use version 2 instead (displaying medals outside "module infobox"). 99kerob (talk) 08:41, 24 January 2021 (UTC)
- It is a table in a table with different css. It is possible but, the template should be modified for this purpose.
- Check how infobox is displayed for Lorrenzo Marin at pl:Wikipedysta:99kerob/brudnopis100 - it definitely shouldn't look like that. 99kerob (talk) 14:50, 24 January 2021 (UTC)
- It is in two teams at the same time. Still have no solution for that. Psemdel (talk) 15:31, 24 January 2021 (UTC)
- To explain a bit more, I fill a table with for each month, the team, the name of team and the category of the team.When it changes I make a new row. But here you have two teams at the same time (which can happens only for trainee). It makes a bit of chaos. I will think if I should create a table trainee... As a reminder by women there is no trainee, I never think about that to be honest. Psemdel (talk) 15:38, 24 January 2021 (UTC)
- I will try to solve that in the coming week.
- @99kerob, Psemdel: Is it possible for a trainee to alternately play for two teams during his internship? As far as I know, a trainee in cycling is a kind of analogue of renting in football. On bike statistics sites for trainees, they write two lines: the date when he left the main team and the date when he joined the new team as an intern.
- -See how Lorrenzo Manzin (cyclingarchives.com) teams are recorded for 2014. Two until 31-07 and from 01-08 (Trainee) entries with the indication "trainee".
- -Do this only for trainees. Moreover, the "team roster" template uses the same data to display when the rider played for the teams.
- A very good point. Teamroster must "chose" between two teams. One more thing to implement.
- -There are also trainees in women's cycling. Look 2.17.008 (USI regulations) Examples:
- - Alice Towers procyclingstats.com and cqranking.com
- - Kate Wootton cqranking.com
- - Maeva Squiban procyclingstats.com and cqranking.com
— GAN (talk) 19:36, 24 January 2021 (UTC)
- It happens hardly ever. And for women, what is the difference between a trainee not paid, and a full time job not paid... Let's say it is less in focus. Psemdel (talk) 19:45, 24 January 2021 (UTC)
- I thought a bit longer on this trainee topic, as I thought it would be necessary to solve it. But the more I am thinking, the more I see that the whole algorithm based on the fact, that there can be only one team for a rider at one moment. Then another part of the algorithm identifies when this team change (id/name/category). Only easy way would be too display it as the Mountain bike, so trainee would be a completely different category. But it makes no sense at all in my opinion. Moreover, as written a bit above, two teams at the same time will lead to problem with all other functions (they will pick one of both on random principle). Eventually, it may be noticed that even when a rider is full time professionnal, he can keep its club. So in fact, they always have 2 teams, but nobody care. Just keep the professionnal team as Gan proposed, I think it is really a very minor distortion of the reality. Psemdel (talk) 19:32, 25 January 2021 (UTC)
- It happens hardly ever. And for women, what is the difference between a trainee not paid, and a full time job not paid... Let's say it is less in focus. Psemdel (talk) 19:45, 24 January 2021 (UTC)
Gan's change
[edit]@GAN:, so when I look more closely to your code, I see 2 main changes:
- Introduction of InfoboxChamp. Could you display somewhere, what happens when we use infobox instead of InfoboxChamp, as they are just a copy paste from each other?
- Changes in listofwinners
Any other main changes? Psemdel (talk) 14:44, 9 January 2021 (UTC)
- @Psemdel: fr:Utilisateur:GAN/Description of module functions --> infobox
- It shows what elements of Wikidata are used and there are examples:
- - The main difference in the display of the venue of different titles, including for races / medals
- - Season - only one "location" line for a continent and / or countries. Everything without flags.
- The championship is now three separate lines: the country with the flag, the city, the stadium / location. And there may still be several countries where the championship was held on different dates.
- Thank you for the documentation. But really, Infoboxseason and InfoboxChamp are pure copy/paste from infobox! Same for listofwinners_custom and listofwinners_main! That is very bad practice to have code in double (and it takes space). Also next time, please merge regularly with the master, here I have to look for what changed in between, that is really not efficient. And why is there no winners in InfoboxChamp?
- The change from
[ 'Q28092831' ]=translate("listofwinners",17), -- rookie
to[ 'Q28092831' ]=translate("listofwinners",2), -- rookie
is also a big change, as it changes completely the display. What happens if we want the different rankings in one table. Psemdel (talk) 14:02, 10 January 2021 (UTC)
- -Code in double format - that's the only way I can. My level is worse than yours. :)
- -What is "merge regularly with the master"?
- -There are no winners "InfoboxChamp" so as not to overload the template. More than 10 medals are currently being played at the Road World Championship. This is more than 30 people. If everyone displays what will happen then?
- My level is also not extraordinary to be honest, Dipsacus fullonum is way better for instance. So I suppose, I will have to make the adaptation to avoid that... For winners, ok but then you should have deleted that part of the code. Dead code is confusing for the reader. Concerning "merge with the master". It is vocabulary from version management. What I call the master is the real module, here, Module:Cycling race. My Module:Psemdel1 or your Module:GAN-Cycling-race are branches. They come from the master but are independent from the master. Our goal is to improve the master. So "sometimes", when we think that the changes we made in our branches are correct (this should be normally validated by tests), we replace the original master code through our changes. This step is called "merge". It works fine when the master stays as it is between 2 merges. But if you wait too long, the master changes also and then we have to spend time sorting out what is the best code... Wikidata and Wikipedia have a very good version management (history) but have no way to make branches in a clean way. So if I don't know that you develop in parallel, it is very probable that our versions won't be compatible. The only way to merge is manual copy/paste also, which can lead to mistakes. That's why it is better to make small steps, so everybody can see here the last version. Psemdel (talk) 14:46, 10 January 2021 (UTC)
- So I imported the module from wikidata to WP:fr, it seems to work. Of course, I had to change all templates on WP:fr and also adapt the l10n module. So be careful! Psemdel (talk) 16:27, 16 January 2021 (UTC)
- @Repf72:, the problem with listofstagesclassification by Giro 2020 (ranking that are only therefore for the general ranking) is solved. Hope there is no side effect. Psemdel (talk) 14:33, 17 January 2021 (UTC)
- @Psemdel: Can I turn off leaderboard autocomplete for the last stage? For example, at the Tour de France, "supercombative" is not determined at the last stage. But this cell is populated with the value from the totals.
{{#invoke:Psemdel1|listofstagesclassification|Q50411777}}
and fr:Tour_de_France_2020#Évolution_des_classements --> 21e étape --> Marc Hirschi — GAN (talk) 14:49, 17 January 2021 (UTC)- Are you sure, there is no combative the last stage? One exception more... Psemdel (talk) 14:54, 17 January 2021 (UTC)
- @Psemdel: Regulations tour de france 2019 --> Page 13 in French and page 33 in English. Right column, second paragraph from the bottom. And in the 1950s, there were two classifications of supercombatives. Regulation text from en-wiki:
In addition, there was a combativity award given after each stage to the cyclist considered most combative. The decision was made by a jury composed of journalists who gave points. The cyclist with the most points from votes in all stages led the combativity classification
—GAN (talk) 15:22, 17 January 2021 (UTC)- Correct, I will add the exception (thank you ASO). Psemdel (talk) 15:25, 17 January 2021 (UTC)
- The first thing of course if there is no combative on the last stage is to leave the database blank so.
- Actually, it is not that bad, I just inserted an exception for the combativity, which shall never be extrapolated (actually logical). Psemdel (talk) 19:44, 18 January 2021 (UTC)
- @Psemdel: Regulations tour de france 2019 --> Page 13 in French and page 33 in English. Right column, second paragraph from the bottom. And in the 1950s, there were two classifications of supercombatives. Regulation text from en-wiki:
- Are you sure, there is no combative the last stage? One exception more... Psemdel (talk) 14:54, 17 January 2021 (UTC)
- @Psemdel: Can I turn off leaderboard autocomplete for the last stage? For example, at the Tour de France, "supercombative" is not determined at the last stage. But this cell is populated with the value from the totals.
- My level is also not extraordinary to be honest, Dipsacus fullonum is way better for instance. So I suppose, I will have to make the adaptation to avoid that... For winners, ok but then you should have deleted that part of the code. Dead code is confusing for the reader. Concerning "merge with the master". It is vocabulary from version management. What I call the master is the real module, here, Module:Cycling race. My Module:Psemdel1 or your Module:GAN-Cycling-race are branches. They come from the master but are independent from the master. Our goal is to improve the master. So "sometimes", when we think that the changes we made in our branches are correct (this should be normally validated by tests), we replace the original master code through our changes. This step is called "merge". It works fine when the master stays as it is between 2 merges. But if you wait too long, the master changes also and then we have to spend time sorting out what is the best code... Wikidata and Wikipedia have a very good version management (history) but have no way to make branches in a clean way. So if I don't know that you develop in parallel, it is very probable that our versions won't be compatible. The only way to merge is manual copy/paste also, which can lead to mistakes. That's why it is better to make small steps, so everybody can see here the last version. Psemdel (talk) 14:46, 10 January 2021 (UTC)
Calendar data
[edit]For calendar and riderranking, I moved the
["europe"] = { -- Q1194340 ['2021']= 'Q103964987', ['2020'] = 'Q74842812', ... ['2007'] = 'Q1780660',['2006'] = 'Q1455600',['2005'] = 'Q1431816' },
To /data. Be aware, that I replaced the "2010-11" through "2011", because it makes no sense at all in my opinion. Check if it impacts your templates on your local wikipedia. Psemdel (talk) 13:48, 23 January 2021 (UTC)
Rider ranking
[edit]I imported that template at pl.wiki today and plan to use it in our articles but have one question: why for male cyclists places in UCI World Ranking isn't displayed there? You check that even at fr.wiki's list of examples where Marianne Vos has all data presented but Amund Grøndahl Jansen has only data from continental tours and nothing about UCI World Ranking (he has data about that ranking for 2018-2020 seasons at Wikidata but it isn't displayed at teamplate). 99kerob (talk) 17:45, 30 January 2021 (UTC) @Psemdel:
- @99kerob: I have been importing the ranking the last 3 weeks (as written here somewhere the UCI export of ranking in Excel file was down until the beginning of the month), right now the UCI world ranking 2018 is being imported see here. I hope I am done by the end of the week. For the women, I did the work last year. Normally, I write about women cycling you know. Psemdel (talk) 18:07, 30 January 2021 (UTC)
- I read again your message, and you are right, something is missing. Psemdel (talk) 18:09, 30 January 2021 (UTC)
- I got confused between World Tour and World Ranking, now it should be ok. Psemdel (talk) 19:02, 30 January 2021 (UTC)
- @Psmedel: Rider ranking template for pl:Yonathan Monsalve is somehow broken at cannot be displayed at this article (in other cases it works great - check for example pl:Sam Bennett (kolarz) where it displayed in right way). 99kerob (talk) 10:27, 27 February 2021 (UTC)
Problems
[edit]Hi again @Psemdel, GAN: ;). I use module more and more and noticed some problems:
- name of the month in data at Polish language should be conjugated (writing it in basic form is a language mistake) so in both Rider and Race infoboxes it should be displayed: "stycznia" instead of "styczeń", "lutego" instead of "luty", "marca" instead of "marzec", "kwietnia" instead of "kwiecień", "maja" instead of "maj", "czerwca" instead of "czerwiec", "lipca" instead of "lipiec", "sierpnia" instead of "sierpień", "września" instead of "wrzesień", "października" instead of "październik", "listopada" instead of "listopad" and "grudnia" instead of "grudzień"
- See answer from GAN. Russian has also some declinations for the month. If it is still not correct, I will adapt.
- according to ProCyclingStats we have more than one (for some teams even three of them) sports-directors for 2021 Paris-Nice race but startlist part of module displays only first one for each team , next ones are not displayed at all
- Yes, I had also the problem actually. I will fix that.
- Done, was easy.
- I noticed also one other problem with a startlist - at yesterday's African RR Champs some cyclists have really weird starting numbers not "compatible" with other cyclist from their NT (for example South African guys had numbers 23-30 and last one had 92) which causes a problem with displaying it with a startlist part of module as it automatically separates that last one rider to "another" team as his number is "too different" from other ones on his team
- Here, I have really no idea. The principle is that the riders are sorted through number and then the algorithm checks that that last team = next team. I mean normally all riders of a team have consecutive numbers..
- I should rewritte the algorithm, but I will look at that.
- Here, I have really no idea. The principle is that the riders are sorted through number and then the algorithm checks that that last team = next team. I mean normally all riders of a team have consecutive numbers..
- rider ranking part of module is broken for Yonathan Monsalve as it gets an error like this: "Błąd Lua w module „Moduł:Cycling_race”, w linii 7643: attempt to index field '?' (a nil value).". It is the only one article that this occured so far (I am slowly adding both rider ranking and cyclist infobox to articles at pl.wiki but will take some time to do that as I am the only one user doing so there)
- I get the same error. Let's have a look.
- Done Ok, was a mistake in 2011-2012.
- I get the same error. Let's have a look.
- and last one is not an error but possible feature - do you plan to create team infobox which will be working similar way to cyclist infobox? I would love to use such one as it will be really useful ;)
99kerob (talk) 09:05, 7 March 2021 (UTC)
- Never thought about that but why not (we already have something like that on WP:fr). When I find some time... Psemdel (talk) 12:19, 7 March 2021 (UTC)
- @99kerob: Names of months. Formulas for displaying dates (including months) are used for all languages. For the Polish Wiki, the names of the months in the module are spelled out in full words in two places. Search for these places through a manual search (or on lines 585 and 646). It needs to be done manually with — GAN (talk) 09:53, 7 March 2021 (UTC)
- @GAN: It was already done long time ago as I can see (for example in line 640 to 644 at pl.wiki we have:
"elseif wiki == "pl" then local date_pl = {"stycznia", "lutego", "marca", "kwietnia", "maja", "czerwca", "lipca", "sierpnia", "września", "października", "listopada", "grudnia"} endtime = lang:formatDate( "j ", eTime ) .. date_pl[tonumber(lang:formatDate( "n", eTime ))] .. lang:formatDate( " Y", eTime )" but it is still displayed as "styczeń", "luty" etc. (check for example: pl:Strade Bianche 2021 - it is "6 marzec 2021" in infobox and should be "6 marca 2021". 99kerob (talk) 10:01, 7 March 2021 (UTC)
- Composition of teams. I would suggest making a separate, slightly modified table for the national teams.:
- - next to the name of the team / star, display its flag
- Why not.
- Done
- Why not.
- - Make UCI-cod a link to the country
- No, in French we have a link to the national selection. As back-up maybe.
- @Psemdel: I suggest the following (links to fr-wiki for clarity)
- No, in French we have a link to the national selection. As back-up maybe.
Now | France FRA |
National team link UCI-cod as text |
---|---|---|
I suggest | France FRA |
National team link UCI-cod as a reference to the country (not the national team) |
- Done
—GAN (talk) 13:22, 7 March 2021 (UTC)
- - remove the flags and the abbreviation of the country in brackets from the riders in the list. They are all from the same country.
- Good idea, have to think how it goes.
- Done
- Good idea, have to think how it goes.
- - disable grouping by numbers. Now if there are no numbers, then the grouping goes by teams. On ITT, numbers can be distributed according to the start time.
— GAN (talk) 09:53, 7 March 2021 (UTC)
- @Psemdel, GAN: Two more things from me:
- Can you add a small icon of Commons linking to proper category to all other infoboxes in a way it currently works at Rider infobox?
- Done Why not. Psemdel (talk) 16:39, 2 April 2021 (UTC)
Nikita Stalnov
[edit]- There is a problem with displaying names of Nikita Stalnov in rider infobox at pl.wiki as his surnames are written differently in French and Polish (Poland use different transcription for all Cyryllic languages) - in such case at pl.wiki only Polish version (Umierbiekow/Stalnow) should be displayed as French one (Umerbekov/Stalnov) is simply wrong in Polish language. 99kerob (talk) 12:47, 2 April 2021 (UTC)
- @99kerob: pl:Wikipedysta:99kerob/brudnopis100 do you mean "Skrócone imię i nazwisko"?
- @GAN: Exactly. 99kerob (talk) 13:52, 2 April 2021 (UTC)
- @99kerob: I did not transfer this template to ru-wiki. Most likely, you need to bind the language to a specific Wiki somewhere in the data output settings. So that other languages are not displayed. — GAN (talk) 15:41, 2 April 2021 (UTC)
- @GAN: Exactly. 99kerob (talk) 13:52, 2 April 2021 (UTC)
- @99kerob: pl:Wikipedysta:99kerob/brudnopis100 do you mean "Skrócone imię i nazwisko"?
- I will have a look. It is not an easy topic. Psemdel (talk) 16:42, 2 April 2021 (UTC)
- If it is too hard to do maybe easier way will be to just delete this parameter in an infobox? P1813 is used quite rarely for cyclists on Wikidata and not really much needed in a Rider infobox. 99kerob (talk) 17:58, 2 April 2021 (UTC)
- For women, it is needed, as they often change name during their life. Psemdel (talk) 08:49, 3 April 2021 (UTC)
- Should be better now. Psemdel (talk) 09:41, 3 April 2021 (UTC)
- If it is too hard to do maybe easier way will be to just delete this parameter in an infobox? P1813 is used quite rarely for cyclists on Wikidata and not really much needed in a Rider infobox. 99kerob (talk) 17:58, 2 April 2021 (UTC)
Team infobox
[edit]A template for a cycling team has been added to the module. Ability to add jersey using the "2" argument in any way. The number of seasons that the template displays is the number of elements specified in has part(s) (P527). Please support a new element for the specified "bike" template. — GAN (talk) 22:30, 4 April 2021 (UTC)
- I imported it into pl.wiki and trying it here. My thoughts:
- If team had only one status (like Mazowsze Serce Polski being an UCI Continental Team all the time) years next to it should be displayed too (now years are displayed only if team had at least 2 statuses like Astana)
- What is the supplementary information here?
- For general director also years are missing (at least in case of Vinokurov in Astana)
- I agree. Only one person can be listed, but he did not hold the position for the entire period. — GAN (talk) 09:36, 5 April 2021 (UTC)
- The infobox should display all managers given in wikidata with the period, if it is not the case, it should be fixed. Psemdel (talk) 07:58, 13 May 2021 (UTC)
- I agree. Only one person can be listed, but he did not hold the position for the entire period. — GAN (talk) 09:36, 5 April 2021 (UTC)
- Info about country should be imported from main Wikidata item and all countries should be displayed there with years, not only one (for example Astana had 3 different countries as they registered place but only Kazakhstan is displayed in infobox)
- I put "normal" rank instead of "not recommended" for Switzerland and Luxembourg. Now displays. — GAN (talk) 09:36, 5 April 2021 (UTC)
- Past/current/next season part of infobox is displayed in a weird way - for example for Astana we have both articles about 2020 and 2021 season at pl.wiki so in infobox 2020 should be displayed as past one and 2021 as current one but there is only 2021 displayed as past one. 99kerob (talk) 07:40, 5 April 2021 (UTC)
- The reason is the date indicated in start time (P580). If it is less than the current one, then the season is considered to have already passed. Likewise in the racing template. — GAN (talk) 09:36, 5 April 2021 (UTC)
- For general director also years are missing (at least in case of Vinokurov in Astana)
- Originally, the algorithm is there for the races. The idea is to display the one the people would like to see most probably. When I go to Ronde van Vlaanderen, we want most probably to see the last one (2021), as we are in May. For Tour de France, it may be 2020 or 2021 that's why both are displayed. In the case of a team, I suppose only the present one should be displayed, except at time like November/December where we want also to see the next one. The case is a bit different, the algorithm can be changed when we agree on the wanted behavior. Psemdel (talk) 08:04, 13 May 2021 (UTC)
Lua error in Module:Cycling_race at line 1271: translation missing in Module:Cycling race/l10n of your wikipedia
[edit]I was wondering if someone can help me with this error message on https://www.wikidata.org/wiki/Wikidata:WikiProject_Cycling/Documentation/infobox. Did I miss something? Thanks in advance EricSabell72 (talk) 13:25, 8 April 2021 (UTC)
- @EricSabell72: If you're talking about the module error on the Wikidata page. This is most likely due to the transfer of almost all translations to the additional module. If the error is on the Wikipedia language page, then you need to look there for the local version of the module. — GAN (talk) 13:39, 8 April 2021 (UTC)
- @EricSabell72:, I saw that the documentation on wikidata was not working, but as I never used it before (used the one from WP:fr), was not sure what the cause was. Thanks for pointing that out! I moved all translation to Module:Cycling_race/l10n_all and set the l10n one to English values. Psemdel (talk) 07:53, 13 May 2021 (UTC)
- @Psemdel: Thank you for your support - much appreciated EricSabell72 (talk) 11:56, 13 May 2021 (UTC)
Cycling categories
[edit]Collected all that can be based on procyclingstats, cyclingarchives and cqranking. Added to the module. — GAN (talk) 00:01, 28 April 2021 (UTC)
- http://autobus.cyclingnews.com/features/?id=2004/uci_codes Race category designations prior to 2005. — GAN (talk) 07:12, 5 May 2021 (UTC)
- We should archive twice this page ;) Psemdel (talk) 15:19, 15 May 2021 (UTC)
Supercombativity
[edit]@Repf72, 99kerob, Hejsa: Added most combative rider (Q21686770) and winner of the most combative rider (Q101246973) to the leaderboard ("Cycling race/listofstagesclassification"). If the same rider wins this nomination two or more stages in a row, then he is not combined in the table. And differently displayed in "Cycling race/stageinfobox". — GAN (talk) 20:13, 26 June 2021 (UTC)
- I think is not necessary to add other combativity element. Instead, would be useful to extend meaning of current combativity elements to include combativity per stage basis (due some judge declare it) or combativity per accumulative points. Repf72 (talk) 20:28, 26 June 2021 (UTC)
- On the Tour from 1952 to 1970, after each stage, the winners were determined / awarded in two "fighting classifications (combativity)". Separately at the stage and separately by the sum of the stages. How to distinguish them differently? — GAN (talk) 09:46, 27 June 2021 (UTC)
@Repf72, 99kerob, Hejsa, Gan: What is the difference between winner of the most combative rider (Q101246973) and winner of the combativity classification (Q20893983)? Which one is to prefer? Is only winner of the combativity classification (Q20893983) used in Module: Cycling race? In the last Tour-de-France-Articles-Infoboxes no „Most Combative Rider“ was to be seen - because in Wikidata it is called „winner of the most combative rider”. I changed it for the years 2022…2018, but ...
Second: For the Tour de France there is a specific combativity award in the Tour de France (Q2094179)-Lexeme. Is it useless? --Tommes (talk) 23:43, 2 August 2022 (UTC)
- @Psemdel, Tommes: I copy Psemdel to answer. I only know that winner of the most combative rider (Q101246973) must be datafiled instead of winner of the combativity classification (Q20893983) for correct visualization for the function "listofstagesclassification" of Cycling race module. Repf72 (talk) 02:09, 3 August 2022 (UTC)
- Omg, I haven't been on this page since a while! I will check everything. Psemdel (talk) 07:02, 3 August 2022 (UTC)
- @Psemdel, Tommes: I copy Psemdel to answer. I only know that winner of the most combative rider (Q101246973) must be datafiled instead of winner of the combativity classification (Q20893983) for correct visualization for the function "listofstagesclassification" of Cycling race module. Repf72 (talk) 02:09, 3 August 2022 (UTC)
- @Repf72: you are wrong with „winner of the most combative rider (Q101246973) must be datafiled instead of winner of the combativity classification (Q20893983) for correct visualization for the function "listofstagesclassification" of Cycling race module”. After I filled winner of the combativity classification (Q20893983) yesterday the infobox was correctly showing the point "most combative rider". Now it doesn't. User:GAN resetted my changes. Now the „most combative rider” is not displayed in the infobox.
- @Psemdel: Why don't you care about the other issues of he module I wrote to you? --Tommes (talk) 08:39, 3 August 2022 (UTC)
- @GAN: Why did you reset my changes? --Tommes (talk) 08:54, 3 August 2022 (UTC)
- @Tommes: Because for the module these are different elements.
Update the module in the de-wiki. You have an outdated version.
- Superfighting - this is for offsets where after each stage the winner is determined regardless of the previous stages. In the stage card, this Racer is displayed after the winners of the stage.
- just Boytsovska - this is when the results of the previous stages are taken into account. In the stage card, this Racer is displayed after the leaders of all classifications.
In the 1950s, there were two fight standings at the TdF. At each stage, this winner was determined. And separately there was a leader in the sum of the previous stages.
combativity award in the Tour de France (Q2094179) is a history article about this TDF score.
Below is an example of the leaderboards after each stage in the Tour d'France 2017. Your edit removes the "Combativity" winner from the "Final" column.
— GAN (talk) 09:25, 3 August 2022 (UTC)
- Thx GAN, I did not know the difference actually, it is very special to TdF and also a source of confusion, as there are combativity prices which are given every day new (and therefore the merge of cells make no sense) and other where they cumulate (very rare, but then the merge makes sense). @Tommes: a) höflich bleiben bitte, ich habe auch andere Probleme im Leben als Cycling race. b) What is exactly the issue that you are experiencing: what do you expect/what is actually displayed? Psemdel (talk) 17:15, 3 August 2022 (UTC)
- @Psemdel: Why do you assume, I am not polite? Das ist unhöflich.
- A question: Is Marlen Reusser (Q30584542) „most combative rider” or „winner of the combativity classification” of the 2022 Tour de France Femmes, stage 4 (Q108899049) .
- In 2022 Tour de France Femmes, stage 4 (Q108899049) she is called as the „most combative rider”. I just want to know for further working. --Tommes (talk) 08:26, 4 August 2022 (UTC)
- I just went on the website, and I cannot conclude to be honest. I also look by the men race 2022 Tour de France, stage 2 (Q99861963) and they used most combative rider (Q21686770)... anyone with more Tour de France experience? I normally do only the women, so my experience is very limited there ;) Psemdel (talk) 10:52, 4 August 2022 (UTC)
- @Psemdel, Tommes: Tour de France Femmes 2022. Page 72. ARTICLE 11. - determined by the jury
in French https://drive.google.com/file/d/1BFmBNpwx5krq2hBFXQc1bfB2lAn1LzGp/view
in English https://storage-aso.lequipe.fr/ASO/cycling_trf/le-tour-femmes-with-zwift-2022-rules.pdf
everything is taken from the forum http://velorooms.com/index.php?topic=2384.0 — GAN (talk) 12:12, 4 August 2022 (UTC)
- @Psemdel, Tommes: Tour de France Femmes 2022. Page 72. ARTICLE 11. - determined by the jury
- I just went on the website, and I cannot conclude to be honest. I also look by the men race 2022 Tour de France, stage 2 (Q99861963) and they used most combative rider (Q21686770)... anyone with more Tour de France experience? I normally do only the women, so my experience is very limited there ;) Psemdel (talk) 10:52, 4 August 2022 (UTC)
- Thank you very much. Now, I am missing the "race’s most aggressive rider, the Super-Combative, will be chosen by the
jury members at the end of the Tour de France
Femmes avec Zwift"-statement; The "most combative rider of all stages" (there is no classification result, just a jury-choice) is missing in the infoboxes. For instance: TdF-2021-most-combative-rider-overall is Franck Bonnamour, which ist marked as winner - of - "winner of the most combative rider", but doesn't show up in the infobox of the tour, like any other "most-combative"-winner since the template/module is used (2016). I guess this is not intended. --Tommes (talk) 13:45, 4 August 2022 (UTC)
- It is there on WP:fr, but not on WP:de... strange. Psemdel (talk) 13:50, 4 August 2022 (UTC)
- It's just that the module in the de-wiki has not been FULLY updated for a long time. GAN (talk) 14:40, 4 August 2022 (UTC)
- I updated the version of the module on WP:de (was 2 years old) and now the super-combative is there. I copied the translations. Nevertheless, I cannot guarantee that it did not cause any bug at any place. I looked at some pages, but the module is not often used on WP:de. Psemdel (talk) 14:36, 4 August 2022 (UTC)
- @Psemdel: Thank you very much for your work! The Modul might be used more often in future, if it is working as the german editors in road biycyce racing or elsewhere want to. ;) --Tommes (talk) 12:32, 8 August 2022 (UTC)
- That's the hope since 5 years now. Psemdel (talk) 12:40, 8 August 2022 (UTC)
- @Psemdel: Thank you very much for your work! The Modul might be used more often in future, if it is working as the german editors in road biycyce racing or elsewhere want to. ;) --Tommes (talk) 12:32, 8 August 2022 (UTC)
- It is there on WP:fr, but not on WP:de... strange. Psemdel (talk) 13:50, 4 August 2022 (UTC)
- Thank you very much. Now, I am missing the "race’s most aggressive rider, the Super-Combative, will be chosen by the
jury members at the end of the Tour de France
Femmes avec Zwift"-statement; The "most combative rider of all stages" (there is no classification result, just a jury-choice) is missing in the infoboxes. For instance: TdF-2021-most-combative-rider-overall is Franck Bonnamour, which ist marked as winner - of - "winner of the most combative rider", but doesn't show up in the infobox of the tour, like any other "most-combative"-winner since the template/module is used (2016). I guess this is not intended. --Tommes (talk) 13:45, 4 August 2022 (UTC)
Tokyo 2020 problems
[edit]I want to use module for Tokyo 2020 events (I already added a list of countries for Q65242249) but there are two problems: 1) Russia is competing as Russian Olympic Commitee and using ROC flag instead of their national one (as part of sanctions for doping), 2) At ITT events there are athletes (1 for each gender) competing as a part of Refugee team but we don't have any template for such team in cycling. Any ideas how to overcome these two problems? It applies for both gender events. @Psemdel, GAN: 99kerob (talk) 08:09, 19 July 2021 (UTC)
- @99kerob: I would suggest using "the country at the Olympics" instead of the road national team for the Olympics. en:Template:Nations at the 2020 Summer Olympics 1). In articles about the Olympics, an athlete usually indicates a link to an article about the country at these games. 2). Perhaps this will make it easier to make the display of the desired flag, which may differ from the state one. The module will of course need to be adapted. — GAN (talk) 08:46, 19 July 2021 (UTC)
@GAN: There is Russian Olympic Committee athletes at the 2020 Summer Olympics (Q50014488) (which has Russian Olympic Committee (Q783625) as country for sport (P1532)), and in 2018 people have used Olympic Athletes from Russia (Q28155263) to tag Russian athletes' participation in some events. Does that help? -- Rz98 (talk) 09:20, 19 July 2021 (UTC)
- I have time in next days, I will have a look (also wanted to prepare the Olympic games anyhow). Psemdel (talk) 20:20, 19 July 2021 (UTC)
- For the category: as it does not affect only the cycling, I suppose national cycling team (Q54660600) is inappropriate. Olympic delegation (Q26213387) seems better. Some adaptations in the code to cover this new property. Russian Olympic Committee (Q783625) is not a country, so it will be removed by the next bot when used in country (P17), only country for sport (P1532) could be used. We should add the flag in the item Russian Olympic Committee (Q783625). Psemdel (talk) 07:33, 20 July 2021 (UTC)
- Is it ok as I proposed? I am not alone on this topic obviously. Psemdel (talk) 15:10, 23 July 2021 (UTC)
Wanty Gobert problem
[edit]According to UCI this year Intermarché–Wanty–Gobert Matériaux team is a successor of last year CCC Team as it competes on Continuum Sports WT license and last year Circus-Wanty Gobert team is no longer existing. Case is similiar as it was when BMC became CCC in 2019 (CCC was treated as a successor of BMC and their development team as a successor of former CCC team) - for some reasons databases like ProCyclingStats treats it different so our Wikidata data is also different than UCI one. Problem is that some Wikis take UCI side and other PCS side on that topic which makes a lot of problem with linking to proper articles via module (for example other user at pl.wiki took UCI side, which is correct from law point of view, so now we have a lot of articles from this season linking to pl:Circus-Wanty Gobert article which says that team is no longer existing as 2021 team is a BMC successor as pl:Intermarché–Wanty–Gobert Matériaux. Is there any solutin to solve this? I don't know - maybe it is possible to write an exception inside module code to redirect everything linking to Q135682 from date od 2021-01-01 to Q787401 in particular languages that take UCI side on that topic? Is it even technically possible? Because I don't know how to solve that differently - it is not possible to make every Wiki taking same side of that problem... 99kerob (talk) 16:11, 8 August 2021 (UTC)
- Team continuity is always an unclear topic. On the other side, adding exception in the module code will lead it to 1 million rows... Was is concretely the consequence here? Psemdel (talk) 15:01, 16 August 2021 (UTC)
Changing nationality
[edit]@Psemdel, GAN: Another thing from me ;). Few days ago Cesare Benedetti changed his licence from Italian to Polish as he finally get Polish citizenship - I added that via P1532 but module don't recognize that change - I guess that module check only P27 which in that case isn't helpful (Benedetti now has citizenship of both Italy and Poland). It should rather check P1532 first and check P27 only if P1532 isn't present at current rider's page. 99kerob (talk) 19:02, 13 August 2021 (UTC)
- Normally P1532 has priority. Where was it not recognized? Psemdel (talk) 15:09, 16 August 2021 (UTC)
- @Psemdel: I gave examples in your draft with a description. — GAN (talk) 16:21, 16 August 2021 (UTC)
- Thanks, I will have a look, very soon. Psemdel (talk) 06:09, 17 August 2021 (UTC)
- @Psemdel: For Benedetti it was for both Vuelta a Espana and Vuelta a Burgos startlists - I needed to change his P27 that way (which is not right as he has dual citizenship) otherwise he was still displayed as Italian. 99kerob (talk) 12:29, 17 August 2021 (UTC)
- Ok, it was not implemented everywhere the P1532. Now it should be the case. Psemdel (talk) 20:30, 17 August 2021 (UTC)
- @Psemdel: For Benedetti it was for both Vuelta a Espana and Vuelta a Burgos startlists - I needed to change his P27 that way (which is not right as he has dual citizenship) otherwise he was still displayed as Italian. 99kerob (talk) 12:29, 17 August 2021 (UTC)
- Thanks, I will have a look, very soon. Psemdel (talk) 06:09, 17 August 2021 (UTC)
- @Psemdel: I gave examples in your draft with a description. — GAN (talk) 16:21, 16 August 2021 (UTC)
Amateur club for professionnal
[edit]Some users started to add some amateur clubs for professionnal riders. It is true that they can keep their original club, but up to now, it was not considered important for the encyclopedia. Nevertheless, it seems that the code will have to cover this aspect (so much fun ^^). Psemdel (talk) 06:08, 17 August 2021 (UTC)
2019 Oceania Tour
[edit]Any idea why results from 2019 Oceania Tour ranking (Q59310280) are not displayed via riderranking - even if data for that season is added on Wikidata? Check for example: pl:Connor Brown or pl:Jay Vine. 99kerob (talk) 19:30, 28 August 2021 (UTC)
RUS / BLR riders
[edit]Since yesterday all Russian and Belarussian riders are competing in UCI races under UCI flag. Any idea how to solve that in the module? It should be displayed that way at startlist (UCI flag before name of that cyclist and UCI abbreviation with a link to article about UCI after it) but shouldn't be really mentioned in riderinfobox. For the case of Riabushenko and his participation in today's Trofeo Laigueglia I tried to do it via P1532 but it don't work as I wanted to. Any other idea how to solve that for the time of this ban on RUS/BLR? 99kerob (talk) 17:18, 2 March 2022 (UTC)
- The UCI website (Watch Rider) will still display without changes as it was or the Strada Bianchi website And only the flags were removed on the database, but even in the old races 1 and 2 You can wait for the next races and see the graphics on TV and various sites. — GAN (talk) 18:19, 2 March 2022 (UTC)
Gender text for "Winner", "Second", "Third"
[edit]Hi, is there any way to use the femenine form for "Winner", "Second", "Third" in headers (calendar_translate, victories_translate, stageinfobox_translate, infobox_translate, listofwinners_translate
), at cycling race/l10n
when the race is for women ? (and language differentiate by gender, of course).
If not, could I suggest incorporating it in a further version?. Thanks, Amadalvarez (talk) 16:41, 13 March 2022 (UTC)
- @Amadalvarez: This suggestion can be extended to all other templates based on this module, depending on the language. Therefore, I think that it would be best to create a separate "female" version of the module. This will save time now and make all future changes to the module easier. For this you need:
- 1. Create Module:Cycling race W
- 2. Copy Module:Cycling race into it and replace
local l10n = mw.loadData("Module:Cycling race/l10n")
withlocal l10n = mw.loadData("Module:Cycling race W/l10n")
in the 7th line (the difference is in the letter "W") - 3. Create Module:Cycling race W/l10n
- 4. Copy Module:Cycling race W/l10n into it and change the necessary heading names in it.
- 5. Create the necessary templates for "female" versions in your Wiki
Modules Cycling race/lang and Cycling race/data in theory, existing ones should be used. — GAN (talk) 18:00, 13 March 2022 (UTC)
- Smart solution. Let me ask to cawiki community whether they assumed to have this double module. I'll tell you what we do. Thanks, Amadalvarez (talk) 18:21, 13 March 2022 (UTC)
- May I deal a new solution?:
- I agree to create a Module:Cycling race W/l10n with a femenine translations just for language that need it or want it. Done in cawiki
- you change the
mw.loadData("Module:...
in line 7 to load"Module:Cycling race W/l10n"
when competition class (P2094)women's cycling (Q1451845), else (it is: noP2094
, or different to Q1451845 or not existsW/l10n
) means to load"Module:Cycling race/l10n"
as now, to allow a normal run of current versions.
- This solution avoids mistakes from article editors as we have just one module for all options.
- Do you see it feasible?. Thanks, Amadalvarez (talk) 18:53, 14 March 2022 (UTC)
- @GAN @Psemdel Meanwhile you think about my previous proposal, I'm going to upload classe de competició (P2094) ciclisme femení (Q1451845) in these items. Would add P2094 be a problem or incompatibility with some other function ?. Thanks ! Amadalvarez (talk) 16:46, 17 March 2022 (UTC)
- I read only now. I suppose we can add an optional parameter for some module to force them to "women". Most of the time, it is not easy to make it automatically as, thanks to the UCI, the class is the same for men and women. P2094 is already in use for other things... Personally I would not change the whole l10n (would be too much expense and add another complexity), just complete it with supplementary fields. Moreover, it is not because the race is feminin that all the words become feminin. With this logic, we would need a l10n nominatif, l10n genitif, and so on for Russian also ... Give me one week, I will think about it. Psemdel (talk) 07:46, 18 March 2022 (UTC)
- Thanks. I'll be waiting. If you need help to upload P2094 or another info you decide to identify femenine, can account on me. Salut ! Amadalvarez (talk) 11:00, 18 March 2022 (UTC)
- @Psemdel: And if you use ready-made data:
- For races, we indicate which calendar/tournament it is part of. And our calendar/tournament is divided into men's and women's. If you make a binding to them??? This will make it possible to replace the headings in all infoboxes, the list of winners by year and classification (top 10) at the end of the race (for ru-wiki it is Гонщик -> Гонщица, 1-й -> 1-я). The infobox of the stage and the classification by stages of the stage remain questionable, since we do not indicate which calendar / tournament in their elements.
-For teams, there are similarly male and female categories/classes. This will make it possible to replace the title on the team's roster for the season. Of course, you can check with the transition to the parent element (that is, from the stage element to the race element for a specific year), but how will this affect the module resources. — GAN (talk) 11:12, 18 March 2022 (UTC)
- @Psemdel: And if you use ready-made data:
- Thanks. I'll be waiting. If you need help to upload P2094 or another info you decide to identify femenine, can account on me. Salut ! Amadalvarez (talk) 11:00, 18 March 2022 (UTC)
- I read only now. I suppose we can add an optional parameter for some module to force them to "women". Most of the time, it is not easy to make it automatically as, thanks to the UCI, the class is the same for men and women. P2094 is already in use for other things... Personally I would not change the whole l10n (would be too much expense and add another complexity), just complete it with supplementary fields. Moreover, it is not because the race is feminin that all the words become feminin. With this logic, we would need a l10n nominatif, l10n genitif, and so on for Russian also ... Give me one week, I will think about it. Psemdel (talk) 07:46, 18 March 2022 (UTC)
- @GAN @Psemdel Meanwhile you think about my previous proposal, I'm going to upload classe de competició (P2094) ciclisme femení (Q1451845) in these items. Would add P2094 be a problem or incompatibility with some other function ?. Thanks ! Amadalvarez (talk) 16:46, 17 March 2022 (UTC)
- May I deal a new solution?:
- Wouldn't it be easier to just change it from "Winner", "Second", "Third" to "First place", "Second place" and "Third place"? 99kerob (talk) 08:40, 18 March 2022 (UTC)
- @99kerob: For "women" in addition to these headings, you need to change others depending on the language. — GAN (talk) 11:12, 18 March 2022 (UTC)
- @GAN:, Thanks.
- @99kerob: In addition, when language is sensitive to the feminine condition, surrogates don't like it too much. Amadalvarez (talk) 11:19, 18 March 2022 (UTC)
- I haven't forgotten, but as mentioned, it won't be easy. Psemdel (talk) 12:29, 26 March 2022 (UTC)
- @99kerob: For "women" in addition to these headings, you need to change others depending on the language. — GAN (talk) 11:12, 18 March 2022 (UTC)
I did a small MVP (https://fr.wikipedia.org/wiki/Module:Psemdel1 https://fr.wikipedia.org/wiki/Utilisateur:Psemdel/brouillon1 https://fr.wikipedia.org/wiki/Module:Psemdel1/l10n). I used competition class (P2094) with women's cycling (Q1451845) as recommended to determine the gender of the race. To pass the name, we could do as for infobox, where name and name_plural are defined. However, I tested with listofwinners, where it is coded a bit differently. I wanted to avoid to make the list of translation even longer. Especially, I find it always difficult to use, as you need to know by heart the index (index 1 is year...and so on). I preferred to use a dictionary.
[ 'Q20882667' ]=feminine(feminin_bool, translate("listofwinners",2))
and
feminin={ ["Vainqueur"]="VainqueurE", ["Deuxième"]="DeuxièmeE", ["Troisième"]="TroisièmeE" }
A this last dictionary is defined in l10n, for language without feminin it is just skept without any more coding. Only issue is if you want that "Vainqueur" is transformed in something in one function and something else in one other function. Do you see any other issue with my proposal? Psemdel (talk) 14:25, 7 April 2022 (UTC)
- Yes/no? Psemdel (talk) 19:35, 18 April 2022 (UTC)
- I will assume yes. I implement it this week. Would be good to have some cases, where it is needed. Psemdel (talk) 07:33, 9 May 2022 (UTC)
- @Psemdel: I just saw this thread now. It seems you never implemented gender-specific translations. Was it lack of time or due to some problems? Same problem was discussed below in the section #Major issues where I have proposed to add new translation tables to Module:Cycling race/l10n so besides infobox_translate, listofwinners_translate, stageinfobox_translate etc. it also has infobox_translate_woman, listofwinners_translate_woman, stageinfobox_translate_woman etc. For woman races the function translate() could then use the "_woman" tables if they exists and otherwise fallback on the original translation tables. What do think of that? I have offered to implement that model, but if you prefer to do it another way, I will stand back. --Dipsacus fullonum (talk) 07:27, 3 August 2022 (UTC)
- I will assume yes. I implement it this week. Would be good to have some cases, where it is needed. Psemdel (talk) 07:33, 9 May 2022 (UTC)
- @Dipsacus fullonum: I never received any feedback about the implementation from other wikis. In French, we have no case as long as I know. The solution proposed is completely described above, it avoids too much effort. We can of course duplicate all translation tables, but it is quite heavy. The advantage of my solution is that you need to duplicate a few words and they are feminized for all functions at the same time. If someone has to add a translation in the future it will be a lot. Generally, I am not a big fan of the present implementation where I always have to know that the xth translation is "race", I would definitely prefer a dictionary with the English word as key but it would be extra work without gain. In addition, the same words need to be translated again and again for each function. It provides flexibility but it is also a lot of effort. Feel free to change whatever you want. It is not my module ;). Psemdel (talk) 16:32, 3 August 2022 (UTC)
- @Dipsacus fullonum: I just noticed that there will be an issue with my idea for word where the plural is same as singular for men but not for women (Fahrer/Fahrer, Fahrerin/Fahrerinnen). So let's try yours. If you don't do it before, I will try to do that this week. Psemdel (talk) 06:38, 8 August 2022 (UTC)
- @ Amadalvarez : Done. It is beta, but it should work. Psemdel (talk) 11:40, 8 August 2022 (UTC)
- I've a break:
- LUA Error in Mòdul:Cycling_race in line 2598: attempt to index upvalue 'stages' (a nil value). in https://ca.wikipedia.org/wiki/UCI_Women%27s_WorldTour_2022#Competicions
- with special:permalink/30520968 version of the module:Cycling race, now reverted to avoid affect all the pages.
- Thanks ! Amadalvarez (talk) 18:53, 8 August 2022 (UTC)
- Thanks, @Psemdel. I saw your upgrade in cawiki. I make the adaptations in the gender in
Module:Cycling race/l10n
and now is running OK. You got it !! - Salut ! Amadalvarez (talk) 09:34, 19 August 2022 (UTC)
- Thx, for the feedback!
- @Psemdel: Sorry, I'm here again. For some reason module doesn't consider femenine in
listofwinners
races with subclasse 2.WWT (Q23005603), as Simac Ladies Tour (Q1572063) or Itzulia Women (Q110381925). In case of 1.WWT (Q23005601) it runs correctly, as La Flèche Wallonne Féminine (Q508838). Thanks, Amadalvarez (talk) 19:17, 22 August 2022 (UTC)- @Amadalvarez:, it is because women's cycling (Q1451845) is missing in competition class (P2094). I will need a script for that too. Psemdel (talk) 19:28, 22 August 2022 (UTC)
- Do I need to do something?, or just wait for your patch ?. Thanks, Amadalvarez (talk) 19:49, 22 August 2022 (UTC)
- You can wait, I will do it. Psemdel (talk) 20:07, 22 August 2022 (UTC)
- Do I need to do something?, or just wait for your patch ?. Thanks, Amadalvarez (talk) 19:49, 22 August 2022 (UTC)
- @Amadalvarez:, it is because women's cycling (Q1451845) is missing in competition class (P2094). I will need a script for that too. Psemdel (talk) 19:28, 22 August 2022 (UTC)
- @Psemdel: Sorry, I'm here again. For some reason module doesn't consider femenine in
- Thx, for the feedback!
- Thanks, @Psemdel. I saw your upgrade in cawiki. I make the adaptations in the gender in
- @ Amadalvarez : Done. It is beta, but it should work. Psemdel (talk) 11:40, 8 August 2022 (UTC)
- @Dipsacus fullonum: I just noticed that there will be an issue with my idea for word where the plural is same as singular for men but not for women (Fahrer/Fahrer, Fahrerin/Fahrerinnen). So let's try yours. If you don't do it before, I will try to do that this week. Psemdel (talk) 06:38, 8 August 2022 (UTC)
Q20639848 / Q20652655
[edit]Hi! Can anyone explain me why we have two different items for pretty much the same (non-UCI, so-called "amateur" teams): Q20639848 and Q20652655? And why these teams are displayed in different group at listofteams part of module? Previously I never had such problem but this year some Danish teams took part in Polish races and I noticed that @Hejsa: is using different item than I do for amateur teams which causes a really weird effect on teams list (check for example: Tour of Małopolska where Danish non-UCI teams are displayed in different group than other ones). I don't see any reason why we have two different items for same thing and why we group them differently in articles. Why we don't merge these two items into one and group all non-UCI teams as one group? @Psemdel, GAN: 99kerob (talk) 09:44, 4 June 2022 (UTC)
- @99kerob: In a module template, it is quite possible to combine all three types of teams (there is also a regional team Q20653570) from two sections into one. For example "non-UCI teams" or "amateur" or "non-professional". You can specify any name in the module. But it is not necessary to combine both elements into one. For me:
- - "amateur" (Q20652655) is a full-fledged, but not a professional team. At which for example the sponsor's name.
- - "club" (Q20639848) is a team from a sports society or association.
The team after the loss of "professional" status - it becomes amateur or club??? — GAN (talk) 12:53, 4 June 2022 (UTC)
- Clubs and amateur teams are not the same, for example @99kerob: changed Q109393204 into a club, but this is a amateur team, with a parent club, which is Q103821177. See for example The Danish National Road Race Championship 2021, here we have some clubs and amateur teams. Clubs has often the city or region name in it, and amateur teams are sponsored. @Vandcykel: What do you think?
- In Denmark we have these amateur teams or "DCU teams", with parent clubs:
- Herning CK Elite Biemme Danmark
- Parent club: Herning Cykle Klub
- Team Bache - JS.dk
- Parent club: CK Aarhus
- Team CO:PLAY - Giant Store
- Parent club: Amager Cykle Ring & ABC
- Team Georg Berg
- Parent club: Næstved Bicycle Club & Slagelse Cykle Ring
- Team Give Elementer
- Parent club: Give Cykelklub
- Team IBT - BH Carl Ras
- Parent club: Sydkysten Cycling
- Team Nyt Syn powered by Fialla
- Parent club: Cykling Odense
- Team Sparekassen Danmark Aalborg
- Parent club: Aalborg Cykle-Ring
--Hejsa (talk) 20:49, 4 June 2022 (UTC)
- I understand that you can make such distinction (although descrptions of both items don't explain difference) but simply don't see a point of doing so. Firstly, in terms of UCI races, they are all the same category of teams (non-UCI) and should be displayed so via listofteams. Secondly all data in Wikidata should be verifible. How you can verify if team is connected to some sports club/association or no if literally none of big databases contain such data? How can I check for example if some random German team who came for one Polish UCI race was connected to any sports club or not? PCS and other databases mark all these teams as one group (club/non-UCI) and simply don't care if they are connected to any other organization or not because it doesn't matter in terms of UCI races. Why make our job at Wikidata harder if there is no really good point for doing so? Although for me the most important thing is to merge them into one category via listofteams part of module to display it properly (not like in Tour of Małopolska article where non-UCI teams are divided in some weird groups without a good reason) - if there will be one or two items doesn't matter to me. 99kerob (talk) 08:05, 5 June 2022 (UTC)
- It is good that we are having this discussion because I never understood either. I personally put all non-UCI in "amateur", as like 99kerod I first don't quite understand, second find it more complex without more information for the reader. In the module, we could make a kind of redirect from club to amateur to avoid strange displays. Psemdel (talk) 10:03, 5 June 2022 (UTC)
Lua error
[edit]Hello, I used a template and the module "Cycling_race" on Wikipedia in breton wich somebody made years ago. For most of the page where I used the template there was no problem. Then I tried it on two page where I got the same code error : "Fazi Lua e Modulenn (=error Lua in Module):Cycling_race d'al linenn (in the line) 536 : attempt to index global 'lang' (a nil value).". Could you please help me to find a solution? The module page is br:Modulenn:Cycling race and the template is br:Patrom:Cycling race/infobox. The pages where I could not use it are br:Tro Breizh 2012 and br:Tro Breizh 2011 Kadwalan (talk) 16:02, 26 June 2022 (UTC)
- @Kadwalan: First, update the module and its subpages: Module:Cycling race/l10n, Module:Cycling race/data, Module:Cycling race/lang — GAN (talk) 16:18, 26 June 2022 (UTC)
- ok, it's done. Though I don't see any change for the error I reported nor in the new translations I made wich does'nt show in the other windows where the template works Kadwalan (talk) 13:27, 27 June 2022 (UTC)
- @Kadwalan: Update. Check it out. — GAN (talk) 14:25, 27 June 2022 (UTC)
- Thank you very much, it works fine now. Good work ! Kadwalan (talk) 14:57, 27 June 2022 (UTC)
How to add languages?
[edit]I was asked to add one of the templates to nds.wp. I created the templates and modules and finally got it to work locally by inserting nds translations into the local copy of the template. It seems the translations need to go into the main copy too. How do I put them in there? The documentation says something about using Module:Cycling race/data exporter, but that process is completely obscure to me.
Could we add the steps in the documentation? The translations appear in Module:Cycling race, in Module:Cycling race/l10n, and in Module:Cycling race/l10n all. Which is the "main" copy? And what are the steps to propagate it from the main copy to the other places? Slomox (talk) 09:24, 26 July 2022 (UTC)
- @Slomox:
- - The most up-to-date version of a module is always found on Wikidata -> Module:Cycling race. The nds-wik now has an old version (noticeable by the "incorrect Danish" flags on the riders in this article "https://nds.wikipedia.org/wiki/Gent–Wevelgem"). If someone makes changes to their local wiki, they contribute them to the Wikidata version.
- The module "Module:Cycling race" contains several major translations. Look for them by the phrase ["fr"]
- If someone makes changes to their local wiki, they contribute them to the Wikidata version. - Still need "Module:Cycling race/data"
- My translation process is as follows:
- If new translations are required when creating a new feature for a module, I add them to "l10n all" for English and my native language.
- Then when others copy new translations using "Module:Cycling race/data exporter" to the local version, the new translations will be added in English. And they will need to be translated into their native language in the local version.
- You can then add new translations to "l10n all" for your native language. So that in the future, when copying translations, do not change them again.
- - The most up-to-date version of a module is always found on Wikidata -> Module:Cycling race. The nds-wik now has an old version (noticeable by the "incorrect Danish" flags on the riders in this article "https://nds.wikipedia.org/wiki/Gent–Wevelgem"). If someone makes changes to their local wiki, they contribute them to the Wikidata version.
— GAN (talk) 19:42, 26 July 2022 (UTC)
- @Slomox: If you need a new language, the good steps would be to add the language in Wikidata in Module:Cycling race/l10n all. So
["nds"] = {"Startlist in nds", "# in nds", "Rider in nds","Rank in nds","Directeur sportif in nds:","DNF in nds","OTL in nds","DNS in nds","DSQ in nds","road in nds","ITT in nds","and in nds", "no team in nds","show in nds","hide in nds"},
for all functions.
Like that we have all translations in a central place. Then you export them to your wiki, don't worry about that, we can do it for you. In the past, all translations were on all wiki. As you noticed Module:Cycling race/l10n all is quite long to read and we wanted to lighten a bit its use on local wiki, that's why there is this export mechanism (it is actually just a filter on your language) and so on. Psemdel (talk) 16:40, 3 August 2022 (UTC)
Major issues
[edit]- Despite the UCI's current ban on displaying the Russian and Belarusian flags, these will be displayed. I am currently using the empty flag
{{NIX2}}
: Template:NIX2 in other tables for this. Users should have the possibility to change WD-Flag. - In the table headers is "drivers" instead of "female drivers". In German it ist a significant difference. If only women drive, it should also be female drivers. German: Fahrer vs. Fahrerin.
- Must be able to limit the number of entries displayed. At the moment, all ranked entries recorded at Wikidata are displayed. So one of the last days the table was 21 names long and data was deleted in Wikidata today for there are only 10 names and the tables in articles aren't miserably long. (reality max would be 100 or even more.
Another point: Ceratizit–WNT Pro Cycling is currently a German team (statement "country"), but carries the flag of GBR in the template (so here). At Wikidata, periods are given for GBR/DEU. The template must pick the current version. This can also affect other teams when changing licenses.
- Template:Cycling race/teamsclassificationbytime
- please ping, if answer.
- --Tommes (talk) 08:40, 30 July 2022 (UTC)
- @Tommes: I fixed issue #4 in this edit. --Dipsacus fullonum (talk) 11:01, 30 July 2022 (UTC)
- @Dipsacus fullonum: Well done, great job! --Tommes (talk) 11:13, 30 July 2022 (UTC)
- Thx also, strange mistake. Psemdel (talk) 16:55, 3 August 2022 (UTC)
- @Tommes: Please look at the page de:Modul:Cycling race/l10n in the German Wikipedia. Can you list all texts in the page where you need to have different values for males and females? It would be best to fix all cases at once. --Dipsacus fullonum (talk) 12:00, 30 July 2022 (UTC)
- @Dipsacus fullonum: Sorry, I could change for instance "Fahrer" into "Fahrer in" but the Module is made for men's races… It would change the table's head in every existing article using the template/modules. What we need is a switch to decide whether male or female designation is used.
- --Tommes (talk) 12:19, 30 July 2022 (UTC)
- @Tommes: I am not asking you to change the module. Please just list all texts in the page where you need to have different values for males and females in German, so the programmers know where changes in the code are necessary. --Dipsacus fullonum (talk) 12:23, 30 July 2022 (UTC)
- @Dipsacus fullonum: I see. I just filtered Modul:Cycling_race/l10n for words changeable into a female form. Even if I don't know where they might appear:
- Fahrer —> Fahrerin
- Sportlicher Leiter —> Sportliche Leiterin
- Sieger —> Siegerin
- Zweiter —> Zweite
- Dritter —> Dritte
- Gesamtführender —> Gesamtführende
- Fahrer am Start —> Fahrerinnen am Start
- Fahrer im Ziel —> Fahrerinnen im Ziel
- Kämpferischster Fahrer ->- Kämpferischste Fahrerin
- Nationale Straßen-Radsportmeister —> Nationale Straßen-Radsportmeisterinnen (plural)
- Amateur —> Amateurin
- Okay? --Tommes (talk) 12:38, 30 July 2022 (UTC)
- @Tommes: I fixed issue #4 in this edit. --Dipsacus fullonum (talk) 11:01, 30 July 2022 (UTC)
I propose this solution to get headers with gender specific words:
- In Module:Cycling race/l10n, add these new the tables for languages where it is needed due to gender specific wording: startlist_translate_women, startlisttable_translate_women, infobox_translate_women, headoftable_translate_women, headoftableII_translate_women, calendar_translate_women, victories_translate_women.
- In Module:Cycling race in function translate, if called on a woman race and if a _translate_women table exists, then return the translation from that table. Otherwise use the _translate table as now.
That should solve most cases with few changes. Only problems I see are:
- For function calendarcustom, entities like 2016 Lotto Cycling Cup for Women (Q22920532) don't have any statements for gender that I could find. Any suggestions?
- For the word "Directeur sportif" (Sportlicher Leiter/Sportliche Leiterin), I assume they can have any gender so it cannot be found from the type of race. The gender could be found in the item for the person.
--Dipsacus fullonum (talk) 14:25, 30 July 2022 (UTC)
- Thank you for your proposal!
- But I do not understand. I don't know even the concept of the module at all. Where are these "startlist_translate_women", etc. to add – which position in Module:Cycling race/l10n?
- Why don't you do?
- --Tommes (talk) 12:09, 31 July 2022 (UTC)
- It doesn't matter where in Module:Cycling race/l10n. I don't do yet because I think the change is so big that it should have consensus first. And maybe other users here have better proposals. --Dipsacus fullonum (talk) 12:29, 31 July 2022 (UTC)
- I am not able to do this. Maybe another user might have the knowledge? --Tommes (talk) 11:39, 1 August 2022 (UTC)
- I do have the knowledge. Please don't insinuate that I don't and stop nagging. You shouldn't rush changes to complex programming. --Dipsacus fullonum (talk) 11:50, 1 August 2022 (UTC)
- Since no one has had any objections or comments, I will try to solve the problem of missing gender-specific translations as outlined by me above. --Dipsacus fullonum (talk) 06:43, 3 August 2022 (UTC)
- <insertion>@Dipsacus fullonum: Sorry, I dont wanna insult nor annoy you. I din't insinuate you are not able to solve the issues. I guess you have the knowledge and I know the issue is not a small. The template/module is used in recently running events. If it doesnt work correctly it should not be used and might replaced by older but working methods (tables, whatever). That's why I am forcing a solution. (It is especially concerning the issue of "combativity") --Tommes (talk) 10:05, 3 August 2022 (UTC)
- A little higher, the female versions of the headlines were also discussed. We still have races with mixed teams. Will it not affect them? #Gender text for "Winner", "Second", "Third" GAN (talk) 07:18, 3 August 2022 (UTC)
- @GAN: I didn't know there are races with mixed teams. Can you give an example please? Do they have both a male and a female winner and other placements, or just one overall winner? --Dipsacus fullonum (talk) 07:42, 3 August 2022 (UTC)
- @Dipsacus fullonum: At least the mixed relay at road cycling championships since 2019. First there are 3 men and then 3 women. The winner is the combined team. But for the list of compositions of these teams, a single template is used. Formally, women also participate in the race along with men. As an example, a link to an article in the pl-wiki where there are all the templates used. pl:Mistrzostwa Świata w Kolarstwie Szosowym 2021 – mieszana jazda drużynowa na czas — GAN (talk) 08:04, 3 August 2022 (UTC)
- Thank you GAN. Would it be OK use male translations for such races? My impression is that at least European languages like German, French and Spanish use male words for mixed groups. --Dipsacus fullonum (talk) 08:27, 3 August 2022 (UTC)
- @GAN: PS. I don't know for Slavic languages like Russian or Polish. Do they need special translations for mixed teams or have other things to consider? --Dipsacus fullonum (talk) 08:40, 3 August 2022 (UTC)
- @Tommes:. I implemented it Done, it relies on the filling of competition class (P2094) with women's cycling (Q1451845). We will need to add it to all women races. I have no better idea. Check, if it is round about correct for Tour de France femmes 2022. Psemdel (talk) 11:43, 8 August 2022 (UTC)
- @Dipsacus fullonum: At least the mixed relay at road cycling championships since 2019. First there are 3 men and then 3 women. The winner is the combined team. But for the list of compositions of these teams, a single template is used. Formally, women also participate in the race along with men. As an example, a link to an article in the pl-wiki where there are all the templates used. pl:Mistrzostwa Świata w Kolarstwie Szosowym 2021 – mieszana jazda drużynowa na czas — GAN (talk) 08:04, 3 August 2022 (UTC)
- @GAN: I didn't know there are races with mixed teams. Can you give an example please? Do they have both a male and a female winner and other placements, or just one overall winner? --Dipsacus fullonum (talk) 07:42, 3 August 2022 (UTC)
- Since no one has had any objections or comments, I will try to solve the problem of missing gender-specific translations as outlined by me above. --Dipsacus fullonum (talk) 06:43, 3 August 2022 (UTC)
- I do have the knowledge. Please don't insinuate that I don't and stop nagging. You shouldn't rush changes to complex programming. --Dipsacus fullonum (talk) 11:50, 1 August 2022 (UTC)
- I am not able to do this. Maybe another user might have the knowledge? --Tommes (talk) 11:39, 1 August 2022 (UTC)
- It doesn't matter where in Module:Cycling race/l10n. I don't do yet because I think the change is so big that it should have consensus first. And maybe other users here have better proposals. --Dipsacus fullonum (talk) 12:29, 31 July 2022 (UTC)
@Dipsacus fullonum: In ru-wiki, translation is not needed for mixed. In Polish, @99kerob: would be a better answer. Someone else in Arabic uses the module.
- You can also take into account team races among women's teams (clubs or national teams). Only women participate in it. The team is the winner. But how would it be correct to say "team - HE IS THE WINNER" or "team - SHE IS THE WINNER" ??? In Russian it will be two different words - победитель and победительница.
- It should probably be possible to manually enable the display of female names for each wiki. How is it done to display the country of citizenship in the results of the race stage. — GAN (talk) 12:30, 3 August 2022 (UTC)
- @Psemdel:Probably more needs Q1451845 to be added for all women's teams. So that "Cycling race/teamroster" and "Cycling race/victories" can display female titles. — GAN (talk) 18:58, 15 August 2022 (UTC)
- Indeed, it seems I forgot the teams. Psemdel (talk) 20:03, 15 August 2022 (UTC)
- First sorry, that I see it only now. It is clear that the "feminine" should be fixed, there are different possibilities as mentioned above. Dipsacus fullonum can do it, I am also open. I can speak German by the way, so it is also not a problem. Tommes does not need to do anything, and thx for the feedback. For mixed team...yes...there are 2 races of this type in the year. I am not sure the module should try to cover all exceptions. It is done to help us, but with 100 languages and thousand of races, it is not possible in my view to cover all cases perfectly. But, I also see that there is no reason why we should cover feminine and not the other declinations (accusativ, dativ, genitiv...).
- Concerning point 1: Wikidedia does not censure the Russian flag as far I know (quick look on Russia article). I don't think UCI rules apply in this encyclopedia. I am no specialist, but I suppose Wikipedia is primarily politicaly neutral and displays the truth, not what is politically correct.
- I see your point. The UCI does not have to tell which flag we sould use for a rider. BUT don't we use (Flag of Chinese Taipei for Olympic games.svg) instead of (Flag of the Republic of China.svg) for Olympic topics? Who tells us? --Tommes (talk) 13:35, 4 August 2022 (UTC)
- I see that on the Tour de France article on WP:fr, they followed UCI opinion. It will be some work in the code. Any other opinions on that?Psemdel (talk) 14:40, 4 August 2022 (UTC)
- I thought about it, the implementation should be easy actually. Psemdel (talk) 15:52, 4 August 2022 (UTC)
- In addition to the UCI races, there are also races within the country's national calendar. In them riders "from the same countries" act under the flags of their countries. GAN (talk) 15:23, 4 August 2022 (UTC)
- It means still Russia and Belarus? Psemdel (talk) 13:30, 5 August 2022 (UTC)
- @GAN: can you re-explain?
- In addition to the UCI races, there are also races within the country's national calendar. In them riders "from the same countries" act under the flags of their countries. GAN (talk) 15:23, 4 August 2022 (UTC)
- I see your point. The UCI does not have to tell which flag we sould use for a rider. BUT don't we use (Flag of Chinese Taipei for Olympic games.svg) instead of (Flag of the Republic of China.svg) for Olympic topics? Who tells us? --Tommes (talk) 13:35, 4 August 2022 (UTC)
@Psemdel:If I understand correctly, there was a proposal to replace the display of the flags of Belarus and Russia in accordance with the current UCI regulations.
The UCI has now banned teams from these countries from racing on the UCI international calendar. And to hold races of the international UCI calendar in these countries. But these countries still have "these suspended" races, only within the framework of the national calendar with the participation of "these suspended" teams. There have been national championships in road cycling. Racers at these races compete under national flags - these races are not included in the UCI calendar.
Sources, all in Russian: Belarus, Russia ITT and RR, Five Rings of Moscow featuring UCI Continental Team Almaty Cycling Team.
How to be in this case? — GAN (talk) 08:53, 8 August 2022 (UTC)
- Oh yeah...No idea how to handle this exception. Psemdel (talk) 09:38, 8 August 2022 (UTC)
- @GAN: Thanks for your idea on my discussion page. You are right, we should give the possibility to overload P1532 in the startlist, as we do now for P54. It will solve the Russian problem in an easy and flexible way. I will try to implement that. Psemdel (talk) 15:35, 9 August 2022 (UTC)
- Done that was easy. Psemdel (talk) 09:30, 10 August 2022 (UTC)
- And Neutral banner (Q113486069) for the filling.
- @GAN: Thanks for your idea on my discussion page. You are right, we should give the possibility to overload P1532 in the startlist, as we do now for P54. It will solve the Russian problem in an easy and flexible way. I will try to implement that. Psemdel (talk) 15:35, 9 August 2022 (UTC)
- Concerning point 3: We normally put only the top 10 in Wikidata. Top 20 maximum. Do you have an example where it is not the case? We could limit hard the number of output for ranking to 10. What think the others? Psemdel (talk) 16:55, 3 August 2022 (UTC)
- Wikidata in best case might and should keep all the classification rankings of riders in any classification. No one knows if and when any other database stops working, updating nor existing with free access. Additional in future those dates couls be used in templates like de:Vorlage:Grand-Tour-Platzierungen which nowadays is filled by hand, but could automatically updated if data is existing in Wikidata. --Tommes (talk) 13:35, 4 August 2022 (UTC)
- So you would like to have a setting limiting the number of results displayed? Psemdel (talk) 14:40, 4 August 2022 (UTC)
- Maybe then by default limit the number of displayed positions. But make it possible to manually set this parameter in the template through the "argument". General classification by time, general classification by points and stage results for TTT - 25 positions. The rest - 10 positions. GAN (talk) 15:17, 4 August 2022 (UTC)
- Done. An issue will be that the generalclassification model is used for the stages and the final general classification. For the last, 25 riders is ok, for the first not. Psemdel (talk) 13:29, 5 August 2022 (UTC)
- Maybe then by default limit the number of displayed positions. But make it possible to manually set this parameter in the template through the "argument". General classification by time, general classification by points and stage results for TTT - 25 positions. The rest - 10 positions. GAN (talk) 15:17, 4 August 2022 (UTC)
- So you would like to have a setting limiting the number of results displayed? Psemdel (talk) 14:40, 4 August 2022 (UTC)
- Wikidata in best case might and should keep all the classification rankings of riders in any classification. No one knows if and when any other database stops working, updating nor existing with free access. Additional in future those dates couls be used in templates like de:Vorlage:Grand-Tour-Platzierungen which nowadays is filled by hand, but could automatically updated if data is existing in Wikidata. --Tommes (talk) 13:35, 4 August 2022 (UTC)
{{#invoke:Psemdel1|generalclassification|Q107565335|max_rank_displayed=5}}
- @Psemdel: I tried updating your last modifications into pl.wiki but it caused an error in race infobobox in pl:Tour de Pologne: "Błąd Lua w module „Moduł:Cycling_race”, w linii 2554: attempt to index upvalue 'class_dic' (a nil value). " so I reverted it immediately. Any idea how to fix this? 99kerob (talk) 17:32, 5 August 2022 (UTC)
- /data needed to be updated at the same time, as we changed "classes" from a list to a dic. Psemdel (talk) 08:06, 6 August 2022 (UTC)
- @Psemdel: Also calendarcustom is displayed in a wrong way - for example earlier on in pl:UCI ProSeries 2022 we have displayed TOP3, their teams and category of race and now it is reduced only to a winner of the race... 99kerob (talk) 08:46, 8 August 2022 (UTC)
- @99kerob: Yes, I introduced a breaking change this weekend. Done I corrected the model. Only a few WP use calendarcustom. Psemdel (talk) 09:42, 8 August 2022 (UTC)
- @Psemdel: . As I checked on de.wikipedia the standard limit to 10 entries is working. And it is working to change it by
|max_rank_displayed=
to more or less entries. (What means TTT - 25 positions, is it for general classification?) --Tommes (talk) 13:03, 8 August 2022 (UTC)- The TTT stage classifications are displayed a bit differently than normal stage. GAN wants to show the top 25. Psemdel (talk) 14:05, 8 August 2022 (UTC)
- @Psemdel: . As I checked on de.wikipedia the standard limit to 10 entries is working. And it is working to change it by
- @99kerob: Yes, I introduced a breaking change this weekend. Done I corrected the model. Only a few WP use calendarcustom. Psemdel (talk) 09:42, 8 August 2022 (UTC)
- @Psemdel: Also calendarcustom is displayed in a wrong way - for example earlier on in pl:UCI ProSeries 2022 we have displayed TOP3, their teams and category of race and now it is reduced only to a winner of the race... 99kerob (talk) 08:46, 8 August 2022 (UTC)
- /data needed to be updated at the same time, as we changed "classes" from a list to a dic. Psemdel (talk) 08:06, 6 August 2022 (UTC)
FirstCycling rider ID --- P10902
[edit]https://www.wikidata.org/wiki/Property:P10902
Not about the module, but related to cycling. Appeared rider ID on https://firstcycling.com/ GAN (talk) 17:31, 3 August 2022 (UTC)
- Cool, I added it to Module:Bases/sport on WP:fr. Psemdel (talk) 10:55, 4 August 2022 (UTC)
Sorting out the properties
[edit]Now that I had to had with a script competition class (P2094) with women's cycling (Q1451845) to many items. I think, it is the opportunity to eventually sort out the property mess that was discussed already several times here. First I made an overview Wikidata:WikiProject Cycling/Documentation/Propertiesoverview
I would like to sort out the instance of (P31) overused topic mentioned above. I would also remove the support of sports season of league or competition (P3450), as I think that we can perfectly use the present system: Paris Roubaix 2022 has instance of (P31) Paris Roubaix. Tennis uses the same. I don't see the need for sports season of league or competition (P3450). Moreover, remove length (P2043).
- 1. Move the class from instance of (P31) to subclass of (P279)
- 2. Move the team category from instance of (P31) to competition class (P2094)
- 3. Remove the support of sports season of league or competition (P3450)
- 4. Remove the support of length (P2043)
- 5. Remove part of (P361) for team and replace it by season of club or team (P5138). Note: on national teams, the restructuration work seems important.
I would like to clean the wikidata and the module at the same time from deprecated properties, as it makes the code complex, unclear and potentially buggy because all cases cannot be covered correctly.
Project plan:
Phase | Content |
---|---|
1 | Introduce subclass of (P279) to the wikidata Cycling race module |
2 | Run the script to insert subclass of (P279) to the wikidata items |
3 | Propagate the change to all WPs module, including infobox using wikidata. |
4 | Remove instance of (P31) on a few items, and validate that it still works |
5 | Remove instance of (P31) on all items |
6 | Remove support for instance of (P31) in the module |
And then the same with competition class (P2094), P...
Any objections? Point 2, is the most risky. It would have the advantage however to update all modules at the same time and have also a clean basis for the versions. Psemdel (talk) 11:34, 11 August 2022 (UTC)
- @Psemdel:
- If I understood correctly, then your bot began to transfer the value "race subclass" from instance of (P31) to subclass of (P279)? This is for me to make a change in my tables.
- Currently "Cycling race/calendarcustom|" new parameter for class "P279" not supported?
—GAN (talk) 12:49, 13 August 2022 (UTC)
- I first insert things in subclass of (P279) only later I will delete instance of (P31). Psemdel (talk) 11:44, 14 August 2022 (UTC)
- @Psemdel: Why is Q1451845 (which shouldn't be displayed at all) displayed instead of a class of the race in race infoboxes? Check for example pl:Tour de France Femmes 2022 (fr.wiki has same error too). 99kerob (talk) 16:27, 15 August 2022 (UTC)
- Yes, good example. I added the compatibility class <-> P2094 month ago. Since then, both systems were there, but even myself forgot about it. --> We need one consistent system, not fallback of fallback of fallback. It should be finished by end of the week. Right now, I introduce the changes in the database. Psemdel (talk) 18:07, 15 August 2022 (UTC)
So, I updated most (see below) languages with an actual version of the code, so there should be no risk of disaster when I delete the old properties. Moreover, it makes a clean reset, which can not damage as there have been some breaking change during the time. I also updated Module:Cycling race/l10n all. But:
- WP:es and WP:pt requires supplementary rights to change the modules. @Repf72:, @Dbastro:, if you could copy the module, /l10n and /data it would help.
- WP:ar as I see that it quite up to date, but I cannot clearly identify where is the difference. I suppose it should be ok, @Mr. Ibrahem:.
When the changes are done, I will start deleting the properties and also simplifying the code. Psemdel (talk) 15:04, 22 August 2022 (UTC)
- @Psemdel: arwiki ready.. Mr. Ibrahem (talk) 20:45, 22 August 2022 (UTC)
- Note: WP:pt should be ok, remains only WP:es. I hope that I can start deleting properties next week. Psemdel (talk) 06:58, 26 August 2022 (UTC)
- @Repf72: Can you update the module? Thanks. Psemdel (talk) 08:33, 29 August 2022 (UTC)
- Does someone know anybody by WP:es? I would like to move forward. Don't use the very last version of the module, I still have a few points to fix... https://www.wikidata.org/w/index.php?title=Module:Cycling_race&oldid=1710656471 should be fine for now. Psemdel (talk) 09:03, 3 September 2022 (UTC)
- Jarraitor more in es-wiki module uses — GAN (talk) 13:10, 3 September 2022 (UTC)
- @Repf72: New try, can you update the module? Psemdel (talk) 06:35, 9 September 2022 (UTC)
- @Repf72:, before X-mas, can we update this module, that I clean up old properties ;). Thx. Psemdel (talk) 19:36, 18 December 2022 (UTC)
- @Repf72: New try, can you update the module? Psemdel (talk) 06:35, 9 September 2022 (UTC)
- Jarraitor more in es-wiki module uses — GAN (talk) 13:10, 3 September 2022 (UTC)
- Does someone know anybody by WP:es? I would like to move forward. Don't use the very last version of the module, I still have a few points to fix... https://www.wikidata.org/w/index.php?title=Module:Cycling_race&oldid=1710656471 should be fine for now. Psemdel (talk) 09:03, 3 September 2022 (UTC)
- @Repf72: Can you update the module? Thanks. Psemdel (talk) 08:33, 29 August 2022 (UTC)
- Note: WP:pt should be ok, remains only WP:es. I hope that I can start deleting properties next week. Psemdel (talk) 06:58, 26 August 2022 (UTC)
Next step
[edit]As written, just above, I will delete the "old" properties next week. I started to simply the code on my draft. To bring a bit of transparency, here is what I tried to achieve:
- Generally reduce the size of the code if possible, make it more clear, more elegant.
- Remove the support for old properties.
- Ideally have one property used only in one function which is called by all other functions. For instance P17 is called by fooa, and fooa is called by the other functions. It avoid redundant codes and make changes easier.
- Cycling race/lang was introduced years ago, later Cycling race/l10n and /data were introduced by different persons with different mechanisms. I think there is no point keeping /lang, as it is just a table. I will merge it with /l10n. So l10n is different for each wiki, data is the same for all.
- There are some "translation" within the code, they should be moved to /l10n. I wanted to also do the same with number(), but it is not worth it, as the rules, not only the word, are different in each languagues.
- Configuration items should be in the very beginning of the module when possible, not within the code.
- Try to harmonize the style between the different functions. It is not easy, they are partially very different. It means for instance, get rid of the outtable={} in some of the functions I wrote.
These efforts, that unfortunately can always bring some temporary bugs with them, are done to simplify the module and make its maintenance easier. Especially, with the idea that somebody new should be able to maintain it. Psemdel (talk) 07:30, 26 August 2022 (UTC)
Team infobox 2
[edit]For some time we have a "team infobox" within module which is great addition but not perfect. If you can do that it will be great to have also "team season infobox" in articles about each season of a team (for example: pl:Astana-Premier Tech w sezonie 2021). If you would like to do that I suggest making such changes:
- Team infobox:
- General director and Sports directors - display only current ones not all mentioned in Wikidata of such team
- Current one should be in the season article, no? But I see your point, it can become a very long list...
- Team season infobox:
- New feature similar to team infobox but taking data from Wikidata item for each team season not a general one for a whole team
- All elements from team infobox whithout a number of seasons, general director and sports directors without a years within a team (currently season items at WD mostly don't have a data about them but it isn't a big problem to add that)
- New elements:
- number of riders - maybe with specyfying number of stagiaires (for example: 28 riders + 2 stagiaires)?
- number of wins
- place in UCI Ranking (which brings another thing - we should have a data about teams rankings uploaded into Wikidata same way as we have it about riders)
Any chance to do that? ;) @Psemdel, GAN: 99kerob (talk) 08:08, 26 August 2022 (UTC)
- Good point, I thought it was already there :D. On WP:fr, we use that. It is no rocker science, can be quickly implemented. You can have a look here for instance. So number of riders, , number of wins . Place in UCI ranking is not implemented yet, but it is something that I want since long, but somehow never had a proper idea on the topic. Let me try again... Psemdel (talk) 08:42, 26 August 2022 (UTC)
- And probably implement it as a separate template "teaminfoboxseason" — GAN (talk) 09:44, 26 August 2022 (UTC)
For this, we will need the UCI ranking. Which is equivalent to brings this kind of table in wikidata.
Année | Classement par équipes |
Meilleure coureuse au classement individuel |
2011 | Template:13e | Template:Drapeau Martine Bras (Template:16e) |
In the season, for the team ranking, I can add a participant in (P1344) with UCI calendar and UCI World Tour as value with the rank as qualifier, everything fine. For the rider, it can be a bit tricky. I cannot use the same mechanism as how to differentiate then between rider and team ranking? Right now, I use points classification (P3494) to list the rider rankings for UCI calendar. For the UCI World Tour, I don't know what to use, there is no "championship ranking" or something of this kind. I could use best sprinter classification (P4322), but a reader of the database should guess that it means UCI World Tour... It is not ideal but I have no other idea right now. Anyone? Psemdel (talk) 11:56, 31 August 2022 (UTC)
- @Psemdel: Through the ranking for each season. That is, the data is placed in the elements about the team by year.
- P1352 - place of the team in the ranking
- P710 - the best racer
- P1545 / P10777 - place of the best rider
This will allow you to compile a table of the best results of the team in the season for each tournament. And separate tables for each tournament for the main article about the team.
If interested, there are ideas on how to make navigation templates through the module (which are at the bottom of the article) with a list of team members and team seasons. List of incoming riders and possibly outgoing riders at the beginning of the season. — GAN (talk) 13:39, 31 August 2022 (UTC)
- Thx, I haven't thought of using P1352 directly, we use it only as qualifier up to now. It should be possible to do something. I need a bit of time. For the navigation, why not but also there, please of bit of patience. Psemdel (talk) 13:47, 31 August 2022 (UTC)
Question: which presentation would you prefer in the infobox. Like that:
Team Name | |
Classement | |
UCI World Tour | 1re ( Demi Vollering, 2e) |
Classement UCI | 1re ( Demi Vollering, 4e) |
Or like that:
Team Name | |
Classement | |
UCI World Tour | |
ranking | 1re |
best rider | Demi Vollering (2e) |
Classement UCI | |
ranking | 1re |
best rider | Demi Vollering (4e) |
GAN prefers the first as it is shorter. But I find that it is not easy to understand what the 1 and the 2 refers to (is it the team or the rider?). Let us know. Psemdel (talk) 18:13, 13 September 2022 (UTC)
- @Psemdel: I would rather prefer second option as it is much easier to unterstand for a reader as you easily know what each number means 99kerob (talk) 18:41, 13 September 2022 (UTC)
- @99kerob: A third option has also been proposed. You can generally remove the classification from the "infobox". And make it through a separate template for placement inside the text of the article, similar to lineups and victories. In the "Classifications" section, this would look great along with "UCIclassification". Continental teams can have up to 4 classifications, which is 12 lines. In this case, the "infobox" will be very elongated, and the article may contain little text. — GAN (talk) 19:39, 13 September 2022 (UTC)
"Combative" vs.
[edit]Hello, if you compare the infoboxes de:Vuelta a España 2022/7. Etappe vs. de:Tour de France 2022/7. Etappe you see for the most combative rider the list entry "combative" in the one article and the in the other article. I guess we prefer the trikot picture as we did for the other colors trikots. I do not know where to change it, even do not know where the difference comes from. Additional: In the Tour-de-France-article's infobox the "Teamwertung" follows the and in the Vuelta-article it does not. @Psemdel: Siehst du, was ich meine? --Tommes (talk) 16:26, 30 August 2022 (UTC)
- @Tommes:. It is hardcoded in jersey_infobox (could be moved to /data actually...). You should add a line of this form with Vuelta a España (Q33937) instead of Tour de France (Q33881)
{'Q33881', 'winner_fighting', '+2003', '+2500', 'Q27644113', 'Q2094179'}, -- Jersey red number.svg {'Q33881', 'winner_fighting2', '+2003', '+2500', 'Q27644113', 'Q2094179'}, -- Jersey red number.svg {'Q33881', 'equipe', '+2006', '+2500', 'Q27644112', 'Q1436680'}, -- Jersey yellow number.svg
Psemdel (talk) 11:38, 31 August 2022 (UTC)
- I do not understand where to put these lines. Would you please be so kind as to do it? --Tommes (talk) 18:54, 4 September 2022 (UTC)
- @Tommes: Added jerseys for fighting and youth classifications. Until 2018, the leader of the youth standings had a red number at the Vuelta. Fighting at that time had a green number. Update Module:Cycling race/data. — GAN (talk) 14:47, 7 September 2022 (UTC)
- @GAN: Может я неправильно объяснил. Пожалуйста, посмотри на это. В информационном окне (Infobox) написано Combative и Teamwertung. в этой другой статье не написано Combative но это показывает майку для самого воинственного/агрессивного водителя. майка самого агрессивного гонщика должна отображаться вместо текста (для Vuelta). Также должна отображаться майка лучшей команды (для Vuelta). Спасибо, что заботишься об этом! --Tommes (talk) 02:53, 8 September 2022 (UTC)
- @Tommes: Неплохой русский или Гугль-переводчик? Updated the module in the de-wiki (there was an old or partially new version) and the module-date. Check it out. — GAN (talk) 08:22, 8 September 2022 (UTC)
- @GAN: Это смесь обоих. Видишь мой bопрос ниже? --Tommes (talk) 07:28, 15 September 2022 (UTC)
- Question and desire fulfilled. T h a n k y o u ! --Tommes (talk) 07:33, 15 September 2022 (UTC)
- @GAN: Это смесь обоих. Видишь мой bопрос ниже? --Tommes (talk) 07:28, 15 September 2022 (UTC)
- @Tommes: Неплохой русский или Гугль-переводчик? Updated the module in the de-wiki (there was an old or partially new version) and the module-date. Check it out. — GAN (talk) 08:22, 8 September 2022 (UTC)
- @GAN: Может я неправильно объяснил. Пожалуйста, посмотри на это. В информационном окне (Infobox) написано Combative и Teamwertung. в этой другой статье не написано Combative но это показывает майку для самого воинственного/агрессивного водителя. майка самого агрессивного гонщика должна отображаться вместо текста (для Vuelta). Также должна отображаться майка лучшей команды (для Vuelta). Спасибо, что заботишься об этом! --Tommes (talk) 02:53, 8 September 2022 (UTC)
- @Tommes: Added jerseys for fighting and youth classifications. Until 2018, the leader of the youth standings had a red number at the Vuelta. Fighting at that time had a green number. Update Module:Cycling race/data. — GAN (talk) 14:47, 7 September 2022 (UTC)
|max_rank_displayed=
doesn't work
[edit]I do not know the reason. But |max_rank_displayed=
is not working anymore.
{{Cycling race/teamsclassificationbytime|Q110159035|max_rank_displayed=3}}
Template:Cycling race/teamsclassificationbytime Tommes (talk) 06:25, 15 September 2022 (UTC)
- @Psemdel: If I understand correctly, then "|max_rank_displayed" does NOT work in one template. When used via "{{#invoke:Cycling race|" all OK. Checked in "fr-wiki". — GAN (talk) 09:30, 15 September 2022 (UTC)
- I will check. I changed the way frame and localframe work, it was a mistake... Psemdel (talk) 09:54, 15 September 2022 (UTC)
- The topic is that the template needed to be adapted. The template does not pass automatically all arguments to the underlying #invoke. You can look at the change in https://de.wikipedia.org/wiki/Vorlage:Cycling_race/generalclassification . But there was still a small bug in the module with that, that I fixed. Psemdel (talk) 12:54, 15 September 2022 (UTC)
- I will check. I changed the way frame and localframe work, it was a mistake... Psemdel (talk) 09:54, 15 September 2022 (UTC)
UCI rider ID --- P11020
[edit]https://www.wikidata.org/wiki/Property:P11020
Not about the module, but related to cycling. Appeared rider ID on https://www.uci.org GAN (talk) 13:10, 16 September 2022 (UTC)
- I saw that some bot used this property massively. Cool thing. Psemdel (talk) 12:27, 24 December 2022 (UTC)
Gender in header for UCI Women's WorldTour 2023
[edit]Hi, @Psemdel. The femenine translation in ca:UCI Women's WorldTour 2023 doesn't show. In ca:UCI Women's WorldTour 2022 also happened, but finally you fix it. If the solution is to refresh a cawiki module version, just tell me which one and I'll change it getting from WD version. Thanks !. Amadalvarez (talk) 05:18, 9 February 2023 (UTC)
- @Amadalvarez: And the presence of all the winners in the races of the Women's Tour 2023 did not bother you? Wrong "Q" was listed for "UCI Women's World Tour 2023". I have corrected. Refresh Module:Cycling race/data — GAN (talk) 09:47, 9 February 2023 (UTC)
- Done. Thanks a lot !! Amadalvarez (talk) 19:36, 9 February 2023 (UTC)
- Updating, solved the feminine issue. Psemdel (talk) 22:29, 9 February 2023 (UTC)