Localize.drupal.org, a bad guy and The Holy Hammer

At the last Drupal Czech Translators Meetup we realized, that we had cuckoo in our translators group. Someone, apparently not Czech, uploaded to the localize.drupal.org translation server more than 3000 suggestions, which were only rough machine translations. Some of the machine generated suggestions were right, but it was only 1 hit from 10 or 20 shots... :-(

We were thinking how to remove all his suggestions as they were priceless and only makes the approval process harder. Unfortunetaly Localization server module which is used for community translation doesn't have any features which can be used for this kind of batch wipe operation. So I decided to make a bookmarklet - a script which automatically declines all suggestions from some bad user or spammer.

And here it is... a source code of the mighty Holy Hammer:

 * Holy Hammer - A machine gun for translation moderators at localize.drupal.org 
 * Author: Vojtech Kusy - www.vojtechkusy.com 
 * Version: 1.1 - 20.5.2010
var badAuthor = '';
var results = document.cookie.match ( '(^|;) ?hammeredauthor=([^;]*)(;|$)' );
if (results) badAuthor = (unescape(results[2]));
badAuthor = prompt('Enter name of author to be hammered:', badAuthor);
document.cookie = "hammeredauthor=" + badAuthor; 
$('.translation.is-declinable.filter-match').each( function(){
	var author = $('div.author a', this).text();
	if (author == badAuthor) {
		$('li.declined label input', this).attr('checked', 1).change();

Note that I'm using jQuery in the script. It is possible because translation server loads it during page load, so it is ready to use when you hit bookmarklet in your favorites toolbar.

Workflow is following:

  1. Use Localize interface and filter only suggestions from a "bad" user.
  2. Click on the bookmarklet in your browser toolbar. A prompt box appears asking the name of the "bad" user.
  3. If you fill it before, last value is offered as default (value is stored in the cookie).
  4. After you hit Ok, script automatically declines all suggestions from that user on the current page.
  5. Continue on the next page... and hammer'em all! Woo ha ha ha

The bookmarklet is here: Add this link - Holly Hammer - to your favorites bookmarks toolbar and name it Holy Hammer (or Witches' Hammer ?)

Please, use this bookmarklet with care, remember that this script is Holy. Discuss it with other translation moderators in your group before you are going to use it.

True Religion Outlet

لعبة زوما

I'm glad that you solved the

I'm glad that you solved the problem. I don't know why people do such things like messing up other people's work.

Love Spell

Thanks very much. I'll try it

Thanks very much. I'll try it on my Drupal website.

tup bebek doktoru

Thanks. That will be useful

Thanks. That will be useful for my dark poems Drupal website.


Really like this , Check out my site

Corian countertops

coach factory outlet online

coach factory outlet online sale, because I want you to accompany me for a lifetime! Coach Factory Outlet Online Sale shook his head, Lover's claim to despise Wangle Yan Tao coach factory outlet , one of the three girls all football into his arms, coach factory outlet online is proud to announce road.


I am Trying this Coding, Its Working Fine and very Informative information for Drupal Developers

Wedding Websites

This article is interesting

This article enhances my admiration for this website even more.
Contact: tienminhinfor@gmail.com - http://www.matkien.com

oh yeah, i like

Over view your article. It is very intesresting that more informative infor to read. thanks
contact: http://www.yowebnet.com (support@yowebnet.com)

لعبة زوما