Template talk:Establishment category in country

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Parallel disestablishments category[edit]

I'm unsure if there exists a consensus for this new hierarchy of disestablishments by country. Also, if this should be part of this template, there should be a check to see if the disestablishment category does in fact exist. If it doesn't the red link should be suppressed. __meco (talk) 20:56, 23 March 2012 (UTC)[reply]

Burma year categories[edit]

Can someone who understands the templates please go through the Burma entries in Category:Wikipedia non-empty soft redirected categories and fix them so that they reflect the country became Myanmar from 1989 onwards? The information on Template:EstcatCountry is very unhelpful for situations where the country's name changes. Timrollpickering (talk) 09:05, 23 August 2015 (UTC)[reply]

 Done. I added new parameters to 4 templates for the new name of a country. – Fayenatic London 07:58, 6 September 2015 (UTC)[reply]

Parameter for new name[edit]

Please list here any countries where the "new name" parameter has been used in {{estcatCountry}}, {{EstcatCountryDecade}}, {{EstcatCountryCentury}} or {{disestcatCountry}}, as I added this without discussion, and it may be desirable to change the way it works.


Places where it was not useful:

Places that need it:

Category

As of August 2019, thanks to user:BrownHairedGirl, pages that use this parameter are in Category:EstcatCountry with newname parameter. – Fayenatic London 03:39, 30 August 2019 (UTC)[reply]

Thanks, Fayenatic. The edit[1] was only two days ago, the category is probably still fillig up. --BrownHairedGirl (talk) • (contribs) 04:06, 30 August 2019 (UTC)[reply]
I've tweaked it to sort by country rather than by year. Trust that's not detrimental for your purposes. – Fayenatic London 04:35, 30 August 2019 (UTC)[reply]

For the record, the above section is now obsolete, see section #Resolve category redirect below. Further category redirects may need to be set up in other cases. To avoid deletion of such redirect pages, they should be tagged with {{R from category navigation}}. – Fayenatic London 14:13, 28 January 2022 (UTC)[reply]

2010 •2011 error[edit]

Replace Line 3 as diff. Then 2010 •2011 will be changed into 2010 • 2011. Sawol (talk) 06:14, 18 August 2018 (UTC)[reply]

 Done Looks fine to me either way. Please verify that it looks fixed now to you, Sawol. Enterprisey (talk!) 07:48, 18 August 2018 (UTC)[reply]

Discussion moved to Template talk:Estcatsubcountry. --BrownHairedGirl (talk) • (contribs) 14:19, 30 June 2019 (UTC)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Could a template expert please add sort key parameters to Template:Estcatsubcountry and Template:Disestcatsubcountry? At the moment I am having to use a work around for subdivisions which we normally prefix with "the" (e.g. the Valencian Community - see Category:2019 establishments in the Valencian Community and Category:2019 disestablishments in the Valencian Community). Ping BrownHairedGirl and Fayenatic london: Thanks.--Obi2canibe (talk) 13:45, 30 June 2019 (UTC)[reply]


The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Typo in documentation[edit]

BrownHairedGirl, there appears to be a typo in the Burma example in the documentation (diff), but I'm not sure whether it's a missing pipe or a repeated parameter. --Paul_012 (talk) 20:32, 16 June 2021 (UTC)[reply]

Thanks, Paul 012. Now fixed.[2] --BrownHairedGirl (talk) • (contribs) 16:48, 17 June 2021 (UTC)[reply]

Resolve category redirect[edit]

If this template would resolve a category redirect on the decade parent, it could replace several tailored templates that bridge the dates of name changes, see Wikipedia:Templates for discussion/Log/2022 January 13#Template:Myanmar 1980s estab by year.

What's more, resolving category redirects on the "by year" category could probably also be used to make the third parameter (new name) obsolete. – Fayenatic London 09:15, 14 January 2022 (UTC)[reply]

