Compare commits

..
11 changed files with 157 additions and 148 deletions

4
.mailmap Normal file
View file

@ -0,0 +1,4 @@
Olli <olli@suruatoel.xyz> <olli@coderkun.de>
Olli <olli@suruatoel.xyz> coderkun <olli@coderkun.de>
Olli <olli@suruatoel.xyz> coderkun <olli@suruatoel.xyz>
Olli <olli@suruatoel.xyz> gotik <olli@coderkun.de>

View file

@ -2,9 +2,7 @@
There are multiple ways to contribute code to this project:
* Submit a Pull Request on
[https://git.suruatoel.xyz/coderkun/mcg](git.suruatoel.xyz/coderkun/mcg) or
[https://codeberg.org/suruatoel/mcg](codeberg.org/suruatoel/mcg)
* Submit a Pull Request on [https://codeberg.org/suruatoel/mcg](codeberg.org/suruatoel/mcg)
* Send a git pull request via eMail
* Send a patch via eMail
@ -16,11 +14,9 @@ Update `.pot` files:
$ xgettext --language=Glade --from-code=UTF-8 --output=po/mcg-ui.pot $(git ls-files '*.ui')
$ msgcat --use-first -o po/mcg.pot po/mcg-go.pot po/mcg-ui.pot
Use a tool like [Poedit](https://poedit.net/) to create or update translations
in the `locale/` folder.
Use a tool like [Poedit](https://poedit.net/) to create or update translations in the `locale/` folder.
## AI Policy
This project uses a _No AI policy_. Any code you submit to this project has to
be written by yourself. If you put this project’s code into any AI tool, you
will be banned from this project.
This project uses a _No AI policy_. Any code you submit to this project has to be written by yourself. If you put this
project’s code into any AI tool, you will be banned from this project.

View file

@ -1,9 +1,8 @@
# CoverGrid
CoverGrid (mcg) is a client for the [Music Player
Daemon](http://www.musicpd.org) (MPD), focusing on albums instead of single
tracks. It is not intended to be a replacement for your favorite MPD client but
an addition to get a better album-experience.
CoverGrid (mcg) is a client for the [Music Player Daemon](http://www.musicpd.org) (MPD), focusing on albums instead of
single tracks. It is not intended to be a replacement for your favorite MPD client but an addition to get a better
album-experience.
Website: [https://www.suruatoel.xyz/codes/mcg](www.suruatoel.xyz/codes/mcg)
@ -15,8 +14,7 @@ Dependencies:
* [libadwaita](https://gnome.pages.gitlab.gnome.org/libadwaita/) (>= 1.2)
* [go](https://go.dev/) (build only)
Additionally, an [MPD](http://www.musicpd.org) server (version >= 0.21.0) is
required at runtime.
Additionally, an [MPD](http://www.musicpd.org) server (version >= 0.21.0) is required at runtime.
## Building
@ -37,8 +35,7 @@ Run the application:
## Packaging
The suggested package name for this project is “mcg”. To build a production
binary, please use the following command:
The suggested package name for this project is “mcg”. To build a production binary, please use the following command:
$ go build --ldflags="-s -w -X main.Version=$(git describe)" -trimpath ./...

6
go.mod
View file

@ -1,12 +1,12 @@
module suruatoel.xyz/mcg
go 1.25.0
go 1.26.0
toolchain go1.26.0
toolchain go1.27.1
require (
github.com/diamondburned/gotk4-adwaita/pkg v0.0.0-20260808200908-d4aecaa0ff32
github.com/diamondburned/gotk4/pkg v0.4.1
)
require golang.org/x/sync v0.22.0 // indirect
require golang.org/x/sync v0.23.0 // indirect

4
go.sum
View file

@ -2,5 +2,5 @@ github.com/diamondburned/gotk4-adwaita/pkg v0.0.0-20260808200908-d4aecaa0ff32 h1
github.com/diamondburned/gotk4-adwaita/pkg v0.0.0-20260808200908-d4aecaa0ff32/go.mod h1:ZzYiyPe0TqsukfPHi0sK/WwKzm0wIJdSRylLnuvAZNw=
github.com/diamondburned/gotk4/pkg v0.4.1 h1:w4BwVUUBkKyNLz5HKHN2Oz3kZCTLHfpfKgB/su1p6uo=
github.com/diamondburned/gotk4/pkg v0.4.1/go.mod h1:BAEEDXtj5srQ1S2++5HX2K1s9c6CtuWSa60dAywrkRM=
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk=
golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=

View file

@ -15,6 +15,7 @@ import (
"suruatoel.xyz/mcg/data"
"suruatoel.xyz/mcg/internal/client"
"suruatoel.xyz/mcg/internal/common"
"suruatoel.xyz/mcg/internal/i18n"
)
type libraryPanel struct {
@ -520,8 +521,7 @@ func (p *libraryPanel) setAlbums(albums map[string]*common.Album) {
i++
glib.IdleAdd(func() {
p.progressBar.SetFraction(float64(i) / float64(n))
// FIXME: i18n
p.progressBar.SetText("Loading images")
p.progressBar.SetText(i18n.T("Loading images"))
})
}

BIN
po/de.mo

Binary file not shown.

128
po/de.po
View file

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: CoverGrid (mcg)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-22 14:39+0200\n"
"PO-Revision-Date: 2024-05-22 14:39+0200\n"
"POT-Creation-Date: 2026-09-26 16:51+0200\n"
"PO-Revision-Date: 2026-09-26 16:56+0200\n"
"Last-Translator: coderkun <olli@suruatoel.xyz>\n"
"Language-Team: \n"
"Language: de_DE\n"
@ -11,23 +11,57 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.4.2\n"
"X-Generator: Poedit 3.9\n"
"X-Poedit-Basepath: ../../..\n"
"X-Poedit-SourceCharset: UTF-8\n"
#: data/ui/connection-panel.ui:29
msgid "No service found"
msgstr "Keine Dienste gefunden"
#: internal/common/album.go:93 internal/gui/coverpanel.go:290
#, go-format
msgid "%d:%d minutes"
msgstr "%d:%d Minuten"
#: data/ui/connection-panel.ui:43
#: internal/gui/application.go:108
msgid ""
"CoverGrid is a client for the Music Player Daemon, focusing on albums "
"instead of single tracks."
msgstr ""
"CoverGrid ist ein ein Client für den Music Player Daemon, der sich auf Alben "
"anstellen von einzelnen Songs fokussiert."
#: internal/gui/coverpanel.go:277
#, go-format
msgid "%s feat. %s"
msgstr "%s mit %s"
#: internal/gui/librarypanel.go:551
msgid "Loading images"
msgstr "Bilder werden geladen"
#: internal/gui/window.go:117
msgid "Server"
msgstr "Server"
#: internal/gui/window.go:118
msgid "Cover"
msgstr "Cover"
#: internal/gui/window.go:119
msgid "Playlist"
msgstr "Wiedergabeliste"
#: internal/gui/window.go:120
msgid "Library"
msgstr "Bibliothek"
#: data/ui/connection-panel.ui:26
msgid "Host"
msgstr "Host"
#: data/ui/connection-panel.ui:56
#: data/ui/connection-panel.ui:38
msgid "Port"
msgstr "Port"
#: data/ui/connection-panel.ui:76
#: data/ui/connection-panel.ui:57
msgid "Password"
msgstr "Passwort"
@ -35,67 +69,67 @@ msgstr "Passwort"
msgid "Show the cover in fullscreen mode"
msgstr "Das Cover im Vollbildmodus anzeigen"
#: data/ui/library-panel.ui:34
#: data/ui/library-panel.ui:33
msgid "update library"
msgstr "Die Bibliothek aktualisieren"
#: data/ui/library-panel.ui:48
#: data/ui/library-panel.ui:46
msgid "Sort"
msgstr "Sortierung"
#: data/ui/library-panel.ui:53
#: data/ui/library-panel.ui:51
msgid "sort by artist"
msgstr "nach Künstler"
#: data/ui/library-panel.ui:61
#: data/ui/library-panel.ui:58
msgid "sort by title"
msgstr "nach Titel"
#: data/ui/library-panel.ui:69
#: data/ui/library-panel.ui:65
msgid "sort by year"
msgstr "nach Jahr"
#: data/ui/library-panel.ui:76
#: data/ui/library-panel.ui:71
msgid "sort by modification"
msgstr "nach Änderungsdatum"
#: data/ui/library-panel.ui:84
#: data/ui/library-panel.ui:78
msgid "sort library descending"
msgstr "absteigend sortieren"
#: data/ui/library-panel.ui:105 data/ui/shortcuts-dialog.ui:99
#: data/ui/library-panel.ui:98 data/ui/shortcuts-dialog.ui:99
msgid "Search the library"
msgstr "Die Bibliothek durchsuchen"
#: data/ui/library-panel.ui:121 data/ui/playlist-panel.ui:14
#: data/ui/library-panel.ui:111 data/ui/playlist-panel.ui:14
msgid "Select multiple albums"
msgstr "Mehrere Alben auswählen"
#: data/ui/library-panel.ui:135
#: data/ui/library-panel.ui:124
msgid "Settings and actions"
msgstr "Einstellungen und Aktionen"
#: data/ui/library-panel.ui:160
#: data/ui/library-panel.ui:149
msgid "search library"
msgstr "Bibliothek durchsuchen"
#: data/ui/library-panel.ui:263 data/ui/playlist-panel.ui:107
#: data/ui/library-panel.ui:216 data/ui/playlist-panel.ui:69
msgid "cancel"
msgstr "abbrechen"
#: data/ui/library-panel.ui:270 data/ui/library-panel.ui:327
#: data/ui/library-panel.ui:222 data/ui/library-panel.ui:277
msgid "queue"
msgstr "einreihen"
#: data/ui/library-panel.ui:320 data/ui/playlist-panel.ui:163
#: data/ui/library-panel.ui:271 data/ui/playlist-panel.ui:123
msgid "play"
msgstr "abspielen"
#: data/ui/playlist-panel.ui:28 data/ui/shortcuts-dialog.ui:77
#: data/ui/playlist-panel.ui:27 data/ui/shortcuts-dialog.ui:77
msgid "Clear the playlist"
msgstr "Die Wiedergabeliste leeren"
#: data/ui/playlist-panel.ui:114 data/ui/playlist-panel.ui:170
#: data/ui/playlist-panel.ui:75 data/ui/playlist-panel.ui:129
msgid "remove"
msgstr "entfernen"
@ -196,7 +230,7 @@ msgstr "Wiedergabeprogramm"
msgid "Connect or disconnect"
msgstr "Die Verbindung herstellen oder trennen"
#: data/ui/shortcuts-dialog.ui:71 data/ui/window.ui:25
#: data/ui/shortcuts-dialog.ui:71 data/ui/window.ui:26
msgid "Switch between play and pause"
msgstr "Zwischen Abspielen und Pause wechseln"
@ -208,41 +242,14 @@ msgstr "Cover-Paneel"
msgid "Library Panel"
msgstr "Bibliothekspaneel"
#: src/connectionpanel.py:51
msgid "use"
msgstr "verwenden"
#~ msgid "No service found"
#~ msgstr "Keine Dienste gefunden"
#: src/librarypanel.py:291
msgid "Loading albums"
msgstr "Alben werden geladen"
#~ msgid "use"
#~ msgstr "verwenden"
#: src/librarypanel.py:379
msgid "Loading images"
msgstr "Bilder werden geladen"
#: src/utils.py:50 src/utils.py:67
msgid "{} feat. {}"
msgstr "{} mit {}"
#: src/utils.py:61
msgid "{}:{} minutes"
msgstr "{}:{} Minuten"
#: src/window.py:114
msgid "Server"
msgstr "Server"
#: src/window.py:115
msgid "Cover"
msgstr "Cover"
#: src/window.py:116
msgid "Playlist"
msgstr "Wiedergabeliste"
#: src/window.py:117
msgid "Library"
msgstr "Bibliothek"
#~ msgid "Loading albums"
#~ msgstr "Alben werden geladen"
#, fuzzy
#~ msgid "Connection state"
@ -287,9 +294,6 @@ msgstr "Bibliothek"
#~ msgid "Quit"
#~ msgstr "Beenden"
#~ msgid "CoverGrid is a client for the Music Player Daemon, focusing on albums instead of single tracks."
#~ msgstr "CoverGrid ist ein ein Client für den Music Player Daemon, der sich auf Alben anstellen von einzelnen Songs fokussiert."
#~ msgid "Connect to MPD"
#~ msgstr "Zu MPD verbinden"

BIN
po/en.mo

Binary file not shown.

128
po/en.po
View file

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: CoverGrid (mcg)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-22 14:39+0200\n"
"PO-Revision-Date: 2024-05-22 14:39+0200\n"
"POT-Creation-Date: 2026-09-26 16:51+0200\n"
"PO-Revision-Date: 2026-09-26 16:55+0200\n"
"Last-Translator: coderkun <olli@suruatoel.xyz>\n"
"Language-Team: \n"
"Language: en\n"
@ -11,24 +11,58 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.4.2\n"
"X-Generator: Poedit 3.9\n"
"X-Poedit-Basepath: ../../..\n"
"X-Poedit-SearchPath-0: mcg\n"
"X-Poedit-SearchPath-1: data/ui\n"
#: data/ui/connection-panel.ui:29
msgid "No service found"
msgstr "No service found"
#: internal/common/album.go:93 internal/gui/coverpanel.go:290
#, go-format
msgid "%d:%d minutes"
msgstr "%d:%d minutes"
#: data/ui/connection-panel.ui:43
#: internal/gui/application.go:108
msgid ""
"CoverGrid is a client for the Music Player Daemon, focusing on albums "
"instead of single tracks."
msgstr ""
"CoverGrid is a client for the Music Player Daemon, focusing on albums "
"instead of single tracks."
#: internal/gui/coverpanel.go:277
#, go-format
msgid "%s feat. %s"
msgstr "%s feat. %s"
#: internal/gui/librarypanel.go:551
msgid "Loading images"
msgstr "Loading images"
#: internal/gui/window.go:117
msgid "Server"
msgstr "Server"
#: internal/gui/window.go:118
msgid "Cover"
msgstr "Cover"
#: internal/gui/window.go:119
msgid "Playlist"
msgstr "Playlist"
#: internal/gui/window.go:120
msgid "Library"
msgstr "Library"
#: data/ui/connection-panel.ui:26
msgid "Host"
msgstr "Host"
#: data/ui/connection-panel.ui:56
#: data/ui/connection-panel.ui:38
msgid "Port"
msgstr "Port"
#: data/ui/connection-panel.ui:76
#: data/ui/connection-panel.ui:57
msgid "Password"
msgstr "Password"
@ -36,67 +70,67 @@ msgstr "Password"
msgid "Show the cover in fullscreen mode"
msgstr "Show the cover in fullscreen mode"
#: data/ui/library-panel.ui:34
#: data/ui/library-panel.ui:33
msgid "update library"
msgstr "update the library"
#: data/ui/library-panel.ui:48
#: data/ui/library-panel.ui:46
msgid "Sort"
msgstr "Sort order"
#: data/ui/library-panel.ui:53
#: data/ui/library-panel.ui:51
msgid "sort by artist"
msgstr "by Artist"
#: data/ui/library-panel.ui:61
#: data/ui/library-panel.ui:58
msgid "sort by title"
msgstr "by Title"
#: data/ui/library-panel.ui:69
#: data/ui/library-panel.ui:65
msgid "sort by year"
msgstr "by Year"
#: data/ui/library-panel.ui:76
#: data/ui/library-panel.ui:71
msgid "sort by modification"
msgstr "by Modification Date"
#: data/ui/library-panel.ui:84
#: data/ui/library-panel.ui:78
msgid "sort library descending"
msgstr "sort descending"
#: data/ui/library-panel.ui:105 data/ui/shortcuts-dialog.ui:99
#: data/ui/library-panel.ui:98 data/ui/shortcuts-dialog.ui:99
msgid "Search the library"
msgstr "Search the library"
#: data/ui/library-panel.ui:121 data/ui/playlist-panel.ui:14
#: data/ui/library-panel.ui:111 data/ui/playlist-panel.ui:14
msgid "Select multiple albums"
msgstr "Select multiple albums"
#: data/ui/library-panel.ui:135
#: data/ui/library-panel.ui:124
msgid "Settings and actions"
msgstr "Settings and actions"
#: data/ui/library-panel.ui:160
#: data/ui/library-panel.ui:149
msgid "search library"
msgstr "search library"
#: data/ui/library-panel.ui:263 data/ui/playlist-panel.ui:107
#: data/ui/library-panel.ui:216 data/ui/playlist-panel.ui:69
msgid "cancel"
msgstr "cancel"
#: data/ui/library-panel.ui:270 data/ui/library-panel.ui:327
#: data/ui/library-panel.ui:222 data/ui/library-panel.ui:277
msgid "queue"
msgstr "queue"
#: data/ui/library-panel.ui:320 data/ui/playlist-panel.ui:163
#: data/ui/library-panel.ui:271 data/ui/playlist-panel.ui:123
msgid "play"
msgstr "play"
#: data/ui/playlist-panel.ui:28 data/ui/shortcuts-dialog.ui:77
#: data/ui/playlist-panel.ui:27 data/ui/shortcuts-dialog.ui:77
msgid "Clear the playlist"
msgstr "Clear the playlist"
#: data/ui/playlist-panel.ui:114 data/ui/playlist-panel.ui:170
#: data/ui/playlist-panel.ui:75 data/ui/playlist-panel.ui:129
msgid "remove"
msgstr "remove"
@ -197,7 +231,7 @@ msgstr "Player"
msgid "Connect or disconnect"
msgstr "Connect or disconnect"
#: data/ui/shortcuts-dialog.ui:71 data/ui/window.ui:25
#: data/ui/shortcuts-dialog.ui:71 data/ui/window.ui:26
msgid "Switch between play and pause"
msgstr "Switch between play and pause"
@ -209,41 +243,14 @@ msgstr "Cover Panel"
msgid "Library Panel"
msgstr "Library Panel"
#: src/connectionpanel.py:51
msgid "use"
msgstr "use"
#~ msgid "No service found"
#~ msgstr "No service found"
#: src/librarypanel.py:291
msgid "Loading albums"
msgstr "Loading albums"
#~ msgid "use"
#~ msgstr "use"
#: src/librarypanel.py:379
msgid "Loading images"
msgstr "Loading images"
#: src/utils.py:50 src/utils.py:67
msgid "{} feat. {}"
msgstr "{} feat. {}"
#: src/utils.py:61
msgid "{}:{} minutes"
msgstr "{}:{} minutes"
#: src/window.py:114
msgid "Server"
msgstr "Server"
#: src/window.py:115
msgid "Cover"
msgstr "Cover"
#: src/window.py:116
msgid "Playlist"
msgstr "Playlist"
#: src/window.py:117
msgid "Library"
msgstr "Library"
#~ msgid "Loading albums"
#~ msgstr "Loading albums"
#, fuzzy
#~ msgid "Connection state"
@ -288,9 +295,6 @@ msgstr "Library"
#~ msgid "Quit"
#~ msgstr "Quit"
#~ msgid "CoverGrid is a client for the Music Player Daemon, focusing on albums instead of single tracks."
#~ msgstr "CoverGrid is a client for the Music Player Daemon, focusing on albums instead of single tracks."
#~ msgid "Connect to MPD"
#~ msgstr "Connect to MPD"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mcg\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-08-09 19:13+0200\n"
"POT-Creation-Date: 2026-09-26 16:51+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"
@ -33,6 +33,10 @@ msgstr ""
msgid "%s feat. %s"
msgstr ""
#: internal/gui/librarypanel.go:551
msgid "Loading images"
msgstr ""
#: internal/gui/window.go:117
msgid "Server"
msgstr ""