diff --git a/locale/de/LC_MESSAGES/mcg.mo b/locale/de/LC_MESSAGES/mcg.mo index db52e43..49179f2 100644 Binary files a/locale/de/LC_MESSAGES/mcg.mo and b/locale/de/LC_MESSAGES/mcg.mo differ diff --git a/locale/de/LC_MESSAGES/mcg.po b/locale/de/LC_MESSAGES/mcg.po index 2271fa7..9cbba9c 100644 --- a/locale/de/LC_MESSAGES/mcg.po +++ b/locale/de/LC_MESSAGES/mcg.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: CoverGrid (mcg)\n" -"POT-Creation-Date: 2020-03-22 00:15+0100\n" -"PO-Revision-Date: 2020-03-22 00:16+0100\n" +"POT-Creation-Date: 2020-03-22 11:18+0100\n" +"PO-Revision-Date: 2020-03-22 11:18+0100\n" "Last-Translator: coderkun \n" "Language-Team: \n" "Language: de\n" @@ -262,27 +262,31 @@ msgstr "Cover-Paneel" msgid "Library Panel" msgstr "Bibliothekspaneel" -#: mcg/utils.py:62 mcg/utils.py:72 +#: mcg/utils.py:62 mcg/utils.py:79 msgid "{} feat. {}" msgstr "{} mit {}" -#: mcg/widgets.py:1281 mcg/widgets.py:1621 +#: mcg/utils.py:73 +msgid "{}:{} minutes" +msgstr "{}:{} Minuten" + +#: mcg/widgets.py:1279 mcg/widgets.py:1620 msgid "cancel" msgstr "abbrechen" -#: mcg/widgets.py:1298 mcg/widgets.py:1638 +#: mcg/widgets.py:1296 mcg/widgets.py:1637 msgid "play" msgstr "abspielen" -#: mcg/widgets.py:1301 +#: mcg/widgets.py:1299 msgid "remove" msgstr "entfernen" -#: mcg/widgets.py:1624 mcg/widgets.py:1641 +#: mcg/widgets.py:1623 mcg/widgets.py:1640 msgid "queue" msgstr "einreihen" -#: mcg/widgets.py:1873 +#: mcg/widgets.py:1872 msgid "Loading albums" msgstr "Alben werden geladen" diff --git a/locale/en/LC_MESSAGES/mcg.mo b/locale/en/LC_MESSAGES/mcg.mo index 6f34756..cb66775 100644 Binary files a/locale/en/LC_MESSAGES/mcg.mo and b/locale/en/LC_MESSAGES/mcg.mo differ diff --git a/locale/en/LC_MESSAGES/mcg.po b/locale/en/LC_MESSAGES/mcg.po index 3008809..16518fb 100644 --- a/locale/en/LC_MESSAGES/mcg.po +++ b/locale/en/LC_MESSAGES/mcg.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: CoverGrid (mcg)\n" -"POT-Creation-Date: 2020-03-22 00:16+0100\n" -"PO-Revision-Date: 2020-03-22 00:16+0100\n" +"POT-Creation-Date: 2020-03-22 11:18+0100\n" +"PO-Revision-Date: 2020-03-22 11:18+0100\n" "Last-Translator: coderkun \n" "Language-Team: \n" "Language: en\n" @@ -261,27 +261,31 @@ msgstr "Cover Panel" msgid "Library Panel" msgstr "Library Panel" -#: mcg/utils.py:62 mcg/utils.py:72 +#: mcg/utils.py:62 mcg/utils.py:79 msgid "{} feat. {}" msgstr "{} feat. {}" -#: mcg/widgets.py:1281 mcg/widgets.py:1621 +#: mcg/utils.py:73 +msgid "{}:{} minutes" +msgstr "{}:{} minutes" + +#: mcg/widgets.py:1279 mcg/widgets.py:1620 msgid "cancel" msgstr "cancel" -#: mcg/widgets.py:1298 mcg/widgets.py:1638 +#: mcg/widgets.py:1296 mcg/widgets.py:1637 msgid "play" msgstr "play" -#: mcg/widgets.py:1301 +#: mcg/widgets.py:1299 msgid "remove" msgstr "remove" -#: mcg/widgets.py:1624 mcg/widgets.py:1641 +#: mcg/widgets.py:1623 mcg/widgets.py:1640 msgid "queue" msgstr "queue" -#: mcg/widgets.py:1873 +#: mcg/widgets.py:1872 msgid "Loading albums" msgstr "Loading albums" diff --git a/mcg/utils.py b/mcg/utils.py index a24eb5e..c465cbe 100644 --- a/mcg/utils.py +++ b/mcg/utils.py @@ -66,6 +66,13 @@ class Utils: return label + def create_length_label(album): + minutes = album.get_length() // 60 + seconds = album.get_length() - minutes * 60 + + return locale.gettext("{}:{} minutes").format(minutes, seconds) + + def create_track_title(track): title = track.get_title() if track.get_artists(): diff --git a/mcg/widgets.py b/mcg/widgets.py index f964a5d..ac65d2a 100644 --- a/mcg/widgets.py +++ b/mcg/widgets.py @@ -1454,7 +1454,8 @@ class PlaylistPanel(GObject.GObject): GObject.markup_escape_text("\n".join([ album.get_title(), ', '.join(album.get_dates()), - Utils.create_artists_label(album) + Utils.create_artists_label(album), + Utils.create_length_label(album) ])), album.get_id() ]) @@ -1942,7 +1943,8 @@ class LibraryPanel(GObject.GObject): GObject.markup_escape_text("\n".join([ album.get_title(), ', '.join(album.get_dates()), - Utils.create_artists_label(album) + Utils.create_artists_label(album), + Utils.create_length_label(album) ])), album_id ])