⚓ T177596 Addition "skipcat" or "suppresscat" and "nocat" param for Babel-box
Page MenuHomePhabricator

Addition "skipcat" or "suppresscat" and "nocat" param for Babel-box
Closed, ResolvedPublic

Description

For final migration to Babel Extension in Meta-wiki is needed adiitional parameter "skipcat" or "supresscat" and "nocat".

If #babel: called with this parameter (may be defined with any value), then page will not be included into Babel categories.

  • Add nocat= parameter
  • Add skipcat= or supresscat= or included= parameter

Use case:
Some Wikimedians is used custom design for theirs usepages. And often Babel-box extracted into subpage. But will be better include main userpages to Babel categories, but no these subpages.

As example, see //meta.wikimedia.org/wiki/User:Aphaia/Babel with using old-style templates with parameters for supressing categories, wrapped in a tag <noinclude>

Proposed code for migration of this page into Babel Extension (replacement {{user language}}) will be {{#babel:plain=1<noinclude>|skipcat=1</noinclude>|ja|en-3|de-2|fr-1|it-1}}

Event Timeline

Kaganer updated the task description. (Show Details)

But will be better include main userpages to Babel categories, but no these subpages.

Not outputting any categories would be easy. I'm not sure outputting them only when included is even possible.

But will be better include main userpages to Babel categories, but no these subpages.

Not outputting any categories would be easy. I'm not sure outputting them only when included is even possible.

"<noinclude>" parsed before or after '#babel:' ?

Hm, I think It is bad idea to use <noinclude> tag inside #babel form. We can create extra parameter, something like '|included='.

And I hope we can add |nocat parameter for this request.

And I hope we can add |nocat parameter for this request.

Ok, but this parameter should be switchable for using on includable subpages. Maybe with extra parameter like '|included='.

Ok, but this parameter should be switchable for using on includable subpages. Maybe with extra parameter like '|included='.

Yep, I agree with you.

Iniquity renamed this task from Addition "skipcat" or "supresscat" param for Babel-box to Addition "skipcat" or "supresscat" and "nocat" param for Babel-box.Oct 22 2017, 8:07 PM
Iniquity updated the task description. (Show Details)

@Kaganer I think you can use the next scheme: <includeonly>{{#babel:}}</includeonly>, if nobody claim this task.
For example: https://ru.wikipedia.org/wiki/Участник:Carn/Шапка

@Nikerabbit you said that not outputting any categories would be easy, can you help with it? Or I need to create another task?

@Iniquity: You prioritized this task. Does that mean you plan to work on it?

I have started, but... have some problems with it.

Iniquity raised the priority of this task from High to Needs Triage.Mar 18 2018, 10:11 AM

@Iniquity: You prioritized this task. Does that mean you plan to work on it?

I have started, but... have some problems with it.

Can I help?

Can I help?

It'll be cool :)

You'll need to tell me what problems did you have :)

I have problems with knowledge of the language. I know that somehow it is necessary to be able to cut the function in https://phabricator.wikimedia.org/diffusion/EBAB/browse/master/includes/BabelBox/LanguageBabelBox.php (line 153), but I can not implement it.

I have problems with knowledge of the language.

Do you mean PHP?

I have problems with knowledge of the language.

Do you mean PHP?

Yes, I was talking about PHP.

Change 445539 had a related patch set uploaded (by Saint Johann; owner: Saint Johann):
[mediawiki/extensions/Babel@master] A simple implementation to ease Russian Wikipedia’s pains from using Babel that just parses the parameters for nocat=1 like it does already for plain=1.

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

@Amire80 Hello, can you review this patch, please?

Help, please, anybody. We are really need this patch.

Patch updated. jenkins-bot is agree with patch.

Patch updated. jenkins-bot is agree with patch.

Great news!

Patch updated. jenkins-bot is agree with patch.

Great news!

I hope somebody will merge it :)

@Amire80, @Nikerabbit can you help us to megre this patch? We really need it.

Hi,
Any information on the merge of this patch? This feature would be of great help for user category management on WP:FR.
Thanks, Epok

Boldly adding Language-Team as per the team's code review statement of intent. If I'm wrong please remove the tag and update the statement of intent.

An update of the statement is planned for January 2019.

An update of the statement is planned for January 2019.

Great news!

An update of the statement is planned for January 2019.

Hello, have you any news? :)

Not yet. January hasn't ended yet :)

OK, thanks :) We are waiting for you :)

Not yet. January hasn't ended yet :)

Hello, it is me again :) Dates have been changed?

We have updated our statement of intent and maintenance levels. Main change was about reducing our scope which included degrading support for Babel. We also agreed to try out some internal process changes with regards to reviews.

I understand that this might not be what you expected from this update. Since this discussion is not directly related to this task, please post possible comments or questions about this update on the talk page or other relevant channels rather than on this task.

We have updated our statement of intent and maintenance levels. Main change was about reducing our scope which included degrading support for Babel. We also agreed to try out some internal process changes with regards to reviews.

I understand that this might not be what you expected from this update. Since this discussion is not directly related to this task, please post possible comments or questions about this update on the talk page or other relevant channels rather than on this task.

Hm, ok, so, who can megre the patch?

Change 445539 abandoned by Saint Johann:
A simple implementation to ease Russian Wikipedia’s pains from using Babel that just parses the parameters for nocat=1 like it does already for plain=1.

Reason:
Sadly, don’t have resources or ability to do this at this time. If anyone wants to pick up on it, feel free to do so.

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

DannyS712 renamed this task from Addition "skipcat" or "supresscat" and "nocat" param for Babel-box to Addition "skipcat" or "suppresscat" and "nocat" param for Babel-box.Dec 21 2019, 2:22 AM

Change 881946 had a related patch set uploaded (by Pppery; author: Saint Johann):

[mediawiki/extensions/Babel@master] A simple implementation to ease Russian Wikipedia’s pains from using Babel that just parses the parameters for nocat=1 like it does already for plain=1.

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

Thanks @Pppery for claiming this task!
Hope it will be integrated!

Change 881946 merged by jenkins-bot:

[mediawiki/extensions/Babel@master] Support |nocat=true in Babel boxes

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

Many thanks for completing this task! This will be of great help to better manager language categories.

You have to write {{#babel:nocat=1|ru}} not {{#babel:ru|nocat=1}}. This will be addressed if T327847 ever goes anywhere.

You have to write {{#babel:nocat=1|ru}} not {{#babel:ru|nocat=1}}. This will be addressed if T327847 ever goes anywhere.

Do I understand correctly that there is no way to combine nocat and plain parameters?