The list of top contributors on the language landing page is a very good idea, and will hopefully inspire to some friendly competition to try to get to the top of the list. In order to encourage new arrivals, and to encourage veteran translators not to rest on their laurels, I suggest the list gives information about, and is sorted by, recent contributions. For instance:

People with most approved translations

  • newandrisingstar - 400 translations last 30 days (400 total)
  • anothertranslator - 398 translations last 30 days (1257 total)
  • oldveteran - 0 translations last 30 days (3456 total)

It would also be an encouragement to see recent progress in the "Progress status" box, so:

  • 3511 translations recorded (798 last 30 days)

The chosen chunk of time need not be exactly 30 days, of course, that's just a reasonably round number which seems about right.

Comments

Gábor Hojtsy’s picture

Well, great idea. I'd love to add such a feature, so looking into whoever help implementing it :)

dami’s picture

Along the line of encouraging new contributors, it may be helpful to display a 'Most suggestions submitted' block as well.
It'd also be useful to have a kind of acknowledgment page, where all contributors are listed (display user name along with how many suggestions were submitted by the user, and how many were approved etc.)

pvasili’s picture

2 zirvap You can not get all the data.
What do you want to get? Write to the(you) task. I try to make a snippet ;)
See: http://drupaler.ru/translate (at the bottom), http://drupaler.ru/translate/heroes, #200927: Some statistics ;)

zirvap’s picture

Thanks for the offer, and sorry for being so late to answer!

Could you make a snippet which will show how many translations each user has added during the last 30 days?

It does not have to be exactly 30 days, if some other amount of time would be easier to count. For instance, if it's easier to count translations for the current month that would be fine.

I also like http://drupaler.ru/translate/heroes -- how did you make that?

pvasili’s picture

This code for all user:

  $l10n_string_heroes  =  db_query("SELECT COUNT( DISTINCT s.sid ) num,  u.uid id, u.name  users FROM {l10n_community_translation} s LEFT JOIN {users} u ON s.uid_entered = u.uid WHERE s.is_active =1 AND s.uid_entered != 0 AND s.is_suggestion = 0  GROUP BY s.uid_entered ORDER BY num DESC");
  // s.uid_entered != 0 - not anonimouse
  $out = " <br />Our heroes(records):<br />";
  while ($l10n_string_heroe = db_fetch_object($l10n_string_heroes)) {
    $out .=  l($l10n_string_heroe -> users, 'user/'.$l10n_string_heroe -> id,NULL,NULL,NULL,TRUE,TRUE) . "  (<strong>" .  $l10n_string_heroe->num  . "</strong>),<br />  ";
  }
  echo $out;

and for 30 days

"... AND s.is_suggestion = 0
 /*added string */
AND DATE_ADD(FROM_UNIXTIME(s.time_entered), INTERVAL 4 WEEK) > now()  /* 34 DAY, 3 MONTH, 2 YEAR, .... */
/* end added */
GROUP BY s.uid_entered   ..."

zirvap’s picture

Thanks! :-)

I didn't get it to work with "WEEKS" but "DAYS" worked fine.

pvasili’s picture

meba’s picture

Status: Active » Postponed (maintainer needs more info)

I have looked into this and maybe in regard to this late time, I think it is not easy to determine this together. I would suggest to do 2 blocks:
- Top contributors
- Top contributors over 30 days

What do you think?

zirvap’s picture

I think that sounds fine.

Gábor Hojtsy’s picture

Status: Postponed (maintainer needs more info) » Active

These SQL queries tie the module to MySQL explicitly. Although there might be MySQL only constructs in the module already, it does not seem hard to skip MySQL only functions here. time_entered is a Unix timestamp, so substracting 30*24*60*60 from time() is doable in PHP and this constant can be used for comparing to time_entered.

Gábor Hojtsy’s picture

Title: Add information about recent progress to statistics » Display recent progress statistics as well
Version: 5.x-1.0-alpha3 » 6.x-1.x-dev
Component: Miscellaneous » User interface
Status: Active » Needs work

If people are still interested, it would be good to put this code to a patch with the above suggestions implemented. Looks like a worthwile thing to empower hopefully more contributors.

franz’s picture

+1 to extended stats