[gnome-music] playlists: create translated names for smart playlists
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] playlists: create translated names for smart playlists
- Date: Mon, 19 Jan 2015 11:05:44 +0000 (UTC)
commit aa211d1b1ae5bf5510617dd980535e51c2d26097
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Mon Jan 19 12:04:59 2015 +0100
playlists: create translated names for smart playlists
gnomemusic/playlists.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/playlists.py b/gnomemusic/playlists.py
index e79c747..044a7d3 100644
--- a/gnomemusic/playlists.py
+++ b/gnomemusic/playlists.py
@@ -29,6 +29,7 @@
from gi.repository import Grl, GLib, GObject
from gnomemusic.grilo import grilo
from gnomemusic.query import Query
+from gettext import gettext as _
import inspect
import time
sparql_dateTime_format = "%Y-%m-%dT%H:%M:%SZ"
@@ -43,19 +44,22 @@ class StaticPlaylists:
ID = None
QUERY = Query.get_most_played_songs()
TAG_TEXT = "MOST_PLAYED"
- TITLE = "Most Played" # Will eventually be translated
+ # TRANSLATORS: this is a playlist name
+ TITLE = _("Most Played")
class NeverPlayed:
ID = None
QUERY = Query.get_never_played_songs()
TAG_TEXT = "NEVER_PLAYED"
- TITLE = "Never Played" # Will eventually be translated
+ # TRANSLATORS: this is a playlist name
+ TITLE = _("Never Played")
class RecentlyPlayed:
ID = None
QUERY = Query.get_recently_played_songs()
TAG_TEXT = "RECENTLY_PLAYED"
- TITLE = "Recently Played" # Will eventually be translated
+ # TRANSLATORS: this is a playlist name
+ TITLE = _("Recently Played")
class Playlists(GObject.GObject):
@@ -104,9 +108,6 @@ class Playlists(GObject.GObject):
# create the playlist
playlist.ID = self.create_playlist_and_return_id(playlist.TITLE, playlist.TAG_TEXT)
- # then update all smart playlists
- self.update_most_played_playlist()
-
@log
def clear_playlist_with_id(self, playlist_id):
query = Query.clear_playlist_with_id(playlist_id)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]