In talking on IRC, it was discussed that being able to customize the link capitalization per namespace might be helpful. In trying to implement this, I wrote a new method (Namespace::isUpperCaseNS). However, in trying to implement it, I ran into several issues:
- At a few points, $wgCapitalLinks is invoked before a namespace has been selected, as a ucfirst/lcfirst is often applied before passing it to Title::newFromText(). In some cases (such as Special:Upload and FileRepo), it is easy to guess it. However, a few places make it hard to figure it out.
- I haven't encountered an issue with this yet, but I didn't know if having it /per/ namespace might have an issue. If one made their content namespace upper, and their associated talk namespace free-form, would this cause any issues in seemingly unrelated areas?
I'm not sure what to do about those places where no namespace has been initialized. As for the second issue, to prevent the issue of mis-matched cases between content/talk, I was thinking of requiring that the namespaces be somehow required in pairs to be upper or free-form.
Hopefully I can submit a patch for this later today.