From 810bdb3b70b07b627946b1fab68dade7c1cf89fc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 14 Sep 2024 22:48:42 +0200 Subject: [PATCH] screen_client: use Interface::Alert() --- po/cs.po | 16 ++++++++-------- po/da.po | 18 +++++++++--------- po/de.po | 18 +++++++++--------- po/en.po | 18 +++++++++--------- po/eo.po | 18 +++++++++--------- po/es.po | 18 +++++++++--------- po/fa.po | 16 ++++++++-------- po/fi.po | 18 +++++++++--------- po/fr.po | 18 +++++++++--------- po/gl.po | 18 +++++++++--------- po/he.po | 18 +++++++++--------- po/hu.po | 18 +++++++++--------- po/ie.po | 18 +++++++++--------- po/it.po | 18 +++++++++--------- po/ja.po | 16 ++++++++-------- po/ko.po | 18 +++++++++--------- po/lt.po | 18 +++++++++--------- po/nb.po | 18 +++++++++--------- po/ncmpc.pot | 16 ++++++++-------- po/nl.po | 18 +++++++++--------- po/pl.po | 18 +++++++++--------- po/pt.po | 18 +++++++++--------- po/pt_BR.po | 18 +++++++++--------- po/ru.po | 18 +++++++++--------- po/sk.po | 18 +++++++++--------- po/sv.po | 18 +++++++++--------- po/tr.po | 4 ++-- po/uk.po | 18 +++++++++--------- po/zh_CN.po | 18 +++++++++--------- src/FileBrowserPage.cxx | 2 +- src/player_command.cxx | 2 +- src/screen_client.cxx | 14 ++++++++------ src/screen_client.hxx | 6 ++---- 33 files changed, 262 insertions(+), 262 deletions(-) diff --git a/po/cs.po b/po/cs.po index 64856976..8ea8341a 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-14 22:45+0200\n" +"POT-Creation-Date: 2024-09-14 22:51+0200\n" "PO-Revision-Date: 2020-02-03 11:50+0000\n" "Last-Translator: Miroslav Burdych \n" "Language-Team: Czech \n" "Language-Team: da \n" @@ -879,7 +879,7 @@ msgstr "" msgid "Queue on %s" msgstr "" -#: src/QueuePage.cxx:612 src/player_command.cxx:62 +#: src/QueuePage.cxx:612 src/player_command.cxx:63 msgid "Shuffled queue" msgstr "" @@ -1139,7 +1139,7 @@ msgstr "Spring" msgid "Unable to find '{}'" msgstr "Kan ikke finde '{}'" -#: src/player_command.cxx:70 +#: src/player_command.cxx:71 msgid "Cleared queue" msgstr "" @@ -1225,17 +1225,17 @@ msgstr "Automatisk centrering er inaktiv" msgid "Password" msgstr "Adgangskode" -#: src/screen_client.cxx:24 +#: src/screen_client.cxx:26 #, fuzzy msgid "Database update running" msgstr "Databasen opdateres..." -#: src/screen_client.cxx:31 -#, c-format -msgid "Database update of %s started" -msgstr "Database opdatering af %s startet" +#: src/screen_client.cxx:33 +#, c++-format +msgid "Database update of {} started" +msgstr "Database opdatering af {} startet" -#: src/screen_client.cxx:34 +#: src/screen_client.cxx:36 msgid "Database update started" msgstr "Database opdatering startet" diff --git a/po/de.po b/po/de.po index f70f2acc..7ef54414 100644 --- a/po/de.po +++ b/po/de.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-14 22:45+0200\n" +"POT-Creation-Date: 2024-09-14 22:51+0200\n" "PO-Revision-Date: 2024-08-06 17:09+0000\n" "Last-Translator: Quentin Frey \n" "Language-Team: German \n" "Language-Team: Esperanto \n" "Language-Team: Spanish \n" "Language-Team: Finnish \n" "Language-Team: French \n" "Language-Team: galician\n" @@ -879,7 +879,7 @@ msgstr "" msgid "Queue on %s" msgstr "" -#: src/QueuePage.cxx:612 src/player_command.cxx:62 +#: src/QueuePage.cxx:612 src/player_command.cxx:63 msgid "Shuffled queue" msgstr "" @@ -1139,7 +1139,7 @@ msgstr "Ir a" msgid "Unable to find '{}'" msgstr "Non se puido atopar «{}»" -#: src/player_command.cxx:70 +#: src/player_command.cxx:71 msgid "Cleared queue" msgstr "" @@ -1225,17 +1225,17 @@ msgstr "Modo de autocentrado: desactivado" msgid "Password" msgstr "Contrasinal" -#: src/screen_client.cxx:24 +#: src/screen_client.cxx:26 #, fuzzy msgid "Database update running" msgstr "A base de datos estase actualizando..." -#: src/screen_client.cxx:31 -#, c-format -msgid "Database update of %s started" -msgstr "Comezou a actualización da base de datos de %s" +#: src/screen_client.cxx:33 +#, c++-format +msgid "Database update of {} started" +msgstr "Comezou a actualización da base de datos de {}" -#: src/screen_client.cxx:34 +#: src/screen_client.cxx:36 msgid "Database update started" msgstr "Comezou a actualización da base de datos" diff --git a/po/he.po b/po/he.po index 45bc0dbb..2b60529f 100644 --- a/po/he.po +++ b/po/he.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-14 22:45+0200\n" +"POT-Creation-Date: 2024-09-14 22:51+0200\n" "PO-Revision-Date: 2022-10-17 00:55+0000\n" "Last-Translator: Yaron Shahrabani \n" "Language-Team: Hebrew \n" "Language-Team: Hungarian \n" @@ -875,7 +875,7 @@ msgstr "" msgid "Queue on %s" msgstr "" -#: src/QueuePage.cxx:612 src/player_command.cxx:62 +#: src/QueuePage.cxx:612 src/player_command.cxx:63 msgid "Shuffled queue" msgstr "" @@ -1135,7 +1135,7 @@ msgstr "Ugrás" msgid "Unable to find '{}'" msgstr "'{}' nem található" -#: src/player_command.cxx:70 +#: src/player_command.cxx:71 msgid "Cleared queue" msgstr "" @@ -1221,17 +1221,17 @@ msgstr "Középre igazítás kikapcsolva" msgid "Password" msgstr "Jelszó" -#: src/screen_client.cxx:24 +#: src/screen_client.cxx:26 #, fuzzy msgid "Database update running" msgstr "Adatbázis frissítés folyamatban..." -#: src/screen_client.cxx:31 -#, c-format -msgid "Database update of %s started" -msgstr "%s adatbázis frissítése elkezdődött" +#: src/screen_client.cxx:33 +#, c++-format +msgid "Database update of {} started" +msgstr "{} adatbázis frissítése elkezdődött" -#: src/screen_client.cxx:34 +#: src/screen_client.cxx:36 msgid "Database update started" msgstr "Adatbázis frissítés elindult" diff --git a/po/ie.po b/po/ie.po index f351d0ee..de7d704f 100644 --- a/po/ie.po +++ b/po/ie.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-14 22:45+0200\n" +"POT-Creation-Date: 2024-09-14 22:51+0200\n" "PO-Revision-Date: 2019-05-19 12:49+0000\n" "Last-Translator: OIS \n" "Language-Team: Occidental \n" "Language-Team: Italian \n" "Language-Team: Japanese \n" "Language-Team: Korean \n" "Language-Team: Lithuanian \n" "Language-Team: Norwegian Bokmål \n" "Language-Team: LANGUAGE \n" @@ -857,7 +857,7 @@ msgstr "" msgid "Queue on %s" msgstr "" -#: src/QueuePage.cxx:612 src/player_command.cxx:62 +#: src/QueuePage.cxx:612 src/player_command.cxx:63 msgid "Shuffled queue" msgstr "" @@ -1114,7 +1114,7 @@ msgstr "" msgid "Unable to find '{}'" msgstr "" -#: src/player_command.cxx:70 +#: src/player_command.cxx:71 msgid "Cleared queue" msgstr "" @@ -1200,16 +1200,16 @@ msgstr "" msgid "Password" msgstr "" -#: src/screen_client.cxx:24 +#: src/screen_client.cxx:26 msgid "Database update running" msgstr "" -#: src/screen_client.cxx:31 -#, c-format -msgid "Database update of %s started" +#: src/screen_client.cxx:33 +#, c++-format +msgid "Database update of {} started" msgstr "" -#: src/screen_client.cxx:34 +#: src/screen_client.cxx:36 msgid "Database update started" msgstr "" diff --git a/po/nl.po b/po/nl.po index 4bbcece1..ebd6de79 100644 --- a/po/nl.po +++ b/po/nl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-14 22:45+0200\n" +"POT-Creation-Date: 2024-09-14 22:51+0200\n" "PO-Revision-Date: 2022-08-23 03:43+0000\n" "Last-Translator: JeibborRip \n" "Language-Team: Dutch \n" "Language-Team: Polish \n" "Language-Team: Portuguese \n" "Language-Team: Portuguese (Brazil) \n" "Language-Team: Russian \n" "Language-Team: sk \n" @@ -866,7 +866,7 @@ msgstr "Poradie" msgid "Queue on %s" msgstr "Poradie na %s" -#: src/QueuePage.cxx:612 src/player_command.cxx:62 +#: src/QueuePage.cxx:612 src/player_command.cxx:63 msgid "Shuffled queue" msgstr "Poradie bolo zamiešané" @@ -1123,7 +1123,7 @@ msgstr "Skok" msgid "Unable to find '{}'" msgstr "Nepodarilo sa nájsť '{}'" -#: src/player_command.cxx:70 +#: src/player_command.cxx:71 msgid "Cleared queue" msgstr "Vyčistené poradie" @@ -1209,16 +1209,16 @@ msgstr "Automatické centrovanie: Vypnuté" msgid "Password" msgstr "Heslo" -#: src/screen_client.cxx:24 +#: src/screen_client.cxx:26 msgid "Database update running" msgstr "Spúšťam aktualizáciu databáze" -#: src/screen_client.cxx:31 -#, c-format -msgid "Database update of %s started" -msgstr "Aktualizácia databáze %s začala" +#: src/screen_client.cxx:33 +#, c++-format +msgid "Database update of {} started" +msgstr "Aktualizácia databáze {} začala" -#: src/screen_client.cxx:34 +#: src/screen_client.cxx:36 msgid "Database update started" msgstr "Bola spustená aktualizácia databáze" diff --git a/po/sv.po b/po/sv.po index f14f332d..671f94cb 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-14 22:45+0200\n" +"POT-Creation-Date: 2024-09-14 22:51+0200\n" "PO-Revision-Date: 2023-11-30 10:03+0000\n" "Last-Translator: bittin1ddc447d824349b2 \n" "Language-Team: Swedish \n" "Language-Team: Ukrainian \n" @@ -874,7 +874,7 @@ msgstr "" msgid "Queue on %s" msgstr "" -#: src/QueuePage.cxx:612 src/player_command.cxx:62 +#: src/QueuePage.cxx:612 src/player_command.cxx:63 msgid "Shuffled queue" msgstr "" @@ -1134,7 +1134,7 @@ msgstr "Перейти" msgid "Unable to find '{}'" msgstr "Не вдається знайти '{}'" -#: src/player_command.cxx:70 +#: src/player_command.cxx:71 msgid "Cleared queue" msgstr "" @@ -1220,17 +1220,17 @@ msgstr "Режим автоматичного центрування: вимкн msgid "Password" msgstr "Пароль" -#: src/screen_client.cxx:24 +#: src/screen_client.cxx:26 #, fuzzy msgid "Database update running" msgstr "Виконується оновлення бази даних..." -#: src/screen_client.cxx:31 -#, c-format -msgid "Database update of %s started" -msgstr "Оновлення бази даних %s розпочате" +#: src/screen_client.cxx:33 +#, c++-format +msgid "Database update of {} started" +msgstr "Оновлення бази даних {} розпочате" -#: src/screen_client.cxx:34 +#: src/screen_client.cxx:36 msgid "Database update started" msgstr "Початок оновлення бази даних" diff --git a/po/zh_CN.po b/po/zh_CN.po index a6800b54..3e533472 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-14 22:45+0200\n" +"POT-Creation-Date: 2024-09-14 22:51+0200\n" "PO-Revision-Date: 2021-01-19 16:32+0000\n" "Last-Translator: Lilian Wang \n" "Language-Team: Chinese (Simplified) void -screen_database_update(struct mpdclient &c, const char *path) +screen_database_update(Interface &interface, struct mpdclient &c, const char *path) { assert(c.IsConnected()); @@ -21,15 +23,15 @@ screen_database_update(struct mpdclient &c, const char *path) if (mpd_connection_get_error(connection) == MPD_ERROR_SERVER && mpd_connection_get_server_error(connection) == MPD_SERVER_ERROR_UPDATE_ALREADY && mpd_connection_clear_error(connection)) - screen_status_message(_("Database update running")); + interface.Alert(_("Database update running")); else c.HandleError(); return; } if (path != nullptr && *path != 0) { - screen_status_printf(_("Database update of %s started"), - Utf8ToLocaleZ{path}.c_str()); + interface.Alert(fmt::format(fmt::runtime(_("Database update of {} started")), + (std::string_view)Utf8ToLocale{path})); } else - screen_status_message(_("Database update started")); + interface.Alert(_("Database update started")); } diff --git a/src/screen_client.hxx b/src/screen_client.hxx index 05068f3d..0669290a 100644 --- a/src/screen_client.hxx +++ b/src/screen_client.hxx @@ -4,13 +4,11 @@ #pragma once struct mpdclient; - -bool -screen_auth(struct mpdclient &c); +class Interface; /** * Starts a (server-side) database update and displays a status * message. */ void -screen_database_update(struct mpdclient &c, const char *path); +screen_database_update(Interface &interface, struct mpdclient &c, const char *path);