Commit graph

2412 commits

Author SHA1 Message Date
Translation updater bot dc631c2c30 Localisation updates from https://translatewiki.net.
Change-Id: Ib4970b553112e0bc472c17a9fa5213ca294869b5
2015-12-07 23:12:54 +01:00
matejsuchanek c4b41a3f60 Add Czech alias of Special:Notifications
Change-Id: I63ae5316d4493798907ef995b091feb2e304c453
2015-12-07 17:21:16 +01:00
Translation updater bot 0e72980c55 Localisation updates from https://translatewiki.net.
Change-Id: I1b027cdb662e93abb9822d59446425841460260c
2015-12-06 21:43:04 +01:00
Translation updater bot f225059d5f Localisation updates from https://translatewiki.net.
Change-Id: I9422137fb1430fd4fdfc05cdc741cdc36356af14
2015-12-05 23:10:19 +01:00
Stephane Bisson e0cf7ea74c Balance brackets in en.json
The problem was introduced by I1cd7caa7bfe811bab89a0c6950c1aeaf1739aac6

Change-Id: I81def611127f0f438764f8aea19e7f2d5c47d969
2015-12-05 11:57:32 -05:00
Stephane Bisson 14b842bd34 Add gender support for the viewing user for mention notification
Bug: T119321
Change-Id: I1cd7caa7bfe811bab89a0c6950c1aeaf1739aac6
2015-12-04 16:53:11 -05:00
Stephane Bisson 65638384fc Normalize links in Special:Notifications formatter
Change-Id: I35354a3b27a59ee9740c6330bb3df22a8f7d6093
2015-12-03 11:11:15 -05:00
jenkins-bot b813835907 Merge "Allow grouping for getBundleCount()" 2015-12-02 21:56:04 +00:00
Translation updater bot 993a221bff Localisation updates from https://translatewiki.net.
Change-Id: I8da2bdf15e3d8ec29eec8c9b5f6fab0e6ebda526
2015-12-02 21:55:22 +01:00
Roan Kattouw 52f4b91204 Allow grouping for getBundleCount()
Presentation models that display the number of bundled notifications
typically group these by a property like agent or page ID. For example,
every edit someone makes to a user talk page generates an event,
so there could be 5 edit-user-talk events by only 2 distinct users;
in that case we want to display "Foo and 1 other user left a message",
not "Foo and 4 other users".

With this change, a presentation model that wants such behavior
can pass a callback to getBundleCount() that retursn the user ID, which
will cause getBundleCount() to return the number of distinct
users rather than the total number of notifications.

Change-Id: I79c8dd14277eff0d2ec27f155b1d13dca1e571a8
2015-12-02 08:16:19 -08:00
Translation updater bot ac316bdb47 Localisation updates from https://translatewiki.net.
Change-Id: Ia84b43f60fcc9edb046aae3de736cca9a57f5714
2015-12-01 21:32:53 +01:00
jenkins-bot 434a034120 Merge "Special:Notifications formatter" 2015-11-30 21:30:05 +00:00
Translation updater bot 948a73db24 Localisation updates from https://translatewiki.net.
Change-Id: I7fa863505528c440a66431972d4c8432d61a3667
2015-11-30 21:33:34 +01:00
jenkins-bot 7dc40bc160 Merge "Get bundled notifications count" 2015-11-30 20:12:38 +00:00
Translation updater bot f9ae56803b Localisation updates from https://translatewiki.net.
Change-Id: I6813e6317091afed8869bba04892790be92e465a
2015-11-28 21:44:21 +01:00
Stephane Bisson 259effc235 Get bundled notifications count
Utility functions to get the count of bundled notifications
for display and plural purposes.

