Last modified: 2014-07-23 20:46:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43259, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41259 - Banner content code reuse is lower than it should be
Banner content code reuse is lower than it should be
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
CentralNotice (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2012-10-21 16:01 UTC by Adam Wight
Modified: 2014-07-23 20:46 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Adam Wight 2012-10-21 16:01:35 UTC
This is a bit unfair to file as a bug... but the way CN is used, large blocks of style and other elements are copied between banners.  For many reasons, all this stuff should be saved in a template and only the things which are actually changed should be in each banner text.

Looking through meta CN, I think I've identified an obstacle, and addressed with commit https://gerrit.wikimedia.org/r/28913  -- I found that the common elements never (?) included "message fields", possibly because of a quirk in the translation interface, possibly due to misunderstanding.

The message fields serve as named template parameters, basically.  We should be able to get a lot more use out of this mechanism before resorting to copy n paste.
Comment 1 Adam Wight 2014-07-09 17:15:21 UTC
We've deployed another feature which should help with the code reuse issue:
https://www.mediawiki.org/wiki/Extension:CentralNotice/Banner_mixins

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links