Addition "skipcat" or "supresscat" and "nocat" param for Babel-box
Open, Needs TriagePublic

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}}

Kaganer created this task.Oct 6 2017, 10:49 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 6 2017, 10:49 AM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptOct 6 2017, 10:49 AM
Kaganer updated the task description. (Show Details)Oct 6 2017, 10:53 AM
Kaganer updated the task description. (Show Details)
Kaganer updated the task description. (Show Details)Oct 6 2017, 11:05 AM

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.

Kaganer updated the task description. (Show Details)Oct 6 2017, 4:13 PM

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:' ?

Iniquity added a subscriber: Iniquity.
Iniquity added a comment.EditedOct 13 2017, 1:42 PM

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)
Iniquity added a comment.EditedOct 26 2017, 4:16 PM

@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 updated the task description. (Show Details)Nov 24 2017, 11:23 AM
Iniquity triaged this task as High priority.Dec 13 2017, 12:21 PM

Can anybody help with it?

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

@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 :)

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

stjn added a subscriber: stjn.Thu, Jul 12, 9:36 PM

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