Page MenuHomePhabricator

Move WikimediaShopLink's i18n messages to WikimediaMessages extension and move the Skin hook to wmf-config
Closed, ResolvedPublic

Description

Looking at the source of [[mw:Extension:WikimediaShopLink]], it's pretty small and can probably be merged into [[mw:Extension:WikimediaMessages]]. Thoughts?


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz55678

Event Timeline

bzimport raised the priority of this task from to Low.
bzimport set Reference to bz55678.

(In reply to comment #0)

Looking at the source of [[mw:Extension:WikimediaShopLink]], it's pretty
small
and can probably be merged into [[mw:Extension:WikimediaMessages]]. Thoughts?

With a configuration variable to enable it on en.wiki only, you mean? The shop is and probably will be en.wiki-only. We could also just undeploy the extension...

(In reply to comment #1)

With a configuration variable to enable it on en.wiki only, you mean? The
shop is and probably will be en.wiki-only. We could also just undeploy the
extension...

This extension is one of the very few places where it wouldn't be inappropriate to hard-code if dbname in ('enwiki', 'testwiki') or whatever. Perhaps.

I'm not sure this makes sense. The ShopLink extension is about using geolocation to conditionally add a link in the sidebar. WikimediaMessages is just a bunch of custom Wikimedia-specific messages. They both perform two different tasks, and IMO should be kept separate.

On a side note, it would be cool if the ShopLink extension was made into something more general for geo location things to replace ugly stuff like [[MediaWiki:Geonotice.js]]

(In reply to comment #3)

I'm not sure this makes sense. The ShopLink extension is about using
geolocation to conditionally add a link in the sidebar. WikimediaMessages is
just a bunch of custom Wikimedia-specific messages. They both perform two
different tasks, and IMO should be kept separate.

Geolocation or not, the extension's sole function, as I understand it, is adding a specific MediaWiki message to another specific MediaWiki message (the sidebar) on Wikimedia wikis. This is basically what WikimediaMessages was designed for: small customizations to the user interface specific to Wikimedia wikis.

On a side note, it would be cool if the ShopLink extension was made into
something more general for geo location things to replace ugly stuff like
[[MediaWiki:Geonotice.js]]

Hmmm, indeed. Though this is basically what the CentralNotice extension does (including geolocation). Perhaps the CentralNotice extension should simply have an "above the watchlist" option. Probably worth filing a bug, if you're interested.

(In reply to comment #4)

This is basically what WikimediaMessages was designed for:
small customizations to the user interface specific Wikimedia wikis.

Are you suggesting WikimediaMessages changes the MediaWiki:Sidebar message? That would get problematic as that would do it sitewide (instead of just testwiki/enwiki), and would not work in practice since wikis override that message already.

Change I92dac758901363 (for bug 57939) reduces the extension to just 2 i18n messages and inserting the link through a Skin hook.

What we could do (sorry if that's what you meant) is move those 2 i18n messages to WikimediaMessages extension, and move the Skin hook to wmf-config under a conditional as we have for other configurations (like wmgUseWikimediaShopLink is).

(In reply to comment #5)

What we could do (sorry if that's what you meant) is move those 2 i18n
messages to WikimediaMessages extension, and move the Skin hook to wmf-config
under a conditional as we have for other configurations (like
wmgUseWikimediaShopLink is).

Yeah, let's do this.

[Rephrasing summary to reflect on steps agreed on in comment 5 and 6]

Change 149785 had a related patch set uploaded by Legoktm:
Add WikimediaShopLink messages

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

Change 149787 had a related patch set uploaded by Legoktm:
Add WikimediaShopLink's SkinBuildSidebar hook directly

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

Change 149785 merged by jenkins-bot:
Add WikimediaShopLink messages

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

Change 149787 merged by jenkins-bot:
Add WikimediaShopLink's SkinBuildSidebar hook directly

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