Change-Id: I74d5ad244dec337a94e59c2118c33e474cd76797
2015-11-27 14:28:35 -05:00
Translation updater bot f4d42418ab Localisation updates from https://translatewiki.net.
Change-Id: I3435f92748712fe7b2c6d4f29a2468d3e0be6f1d
2015-11-26 22:00:10 +01:00
jenkins-bot a8171d1f75 Merge "EventPresentationModel: Cache the result of getBundledEvents()" 2015-11-25 18:39:01 +00:00
Roan Kattouw 104075d2d4 EventPresentationModel: Cache the result of getBundledEvents()
Change-Id: I83ce3b7754055dd494fcde41f043144294da2f3f
2015-11-25 10:33:47 -08:00
Kunal Mehta 2892108b65 Special:Notifications formatter
I'm not really sure where to stick the primary link. I could wrap the
entire notification in a <a> tag, but all the text becomes ugly (I
suppose we could hack around it with CSS?). For now I just added it
before all the secondary links.

Change-Id: I4f6add9ecfb367660d1a6346825382ad415bdb77
2015-11-25 10:22:04 -08:00
Roan Kattouw 23734e3539 Follow-up b85f978ddd: don't check for the non-existent CentralAuth class
Change-Id: Ie7ca022c659f9856641aaec6183eadf8a86865a2
2015-11-24 19:34:27 -08:00
Translation updater bot 1641275d50 Localisation updates from https://translatewiki.net.
Change-Id: I6242d71101507bc41489e415371d5c6e8e21a7e7
2015-11-24 23:08:01 +01:00
jenkins-bot 046537f6b4 Merge "Add a global overlay to Echo" 2015-11-24 18:54:18 +00:00
jenkins-bot cdee3093b3 Merge "Add secondary link details: icon & description" 2015-11-24 18:54:15 +00:00
Kunal Mehta 5be28ba4df Require a User object to be passed to EchoEvent::userCan()
All callers were already doing this.

Change-Id: If9e20e3d4740bcdb8842592e4cd988f8b35e1300
2015-11-23 16:08:17 -08:00
jenkins-bot 6eba89d400 Merge "Add accessor for bundled events in EventPresentationModel" 2015-11-23 23:43:41 +00:00
Kunal Mehta 9057196d21 Add accessor for bundled events in EventPresentationModel
The implementation of this sucks as the presentation model
should not be making database queries. But the API it provides
is what we want and will be supported even if the backend
implementation is changed.

Change-Id: Ifd0d11260990fd0e00e8f32eee273f9717d3e1fb
2015-11-23 15:13:31 -08:00
Translation updater bot ec8ab4f729 Localisation updates from https://translatewiki.net.
Change-Id: I81f2c1c30cc49c5251a8f82405e6a95ad50ee1ed
2015-11-23 22:32:04 +01:00
Moriel Schottlender 7d419bd128 Add a global overlay to Echo
This is preparing for nested popups inside the master popup.

Change-Id: I3bb86acd1bf841d5b27018565f5aa8f4a3295d9d
2015-11-23 18:47:57 +00:00
Matthias Mullie 30dcfeaa9e Add secondary link details: icon & description
We should probably merge this ASAP now that a lot of presentation
models still have to be implemented. There's a bit of B/C code that
will take care of the previous format, but it would be nice to be
able to remove that soon.

Meanwhile I've also changed getPrimaryLink to follow the same format.

Bug: T115421
Change-Id: Ic18a050d2ee0239f287a6d55c572df6f8aebb59a
2015-11-23 16:10:52 +00:00
Translation updater bot 7ff1f7492a Localisation updates from https://translatewiki.net.
Change-Id: Ia96ca46d28ae1f2ae2ce5e6afb630d2dd7b26fe6
2015-11-22 20:43:17 +01:00
jenkins-bot f875dfc191 Merge "Track what wikis a user has unread notifications on" 2015-11-21 00:05:44 +00:00
Kunal Mehta b85f978ddd Track what wikis a user has unread notifications on
This implements a backend layer and database storage for tracking what
wikis a user has unread notifications on. It is not yet exposed via any
API.

Whenever the notification counts on the local wiki are reset, a deferred
update is queued to also update the central database table.

