Commits

Vladimir Kolev committed affccc0

gSharkDown is now translatable, so if you want you can translate it in your
language using the gsharkdown.pot file.

Comments (0)

Files changed (9)

-0.3.2
+0.3.3

data/about_dialog.ui

-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
 <interface>
   <requires lib="gtk+" version="2.18"/>
   <!-- interface-naming-policy project-wide -->
   <object class="GtkAboutDialog" id="aboutdialog1">
-    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">About GrooveDown</property>
     <property name="window_position">center-on-parent</property>
     <property name="icon">gsharkdown_64.png</property>
     <property name="type_hint">dialog</property>
     <property name="program_name">gSharkDown</property>
-    <property name="version">0.3.2</property>
+    <property name="version">0.3.3</property>
     <property name="copyright" translatable="yes">(c) Vladimir Kolev 2011</property>
     <property name="comments" translatable="yes">Gnome-toolkit based desktop application for downloading music files from Grooveshark.com</property>
     <property name="website">https://bitbucket.org/vkolev/gsharkdown</property>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
         <child>
           <object class="GtkVBox" id="vbox1">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <child>
               <object class="GtkHBox" id="hbox1">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkImage" id="image1">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="stock">gtk-dialog-warning</property>
                     <property name="icon-size">6</property>
                   </object>
                   <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Downloading mp3s is illegal in some countries! Please check the low in your country.&lt;/b&gt;</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Downloading mp3s is illegal in some countries! Please check the law in your country.&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
                     <property name="justify">center</property>
                     <property name="wrap">True</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkHButtonBox" id="hbuttonbox1">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <property name="spacing">90</property>
                 <property name="layout_style">end</property>
                 <child>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="image">image3</property>
                   </object>
                   <packing>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
                     <property name="tooltip_text" translatable="yes">Flattr gSharkDow</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="image">image2</property>
                     <property name="relief">none</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="fill">True</property>
             <property name="position">3</property>
           </packing>
         </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
       </object>
     </child>
   </object>
   <object class="GtkImage" id="image2">
     <property name="visible">True</property>
-    <property name="can_focus">False</property>
     <property name="pixbuf">flattr-badge-large.png</property>
   </object>
   <object class="GtkImage" id="image3">
     <property name="visible">True</property>
