wiki.techinc.nl/tests
Bartosz Dziewoński f7158c396d Add markup to page titles to distinguish the namespace and the main text
Pages outside of the main namespace now have the following markup in
their <h1> page titles, using 'Talk:Hello' as an example:

<h1>
  <span class="mw-page-title-namespace">Talk</span>
  <span class="mw-page-title-separator">:</span>
  <span class="mw-page-title-main">Hello</span>
</h1>
(line breaks and spaces added for readability)

Pages in the main namespace only have the last part, e.g. for 'Hello':

<h1>
  <span class="mw-page-title-main">Hello</span>
</h1>

The change is motivated by a desire to style the titles differently on
talk pages in the DiscussionTools extension (T313636), but it could
also be used for other things:
* Language-specific tweaks (e.g. adding typographically-correct spaces
  around the colon separator: T249149, or replacing it with a
  different character: T36295)
* Site-specific tweaks (e.g. de-emphasize or emphasize specific
  namespaces like 'Draft': T62973 / T236215)

The markup is also added to automatically language-converted titles.

It is not added when the title is overridden using the wikitext
`{{DISPLAYTITLE:…}}` or `-{T|…}-` forms. I think this is a small
limitation, as those forms mostly used in the main namespace, where
the extra markup isn't very helpful anyway. This may be improved in
the future. As a workaround, users could also just add the same HTML
markup to their wikitext (as those forms accept it).

It is not also added when the title is overridden by an extension
like Translate. Maybe we'll have a better API before anyone wants
to do that. If not, one could un-mark Parser::formatPageTitle()
as @internal, and use that method to add the markup themselves.

Bug: T306440
Change-Id: I62b17ef22de3606d736e6c261e542a34b58b5a05
2022-08-16 23:36:21 +00:00
..
api-testing Move knowledge about the attribs array out of TransformContext 2022-07-22 12:12:55 +00:00
common Merge "Add *ContentHandlerIntegrationTest" 2022-07-28 13:55:49 +00:00
parser Add markup to page titles to distinguish the namespace and the main text 2022-08-16 23:36:21 +00:00
phpunit Add markup to page titles to distinguish the namespace and the main text 2022-08-16 23:36:21 +00:00
qunit mediawiki.base: Test importScript and re-use internal wikiUrlencode() 2022-08-16 12:40:31 +00:00
selenium wdio-mediawiki: Release 2.1.0 2022-05-19 13:45:00 +02:00
.htaccess