Page MenuHomePhabricator

Use Wikidata to check for category names instead of hardcoding in categoryToCheck
Open, LowPublicFeature

Description

Have had a quick discussion on [[w:ja:Category‐ノート:保護関連]], and from the discussion I am feeling that the current design is not a really good one.
Namely, why are we hardcoding the category names in categoryToCheck, instead of dynamically fetching, say, from several Wikidata entries such as [[d:Q4616255]] and [[d:Q10224556]]? The current design will fail whenever there is a renaming in any of the listed languages.

The more difficult part would be to remove hardcoding in template names as it involves fixing all those regex strings but I would think that the category names could act as a first step.

Event Timeline

patilise created this task.Sep 7 2019, 9:51 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptSep 7 2019, 9:51 AM
patilise updated the task description. (Show Details)Sep 7 2019, 9:52 AM
Xqt added a subscriber: Xqt.Sep 7 2019, 10:53 AM

Which is the related script?

Xqt triaged this task as Low priority.Sep 7 2019, 11:34 AM
Xqt changed the subtype of this task from "Task" to "Feature Request".

Which is the related script?

This is blockpageschecker.py

Which is the related script?

This is blockpageschecker.py

Oh - apologies - yes this is blockpageschecker.py

Hi,
I can start working on this.
Thanks

Mh-3110 claimed this task.Sep 7 2019, 12:07 PM
Xqt added a comment.Sep 7 2019, 12:11 PM

Hi,
I can start working on this.
Thanks

Sure. For any questions do not hesitate to ask for help.

Hi @Xqt ,
so if I get right, I will need to fetch categories names from wikidata, right?

Hi @Xqt ,
so if I get right, I will need to fetch categories names from wikidata, right?

Yes, that is right.

Shubham-sp35 added a subscriber: Shubham-sp35.EditedNov 20 2019, 11:00 AM

@Xqt
Can I get help on how to fetch those categories' names from wikidata ?