mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
c8536f1a71
There are 2 situations: 1. Either the template name is used in a [[…]] link. In this case we must provide the namespace. MWTemplateModel.getTitle() does this. However, it's not a mw.Title object and therefor not really guaranteed to be a valid title. This is fine. The worst thing that can happen is that the link points to an error message. But this should be entirely unreachable anyway. 2. Some messages want to display the name of the template. Ideally without the namespace. That's what MWTemplateSpecModel.getLabel() is for. Again this is not guaranteed to be a valid mw.Title. But it doesn't need to. It's only used as a label. Change-Id: I03d0481201620a2f5c444ee32b656bcaade98aac |
||
---|---|---|
.. | ||
ve-mw | ||
ve-mw-collab |