Page MenuHomePhabricator

Automatically created categories should be categorized: xx-y in xx, xx in <babel-footer-url>'s category
Open, MediumPublic

Description

Babel does not add a parent category to automatically generate categories.
Category is included in the main category, as well as the main category should be included in another category.

In the Japanese Wikipedia has been blocked,
Babel has created a lot of lost category. A short time.

I want to make the ability to add a parent category.


See Also: T33134: add new language code parameter for Babel-autocreate-text* messages

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:48 PM
bzimport set Reference to bz31097.
bzimport added a subscriber: Unknown Object (MLST).

I clarified the summary: I consider this a bug, because uncategorized categories are useless (for examples see [[ja:特別:投稿記録/バベル自動作成係]]).
The main category [[MediaWiki:babel-footer-url]] can be categorized in the wiki.

Does adding categories to [[MediaWiki:Babel-autocreate-user]] and [[MediaWiki:babel-autocreate-text-levels]] work? If yes, this could be reduced to an enhancement request.

Change 332332 had a related patch set uploaded (by Georggi199):
Fixed 2 issues with Babel boxes and categorisation of language codes

https://gerrit.wikimedia.org/r/332332

I want to be able to turn off automatic categorization. For example, on huwikisource we have a template which automatically adds text and categories in a highly configurable way; I don’t want another autocategorization in addition to this. So I should be able to override this by the customization of the MediaWiki messages. The most trivial way to do this is just passing the category name as a message parameter and modify the default (translatewiki) messages to include the category.

Autocategorization should probably be configurable so that it will generate a category page containing a local template transclusion such as

  • {{Babel category|da|N}} (per level) or
  • {{Babel category|da}} (all levels for the language).

(This is the same solution as the exposed template used in huwikisource, and implemented in https://gerrit.wikimedia.org/r/#/c/332332/6/BabelAutoCreate.class.php, except that this patches enforces the generation of a parent category in the autocreated per-level category, which may not be appropriate: the "Template:Babel category" can add this itself, the autocreation bot of Babel does not need to do that itself).

In summary, the text to insert in autocreated categories should be also a template with two variables: the language code (with its extension variant), and the level, or possibly 3 variables: the base language code, the optional extension variant seprately, and the level. A local wiki may then just need to customize the format to use in only 2 configuration variables such as:

  • {{Babel category|$1|$2}} (per level)
  • {{Babel category|$1}} (all levels)

without needing to translate it for multiple UILANGUAGE supported.

Such local template on the wiki can provide a correct description, including being able to show the description in the UILANGUAGE, or adding links to local portals for the language (e.g. of use on Translatewiki to link to "Portal:LANG"). With this, we would not even need to configure and translate the default text that appears in these categories, given that the posted text using such template invokation is independant of the UILANGUAGE or default language of the wiki (not all wikis are multilingual like Commons, MetaWiki or TranslateWiki, and the posted message in English only or in the local default language only is not desirable in all cases: the wiki can better decide which text to show).

It is then simpler to configure the general categories that these autocreated categories will generate, there would be less errors, the presentation would be unified, no categoy would be forgotten (many autocreated "User LANG" and "User LANG-LEVEL" categories are left orphaned, or improperly sorted because of confusion made when manual editing them).
And then nothing prohibits a wiki to add other content in these categories in addition to these autogenerated descriptions, by adding text above or below (e.g. some additional banners/warnings, or additional categories used to group languages by family or groups, or categories for local projects for specific languages or language groups)

Change 332332 abandoned by Nikerabbit:

[mediawiki/extensions/Babel@master] Fixed 2 issues with Babel boxes and categorisation of language codes

Reason:

Old, stale patch

https://gerrit.wikimedia.org/r/332332

Pppery subscribed.

Sorry for the indecisiveness.

Sorry for the indecisiveness.

:) Thanks for claimed it!

There is one problem with MediaWiki:Babel-footer-url. I remembered this when I looked at this problem - T33115. In Russian Wikipedia, I generally reassigned and removed the link to the category from the footer: https://ru.wikipedia.org/wiki/Шаблон:Babel#Пример_использования, https://ru.wikipedia.org/wiki/MediaWiki:Babel-footer-url. And I think it will be difficult to find out where else this message has been changed. To get the main-main category, a new parameter is needed.

Sorry for the indecisiveness.

:) Thanks for claimed it!

There is one problem with MediaWiki:Babel-footer-url. I remembered this when I looked at this problem - T33115. In Russian Wikipedia, I generally reassigned and removed the link to the category from the footer: https://ru.wikipedia.org/wiki/Шаблон:Babel#Пример_использования, https://ru.wikipedia.org/wiki/MediaWiki:Babel-footer-url. And I think it will be difficult to find out where else this message has been changed. To get the main-main category, a new parameter is needed.

My in-progress patch passes any categories to add as a parameter to MediaWiki:Babel-autocreate-text-main and MediaWiki:Babel-autocreate-text-levels. Any wiki doing something weird with MediaWiki:Babel-footer-url (although I'm not sure what Russian Wikipedia is doing there since I don't speak Russian) can also add its own parent categories to MediaWiki:Babel-autocreate-text-main and not use the parameter.

Sorry for the indecisiveness.

:) Thanks for claimed it!

There is one problem with MediaWiki:Babel-footer-url. I remembered this when I looked at this problem - T33115. In Russian Wikipedia, I generally reassigned and removed the link to the category from the footer: https://ru.wikipedia.org/wiki/Шаблон:Babel#Пример_использования, https://ru.wikipedia.org/wiki/MediaWiki:Babel-footer-url. And I think it will be difficult to find out where else this message has been changed. To get the main-main category, a new parameter is needed.

My in-progress patch passes any categories to add as a parameter to MediaWiki:Babel-autocreate-text-main and MediaWiki:Babel-autocreate-text-levels. Any wiki doing something weird with MediaWiki:Babel-footer-url (although I'm not sure what Russian Wikipedia is doing there since I don't speak Russian) can also add its own parent categories to MediaWiki:Babel-autocreate-text-main and not use the parameter.

Exactly! You're right, for some reason I decided that you would do the categorization through code, and not through messages. Thanks :)
But I would duplicate it with one more parameter anyway, because it's a footer, not a "main category store" :)

(although I'm not sure what Russian Wikipedia is doing there since I don't speak Russian)

I've included a link to the help page because the current footer format is pretty bad.

But I would duplicate it with one more parameter anyway, because it's a footer, not a "main category store" :)

I'm not convinced. This decision will ultimately be made by whoever code-reviews the patch.

But I would duplicate it with one more parameter anyway, because it's a footer, not a "main category store" :)

I'm not convinced. This decision will ultimately be made by whoever code-reviews the patch.

I may create a separate task to discuss the new setting.

Change 884406 had a related patch set uploaded (by Pppery; author: Pppery):

[mediawiki/extensions/Babel@master] Add parent categories to babel categories

https://gerrit.wikimedia.org/r/884406

<s>@Pppery Are we sure that we need it after T211665? :)</s>

Forget about the text above, I figured it out :)