-    <property name="can_focus">False</property>
     <property name="icon_name">system-software-update</property>
   </object>
 </interface>
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-08-04 03:29+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: gsharkdown.py:151
+msgid "gSharkDown : Download from Grooveshark"
+msgstr ""
+
+#: gsharkdown.py:189
+msgid "Error saving the playlist"
+msgstr ""
+
+#: gsharkdown.py:193 data/main_window.ui.h:22
+msgid "Save playlist to file"
+msgstr ""
+
+#: gsharkdown.py:208
+msgid "Select Playlist to open"
+msgstr ""
+
+#: gsharkdown.py:214
+msgid "Playlist files"
+msgstr ""
+
+#: gsharkdown.py:259 data/about_dialog.ui.h:4
+msgid "Check for update"
+msgstr ""
+
+#: gsharkdown.py:291
+msgid "New update"
+msgstr ""
+
+#: gsharkdown.py:292
+msgid "To update to the latest version click on the button "
+msgstr ""
+
+#: gsharkdown.py:293
+msgid ""
+"'Update'\n"
+"and download it. After that you can "
+msgstr ""
+
+#: gsharkdown.py:294
+msgid "remove the old one and install the new gSharkDown"
+msgstr ""
+
+#: gsharkdown.py:295
+#, python-format
+msgid "<b>New version <i>%s</i> is available</b>"
+msgstr ""
+
+#: gsharkdown.py:311
+msgid "No updates"
+msgstr ""
+
+#: gsharkdown.py:312
+msgid "Congratulations!\n"
+msgstr ""
+
+#: gsharkdown.py:313
+msgid "<b>You are using the latest version!</b>"
+msgstr ""
+
+#: gsharkdown.py:341 gsharkdown.py:366
+msgid "Title"
+msgstr ""
+
+#: gsharkdown.py:346 gsharkdown.py:371
+msgid "Artist"
+msgstr ""
+
+#: gsharkdown.py:351
+msgid "Album"
+msgstr ""
+
+#: gsharkdown.py:356 gsharkdown.py:376
+msgid "SongID"
+msgstr ""
+
+#: gsharkdown.py:387
+msgid "Are you sure to quit?"
+msgstr ""
+
+#: gsharkdown.py:388
+msgid "Quit?"
+msgstr ""
+
+#: gsharkdown.py:552
+msgid "Song Information - {sonid}"
+msgstr ""
+
+#: gsharkdown.py:553
+msgid "<b>Filename:</b> {artist} - {title}.mp3\n"
+msgstr ""
+
+#: gsharkdown.py:555
+msgid "<b>Artist:</b> {artist}\n"
+msgstr ""
+
+#: gsharkdown.py:556
+msgid "<b>Title:</b> {title}\n"
+msgstr ""
+
+#: gsharkdown.py:558
+msgid "<b>Duration:</b> {mins}:{secs} min\n"
+msgstr ""
+
+#: gsharkdown.py:560
+msgid "<b>Album:</b> {album}\n"
+msgstr ""
+
+#: gsharkdown.py:561
+msgid "<b>Year:</b> {year}\n"
+msgstr ""
+
+#: gsharkdown.py:650
+msgid "Select destination directory"
+msgstr ""
+
+#: gsharkdown.py:734
+msgid "Playing: {artist} - {title}"
+msgstr ""
+
+#: gsharkdown.py:738
+msgid "<b>Playing:</b> {artist} - {title}"
+msgstr ""
+
+#: gsharkdown.py:742
+msgid "Now playing"
+msgstr ""
+
+#: gsharkdown.py:749
+msgid "gSharkDown: GrooveShark Downloader"
+msgstr ""
+
+#: data/main_window.ui.h:1
+msgid "<b>Playlist</b>"
+msgstr ""
+
+#: data/main_window.ui.h:2
+msgid "<b>Search Results</b>"
+msgstr ""
+
+#: data/main_window.ui.h:3
+msgid "About"
+msgstr ""
+
+#: data/main_window.ui.h:4
+msgid "Add item from search results"
+msgstr ""
+
+#: data/main_window.ui.h:5
+msgid "Clear the playlist"
+msgstr ""
+
+#: data/main_window.ui.h:6
+msgid "Copy song name to clipboard"
+msgstr ""
+
+#: data/main_window.ui.h:7
+msgid "Copyto Clipboard"
+msgstr ""
+
+#: data/main_window.ui.h:8
+msgid "Download"
+msgstr ""
+
+#: data/main_window.ui.h:9
+msgid "Download selected"
+msgstr ""
+
+#: data/main_window.ui.h:10
+msgid "Exit gSharkDown"
+msgstr ""
+
+#: data/main_window.ui.h:11
+msgid "Get Lyrics"
+msgstr ""
+
+#: data/main_window.ui.h:12
+msgid "Info"
+msgstr ""
+
+#: data/main_window.ui.h:13
+msgid "Information about the application"
+msgstr ""
+
+#: data/main_window.ui.h:14
+msgid "Next"
+msgstr ""
+
+#: data/main_window.ui.h:15
+msgid "Open Prefrences"
+msgstr ""
+
+#: data/main_window.ui.h:16
+msgid "Open saved playlist"
+msgstr ""
+
+#: data/main_window.ui.h:17
+msgid "Play/Stop"
+msgstr ""
+
+#: data/main_window.ui.h:18 data/preferenes_dialog.ui.h:2
+msgid "Preferences"
+msgstr ""
+
+#: data/main_window.ui.h:19
+msgid "Previous"
+msgstr ""
+
+#: data/main_window.ui.h:20
+msgid "Quit"
+msgstr ""
+
+#: data/main_window.ui.h:21
+msgid "Remove item from playlist"
+msgstr ""
+
+#: data/main_window.ui.h:23
+msgid "Search a lyrics for selected song from the playlist"
+msgstr ""
+
+#: data/main_window.ui.h:24
+msgid "Search the grooveshark"
+msgstr ""
+
+#: data/main_window.ui.h:25
+msgid "Show selection info"
+msgstr ""
+
+#: data/main_window.ui.h:26
+msgid "Toggle Repeat all"
+msgstr ""
+
+#: data/main_window.ui.h:27
+msgid "Toggle Shuffle"
+msgstr ""
+
+#: data/main_window.ui.h:28
+msgid "gSharkDown"
+msgstr ""
+
+#: data/main_window.ui.h:29 data/lyrics_dialog.ui.h:3
+msgid "label"
+msgstr ""
+
+#: data/preferenes_dialog.ui.h:1
+msgid "Download Directory:"
+msgstr ""
+
+#: data/preferenes_dialog.ui.h:3
+msgid "Quit application on close without confirmation"
+msgstr ""
+
+#: data/preferenes_dialog.ui.h:4
+msgid "Show notifications on track change"
+msgstr ""
+
+#: data/lyrics_dialog.ui.h:1
+msgid "<b>Lyrics for:</b>"
+msgstr ""
+
+#: data/lyrics_dialog.ui.h:2
+msgid "Lyrics viewer"
+msgstr ""
+
+#: data/about_dialog.ui.h:1
+msgid "(c) Vladimir Kolev 2011"
+msgstr ""
+
+#: data/about_dialog.ui.h:2
+msgid ""
+"<b>Downloading mp3s is illegal in some countries! Please check the low in "
+"your country.</b>"
+msgstr ""
+
+#: data/about_dialog.ui.h:3
+msgid "About GrooveDown"
+msgstr ""
+
+#: data/about_dialog.ui.h:5
+msgid "Flattr gSharkDow"
+msgstr ""
+
+#: data/about_dialog.ui.h:6
+msgid ""
+"Gnome-toolkit based desktop application for downloading music files from "
+"Grooveshark.com"
+msgstr ""
+
+#: data/about_dialog.ui.h:7
+msgid ""
+"gSharkDown is licensed under the GNU GPL v3 License\n"
+"\n"
+"The gSharkDown icon is made by wall-e-ps (http://wall-e-ps.deviantart.com/)\n"
+"\n"
+"The groove.py library is developed by George Stephanos (jacktheripper51 @ "
+"github)\n"
+"Link to the sources: https://github.com/jacktheripper51/groove-dl"
+msgstr ""
 from lib.tfuncs import t_search
 from lib.tfuncs import t_key_listener
 import lib.lyrdblib
+import locale
+import gettext
+from gettext import gettext as _
 import urllib2
 import webbrowser
 import pickle
 
 BASEPATH = os.path.abspath(os.path.dirname(sys.argv[0]))
 
