Last modified: 2014-07-24 21:10:58 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 T65588, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63588 - wgFlowTermsOfUseEdit should be replaced with a message
wgFlowTermsOfUseEdit should be replaced with a message
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-06 08:21 UTC by Ori Livneh
Modified: 2014-07-24 21:10 UTC (History)
7 users (show)

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


Attachments

Description Ori Livneh 2014-04-06 08:21:54 UTC
There are two things wrong with wgFlowTermsOfUseEdit:

1) It is injected into every page.
2) It is not actually a configuration variable, but an interface message.

Both problems would be resolved by making the terms of use be an interface message associated with the relevant module.
Comment 1 spage 2014-04-24 07:29:01 UTC
It's a config variable so that the message can be overridden by extension:WikimediaMessages for WMF-specific terms of use, bug 60704.  Yes it shouldn't be on every page. Either handle the hook in an object that knows whether Flow is enabled; or set these variables by calling $out->addJsConfigVars() in Flow board initialization code; or, bug 61448 is a cleaner way to do this using new MessageCache::get hook.

This gets worse in 1.24wmf2 because close/summarize topic functionality adds similar wgFlowTermsOfUseCloseTopic, wgFlowTermsOfUseSummarize, and  wgFlowTermsOfUseReopenTopic variables to every page.
Comment 2 Ori Livneh 2014-04-29 19:36:04 UTC
Could you please assign this a higher priority?
Comment 3 Erik Bernhardson 2014-04-29 21:03:41 UTC
Unfortunately these are interface messages, they are rendered in the backend and passed pre-rendered to the frontend because WikimediaMessages extension, imo, is a complete kludge.

If your not familiar the WikimediaMessages extension is what is used to replace generic i18n messages with wikimedia specific ones.  It works by passing your i18n keys by reference into a hook and allowing it to mutate them however it feels like.  This basically means the list of messages provided to resource loader has to become dynamic rather than static.

I'm open to suggestions, but the only one I have right now is the throw away WikimediaMessages and write an extension that actually replaces the i18n values without the application knowing the difference.  But I don't have any time to write that.
Comment 4 Erik Bernhardson 2014-04-29 21:04:02 UTC
I should add that was all response to 2), step 1 can and will be fixed.
Comment 5 bsitu 2014-07-24 21:10:58 UTC
This was resolved during the frontend rewrite.  terms are removed from global vars and now interface message for templating module

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


Navigation
Links