Page MenuHomePhabricator

Allow localising content model names where model id includes uppercase chars
Closed, ResolvedPublic

Description

Names of content models can be localised by defining the message content-model-$model, which is used by ContentHandler::getLocalizedName, and gets shown in various interface messages, notably in Special:ChangeContentModel.

However, for cases where the model id includes uppercase characters (like in Scribunto, MassMessageListContent, GadgetDefinition, etc), adding the message causes the grunt-banana-checker build to fail. Example: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MassMessage/+/1005982

Proposed solution: modify ContentHandler::getLocalizedName to use the message content-model- .. strtolower( $model ) instead.

Event Timeline

Change 1005994 had a related patch set uploaded (by SD0001; author: SD0001):

[mediawiki/core@master] content: lowercase model name before looking up message

https://gerrit.wikimedia.org/r/1005994

Change 1005982 had a related patch set uploaded (by SD0001; author: SD0001):

[mediawiki/extensions/MassMessage@master] Allow localising content model name

https://gerrit.wikimedia.org/r/1005982

Change 1006105 had a related patch set uploaded (by SD0001; author: SD0001):

[mediawiki/extensions/Scribunto@master] Allow localising content model name

https://gerrit.wikimedia.org/r/1006105

Change 1006126 had a related patch set uploaded (by SD0001; author: SD0001):

[mediawiki/extensions/Flow@master] Allow localising content model name

https://gerrit.wikimedia.org/r/1006126

Change 1005994 merged by jenkins-bot:

[mediawiki/core@master] content: lowercase model name before looking up message

https://gerrit.wikimedia.org/r/1005994

Change 1006105 merged by jenkins-bot:

[mediawiki/extensions/Scribunto@master] Allow localising content model name

https://gerrit.wikimedia.org/r/1006105

Change 1006126 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Allow localising content model name

https://gerrit.wikimedia.org/r/1006126

Change 1005982 merged by jenkins-bot:

[mediawiki/extensions/MassMessage@master] Allow localising content model name

https://gerrit.wikimedia.org/r/1005982

SD0001 claimed this task.