As a group manager I would like to be notified when a fellow administrator approves a suggestion or when somebody deletes a string. Would it be possible to introduce such notifications?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

How / where should these notifications appear?

archetwist’s picture

Just like the existing ones - via e-mail.

Gábor Hojtsy’s picture

Ok, you might not be aware, but when you go through the Translate screen to compare and pick suggestions, the selection is saved via Ajax. So a normal rundown of that page would result in 10 emails immediately. Is that what you have in mind?

apaderno’s picture

10 emails sent just after viewing a page is not something I would desire. :-)

Gábor Hojtsy’s picture

Kiam: not after viewing but after moderating suggestions for those 10 strings displayed.

archetwist’s picture

OK, then maybe we could have something like a "History" tab? A log of suggestion approvals, corrections, etc. And I don't know if it's possible, but it would be nice to get periodic e-mail notifications (daily, weekly).

Gábor Hojtsy’s picture

Project: Drupal.org site moderators » Localization server
Version: » 6.x-1.x-dev
Component: Localize.drupal.org » Code

Moving to the right queue.

aries’s picture

As an extension of this request, a little textbox would be fine to explain the reason of the modification.

Gábor Hojtsy’s picture

Title: Notify of suggestion approvals and other activities » Build activity stream integration

I've been looking at http://drupal.org/project/activity and think that building activity stream integration into l10n_server would be the right choice. We'd need to figure out how to have a global stream (with things like 'Og 6.x-5.2 now available for translation' added to it on project release additions) and group specific streams with things like ("Joe imported a .po file with translations for Og, Og user roles and Views" and "Jane approved 10 suggestions").

The first type of activity would be easiest to include, since we know exactly when a project becomes available. Then this can be monitored by people who care about being up to date in certain project translations. The second type of activity sounds hardest, since we need to identify the projects related to a .po import (which can be numerous given the sharing of strings); so we'd include the top list of projects there. But this needs certain data mining. Finally, the last one could put a "summary" activity per half an hour or so, just so we do not have an activity per each moderation action... That would otherwise end up in hundreds of messages when someone approves/declines that many.

This sounds like a fun project and given the standardization of activity streams, a good way to integrate the visible activity to any other tools.

Gábor Hojtsy’s picture

#211727: OG Activity Module and #442238: Activity Integration with OG seems to be relevant to list activity per organic group.

Scott Reynolds’s picture

Activity2 is essentially a Action callback. So whats needed is Trigger implementation for the Activity that needs to be recorded and then Activity API implementation that provides metadata for the Action callback.

Activity2 leverages Views so once the messages are recorded it becomes somewhat of a trivial tasks to build streams using filters and arguments.

It is lacking OG integration at the current time but should be straight forward to write.

Gábor Hojtsy’s picture

@Scott: It would be great if you could help with adding OG integration to Activity. Both in terms of things like "[author] joined [group]" type of activities and the ability for l10n_server to submit group specific events. So we could have per-group activity listing, like who submitted stuff, who moderated stuff, etc. I believe porting OG integration from 1.x to 2.x in Activity would be worth it even without us needing it, but our need underlines it even more I guess :)

Scott Reynolds’s picture

Gábor Hojtsy’s picture

Yay, thanks Scott!

Gábor Hojtsy’s picture

Title: Build activity stream integration » Add activity 2.x integration
Status: Active » Needs review
Issue tags: +activity2-integration
FileSize
65.24 KB
5.98 KB

Here is an initial patch. Because activity works with triggers and tokens, we need to add support for triggers and some token module mapping as well. The added code handles these things respectively:

1. l10n_localpacks and l10n_project gets a (new) hook_l10n_community() invocation, where it tells the hook that a new release was parsed.

2. l10n_community implements hook_l10n_community() and handles this new release parsing op if trigger module is available. In this case, it runs all the actions registered for this trigger. (Activity module registers actions for the triggers present).

3. l10n_community implements the hook_hook_info() core hook, which informs the action system of the possible triggers (this makes l10n_community show up on the core actions UI).

4. l10n_community implements hook_activity_info(), where it tells activity module to expose Localization community activities. @todo: this includes a reference to the "l10n_community release" type, which makes that available for token placement in message templates, but also exposes the possibility to register message templates for "The release" (which is pointless as far as I understand)

5. l10n_community implements hook_token_list() and hook_token_values(), defining the "l10n_community release" object type and two basic tokens for this type.

Now given all this, if you have activity 2.x installed, you can set up an activity to fire when one connector module parses a release, and include the project + release title in the activity.

I'd love to get reviews especially from Scott, and would love to get a cleaner picture on how we can expose the release info in the activity without adding a dummy looking UI field for it:

SebCorbin’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

This is now a dead end as 6.x is discontinued and Activity module has no release on D7 and seems not maintained anymore.

We should have a look at Message or Heartbeat