+APP = 'gsharkdown'
+if os.path.exists("locale"):
+    DIR = "%s/locale" % BASEPATH
+else:
+    DIR = os.path.join(sys.prefix, 'share', 'locale')
+
+try:
+    locale.setlocale(locale.LC_ALL, '')
+except locale.Error:
+    locale.setlocale(locale.LC_ALL, 'en_US.utf8')
+locale.bindtextdomain(APP, DIR)
+gettext.bindtextdomain(APP, DIR)
+gettext.textdomain(APP)
+gettext.install(APP, localedir=DIR, unicode=True)
+
 if os.path.exists("%s/.gsharkdown/gsharkdown.ini" % os.environ.get("HOME")):
     CONFIG = ConfigObj("%s/.gsharkdown/gsharkdown.ini" % os.environ.get("HOME"))
 else:
         """
         gobject.threads_init()
         builder = gtk.Builder()
+        builder.set_translation_domain(APP)
         builder.add_from_file('%s/data/main_window.ui' % BASEPATH)
         self.window = builder.get_object('window1')
         self.window.connect('delete-event', self.window_close)
         self.staticon.set_from_file("%s/data/gsharkdown_16.png" % BASEPATH)
         self.staticon.connect("popup-menu", self.right_click_event)
         self.staticon.connect("activate", self.icon_clicked)
-        self.staticon.set_tooltip("gSharkDown : Download from Grooveshark")
+        self.staticon.set_tooltip(_("gSharkDown : Download from Grooveshark"))
 
         if os.path.exists("%s/.gsharkdown/playlist.pkl" % os.environ.get("HOME")):
             self.load_saved_playlist("%s/.gsharkdown/playlist.pkl" % os.environ.get("HOME"))
                 pickle.dump(self.playitems[i], output)
             output.close()
         except:
-            print "Error saving the playlist"
+            self.show_error(_("Error saving the playlist"))
 
 
     def save_as_playlist(self, widget, data=None):
-        savedlg = gtk.FileChooserDialog("Save playlist to file",
+        savedlg = gtk.FileChooserDialog(_("Save playlist to file"),
                                        None,
                                        gtk.FILE_CHOOSER_ACTION_SAVE,
                                        (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
         savedlg.destroy()
 
     def open_saved_playlist(self, widget, data=None):
-        opendlg = gtk.FileChooserDialog("Select Playlist to open",
+        opendlg = gtk.FileChooserDialog(_("Select Playlist to open"),
                                        None,
                                        gtk.FILE_CHOOSER_ACTION_OPEN,
                                        (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
                                        gtk.STOCK_OPEN, gtk.RESPONSE_OK))
         openfilter = gtk.FileFilter()
-        openfilter.set_name('Playlist files')
+        openfilter.set_name(_('Playlist files'))
         openfilter.add_pattern("*.pkl")
 
         opendlg.add_filter(openfilter)
         updimg = gtk.Image()
         updimg.set_from_icon_name('system-software-update',
                                  gtk.ICON_SIZE_MENU)
-        updbut = gtk.ImageMenuItem("Check for update")
+        updbut = gtk.ImageMenuItem(_("Check for update"))
         updbut.set_image(updimg)
         updbut.connect("activate", self.check_for_update)
         quiter = gtk.ImageMenuItem(gtk.STOCK_QUIT)
             upddiag = gtk.MessageDialog(None,
                                        gtk.DIALOG_DESTROY_WITH_PARENT,
                                        gtk.MESSAGE_INFO)
-            upddiag.set_title("New update")
-            othertext = "To update to the latest version click on the button "
-            othertext += "'Update'\nand download it. After that you can "
-            othertext += "remove the old one and install the new gSharkDown"
-            markup = "<b>New version <i>%s</i> is available</b>"
+            upddiag.set_title(_("New update"))
+            othertext = _("To update to the latest version click on the button ")
+            othertext += _("'Update'\nand download it. After that you can ")
+            othertext += _("remove the old one and install the new gSharkDown")
+            markup = _("<b>New version <i>%s</i> is available</b>")
             upddiag.set_markup(markup % remoteversion)
             upddiag.format_secondary_text(othertext)
             upddiag.add_buttons(gtk.STOCK_CLOSE, gtk.RESPONSE_CANCEL,
                 upddiag = gtk.MessageDialog(None,
                                        gtk.DIALOG_DESTROY_WITH_PARENT,
                                        gtk.MESSAGE_INFO)
-                upddiag.set_title("No updates")
-                othertext = "Congratulations!\n"
-                markup = "<b>You are using the latest version!</b>"
+                upddiag.set_title(_("No updates"))
+                othertext = _("Congratulations!\n")
+                markup = _("<b>You are using the latest version!</b>")
                 upddiag.set_markup(markup)
                 upddiag.format_secondary_text(othertext)
                 upddiag.add_buttons(gtk.STOCK_CLOSE, gtk.RESPONSE_CANCEL,
         for the search results
         """
         rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn("Title", rendererText, text=0)
+        column = gtk.TreeViewColumn(_("Title"), rendererText, text=0)
         column.set_max_width(180)
         self.result_view.append_column(column)
 
         rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn("Artist", rendererText, text=1)
+        column = gtk.TreeViewColumn(_("Artist"), rendererText, text=1)
         column.set_max_width(100)
         self.result_view.append_column(column)
 
         rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn("Album", rendererText, text=2)
+        column = gtk.TreeViewColumn(_("Album"), rendererText, text=2)
         column.set_max_width(150)
         self.result_view.append_column(column)
 
         rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn("Song ID", rendererText, text=3)