I have now incorporated {{Resolve category redirect}} to fix the decade parent and the "estab in [country] by year" parent categories. This is working on e.g. Category:1980 establishments in Burma and Category:1991 establishments in the Republic of Macedonia. – Fayenatic London 22:57, 20 January 2022 (UTC)[reply]
However something's causing a mess at Category:1964 establishments in Northern Rhodesia which is populating Category:1964 in Northern Rhodesia. Timrollpickering (talk) 12:46, 21 January 2022 (UTC)[reply]
Thanks, @Timrollpickering: it seems that Category:1964 establishments in Northern Rhodesia was used intentionally rather than Category:1964 establishments in Zambia which is also in use, so I subst'd and trimmed the template on that page, in order to change the parent category to 1964 in Zambia. But it is rare a case where having categories for both names in one year might be justified. – Fayenatic London 18:02, 22 January 2022 (UTC)[reply]
@Timrollpickering: I realised that this just needed one more {{resolve category redirect}} and have now implemented this, which also resolves the 1922 Turkey example that you highlighted in an earlier section above. – Fayenatic London 22:19, 27 January 2022 (UTC)[reply]
@BrownHairedGirl: the 5th parameter for newname is now obsolete. May I remove the newname code from the templates, and delete the tracking categories Category:EstcatCountry with newname parameter & its "dis" sibling? – Fayenatic London 17:18, 27 January 2022 (UTC)[reply]
@Fayenatic london: the honest answer is that I dunno.
There is a lot of complexity across this whole template and its subpages which was added to cope with various variations, of which name changes are just one part. As I have said before, the whole thing needs a major rewrite to accommodate new coding techniques (of which {{Resolve category redirect}} is only one part) ... and in the meantime I don't want to put a lot of effort into re-evaluating a large chunk of old code.
This is top of my list for when I finish my work on bare URL refs. I hope that if WP:Bots/Requests for approval/BareRefBot is approved, I can massively scale back that work and get back to templating. But until then, I cant't make a judgement without putting in more time than I can spare. BrownHairedGirl (talk) • (contribs) 17:35, 27 January 2022 (UTC)[reply]
Thanks. In this case I found the coding straightforward, so I had the confidence to remove the obsolete code myself, and update the documentation to match. (Would be happy to be reverted or be asked sort out any unforeseen consequences if such a need arises.) – Fayenatic London 21:47, 27 January 2022 (UTC)[reply]
Thanks, @Fayenatic london. Sorry I can't be more help. BrownHairedGirl (talk) • (contribs) 22:21, 27 January 2022 (UTC)[reply]
For the record, I have made corresponding updates to Template:EstcatCountryDecade. However, Template:DisestcatCountryDecade still takes the old format including numerical parameters. – Fayenatic London 22:46, 28 January 2022 (UTC)[reply]

Generating parents for continent etc[edit]

Manual coding of parents for continents, regions, federations, empires etc is patchy.

Would it be good to generate these from the template? One possibility would be to add (up to 4?) parameters for such, and generate the parent categories in this template.

The sort key could be parameter 2 if used, otherwise parameter 1. However, that would miss subtleties such as "Category:2015 establishments in the Republic of Macedonia" which is sorted by "Macedonia" rather than "Republic" in such parents; one workaround would be to retain the existing manually coded parents in such cases.

But none of the above would solve the problem of patchy implementation. An alternative approach would be to use a lookup table to generate such parents from the country name, similar to an existing parsing table that generates links to portals. This would require use of start and end dates for empires etc. I think this may be on BrownHairedGirl's long-term radar already. – Fayenatic London 17:27, 27 January 2022 (UTC)[reply]

@Fayenatic london: this is on my radar for the rewrite. BrownHairedGirl (talk) • (contribs) 17:36, 27 January 2022 (UTC)[reply]
@BrownHairedGirl: great. For reference, I found 5 such parents at Category:1950s establishments in French Sudan – that's the most so far. – Fayenatic London 15:13, 30 January 2022 (UTC)[reply]
I've added parent categories for continents. Template:Establishment category in country/core/sandbox. It only adds them if the category exists. Mason (talk) 13:37, 27 March 2024 (UTC)[reply]

Duplicate portals[edit]

This template is showing the Geography portal twice on Category:1944 establishments in Armenia, is there a way to de-duplicate it? Thanks. --Jameboy (talk) 10:18, 6 February 2023 (UTC)[reply]

Done. It now says Asia and Europe. – Fayenatic London 08:26, 7 February 2023 (UTC)[reply]
I have followed this up for a couple of dozen other countries whose portals have been deleted. "Geography portal History portal Geography portal" is a search to check where else the country name is generating the repeated geography portal. Although it currently shows some 2,000 results, these should all disappear as the cached versions of pages get updated.
I have also documented at Template:YearInCountryPortalBox how that feature works. – Fayenatic London 21:58, 7 February 2023 (UTC)[reply]
Now they are all resolved except for one about Golan Heights, which may be deleted per Wikipedia:Categories for discussion/Log/2023 February 7#Establishments in the Golan Heights. – Fayenatic London 09:44, 8 February 2023 (UTC)[reply]