MediaWiki talk:Talkpageheader

Latest comment: 1 year ago by Nikki in topic Edit request 3

Edit request edit

{{#ifeq:{{NAMESPACENUMBER}}|1|{{#switch:{{#property:P31|from={{PAGENAME}}}}|given name|male given name|female given name|unisex given name={{TP given name}}|family name={{TP family name}}|}}}}

Would you kindly add the above to this page? It should work for pages like Talk:Q4925477. --- Jura 19:30, 3 February 2020 (UTC)Reply

@Jarekt: --- Jura 00:04, 4 February 2020 (UTC)Reply

  Done Jura, good idea. --Jarekt (talk) 03:29, 4 February 2020 (UTC)Reply

{{#ifeq:{{NAMESPACENUMBER}}|1|{{#switch:{{#invoke:Wikidata|formatStatementsE|item={{PAGENAME}}|property=p31|displayformat=raw|numval=1}}|Q202444|Q12308941|Q11879590|Q3409032={{TP given name}}|Q101352={{TP family name}}|}}}}

@Jarekt: Thanks: it seems to work. An exception is when language is set to non-English. The above should fix that. --- Jura 11:51, 5 February 2020 (UTC)Reply

  Done --Jarekt (talk) 12:42, 5 February 2020 (UTC)Reply

@Jarekt: For inl8, would you add

{{MediaWiki:Talkpageheader}}

to

(most frequent Latin script languages from Wikidata:Database reports/User preferences).

Also:

for inexisting talk pages like Talk:Q84306168 ([1]) --- Jura 12:10, 7 February 2020 (UTC)Reply

I do not like the idea of creating all those subpages and transcluding {{MediaWiki:Talkpageheader}} there. I wonder there the text in MediaWiki:Talkpageheader/xyz come from. Apparently not from MediaWiki:Talkpageheader. I also do not see the point of adding it to nonexisting talk pages through MediaWiki:Newarticletext. What would be the purpose? My favorite solution would be to add the template directly to the top of each relevant talk page (perhaps once ticket:T210304 is fulfilled). That would be the most transparent approach for maintainers of the future. --Jarekt (talk) 14:44, 7 February 2020 (UTC)Reply
@Jarekt: Agree about the subpages. If there is a way of avoiding creating them, that would be great. Recalling Wikidata:Contact_the_development_team/Archive/2019/11#Wikidata_in_n'ko, it seems it's the way that works around here. The text in MediaWiki:Talkpageheader/xyz is the same as there was at MediaWiki:Talkpageheader by default. Maybe this gets fed from Translatewiki.
MediaWiki:Newarticletext would allow to click on the talk page link to get the list of queries (without having to create thousands of empty talk pages). --- Jura 14:57, 7 February 2020 (UTC)Reply

@Jarekt: maybe I will come up with something better than the subpages, but in the meantime would you do the change on MediaWiki:Newarticletext? --- Jura 12:33, 8 February 2020 (UTC)Reply

  Done --Jarekt (talk) 04:14, 9 February 2020 (UTC)Reply

@Jarekt:

{{#ifeq:{{NAMESPACENUMBER}}|1|{{#switch:{{#invoke:Wikidata|formatStatementsE|item={{PAGENAME}}|property=p31|displayformat=raw|numval=1}}|Q202444|Q12308941|Q11879590|Q3409032={{TP given name}}|Q101352={{TP family name}}|Q5398426={{TP television series}}|}}}}

It seems to work out well. Would you update it with the above. I want to try it on another type of item. --- Jura 15:43, 17 February 2020 (UTC)Reply

Jura   Done --Jarekt (talk) 04:19, 18 February 2020 (UTC)Reply

Edit request (December) edit

@Jarekt: This seems to work out mostly, except that (as expected) it doesn't work for people who use non English UIs.

For inl8, would you kindly add

{{MediaWiki:Talkpageheader}}

to

I think it's still better than trying to add a template to every talk page instead.--- Jura 23:11, 13 December 2020 (UTC)Reply

Jura, That is some confusing syntax. Maybe we should create a template with content of MediaWiki:Talkpageheader and transclude it to all the pages, That way you can also add proper template documentation, explaining what it does. --Jarekt (talk) 23:22, 13 December 2020 (UTC)Reply
For the above subpages, it doesn't change much and similar things still standard (Wikidata:Project_chat/Archive/2020/12#MediaWiki:Villagepump-url/sv). The advantage of the current solution is that whether a template is displayed depends what's defined here. --- Jura 23:33, 13 December 2020 (UTC)Reply
It just seems like you are trying to use MediaWiki:Talkpageheader as a template, so I was thinking about creating a proper template which can be tested and be documented. My uneasiness comes from the fact that that I do not work with MediaWiki namespace that much and are not sure if the above solution is the best practice or not or if it can have some unintended consequences. There are 200-300 languages supported on Wikidata. Are we going to add this to all of them? --Jarekt (talk) 14:04, 14 December 2020 (UTC)Reply

@Jarekt: hope the above isn't too much work. I suppose I should be asking for the access to do it myself. --- Jura 12:17, 14 December 2020 (UTC)Reply

Jura, if you are interested in doing more work in MediaWiki namespace than I would apply for Administrator or Interface administrator. If you apply ping me and I will support you. --Jarekt (talk) 14:04, 14 December 2020 (UTC)Reply
@Jarekt: Looks like it will take some more time if ever [2]. Would you create at least MediaWiki:Talkpageheader/fr so User:PAC2 could edit TP given name to add a French version? Thanks for your support btw. --- Jura 17:07, 17 December 2020 (UTC)Reply
Jura,   Done with MediaWiki:Talkpageheader/fr. Perhaps you and others can test it in French and I can do the rest, if it works correctly. --Jarekt (talk) 18:08, 17 December 2020 (UTC)Reply
@Jarekt: Thanks, it works as expected: visible in https://www.wikidata.org/wiki/Talk:Q4925477?uselang=fr and https://www.wikidata.org/wiki/Talk:Q4925477?uselang=en , but not yet https://www.wikidata.org/wiki/Talk:Q4925477?uselang=es --- Jura 18:18, 17 December 2020 (UTC)Reply

It works. Thanks for your notification @Jura1:. This is great way to add documentation for items.

I just created a documentation page for {{TP given name}}. PAC2 (talk) 22:11, 17 December 2020 (UTC)Reply

Thanks. Feel free to edit it, but be careful. --- Jura 22:16, 17 December 2020 (UTC)Reply

New template for administrative areas edit

I'm working on a new documentation template for administrative areas. This is very preliminary : {{TP administrative area}}. It is inspired by {{TP given name}}. Comments and feedback are welcome PAC2 (talk) 07:24, 24 December 2020 (UTC)Reply

Do you think it would be possible to deploy it for items which are instance of administrative territorial entity (Q56061)? PAC2 (talk) 11:03, 27 December 2020 (UTC)Reply

Edit request (August 2021) edit

{{Edit request}} Please update the code to:

{{#ifeq:{{NAMESPACENUMBER}}|1|{{#switch:{{#invoke:Wikidata|formatStatementsE|item={{PAGENAME}}|property=p31|displayformat=raw|numval=1}}|Q202444|Q12308941|Q11879590|Q3409032={{TP given name}}|Q101352={{TP family name}}|Q5398426={{TP television series}}|{{#if:{{#property:P9753|from={{PAGENAME}}}}|{{TP lang}}}}}}}}

This should output language names on talk pages like Talk:Q10179 once P9753 is added.

Also, would you do the #Edit_request_(December) for languages other than French? Seems some users prefer I don't do them myself.

@Jarekt: --- Jura 10:11, 7 August 2021 (UTC)Reply

  Done --Jarekt (talk) 02:00, 12 August 2021 (UTC)Reply
@Jura1: now we are transcluding {item documentation} on every item talk page please can you advise if any of the {TP} templates are now redundant? — Martin (MSGJ · talk) 12:57, 26 May 2022 (UTC)Reply

Bug with the mobile interface edit

The Talkpageheader doesn't appear in the mobile Web interface (also known as Minerva) if the talk page doesn't exist. PAC2 (talk) 05:14, 12 August 2021 (UTC)Reply

Discussion in the project chat edit

For your information, there is a discussion related to Talkpageheader in the the project chat : Wikidata:Project_chat#Item_documentation_on_talk_page_header. PAC2 (talk) 20:26, 4 January 2022 (UTC)Reply

Edit request 2 edit

@Jarekt: Can we replace the content with something like {{Item documentation}} ? This is a more generic approach than requesting an edit each time we wan to add a new kind of item. This approach subsumes the previous as item documentation contains a mechanism to choose a dedicated template according to the type of the item. author  TomT0m / talk page 08:06, 4 May 2022 (UTC)Reply

@PAC2: ping author  TomT0m / talk page 08:07, 4 May 2022 (UTC)Reply

I support TomT0m proposition. I've launched a request for comments last year about this topic Wikidata:Requests for comment/How should we develop and deploy documentation for items ?. Item documentation is now a meta template which displays specific templates for administrative areas, organizations, awards, occupations, positions, etc. It would be logic to embed {{TP given name}} and {{TP family name}} in {{Item documentation}} and add {{Item documentation}} in the talkpageheader. PAC2 (talk) 16:34, 5 May 2022 (UTC)Reply

I also cc Jura1 who may have an opinion on the topic. PAC2 (talk) 16:35, 5 May 2022 (UTC)Reply
@TomT0m: Correct me, if I am wrong, but I think we cannot just use {{Item documentation}} because this would be used on all talk pages (in all namespaces) so we need do keep something like the current {{#ifeq:{{NAMESPACENUMBER}}|1… --Ameisenigel (talk) 14:22, 18 May 2022 (UTC)Reply
@Ameisenigel Well, {{#ifeq:{{NAMESPACENUMBER}}|1|{{Item documentation}}}} then ?
We totally can include the template call inside such a test. Or include the test in the template if needed. author  TomT0m / talk page 15:20, 18 May 2022 (UTC)Reply
OK, sounds good to me. --Ameisenigel (talk) 15:47, 18 May 2022 (UTC)Reply

The template is already used in 7,525 talk pages. Those should all be removed then? If someone can remove those easily, I am willing to add {{#ifeq:{{NAMESPACENUMBER}}|1|{{Item documentation}}}} here. Lymantria (talk) 20:26, 18 May 2022 (UTC)Reply

Thanks a lot for your answer. It would be great.

Of course, if we add the template to the talk page header, we will remove the template from the 7,525 pages where it is has been manually added. I don't know how to do it automatically but I'm sure that someone will know. PAC2 (talk) 04:19, 19 May 2022 (UTC)Reply

There is a procedure that could spead up the deployment though without removing the template yet :
  • rename the template temporarily
  • blank the page while we remove the template
  • do the edit with the temporary name
  • launch a bot or a tool like Auto Wiki Browser to remove the template
  • rename back and redirect the rename to « Item documentation »
This would avoid the template being rendered twice on talk pages where it is manually included. author  TomT0m / talk page 06:48, 19 May 2022 (UTC)Reply
This is an excellent suggestion. I have posted at Template talk:Item documentation to give some warning. If there are no serious objections we can do it in a couple of days — Martin (MSGJ · talk) 08:56, 20 May 2022 (UTC)Reply
I don't understand why we need such a complex process. It's not so bad if during a few days you have the template displayed twice on a relatively small number of pages. By the way, this would lead to lose the history of the template. Another option would be hide the template in the talk page header for pages in the category Category:Page using item documentation template. Is it possible? PAC2 (talk) 04:53, 21 May 2022 (UTC)Reply
A renaming does not imply a loss of history. It’s not really complex, the harder part is to find someone to perform the task :) one done, it’s just three clicks instead of one, no big deal. author  TomT0m / talk page 11:13, 21 May 2022 (UTC)Reply
This has now been done, and item documentation is appearing automatically. When the bot task has completed, please let me know and I will move the template back to its usual location — Martin (MSGJ · talk) 11:41, 26 May 2022 (UTC)Reply
@MSGJ Ready to undo the move. author  TomT0m / talk page 14:40, 28 May 2022 (UTC)Reply
Will do, likely tomorrow — Martin (MSGJ · talk) 20:36, 28 May 2022 (UTC)Reply

As for the bot, should be quite a trivial task : There is already a pywikibot tool to set up such a bot that deletes / substitutes template : mw:Manual:Pywikibot/template.py, the only stuff I’m not sure about yet is just how to restrict it to act on the « main talk » space.I’ll set up using PAWS with my bot User:InfoRobBot who’s been inactive for quite a while. EDIT I made a bot request as my bot has no more a botflag, easier than to get it back just for that. author  TomT0m / talk page 07:21, 19 May 2022 (UTC)Reply

@TomT0m Can you describe the bot task more simply and clearly? Please ping me if you have any questions, thank you. Kanashimi (talk) 20:44, 24 May 2022 (UTC)Reply
@KanashimiThe botask is described here, this is the right place to discuss it. Please comment there if there remains anything unclear. author  TomT0m / talk page 14:24, 25 May 2022 (UTC)Reply

Apparently, all occurrences of {{Item documentation}} in talk pages have been removed : Category:Page using item documentation template. PAC2 (talk) 13:54, 28 May 2022 (UTC)Reply

Edit request 3 edit

{{Edit request}} According to this discussion Wikidata:Project_chat#Item_documentation, it seems that some people don't see the Talkpageheader. It may be due to languages preferences.

This may be due to the differences between MediaWiki:Talkpageheader/fr and other subpages such as MediaWiki:Talkpageheader/de or MediaWiki:Talkpageheader/es. I understand from the discussion above that creating a transclusion in each linguistic subpage is not the solution. What happens if we suppress the linguistic subpages? this would maybe be the best solution. What do you think @Jarekt: @MSGJ:? -- PAC2 (talk) 17:55, 20 July 2022 (UTC)Reply

PAC2, I lost my admin privileges somehow, so I can't help. Sorry --Jarekt (talk) 01:36, 21 July 2022 (UTC)Reply
Thanks for your answer PAC2 (talk) 05:05, 21 July 2022 (UTC)Reply
I don't know if the subpages can be "suppressed" as you mention, but we really do not need or want 100+ variants of this template. I feel that if a variant is missing, then it should fall back to the default one. I will see if I can look into this further. If that's not possible then I agree with Jarket's suggestion of creating a template and transcluding this. — Martin (MSGJ · talk) 12:28, 21 July 2022 (UTC)Reply
Confirming that I can't see the item documentation when my interface is in Swedish, but when I switch to English, I see it. Ainali (talk) 09:50, 9 August 2022 (UTC)Reply
I would like to see the template in Russian. Otherwise it would be reasonable restoring all inclusions in source code... --Infovarius (talk) 07:23, 2 December 2022 (UTC)Reply
@PAC2, MSGJ: It only works if the interface language is English, because you can only override a default MediaWiki message for a single language (fallbacks don't apply because the original message isn't untranslated). Wikidata is supposed to be a multilingual project, so we should not be overriding MediaWiki messages like this. If you want to put something on every talk page, this is not the way to do it. - Nikki (talk) 02:05, 30 December 2022 (UTC)Reply
Okay please suggest the best way of doing this — Martin (MSGJ · talk) 10:57, 30 December 2022 (UTC)Reply
Wikidata:Translators' noticeboard#Template:Item_documentation via MediaWiki:Talkpageheader as well as phab:T50956 are related. The software seems unable to provide us with a clean solution and that is not a new problem. I recommend to go with the bruteforce solution as in Special:PrefixIndex/MediaWiki:Watchlist-summary/ for MediaWiki:Watchlist-summary: transclude the main message to all language subpages. —MisterSynergy (talk) 12:05, 30 December 2022 (UTC)Reply
I am not happy with this solution at all, but I have now created the 390 MediaWiki pages until we have a better (software) solution. --Ameisenigel (talk) 11:10, 11 April 2023 (UTC)Reply
MediaWiki supports over 500 languages though, which means a quarter of them are still missing. - Nikki (talk) 11:28, 11 April 2023 (UTC)Reply
According to phab:T50956#7996294 it should be possible to override the message in the WikimediaMessages repository, but I don't know how to do that.
I think the best solution in the meantime would be to delete these messages and add the header using javascript (which can be made into a gadget that is enabled by default). I made User:Nikki/TalkPageHeader.js recently which adds Template:Item documentation to the talk page and the feedback I've had so far has been that it works, but this message appears to be doing something beyond simply including that template that I don't really understand. - Nikki (talk) 11:42, 11 April 2023 (UTC)Reply

Fixing TemplateStyles edit

  It is requested that an edit or modification be made to this protected page.

The page has been added to Category:Wikidata protected edit requests.

Administrators: Please apply <nowiki> or {{Tl}} to the tag after the request is fulfilled.

Because {{Item documentation}} is now being included here, rather than in the main part of the page, various w:Wikipedia:TemplateStyles aren't being applied (e.g. Template:Tree/styles.css). I'm not sure what the right way to fix this is (maybe transcluding Template:Tree/styles.css directly into here, or something like that?), but it's frustrating trying to read a large {{SuperclassTree}} without the nice lines showing the levels, so I'd love help getting this fixed. JesseW (talk) 14:25, 17 August 2022 (UTC)Reply

Return to "Talkpageheader" page.