+        column = gtk.TreeViewColumn(_("SongID"), rendererText, text=3)
         column.set_max_width(50)
         self.result_view.append_column(column)
 
         for the playlist items
         """
         rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn("Title", rendererText, text=0)
+        column = gtk.TreeViewColumn(_("Title"), rendererText, text=0)
         column.set_max_width(180)
         self.play_view.append_column(column)
 
         rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn("Artist", rendererText, text=1)
+        column = gtk.TreeViewColumn(_("Artist"), rendererText, text=1)
         column.set_max_width(100)
         self.play_view.append_column(column)
 
         rendererText = gtk.CellRendererText()
-        column = gtk.TreeViewColumn("SongID", rendererText, text=2)
+        column = gtk.TreeViewColumn(_("SongID"), rendererText, text=2)
         column.set_max_width(50)
         self.play_view.append_column(column)
 
         dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL,
                                   type=gtk.MESSAGE_QUESTION,
                                   buttons=gtk.BUTTONS_YES_NO,
-                                  message_format="Are you sure to quit?")
-        dialog.set_title("Quit?")
+                                  message_format=_("Are you sure to quit?"))
+        dialog.set_title(_("Quit?"))
         response = dialog.run()
         if response == gtk.RESPONSE_YES:
             self.save_playlist("%s/.gsharkdown/playlist.pkl" % os.environ.get("HOME"))
             song = self.results[index]
             dialog = gtk.MessageDialog(None, gtk.DIALOG_DESTROY_WITH_PARENT,
                                       0, gtk.BUTTONS_OK,)
-            dialog.set_title("Song Information - %s" % song['SongID'])
-            info = "<b>Filename:</b> %s - %s.mp3\n" % (song['ArtistName'],
-                                                       song['SongName'])
-            info += "<b>Artist:</b> %s\n" % song['ArtistName']
-            info += "<b>Title:</b> %s\n" % song['SongName']
-            duration = "%.2f" % (float(song['EstimateDuration']) / 60)
-            info += "<b>Duration:</b> %s:%s min\n" % (duration.split(".")[0],
-                                                      duration.split(".")[1])
-            info += "<b>Album:</b> %s\n" % song['AlbumName']
-            info += "<b>Year:</b> %s\n" % song['Year']
+            dialog.set_title(_("Song Information - {songid}").format(songid=song['SongID']))
+            _filename = _("<b>Filename:</b> {artist} - {title}.mp3\n").format(artist=song['ArtistName'],
+                                                       title=song['SongName'])
+            _artist = _("<b>Artist:</b> {artist}\n").format(artist=song['ArtistName'])
+            _title = _("<b>Title:</b> {title}\n").format(title=song['SongName'])
+            _duration = "%.2f" % (float(song['EstimateDuration']) / 60)
+            _duration = _("<b>Duration:</b> {mins}:{secs} min\n").format(mins=_duration.split(".")[0],
+                                                      secs=_duration.split(".")[1])
+            _album = _("<b>Album:</b> {album}\n").format(album=song['AlbumName'])
+            _year = _("<b>Year:</b> {year}\n").format(year=song['Year'])
+            info = _filename + _artist + _title + _duration + _album + _year
             image = gtk.Image()
             try:
                 url = "http://beta.grooveshark.com/static/amazonart/s%s"
                 self.show_error(lyric)
             else:
                 builder = gtk.Builder()
+                builder.set_translation_domain(APP)
                 builder.add_from_file('%s/data/lyrics_dialog.ui' % BASEPATH)
                 lyrics = builder.get_object('dialog1')
                 songlabel = builder.get_object('label2')
         About dialog for the application
         """
         builder = gtk.Builder()
