--- catfish.orig.py 2010-05-10 03:59:48.802456485 +0700 +++ catfish.py 2010-05-10 05:18:10.673938686 +0700 @@ -12,7 +12,7 @@ import sys try: - import os, stat, time, md5, optparse, subprocess, fnmatch, re + import os, stat, time, hashlib, optparse, subprocess, fnmatch, re import gobject, pygtk pygtk.require('2.0') import locale, gettext, gtk, gtk.glade, pango @@ -690,7 +690,9 @@ messages.append([_('No files were found.'), None]) status = _('No files found for "%s".') % keywords else: - status = _('%s files found for "%s".') % (len(listmodel), keywords) + status = gettext.ngettext('%(n)s file found for "%(q)s".', \ + '%(n)s files found for "%(q)s".',len(listmodel)) \ + % {"n":len(listmodel), "q":keywords} for message, action in messages: icon = [None, self.get_icon_pixbuf(status_icon)][message == messages[0][0]] listmodel.append([icon, message, -1, None, action]) @@ -713,7 +715,7 @@ def get_thumbnail(self, path, icon_size=0, mime_type=None): """Try to fetch a small thumbnail.""" - md5_hash = md5.new('file://' + path).hexdigest() + md5_hash = hashlib.md5('file://' + path).hexdigest() filename = '%s%s.png' % (self.folder_thumbnails, md5_hash) try: return gtk.gdk.pixbuf_new_from_file(filename) --- po/messages.bak 2010-05-10 05:05:41.185948319 +0700 +++ po/messages.pot 2010-05-10 05:00:25.609909586 +0700 @@ -86,7 +86,8 @@ msgid "No files were found." msgstr "" -msgid "%s files found for \"%s\"." +msgid "%(n)s files found for \"%(q)s\"." +msgid_plural "%(n)s files found for \"%(q)s\"." msgstr "" msgid "Fatal error, search was aborted."