Change-Id: Id1498bdeb5811d6848dc66781ffca03e726eab90
2015-11-20 15:54:11 -08:00
jenkins-bot 0416f39e68 Merge "Expose more data through API" 2015-11-20 23:41:55 +00:00
jenkins-bot 7a68a05083 Merge "Prevent link color on hover for the body ("payload") as well as the header" 2015-11-20 23:39:37 +00:00
jenkins-bot acdcdb29f0 Merge "Remove styling for nonexistent mw-echo-title-heading class" 2015-11-20 23:38:58 +00:00
Translation updater bot 72f7e4977c Localisation updates from https://translatewiki.net.
Change-Id: Ic0b0500a67c53837b0d189ae3e8076e6f08dac63
2015-11-20 22:55:15 +01:00
Matthias Mullie 0ef4df8e15 Expose more data through API
Instead of relying on the frontend to render, this enables the frontend
to do it.

The API will now accept a new format: 'model', which is basically the
presentation model's data in json format.

Some of the render code is currently only in the backend (e.g. get icon
path from icon type) so other api formats will stay available. At some
point, however, we may be able to kill those.

Bug: T115418
Change-Id: Ibc3ad54c94d6ea9bf751f3927cf69e1d062f4780
2015-11-20 19:27:34 +00:00
jenkins-bot 6bb3738812 Merge "Change the naming of 'notification option' to 'notification item' widgets" 2015-11-20 00:58:16 +00:00
jenkins-bot 8db241e328 Merge "Add a NetworkHandler as a central API authority to Echo" 2015-11-20 00:55:01 +00:00
Moriel Schottlender 4bbaf77c2a Change the naming of 'notification option' to 'notification item' widgets
This is in preparation of adding more item models and widget types,
and in preparation of switching the notification widget away from being
a select widget.

Change-Id: I518fb3d80f4f67d677c21ca5593638269acfa544
2015-11-19 16:52:04 -08:00
Kunal Mehta 8c49a812e1 Unstub $wgLang in BasicFormatter::getLanguage() too
Bug: T118542
Change-Id: Ic9f3c03a3f1d38f2ea420cf32dcd3bb33d6c3635
2015-11-19 16:34:13 -08:00
Moriel Schottlender 24a8bc23ef Add a NetworkHandler as a central API authority to Echo
This is in preparation for dealing with cross-wiki notifications
where we may need several types of operations to extract bundled
notifications from local and external APIs.

Also, renamed files:
* mw.echo.dm.AbstractAPIHandler -> mw.echo.dm.APIHandler
* mw.echo.dm.APIHandler -> mw.echo.dm.LocalAPIHandler
* All API-related handler files moved to their own folder
  for better organization.

Change-Id: Ib730c780ea52c93a6026c5d0b22012b6f39bb50d
2015-11-19 15:25:03 -08:00
Translation updater bot 85943737b3 Localisation updates from https://translatewiki.net.
Change-Id: I273cf2ae0270089a437579510819e03ec4d0979e
2015-11-19 21:35:25 +01:00
Kunal Mehta a00628b42a EventMapper::fetchByUserBundleHash(): Always return an array
It's basically impossible for DatabaseBase::select() to return false now
that ignoreErrors() is protected. So always return an array so callers
don't have to worry about false.

And remove a test that checked the result if DatabaseBase::select() did
return false.

Change-Id: I9ca8511585403d8c0ec262898ad4e61c2b038d51
2015-11-19 10:12:43 -08:00
Roan Kattouw c8d0115fd5 Prevent link color on hover for the body ("payload") as well as the header
Change-Id: Id221af75ed76122b03f741c184053e73bd2f4ee5
2015-11-18 20:10:40 -08:00
Roan Kattouw 8e46160210 Remove styling for nonexistent mw-echo-title-heading class
Change-Id: Ia1ce2889ec0e740d0fcc7d49809d5c64d24a696c
2015-11-18 20:07:53 -08:00
jenkins-bot 904e1e5a8c Merge "Presentation model for reverted" 2015-11-19 00:55:46 +00:00
Translation updater bot 08c3927cdf Localisation updates from https://translatewiki.net.
Change-Id: Ifa294aa5da19e1ca2aaae0e818bf673912f4a63b
2015-11-18 21:57:28 +01:00
jenkins-bot 9c40143cef Merge "Presentation model for email-user" 2015-11-18 18:42:00 +00:00