Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It's helpful for me to see the latest translation activity and who my top translators are. Plus, I think having these two blocks helps out the 'community' aspect as it recognizes both the top contributors and the people who have recently helped translate. It also gives me a chance to help glance and quick review the latest translations.
I could probably spruce these up a little more with configuration options and I'm not sure if I can link directly to the page for a specific translation string. But it's a start and I'm running these blocks on project.davereid.net just fine!
Comment | File | Size | Author |
---|---|---|---|
#13 | l10n_server_490020.patch | 4.26 KB | tobiasb |
#12 | l10n_server_blocks-490020-1-D6.patch | 3.56 KB | claudiu.cristea |
#11 | l10n_server_blocks-490020-D6.patch | 3.56 KB | claudiu.cristea |
#1 | 490020-blocks.patch | 13.57 KB | Dave Reid |
Comments
Comment #1
Dave ReidPatch attached for review. Sorry, my IDE auto-corrects trailing whitespace, so there's not too much I can do since I don't like to disable it. :)
Comment #2
Pasqualle+1
yes, especially a core committer should use a text editor which automatically removes trailing spaces. It is really bad to create and read patches like this. This is the no 2 reason when I want to contribute but I refuse to.. no 1 is the limited time..
Comment #3
pvasili CreditAttribution: pvasili commentedYou can make SQL queries on the PHP block. It's easy ;)
I think more useful to integrate in the VotingAPI (see at: http://drupaler.ru/translate/download)
Comment #5
Gábor HojtsyThe idea looks cool. However, to make this work on heavy duty sites like localize.drupal.org, we need to cache this data heavily.
Comment #6
podaroksubscribe
looking for adding counters for suggested+approved+declined+notapproved_suggestions for every user too...
Comment #7
claudiu.cristea@Gábor Hojtsy,
I think that implementing some cache clearing for native block caching may be enough. Administrators can enable the Block caching.
The default
BLOCK_CACHE_PER_ROLE
is suitable. We only have to implement:where the table
{l10n_community_translations}
get INSERTed/UPDATEd/DELETEed.Comment #8
Gábor Hojtsy@claudiu.cristea: given how often that table changes, that would be almost identical to no caching. We need to accept some staleness of that data at least. Maybe even include the date of generation in the block and leave it stale for a day or so.
Comment #9
podarokone day - is a good period for recalculation...
Comment #10
claudiu.cristeaComment #11
claudiu.cristeaThis patch add caching to #1.
Comment #12
claudiu.cristeaUps... There was a bug in the above patch...
Check this one...
Comment #13
tobiasbmy version
Comment #14
Gábor HojtsyLooking at the patch, I think the latest translations block is not useful at all on a server the scale of localize.drupal.org, because showing the last 10 strings and then caching for a day will not show much. To show the site activity, I think #599322: Add activity 2.x integration has a better objective / strategy (it also shows when people moderate, import a .po file, etc).
For the top contributors block, we already have this per group in l10n_group. It would be good to generalize this, maybe even make it a block and then reuse all around. There is also #587686: Add more granular contributor statistics about adding thing like "recent top contributors".
Comment #15
Gábor Hojtsy#245067: Display recent progress statistics as well is also related.