Several scripts have been braking on wiktionary-like wikis since forever, resulting in per-wiki hardcoded hacks.
Although exposing $wgCapitalLinkOverrides and/or $wgCapitalLinks directly is no good, a simple array that matches MWNamespace::isCapital would be nice.
The reason those config variables aren't useful rightaway is due to the logic behind MWNamespace::isCapital (ie. Media->File, $alwaysCapitalizedNamespaces, getSubject(), etc.)
Since this would probably end up in a loop, we can re-use the loop introduced in r90096 for wgNamespaceIds.
This bug is blocking proper integration of the mw.Title constructor, which currently (in UploadWizard) harccodes ucFirst() – not a big deal since it's targetting Wikimedia Commons, but for core it needs to be fixed.
ie. on a wiki with a case-sensitive main-namespace the following is happening that could be breaking many things:
var title = new mw.Title( 'apple' );
title.toString()
"Apple"
Version: 1.20.x
Severity: normal