Page MenuHomePhabricator

Auto-Capitalizing titles' first-letter in wikis
Open, Needs TriagePublic

Description

AWB is forcing autocapitalization of first-letter of pages' title in wikis, except on the wikitionnary due to the line 733 at Variables.cs (if I guessed right). But the problem is that you can't tell AWB to not "first-auto-capitalize" titles in custom wikis, which would be useful for dicoado.org (for example) which is a french wikitionnary for children.

We need to add something like a check box to disable autocapitalization of the titles' first-letter.

Event Timeline

Raphoraph renamed this task from Auto-Capitalizing titles in wikis to Auto-Capitalizing titles' first-letter in wikis.Jun 6 2020, 3:30 PM

We can actually get it from the MW API - https://en.wiktionary.org/w/api.php?action=query&meta=siteinfo&siprop=general%7Cnamespaces%7Cnamespacealiases%7Cstatistics

"case": "case-sensitive",

Based on this PHP config of https://www.mediawiki.org/wiki/Manual:$wgCapitalLinks

		// 'case-insensitive' option is reserved for future
		$data['case'] = $config->get( 'CapitalLinks' ) ? 'first-letter' : 'case-sensitive';

But then it can vary per NS on a wiki

"6": {
    "id": 6,
    "case": "case-sensitive",
    "canonical": "File",
    "*": "File"
},
"7": {
    "id": 7,
    "case": "case-sensitive",
    "subpages": "",
    "canonical": "File talk",
    "*": "File talk"
},
"8": {
    "id": 8,
    "case": "first-letter",
    "subpages": "",
    "canonical": "MediaWiki",
    "namespaceprotection": "editinterface",
    "*": "MediaWiki"
},
"9": {
    "id": 9,
    "case": "first-letter",
    "subpages": "",
    "canonical": "MediaWiki talk",
    "*": "MediaWiki talk"
},

https://fr.dicoado.org/wiki/api.php?action=query&meta=siteinfo&siprop=general%7Cnamespaces%7Cnamespacealiases%7Cstatistics

"case": "first-letter",

Which means $wgCapitalLinks = true (the default).

Your wiki seems to be misconfigured.

This comment was removed by Raphoraph.

I got it. We don't use $wgCapitalLinks but wgCapitalLinkOverrides. But this is ignored by AWB, as it doesn't use the data par namespace.
So one fix would be for us to use wgCapitalLinks (will try it), and for AWB to adapt accordingly to data per namespace.
Thanks for your time!

So one fix would be for us to use wgCapitalLinks (will try it), and for AWB to adapt accordingly to data per namespace.

Or if you set $wgCapitalLinks = false, AWB will follow it, and then you can use $wgCapitalLinkOverrides to turn this off for the NS you dont' want it to be the case. Basically, invert your current config.

AWB then won't change the capitalisation for anything on the wiki.