Page MenuHomePhabricator

Do not add/remove spaces in citation templates in cswiki
Closed, ResolvedPublic


edits changing spaces in citation templates (cosmetic changes) like this are not wanted by the community. Please do not change spaces in existing parameters, or change it as wanted in most cases (one space before and after = and one space after |).

Also, it'll be useful if you can add just one space before and after = in newly added parameters as well.

Thank you,

Event Timeline

Urbanecm created this task.Aug 2 2018, 7:59 PM
Restricted Application added a project: User-Urbanecm. · View Herald TranscriptAug 2 2018, 7:59 PM
Cirdan added a subscriber: Cirdan.Aug 4 2018, 8:44 AM

@Cyberpower678 Can this be fixed for now by editing the template configurations on the management interface to include spaces? Then I'm happy to take a look at it.

@Urbanecm Are you referring to the multiline templates? IABot adapts formatting practices as best as possible based on its analysis of how the template is formatted. There's not really much that can be done here. Fulfilling the request would very likely create lots of problems on the other wikis.

Yes, multiline templates. Well, isn't neither adding spaces to have = under each other nor space=space standard, so it is invalid in both ways. I don't know why modifying the parameters to look like this should help the formatting.

|jméno            = 
|odkaz na autora   = 
|titul             = Resolution adopted by the General Assembly: 66/18. Jerusalem
|url               =
|datum vydání    = 2011-11-30
|datum aktualizace = 
|datum přístupu  = 2016-09-08
|vydavatel         = United Nations
|jazyk             = anglicky
|url archivu       =

Also, I see no reason why this functionality cannot be based on something in wiki configuration, similary to how PWB cosmetic changes works, you can use it or disable it, up to you. Thank you.

I for one think it makes it a whole lot more readable when the values are lined up like that. The issue I see here is that the UTF-8 chars consume more bytes thus throwing the string length counter off when aligning them. The bot will be moving over to Citoid config values in the future for determining default formatting. To explain what happens, when the bot detects a multiline template with inconsistent spacing for each value, it will default to "multiline-pretty" and just make the template more readable in the wiki text as it can't tell how to space it. If it notices a consistent pattern, it will try to use that and bring the rest of that template to use that spacing style.

Maybe your bot do not know all existing consistent patterns :). Most templates looks like this rather than the previous example. Those templates are displayed like this even in documentation (see as one example). Can this pattern be added, please?

| příjmení = 
| jméno = 
| odkaz na autora = 
| titul = Resolution adopted by the General Assembly: 66/18. Jerusalem
| url =
| datum vydání = 2011-11-30
| datum aktualizace = 
| datum přístupu = 2016-09-08
| vydavatel = United Nati

They're not pre-programmed patterns. The bot uses an algorithm to try and determine the pattern.

Wang_Qiliang moved this task from Backlog to To deploy on the User-Urbanecm board.Aug 17 2018, 2:25 PM
Urbanecm moved this task from To deploy to Created on the User-Urbanecm board.Aug 19 2018, 11:22 AM
Dvorapa updated the task description. (Show Details)
Dvorapa added a subscriber: Dvorapa.
Dvorapa added a comment.EditedSep 2 2018, 11:22 AM

@Cyberpower678 The problem is that refToolbar, Citoid and VE (based on TemplateData) and Pywikibot all work with format like
| param = value. IABot doesn't take TemplateData into account at all, which is inacceptable. Then wars like this happens:

User123 (VE + Citoid based on TemplateData)
{{Citace monografie
 | url =
User456Bot (Pywikibot) /fixlink/
{{Citace monografie
 | url =
IABot /source not found/
{{Citace monografie
 |url                  =
}}{{Nedostupný zdroj}}
User456Bot (Pywikibot) /fixlink + cosmetic changes/
{{Citace monografie
 | url =
JAnD added a subscriber: JAnD.Sep 2 2018, 6:41 PM

Can this be given priority please?

There was request to stop bot until this is resolved. Various members of the community reported this bug, so I consider this enough to take this as a blocking bug for It is very useful bot, but having a temp bot just fixing this isn't a good idea.

As you have done already, the bot can be enabled and disabled through the Bot runpages on the Management Interface.

I believe a re-parsing of the template definitions might be sufficient, but that's something only @Cyberpower678 as the developer can do.

Cyberpower678 triaged this task as Medium priority.Sep 7 2018, 1:37 PM
Dvorapa rescinded a token.Feb 21 2019, 12:05 AM
Dvorapa awarded a token.
Dvorapa added a comment.EditedFeb 21 2019, 12:07 AM

Meh such a small issue and we can not use IABot for Arkive links

Fixed in beta11. There was an error in detecting multiline formats that are inconsistent. It thought all multilines were inconsistent.

Cyberpower678 closed this task as Resolved.Feb 23 2019, 3:04 AM