+        builder.set_translation_domain(APP)
         builder.add_from_file('%s/data/about_dialog.ui' % BASEPATH)
         flattr = builder.get_object('flattrbut')
         flattr.connect("clicked", self.flattr_this)
         Preferences dialog with save and close buttons
         """
         builder = gtk.Builder()
+        builder.set_translation_domain(APP)
         builder.add_from_file('%s/data/preferenes_dialog.ui' % BASEPATH)
         self.prefs = builder.get_object('window1')
         self.dest = builder.get_object('entry1')
         """
         Handler for the Select button from the Preferences dialog
         """
-        chooser = gtk.FileChooserDialog("Select destination directory",
+        chooser = gtk.FileChooserDialog(_("Select destination directory"),
                                        None,
                                         gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
                                        (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
                 "%s/data/gsharkdown_16_playing.png" % BASEPATH
             )
             self.staticon.set_tooltip(
-                "Playing: %s - %s" % (song['ArtistName'], song['SongName'])
+                _("Playing: {artist} - {title}").format(artist=song['ArtistName'],
+                                                        title=song['SongName'])
             )
             self.songinfo.set_markup(
-                "<b>Playing:</b> %s - %s" % (song['ArtistName'],
-                                         song['SongName'])
+                _("<b>Playing:</b> {artist} - {title}").format(artist=song['ArtistName'],
+                                         title=song['SongName'])
             )
             if int(CONFIG['show_notification']) == 1:
-                n = pynotify.Notification("Now playing",
+                n = pynotify.Notification(_("Now playing"),
                     "%s - %s" % (song['ArtistName'], song['SongName']),
                     "audio-x-generic")
                 n.show()
         else:
             self.staticon.set_from_file("%s/data/gsharkdown_16.png" % BASEPATH)
             self.staticon.set_tooltip(
-                "gSharkDown: GrooveShark Downloader"
+                _("gSharkDown: GrooveShark Downloader")
             )
             self.selector.unselect_all()
             self.songinfo.set_markup("")
         pass
 
 if __name__ == "__main__":
-    APP = SharkDown()
-    init_thread = t_init(APP)
+    app = SharkDown()
+    init_thread = t_init(app)
     init_thread.run()
     gtk.main()
 
 import urllib2
 from xml.etree import ElementTree
+import sys
+import os
 
 __doc__ = """Lyrbrary to work with the lyrdb webservices"""
 __author__ = "Vladimir Kolev <vladimir.r.kolev@gmail.com>"
 GETLYR_URL = "http://webservices.lyrdb.com/getlyr.php?q=%s"
 CHART_URL = "http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect?artist=%s&song=%s"
 
+basepath = os.path.abspath(os.path.dirname(sys.argv[0]).strip("/lib"))
+
 def search(artist, track, method="match"):
     first = searchlyr(artist, track, method)
     if "error" in first:
         second = searchchart(artist, track)
         if "error" in second:
-            lyrics = "ERROR: Cant't find lyrics for %s - %s" % (artist,
+            lyrics = "ERROR: Cant't find lyrics for {artist} - {track}".format(artist,
                                                                track)
         else:
             lyrics = second
             try:
                 groove.init()
                 groove.getToken()
-                self.frame.progress_bar.set_text("Ready")
+                self.frame.progress_bar.set_text(_("Ready"))
                 p = 0
             except Exception, e:
                 if e.args[0] == 11004:
         else:
             self.win.play_button.set_stock_id(gtk.STOCK_MEDIA_PLAY)
             self.win.staticon.set_from_file("%s/data/gsharkdown_16.png" % basepath)
-            self.win.staticon.set_tooltip("gSharkDown : Grooveshark Downloader")
+            self.win.staticon.set_tooltip(_("gSharkDown : Grooveshark Downloader"))
 
     def update_buttons(self, state):
         if state == gst.STATE_NULL:

locale/bg_BG/LC_MESSAGES/gsharkdown.mo

Binary file added.

locale/bg_BG/LC_MESSAGES/gsharkdown.po

+msgid ""
+msgstr ""
+"Project-Id-Version: gsharkdown\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-08-04 03:29+0200\n"
+"PO-Revision-Date: 2011-08-04 04:03+0200\n"
+"Last-Translator: Vladimir Kolev <vladimir.r.kolev@gmail.com>\n"
+"Language-Team: Bulgarian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Bulgarian\n"
+"X-Poedit-Country: BULGARIA\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#: gsharkdown.py:151
+msgid "gSharkDown : Download from Grooveshark"
+msgstr "gSharkDown : Изтегляй от Grooveshark"
+
+#: gsharkdown.py:189
+msgid "Error saving the playlist"
+msgstr "Грешка при записването на списъка с песни"
+
+#: gsharkdown.py:193
+#: data/main_window.ui.h:22
+msgid "Save playlist to file"
+msgstr "Запиши списъка с песни във файл"
+
+#: gsharkdown.py:208
+msgid "Select Playlist to open"
+msgstr "Изберете списък с песни"
+
+#: gsharkdown.py:214
+msgid "Playlist files"
+msgstr "Списъци с песни"
+
+#: gsharkdown.py:259
+#: data/about_dialog.ui.h:4
+msgid "Check for update"
+msgstr "Провери за нова версия"
+
+#: gsharkdown.py:291
+msgid "New update"
+msgstr "Нова версия"
+
+#: gsharkdown.py:292
+msgid "To update to the latest version click on the button "
+msgstr "За да обновите до последната версия изберете бутона"
+
+#: gsharkdown.py:293
+msgid ""
+"'Update'\n"
+"and download it. After that you can "
+msgstr ""
+"'Изпълни'\n"
+"и я изтеглете. След това можете да"
+
+#: gsharkdown.py:294
+msgid "remove the old one and install the new gSharkDown"
+msgstr "премахнете старата версия и да инсталирате новия gSharkDown"
+
+#: gsharkdown.py:295
+#, python-format
+msgid "<b>New version <i>%s</i> is available</b>"
+msgstr "<b>Достъпна е нова версия <i>%s</i></b>"
+
+#: gsharkdown.py:311
+msgid "No updates"
+msgstr "Няма нови версии"
+
+#: gsharkdown.py:312
+msgid "Congratulations!\n"
+msgstr "Поздравления!\n"
+
+#: gsharkdown.py:313
+msgid "<b>You are using the latest version!</b>"
+msgstr "<b>Вие използвате последната версия!</b>"
+
+#: gsharkdown.py:341
+#: gsharkdown.py:366
+msgid "Title"
+msgstr "Заглавие"
+
+#: gsharkdown.py:346
+#: gsharkdown.py:371
+msgid "Artist"
+msgstr "Изпълнител"
+
+#: gsharkdown.py:351
+msgid "Album"
+msgstr "Албум"
+
+#: gsharkdown.py:356
+#: gsharkdown.py:376
+msgid "SongID"
+msgstr "SongID"
+
+#: gsharkdown.py:387
+msgid "Are you sure to quit?"
+msgstr "Наистина изключване на програмата?"
+
+#: gsharkdown.py:388
+msgid "Quit?"
+msgstr "Изход?"
+
+#: gsharkdown.py:552
+msgid "Song Information - {sonid}"
+msgstr "Информация за песента - {sonid}"
+
+#: gsharkdown.py:553
+msgid "<b>Filename:</b> {artist} - {title}.mp3\n"
+msgstr "<b>Име на файла:</b> {artist} - {title}.mp3\n"
+
+#: gsharkdown.py:555
+msgid "<b>Artist:</b> {artist}\n"
+msgstr "<b>Изпълнител:</b> {artist}\n"
+
+#: gsharkdown.py:556
+msgid "<b>Title:</b> {title}\n"
+msgstr "<b>Заглавие:</b> {title}\n"
+
+#: gsharkdown.py:558
+msgid "<b>Duration:</b> {mins}:{secs} min\n"
+msgstr "<b>Времетраене:</b> {mins}:{secs} min\n"
+
+#: gsharkdown.py:560
+msgid "<b>Album:</b> {album}\n"
+msgstr "<b>Албум:</b> {album}\n"
+
+#: gsharkdown.py:561
+msgid "<b>Year:</b> {year}\n"
+msgstr "<b>Година:</b> {year}\n"
+
+#: gsharkdown.py:650
+msgid "Select destination directory"
+msgstr "Изберете дестинация за записване"
+
+#: gsharkdown.py:734
+msgid "Playing: {artist} - {title}"
+msgstr "Свири: {artist} - {title}"
+
+#: gsharkdown.py:738
+msgid "<b>Playing:</b> {artist} - {title}"
+msgstr "<b>Свири:</b> {artist} - {title}"
+
+#: gsharkdown.py:742
+msgid "Now playing"
+msgstr "В момента свири"
+
+#: gsharkdown.py:749
+msgid "gSharkDown: GrooveShark Downloader"
+msgstr "gSharkDown: GrooveShark Downloader"
+
+#: data/main_window.ui.h:1
+msgid "<b>Playlist</b>"
+msgstr "<b>Списък за изпълнение</b>"
+
+#: data/main_window.ui.h:2
+msgid "<b>Search Results</b>"
+msgstr "<b>Резултати от търсенето</b>"
+
+#: data/main_window.ui.h:3
+msgid "About"
+msgstr "Относно"
+
+#: data/main_window.ui.h:4
+msgid "Add item from search results"
+msgstr "Добави обект от резултатите"
+
+#: data/main_window.ui.h:5
+msgid "Clear the playlist"
+msgstr "Изчисти списъка за изпълнение"
+
+#: data/main_window.ui.h:6
+msgid "Copy song name to clipboard"
+msgstr "Копирай името на песента в буфера за обмен"
+
+#: data/main_window.ui.h:7
+msgid "Copyto Clipboard"
+msgstr "Копирай в буфера за обмен"
+
+#: data/main_window.ui.h:8
+msgid "Download"
+msgstr "Изтегляне"
+
+#: data/main_window.ui.h:9
+msgid "Download selected"
+msgstr "Изтегли избраните"
+
+#: data/main_window.ui.h:10
+msgid "Exit gSharkDown"
+msgstr "Излез от gSharkDown"
+
+#: data/main_window.ui.h:11
+msgid "Get Lyrics"
+msgstr "Изтегли текст за песента"
+
+#: data/main_window.ui.h:12
+msgid "Info"
+msgstr "Информация"
+
+#: data/main_window.ui.h:13
+msgid "Information about the application"
+msgstr "Информация относно приложението"
+
+#: data/main_window.ui.h:14
+msgid "Next"
+msgstr "Следваща"
+
+#: data/main_window.ui.h:15
+msgid "Open Prefrences"
+msgstr "Отвори настройки"
+
+#: data/main_window.ui.h:16
+msgid "Open saved playlist"
+msgstr "Отвори запазен списък за изпълнение"
+
+#: data/main_window.ui.h:17
+msgid "Play/Stop"
+msgstr "Пускане/Спиране"
+
+#: data/main_window.ui.h:18
+#: data/preferenes_dialog.ui.h:2
+msgid "Preferences"
+msgstr "Настройки"
+
+#: data/main_window.ui.h:19
+msgid "Previous"
+msgstr "Предишна"
+
+#: data/main_window.ui.h:20
+msgid "Quit"
+msgstr "Изход"
+
+#: data/main_window.ui.h:21
+msgid "Remove item from playlist"
+msgstr "Премахни обект от списъка за изпълнение"
+
+#: data/main_window.ui.h:23
+msgid "Search a lyrics for selected song from the playlist"
+msgstr "Търсене на текст за избрана песен от списъка за изпълнение"
+
+#: data/main_window.ui.h:24
+msgid "Search the grooveshark"
+msgstr "Търси в grooveshark"
+
+#: data/main_window.ui.h:25
+msgid "Show selection info"
+msgstr "Покажи информация за избраните"
+
+#: data/main_window.ui.h:26
+msgid "Toggle Repeat all"
+msgstr "Повтаряй всички"
+
+#: data/main_window.ui.h:27
+msgid "Toggle Shuffle"
+msgstr "Разбъркано просвирване"
+
+#: data/main_window.ui.h:28
+msgid "gSharkDown"
+msgstr "gSharkDown"
+
+#: data/main_window.ui.h:29
+#: data/lyrics_dialog.ui.h:3
+msgid "label"
+msgstr "label"
+
+#: data/preferenes_dialog.ui.h:1
+msgid "Download Directory:"
+msgstr "Директория за изтегляне:"
+
+#: data/preferenes_dialog.ui.h:3
+msgid "Quit application on close without confirmation"
+msgstr "Изключи приложението без потвърждение"
+
+#: data/preferenes_dialog.ui.h:4
+msgid "Show notifications on track change"
+msgstr "Показвай информативен балон при смяна на песента"
+
+#: data/lyrics_dialog.ui.h:1
+msgid "<b>Lyrics for:</b>"
+msgstr "<b>Текст за:</b>"
+
+#: data/lyrics_dialog.ui.h:2
+msgid "Lyrics viewer"
+msgstr "Текст на песен"
+
+#: data/about_dialog.ui.h:1
+msgid "(c) Vladimir Kolev 2011"
+msgstr "(c) Vladimir Kolev 2011"
+
+#: data/about_dialog.ui.h:2
+msgid "<b>Downloading mp3s is illegal in some countries! Please check the low in your country.</b>"
+msgstr "<b>Изтеглянето на mp3 файлове е нелегално в някои държави! Моля уверете се, че не нарушавате закона на държавата, в която се намирате.</b>"
+
+#: data/about_dialog.ui.h:3
+msgid "About GrooveDown"
+msgstr "Относно gSharkDown"
+
+#: data/about_dialog.ui.h:5
+msgid "Flattr gSharkDow"
+msgstr "Flattr gSharkDow"
+
+#: data/about_dialog.ui.h:6
+msgid "Gnome-toolkit based desktop application for downloading music files from Grooveshark.com"
+msgstr "Gnome-toolkit базирано, десктоп приложение за изтегляне на файлове от Grooveshark.com"
+
+#: data/about_dialog.ui.h:7
+msgid ""
+"gSharkDown is licensed under the GNU GPL v3 License\n"
+"\n"
+"The gSharkDown icon is made by wall-e-ps (http://wall-e-ps.deviantart.com/)\n"
+"\n"
+"The groove.py library is developed by George Stephanos (jacktheripper51 @ github)\n"
+"Link to the sources: https://github.com/jacktheripper51/groove-dl"
+msgstr ""
+"gSharkDownе лицензиран под GNU GPL v3 License\n"
+"\n"
+"gSharkDown иконата е направена отwall-e-ps (http://wall-e-ps.deviantart.com/)\n"
+"\n"
+"Библиотеката groove.py е разработена от George Stephanos (jacktheripper51 @ github)\n"
+"Вързка към изходния код: https://github.com/jacktheripper51/groove-dl"
+
+#~ msgid "ERROR: Cant't find lyrics for {artist} - {track}"
+#~ msgstr "ГРЕШКА: Не може да бъде намерен текст за {artist} - {track}"
+#~ msgid "Ready"
+#~ msgstr "Готов"
+#~ msgid "Downloading: %s"
+#~ msgstr "Изтегляне: %s"
+#~ msgid "Downloaded!"
+#~ msgstr "Изтеглена"
+#~ msgid "gSharkDown : Grooveshark Downloader"
+#~ msgstr "gSharkDown : Grooveshark Downloader"
+
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-08-04 03:29+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: gsharkdown.py:151
+msgid "gSharkDown : Download from Grooveshark"
+msgstr ""
+
+#: gsharkdown.py:189
+msgid "Error saving the playlist"
+msgstr ""
+
+#: gsharkdown.py:193 data/main_window.ui.h:22
+msgid "Save playlist to file"
+msgstr ""
+
+#: gsharkdown.py:208
+msgid "Select Playlist to open"
+msgstr ""
+
+#: gsharkdown.py:214
+msgid "Playlist files"
+msgstr ""
+
+#: gsharkdown.py:259 data/about_dialog.ui.h:4
+msgid "Check for update"
+msgstr ""
+
+#: gsharkdown.py:291
+msgid "New update"
+msgstr ""
+
+#: gsharkdown.py:292
+msgid "To update to the latest version click on the button "
+msgstr ""
+
+#: gsharkdown.py:293
+msgid ""
+"'Update'\n"
+"and download it. After that you can "
+msgstr ""
+
+#: gsharkdown.py:294
+msgid "remove the old one and install the new gSharkDown"
+msgstr ""
+
+#: gsharkdown.py:295
+#, python-format
+msgid "<b>New version <i>%s</i> is available</b>"
+msgstr ""
+
+#: gsharkdown.py:311
+msgid "No updates"
+msgstr ""
+
+#: gsharkdown.py:312
+msgid "Congratulations!\n"
+msgstr ""
+
+#: gsharkdown.py:313
+msgid "<b>You are using the latest version!</b>"
+msgstr ""
+
+#: gsharkdown.py:341 gsharkdown.py:366
+msgid "Title"
+msgstr ""
+
+#: gsharkdown.py:346 gsharkdown.py:371
+msgid "Artist"
+msgstr ""
+
+#: gsharkdown.py:351
+msgid "Album"
+msgstr ""
+
+#: gsharkdown.py:356 gsharkdown.py:376
+msgid "SongID"
+msgstr ""
+
+#: gsharkdown.py:387
+msgid "Are you sure to quit?"
+msgstr ""
+
+#: gsharkdown.py:388
+msgid "Quit?"
+msgstr ""
+
+#: gsharkdown.py:552
+msgid "Song Information - {sonid}"
+msgstr ""
+
+#: gsharkdown.py:553
+msgid "<b>Filename:</b> {artist} - {title}.mp3\n"
+msgstr ""
+
+#: gsharkdown.py:555
+msgid "<b>Artist:</b> {artist}\n"
+msgstr ""
+
+#: gsharkdown.py:556
+msgid "<b>Title:</b> {title}\n"
+msgstr ""
+
+#: gsharkdown.py:558
+msgid "<b>Duration:</b> {mins}:{secs} min\n"
+msgstr ""
+
+#: gsharkdown.py:560
+msgid "<b>Album:</b> {album}\n"
+msgstr ""
+
+#: gsharkdown.py:561
+msgid "<b>Year:</b> {year}\n"
+msgstr ""
+
+#: gsharkdown.py:650
+msgid "Select destination directory"
+msgstr ""
+
+#: gsharkdown.py:734
+msgid "Playing: {artist} - {title}"
+msgstr ""
+
+#: gsharkdown.py:738
+msgid "<b>Playing:</b> {artist} - {title}"
+msgstr ""
+
+#: gsharkdown.py:742
+msgid "Now playing"
+msgstr ""
+
+#: gsharkdown.py:749
+msgid "gSharkDown: GrooveShark Downloader"
+msgstr ""
+
+#: data/main_window.ui.h:1
+msgid "<b>Playlist</b>"
+msgstr ""
+
+#: data/main_window.ui.h:2
+msgid "<b>Search Results</b>"
+msgstr ""
+
+#: data/main_window.ui.h:3
+msgid "About"
+msgstr ""
+
+#: data/main_window.ui.h:4
+msgid "Add item from search results"
+msgstr ""
+
+#: data/main_window.ui.h:5
+msgid "Clear the playlist"
+msgstr ""
+
+#: data/main_window.ui.h:6
+msgid "Copy song name to clipboard"
+msgstr ""
+
+#: data/main_window.ui.h:7
+msgid "Copyto Clipboard"
+msgstr ""
+
+#: data/main_window.ui.h:8
+msgid "Download"
+msgstr ""
+
+#: data/main_window.ui.h:9
+msgid "Download selected"
+msgstr ""
+
+#: data/main_window.ui.h:10
+msgid "Exit gSharkDown"
+msgstr ""
+
+#: data/main_window.ui.h:11
+msgid "Get Lyrics"
+msgstr ""
+
+#: data/main_window.ui.h:12
+msgid "Info"
+msgstr ""
+
+#: data/main_window.ui.h:13
+msgid "Information about the application"
+msgstr ""
+
+#: data/main_window.ui.h:14
+msgid "Next"
+msgstr ""
+
+#: data/main_window.ui.h:15
+msgid "Open Prefrences"
+msgstr ""
+
+#: data/main_window.ui.h:16
+msgid "Open saved playlist"
+msgstr ""
+
+#: data/main_window.ui.h:17
+msgid "Play/Stop"
+msgstr ""
+
+#: data/main_window.ui.h:18 data/preferenes_dialog.ui.h:2
+msgid "Preferences"
+msgstr ""
+
+#: data/main_window.ui.h:19
+msgid "Previous"
+msgstr ""
+
+#: data/main_window.ui.h:20
+msgid "Quit"
+msgstr ""
+
+#: data/main_window.ui.h:21
+msgid "Remove item from playlist"
+msgstr ""
+
+#: data/main_window.ui.h:23
+msgid "Search a lyrics for selected song from the playlist"
+msgstr ""
+
+#: data/main_window.ui.h:24
+msgid "Search the grooveshark"
+msgstr ""
+
+#: data/main_window.ui.h:25
+msgid "Show selection info"
+msgstr ""
+
+#: data/main_window.ui.h:26
+msgid "Toggle Repeat all"
+msgstr ""
+
+#: data/main_window.ui.h:27
+msgid "Toggle Shuffle"
+msgstr ""
+
+#: data/main_window.ui.h:28
+msgid "gSharkDown"
+msgstr ""
+
+#: data/main_window.ui.h:29 data/lyrics_dialog.ui.h:3
+msgid "label"
+msgstr ""
+
+#: data/preferenes_dialog.ui.h:1
+msgid "Download Directory:"
+msgstr ""
+
+#: data/preferenes_dialog.ui.h:3
+msgid "Quit application on close without confirmation"
+msgstr ""
+
+#: data/preferenes_dialog.ui.h:4
+msgid "Show notifications on track change"
+msgstr ""
+
+#: data/lyrics_dialog.ui.h:1
+msgid "<b>Lyrics for:</b>"
+msgstr ""
+
+#: data/lyrics_dialog.ui.h:2
+msgid "Lyrics viewer"
+msgstr ""
+
+#: data/about_dialog.ui.h:1
+msgid "(c) Vladimir Kolev 2011"
+msgstr ""
+
+#: data/about_dialog.ui.h:2
+msgid ""
+"<b>Downloading mp3s is illegal in some countries! Please check the low in "
+"your country.</b>"
+msgstr ""
+
+#: data/about_dialog.ui.h:3
+msgid "About GrooveDown"
+msgstr ""
+
+#: data/about_dialog.ui.h:5
+msgid "Flattr gSharkDow"
+msgstr ""
+
+#: data/about_dialog.ui.h:6
+msgid ""
+"Gnome-toolkit based desktop application for downloading music files from "
+"Grooveshark.com"
+msgstr ""
+
+#: data/about_dialog.ui.h:7
+msgid ""
+"gSharkDown is licensed under the GNU GPL v3 License\n"
+"\n"
+"The gSharkDown icon is made by wall-e-ps (http://wall-e-ps.deviantart.com/)\n"
+"\n"
+"The groove.py library is developed by George Stephanos (jacktheripper51 @ "
+"github)\n"
+"Link to the sources: https://github.com/jacktheripper51/groove-dl"
+msgstr ""
+
+#: lib/lyrdblib.py:21
+msgid "ERROR: Cant't find lyrics for {artist} - {track}"
+msgstr ""
+
+#: lib/tfuncs.py:34
+msgid "Ready"
+msgstr ""
+
+#: lib/tfuncs.py:80
+#, python-format
+msgid "Downloading: %s"
+msgstr ""
+
+#: lib/tfuncs.py:83
+msgid "Downloaded!"
+msgstr ""
+
+#: lib/tfuncs.py:122
+msgid "gSharkDown : Grooveshark Downloader"
+msgstr ""