[rhythmbox] im-status: fix translation issues, add to POTFILES.in (bug #581468)



commit bc5f7192533f76870a9b469eb1ab1efe1631db59
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun May 10 12:22:04 2009 +1000

    im-status: fix translation issues, add to POTFILES.in (bug #581468)
    
    Use %(artist)s etc. so translators can distinguish between the template
    strings, and add some translation comments.
---
 plugins/im-status/im-status/__init__.py |   25 ++++++++++++++++++++-----
 po/POTFILES.in                          |    1 +
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/plugins/im-status/im-status/__init__.py b/plugins/im-status/im-status/__init__.py
index 587362e..ed5cddf 100644
--- a/plugins/im-status/im-status/__init__.py
+++ b/plugins/im-status/im-status/__init__.py
@@ -140,17 +140,32 @@ class IMStatusPlugin (rb.Plugin):
     self.set_status ()
 
   def set_status (self):
+    subs = {
+        'artist': self.current_artist,
+        'album': self.current_album,
+        'title': self.current_title
+    }
     if self.current_artist:
       if self.current_title:
-        new_status = _(u"â?« %s - %s â?«") % (self.current_artist, self.current_title)
+        # Translators: do not translate %(artist)s or %(title)s, they are
+        # string substitution markers (like %s) for the artist and title of
+        # the current playing song.  They can be reordered if necessary.
+        new_status = _(u"â?« %(artist)s - %(title)s â?«") % subs
       elif self.current_album:
-        new_status = _(u"â?« %s - %s â?«") % (self.current_artist, self.current_album)
+        # Translators: do not translate %(artist)s or %(album)s, they are
+        # string substitution markers (like %s) for the artist and album name
+        # of the current playing song.  They can be reordered if necessary.
+        new_status = _(u"â?« %(artist)s - %(album)s â?«") % subs
     elif self.current_album:
-      new_status = _(u"â?« %s â?«") % (self.current_album)
+      # Translators: do not translate %(album)s, it is a string substitution
+      # marker (like %s) for the album name of the current playing song.
+      new_status = _(u"â?« %(album)s â?«") % subs
     elif self.current_title:
-      new_status = _(u"â?« %s â?«") % (self.current_title)
+      # Translators: do not translate %(title)s, it is a string substitution
+      # marker (like %s) for the title of the current playing song.
+      new_status = _(u"â?« %(title)s â?«") % subs
     else:
-      new_status = _(u"â?« Listening music... â?«")
+      new_status = _(u"â?« Listening to music... â?«")
 
     self.set_gossip_status (new_status)
     self.set_empathy_status (new_status)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ec1cee8..6f221e9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -73,6 +73,7 @@ plugins/generic-player/rb-generic-player-source.c
 plugins/generic-player/rb-nokia770-source.c
 plugins/generic-player/rb-psp-source.c
 [type: gettext/ini]plugins/im-status/im-status.rb-plugin.in
+plugins/im-status/im-status/__init__.py
 [type: gettext/ini]plugins/ipod/ipod.rb-plugin.in
 plugins/ipod/ipod-info.glade
 plugins/ipod/ipod-init.glade



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]