From add8cdad5e2ee132c5c5af37fcb9eb325184d4cf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 14 Sep 2024 22:17:01 +0200 Subject: [PATCH] Main, Page, screen: use Alert() instead of screen_status_...() --- po/cs.po | 48 +++++++++++++++++++++---------------------- po/da.po | 52 +++++++++++++++++++++++------------------------ po/de.po | 52 +++++++++++++++++++++++------------------------ po/en.po | 52 +++++++++++++++++++++++------------------------ po/eo.po | 52 +++++++++++++++++++++++------------------------ po/es.po | 50 ++++++++++++++++++++++----------------------- po/fa.po | 48 +++++++++++++++++++++---------------------- po/fi.po | 52 +++++++++++++++++++++++------------------------ po/fr.po | 52 +++++++++++++++++++++++------------------------ po/gl.po | 52 +++++++++++++++++++++++------------------------ po/he.po | 52 +++++++++++++++++++++++------------------------ po/hu.po | 52 +++++++++++++++++++++++------------------------ po/ie.po | 52 +++++++++++++++++++++++------------------------ po/it.po | 52 +++++++++++++++++++++++------------------------ po/ja.po | 48 +++++++++++++++++++++---------------------- po/ko.po | 52 +++++++++++++++++++++++------------------------ po/lt.po | 52 +++++++++++++++++++++++------------------------ po/nb.po | 52 +++++++++++++++++++++++------------------------ po/ncmpc.pot | 48 +++++++++++++++++++++---------------------- po/nl.po | 50 ++++++++++++++++++++++----------------------- po/pl.po | 52 +++++++++++++++++++++++------------------------ po/pt.po | 52 +++++++++++++++++++++++------------------------ po/pt_BR.po | 52 +++++++++++++++++++++++------------------------ po/ru.po | 52 +++++++++++++++++++++++------------------------ po/sk.po | 52 +++++++++++++++++++++++------------------------ po/sv.po | 52 +++++++++++++++++++++++------------------------ po/tr.po | 8 ++++---- po/uk.po | 52 +++++++++++++++++++++++------------------------ po/zh_CN.po | 52 +++++++++++++++++++++++------------------------ src/Main.cxx | 17 ++++++++-------- src/callbacks.cxx | 6 +++--- src/page/Page.cxx | 4 ++-- src/screen.cxx | 4 ++-- 33 files changed, 738 insertions(+), 737 deletions(-) diff --git a/po/cs.po b/po/cs.po index 064c3038..90c2b550 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-12 11:54+0200\n" +"POT-Creation-Date: 2024-09-14 22:21+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" @@ -815,15 +815,15 @@ msgstr "Afspilningslisten slettet" msgid "No saved lyrics" msgstr "Gem sagtekster" -#: src/Main.cxx:106 -#, fuzzy, c-format -msgid "Connecting to %s" -msgstr "Forbundet til %s" +#: src/Main.cxx:107 +#, fuzzy, c++-format +msgid "Connecting to {}" +msgstr "Forbundet til {}" -#: src/Main.cxx:122 -#, fuzzy, c-format -msgid "Error: MPD version %d.%d.%d is too old (%s needed)" -msgstr "Fejl: MPD version %d.%d.%d er for gammel (mindst %s er nødvendig)" +#: src/Main.cxx:123 +#, fuzzy, c++-format +msgid "Error: MPD version {} is too old ({} needed)" +msgstr "Fejl: MPD version {} er for gammel (mindst {} er nødvendig)" #. To translators: these credits are shown #. when ncmpc is started with "--version" @@ -1114,11 +1114,11 @@ msgstr "Terminalen understøtter ikke farver" msgid "All tracks" msgstr "Alle spor" -#: src/TitleBar.cxx:82 src/TitleBar.cxx:85 +#: src/TitleBar.cxx:85 src/TitleBar.cxx:87 msgid "Volume" msgstr "Volumen" -#: src/TitleBar.cxx:82 +#: src/TitleBar.cxx:85 msgid "n/a" msgstr "n/a" @@ -1158,70 +1158,70 @@ msgstr "Erstat '%s' [%s/%s] ? " msgid "Saved {}" msgstr "Gemt {}" -#: src/screen.cxx:151 +#: src/screen.cxx:155 msgid "Repeat mode is on" msgstr "Gentagelse er slået til" -#: src/screen.cxx:152 +#: src/screen.cxx:156 msgid "Repeat mode is off" msgstr "Gentagelse er slået fra" -#: src/screen.cxx:156 +#: src/screen.cxx:160 msgid "Random mode is on" msgstr "Tilfældig orden slået til" -#: src/screen.cxx:157 +#: src/screen.cxx:161 msgid "Random mode is off" msgstr "Tilfældig orden slået fra" #. "single" mode means that MPD will #. automatically stop after playing one #. single song -#: src/screen.cxx:164 +#: src/screen.cxx:168 msgid "Single mode is on" msgstr "Single afspilning slået til" -#: src/screen.cxx:165 +#: src/screen.cxx:169 msgid "Single mode is off" msgstr "Single afspilning slået fra" #. "consume" mode means that MPD removes #. each song which has finished #. playing -#: src/screen.cxx:172 +#: src/screen.cxx:176 msgid "Consume mode is on" msgstr "\"Consume mode\" er slået til" -#: src/screen.cxx:173 +#: src/screen.cxx:177 msgid "Consume mode is off" msgstr "\"Consume mode\" er slået fra" -#: src/screen.cxx:176 +#: src/screen.cxx:180 #, c++-format msgid "Crossfade {} seconds" msgstr "Crossfade {} sekunder" -#: src/screen.cxx:188 +#: src/screen.cxx:192 msgid "Database updated" msgstr "Databasen er opdateret" -#: src/screen.cxx:233 +#: src/screen.cxx:237 msgid "Find mode: Wrapped" msgstr "Søg (begynd forfra)" -#: src/screen.cxx:234 +#: src/screen.cxx:238 msgid "Find mode: Normal" msgstr "Søg normalt (start/slut)" -#: src/screen.cxx:240 +#: src/screen.cxx:244 msgid "Auto center mode: On" msgstr "Automatisk centrering er aktiv" -#: src/screen.cxx:241 +#: src/screen.cxx:245 msgid "Auto center mode: Off" msgstr "Automatisk centrering er inaktiv" -#: src/screen.cxx:386 +#: src/screen.cxx:402 msgid "Password" msgstr "Adgangskode" diff --git a/po/de.po b/po/de.po index 3f3f5a11..0215996d 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-12 11:54+0200\n" +"POT-Creation-Date: 2024-09-14 22:21+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" @@ -812,15 +812,15 @@ msgstr "Letras de cancións eliminadas" msgid "No saved lyrics" msgstr "Letras de cancións sen gardar" -#: src/Main.cxx:106 -#, fuzzy, c-format -msgid "Connecting to %s" -msgstr "Conectado a %s" +#: src/Main.cxx:107 +#, fuzzy, c++-format +msgid "Connecting to {}" +msgstr "Conectado a {}" -#: src/Main.cxx:122 -#, fuzzy, c-format -msgid "Error: MPD version %d.%d.%d is too old (%s needed)" -msgstr "Erro: a versión %d.%d.%d do MPD é moi antiga (precisase a %s)" +#: src/Main.cxx:123 +#, fuzzy, c++-format +msgid "Error: MPD version {} is too old ({} needed)" +msgstr "Erro: a versión {} do MPD é moi antiga (precisase a {})" #. To translators: these credits are shown #. when ncmpc is started with "--version" @@ -1114,11 +1114,11 @@ msgstr "A terminal non ten funcionalidades de cor" msgid "All tracks" msgstr "Todas as pistas" -#: src/TitleBar.cxx:82 src/TitleBar.cxx:85 +#: src/TitleBar.cxx:85 src/TitleBar.cxx:87 msgid "Volume" msgstr "Volume" -#: src/TitleBar.cxx:82 +#: src/TitleBar.cxx:85 msgid "n/a" msgstr "n/a" @@ -1158,70 +1158,70 @@ msgstr "Substituir %s [%s/%s] ? " msgid "Saved {}" msgstr "Gardouse {}" -#: src/screen.cxx:151 +#: src/screen.cxx:155 msgid "Repeat mode is on" msgstr "Activado o modo de repetición" -#: src/screen.cxx:152 +#: src/screen.cxx:156 msgid "Repeat mode is off" msgstr "Modo repetición desactivado" -#: src/screen.cxx:156 +#: src/screen.cxx:160 msgid "Random mode is on" msgstr "Modo aleatório activado" -#: src/screen.cxx:157 +#: src/screen.cxx:161 msgid "Random mode is off" msgstr "Modo aleatório desactivado" #. "single" mode means that MPD will #. automatically stop after playing one #. single song -#: src/screen.cxx:164 +#: src/screen.cxx:168 msgid "Single mode is on" msgstr "Modo compacto activado" -#: src/screen.cxx:165 +#: src/screen.cxx:169 msgid "Single mode is off" msgstr "Modo compacto desactivado" #. "consume" mode means that MPD removes #. each song which has finished #. playing -#: src/screen.cxx:172 +#: src/screen.cxx:176 msgid "Consume mode is on" msgstr "Modo completo activado" -#: src/screen.cxx:173 +#: src/screen.cxx:177 msgid "Consume mode is off" msgstr "Modo completo desactivado" -#: src/screen.cxx:176 +#: src/screen.cxx:180 #, c++-format msgid "Crossfade {} seconds" msgstr "Esvaecemento cruzado {} segundos" -#: src/screen.cxx:188 +#: src/screen.cxx:192 msgid "Database updated" msgstr "Base de dados actualizada" -#: src/screen.cxx:233 +#: src/screen.cxx:237 msgid "Find mode: Wrapped" msgstr "Modo de busca: Limitada" -#: src/screen.cxx:234 +#: src/screen.cxx:238 msgid "Find mode: Normal" msgstr "Modo de busca: Normal" -#: src/screen.cxx:240 +#: src/screen.cxx:244 msgid "Auto center mode: On" msgstr "Modo de autocentrado: activado" -#: src/screen.cxx:241 +#: src/screen.cxx:245 msgid "Auto center mode: Off" msgstr "Modo de autocentrado: desactivado" -#: src/screen.cxx:386 +#: src/screen.cxx:402 msgid "Password" msgstr "Contrasinal" diff --git a/po/he.po b/po/he.po index 0ab41b28..50499856 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-12 11:54+0200\n" +"POT-Creation-Date: 2024-09-14 22:21+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" @@ -811,15 +811,15 @@ msgstr "" msgid "No saved lyrics" msgstr "" -#: src/Main.cxx:106 -#, fuzzy, c-format -msgid "Connecting to %s" -msgstr "Csatlakoztatva ide: %s" +#: src/Main.cxx:107 +#, fuzzy, c++-format +msgid "Connecting to {}" +msgstr "Csatlakoztatva ide: {}" -#: src/Main.cxx:122 -#, fuzzy, c-format -msgid "Error: MPD version %d.%d.%d is too old (%s needed)" -msgstr "Hiba: a(z) %d.%d.%d MPD verzió túl régi (%s kell)" +#: src/Main.cxx:123 +#, fuzzy, c++-format +msgid "Error: MPD version {} is too old ({} needed)" +msgstr "Hiba: a(z) {} MPD verzió túl régi ({} kell)" #. To translators: these credits are shown #. when ncmpc is started with "--version" @@ -1110,11 +1110,11 @@ msgstr "A terminál nem támogatja a színeket" msgid "All tracks" msgstr "Minden szám" -#: src/TitleBar.cxx:82 src/TitleBar.cxx:85 +#: src/TitleBar.cxx:85 src/TitleBar.cxx:87 msgid "Volume" msgstr "Hangerő" -#: src/TitleBar.cxx:82 +#: src/TitleBar.cxx:85 msgid "n/a" msgstr "ismeretlen" @@ -1154,70 +1154,70 @@ msgstr "Cserélni a következőt: %s [%s/%s]? " msgid "Saved {}" msgstr "{} elmentve" -#: src/screen.cxx:151 +#: src/screen.cxx:155 msgid "Repeat mode is on" msgstr "Ismétlő mód be" -#: src/screen.cxx:152 +#: src/screen.cxx:156 msgid "Repeat mode is off" msgstr "Ismétlő mód ki" -#: src/screen.cxx:156 +#: src/screen.cxx:160 msgid "Random mode is on" msgstr "Véletlen mód be" -#: src/screen.cxx:157 +#: src/screen.cxx:161 msgid "Random mode is off" msgstr "Véletlen mód ki" #. "single" mode means that MPD will #. automatically stop after playing one #. single song -#: src/screen.cxx:164 +#: src/screen.cxx:168 msgid "Single mode is on" msgstr "Egyszeri lejátszás mód be" -#: src/screen.cxx:165 +#: src/screen.cxx:169 msgid "Single mode is off" msgstr "Egyszeri lejátszás mód ki" #. "consume" mode means that MPD removes #. each song which has finished #. playing -#: src/screen.cxx:172 +#: src/screen.cxx:176 msgid "Consume mode is on" msgstr "Fogyasztó mód be" -#: src/screen.cxx:173 +#: src/screen.cxx:177 msgid "Consume mode is off" msgstr "Fogyasztó mód ki" -#: src/screen.cxx:176 +#: src/screen.cxx:180 #, c++-format msgid "Crossfade {} seconds" msgstr "Egymásba mosás {} másodperc" -#: src/screen.cxx:188 +#: src/screen.cxx:192 msgid "Database updated" msgstr "Adatbázis frissítve" -#: src/screen.cxx:233 +#: src/screen.cxx:237 msgid "Find mode: Wrapped" msgstr "Keresési mód: újrakezdő" -#: src/screen.cxx:234 +#: src/screen.cxx:238 msgid "Find mode: Normal" msgstr "Keresési mód: normál" -#: src/screen.cxx:240 +#: src/screen.cxx:244 msgid "Auto center mode: On" msgstr "Középre igazítás bekapcsolva" -#: src/screen.cxx:241 +#: src/screen.cxx:245 msgid "Auto center mode: Off" msgstr "Középre igazítás kikapcsolva" -#: src/screen.cxx:386 +#: src/screen.cxx:402 msgid "Password" msgstr "Jelszó" diff --git a/po/ie.po b/po/ie.po index f116c723..48c49b38 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-12 11:54+0200\n" +"POT-Creation-Date: 2024-09-14 22:21+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" @@ -797,14 +797,14 @@ msgstr "" msgid "No saved lyrics" msgstr "" -#: src/Main.cxx:106 -#, c-format -msgid "Connecting to %s" +#: src/Main.cxx:107 +#, c++-format +msgid "Connecting to {}" msgstr "" -#: src/Main.cxx:122 -#, c-format -msgid "Error: MPD version %d.%d.%d is too old (%s needed)" +#: src/Main.cxx:123 +#, c++-format +msgid "Error: MPD version {} is too old ({} needed)" msgstr "" #. To translators: these credits are shown @@ -1089,11 +1089,11 @@ msgstr "" msgid "All tracks" msgstr "" -#: src/TitleBar.cxx:82 src/TitleBar.cxx:85 +#: src/TitleBar.cxx:85 src/TitleBar.cxx:87 msgid "Volume" msgstr "" -#: src/TitleBar.cxx:82 +#: src/TitleBar.cxx:85 msgid "n/a" msgstr "" @@ -1133,70 +1133,70 @@ msgstr "" msgid "Saved {}" msgstr "" -#: src/screen.cxx:151 +#: src/screen.cxx:155 msgid "Repeat mode is on" msgstr "" -#: src/screen.cxx:152 +#: src/screen.cxx:156 msgid "Repeat mode is off" msgstr "" -#: src/screen.cxx:156 +#: src/screen.cxx:160 msgid "Random mode is on" msgstr "" -#: src/screen.cxx:157 +#: src/screen.cxx:161 msgid "Random mode is off" msgstr "" #. "single" mode means that MPD will #. automatically stop after playing one #. single song -#: src/screen.cxx:164 +#: src/screen.cxx:168 msgid "Single mode is on" msgstr "" -#: src/screen.cxx:165 +#: src/screen.cxx:169 msgid "Single mode is off" msgstr "" #. "consume" mode means that MPD removes #. each song which has finished #. playing -#: src/screen.cxx:172 +#: src/screen.cxx:176 msgid "Consume mode is on" msgstr "" -#: src/screen.cxx:173 +#: src/screen.cxx:177 msgid "Consume mode is off" msgstr "" -#: src/screen.cxx:176 +#: src/screen.cxx:180 #, c++-format msgid "Crossfade {} seconds" msgstr "" -#: src/screen.cxx:188 +#: src/screen.cxx:192 msgid "Database updated" msgstr "" -#: src/screen.cxx:233 +#: src/screen.cxx:237 msgid "Find mode: Wrapped" msgstr "" -#: src/screen.cxx:234 +#: src/screen.cxx:238 msgid "Find mode: Normal" msgstr "" -#: src/screen.cxx:240 +#: src/screen.cxx:244 msgid "Auto center mode: On" msgstr "" -#: src/screen.cxx:241 +#: src/screen.cxx:245 msgid "Auto center mode: Off" msgstr "" -#: src/screen.cxx:386 +#: src/screen.cxx:402 msgid "Password" msgstr "" diff --git a/po/nl.po b/po/nl.po index 345fa561..57f5bedb 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-12 11:54+0200\n" +"POT-Creation-Date: 2024-09-14 22:21+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" @@ -801,15 +801,15 @@ msgstr "Text skladby bol odstránený" msgid "No saved lyrics" msgstr "Žiaden uložený text piesne" -#: src/Main.cxx:106 -#, c-format -msgid "Connecting to %s" -msgstr "Pripájam sa k %s" +#: src/Main.cxx:107 +#, c++-format +msgid "Connecting to {}" +msgstr "Pripájam sa k {}" -#: src/Main.cxx:122 -#, c-format -msgid "Error: MPD version %d.%d.%d is too old (%s needed)" -msgstr "Chyba: Verzia MPD %d.%d.%d je príliš stará (potrebná je %s)" +#: src/Main.cxx:123 +#, c++-format +msgid "Error: MPD version {} is too old ({} needed)" +msgstr "Chyba: Verzia MPD {} je príliš stará (potrebná je {})" #. To translators: these credits are shown #. when ncmpc is started with "--version" @@ -1098,11 +1098,11 @@ msgstr "Terminál nemá schopnosti zobrazovania farieb" msgid "All tracks" msgstr "Všetky stopy" -#: src/TitleBar.cxx:82 src/TitleBar.cxx:85 +#: src/TitleBar.cxx:85 src/TitleBar.cxx:87 msgid "Volume" msgstr "Hlasitosť" -#: src/TitleBar.cxx:82 +#: src/TitleBar.cxx:85 msgid "n/a" msgstr "n/a" @@ -1142,70 +1142,70 @@ msgstr "Nahradiť %s?" msgid "Saved {}" msgstr "Uložený {}" -#: src/screen.cxx:151 +#: src/screen.cxx:155 msgid "Repeat mode is on" msgstr "Režim opakovania zapnutý" -#: src/screen.cxx:152 +#: src/screen.cxx:156 msgid "Repeat mode is off" msgstr "Režim opakovania vypnutý" -#: src/screen.cxx:156 +#: src/screen.cxx:160 msgid "Random mode is on" msgstr "Náhodný režim zapnutý" -#: src/screen.cxx:157 +#: src/screen.cxx:161 msgid "Random mode is off" msgstr "Náhodný režim vypnutý" #. "single" mode means that MPD will #. automatically stop after playing one #. single song -#: src/screen.cxx:164 +#: src/screen.cxx:168 msgid "Single mode is on" msgstr "Jednotlivý režim zapnutý" -#: src/screen.cxx:165 +#: src/screen.cxx:169 msgid "Single mode is off" msgstr "Jednotlivý režim vypnutý" #. "consume" mode means that MPD removes #. each song which has finished #. playing -#: src/screen.cxx:172 +#: src/screen.cxx:176 msgid "Consume mode is on" msgstr "Spotrebný režim zapnutý" -#: src/screen.cxx:173 +#: src/screen.cxx:177 msgid "Consume mode is off" msgstr "Spotrebný režim vypnutý" -#: src/screen.cxx:176 +#: src/screen.cxx:180 #, c++-format msgid "Crossfade {} seconds" msgstr "Prelínanie {} sekúnd" -#: src/screen.cxx:188 +#: src/screen.cxx:192 msgid "Database updated" msgstr "Databáza aktualizovaná" -#: src/screen.cxx:233 +#: src/screen.cxx:237 msgid "Find mode: Wrapped" msgstr "Režim vyhľadávania: Dookola" -#: src/screen.cxx:234 +#: src/screen.cxx:238 msgid "Find mode: Normal" msgstr "Režim vyhľadávania: Normálny" -#: src/screen.cxx:240 +#: src/screen.cxx:244 msgid "Auto center mode: On" msgstr "Automatické centrovanie: Zapnuté" -#: src/screen.cxx:241 +#: src/screen.cxx:245 msgid "Auto center mode: Off" msgstr "Automatické centrovanie: Vypnuté" -#: src/screen.cxx:386 +#: src/screen.cxx:402 msgid "Password" msgstr "Heslo" diff --git a/po/sv.po b/po/sv.po index ccb6468e..6d23544c 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-12 11:54+0200\n" +"POT-Creation-Date: 2024-09-14 22:21+0200\n" "PO-Revision-Date: 2023-11-30 10:03+0000\n" "Last-Translator: bittin1ddc447d824349b2 \n" "Language-Team: Swedish \n" "Language-Team: Ukrainian \n" @@ -813,15 +813,15 @@ msgstr "Текст пісні видалений" msgid "No saved lyrics" msgstr "Немає збереженого тексту пісні" -#: src/Main.cxx:106 -#, fuzzy, c-format -msgid "Connecting to %s" -msgstr "Встановлене з'єднання з %s" +#: src/Main.cxx:107 +#, fuzzy, c++-format +msgid "Connecting to {}" +msgstr "Встановлене з'єднання з {}" -#: src/Main.cxx:122 -#, fuzzy, c-format -msgid "Error: MPD version %d.%d.%d is too old (%s needed)" -msgstr "Помилка: MPD версії %d.%d.%d застаріла (необхідна %s)" +#: src/Main.cxx:123 +#, fuzzy, c++-format +msgid "Error: MPD version {} is too old ({} needed)" +msgstr "Помилка: MPD версії {} застаріла (необхідна {})" #. To translators: these credits are shown #. when ncmpc is started with "--version" @@ -1109,11 +1109,11 @@ msgstr "Терміналу бракує підтримки можливосте msgid "All tracks" msgstr "Всі доріжки" -#: src/TitleBar.cxx:82 src/TitleBar.cxx:85 +#: src/TitleBar.cxx:85 src/TitleBar.cxx:87 msgid "Volume" msgstr "Гучність" -#: src/TitleBar.cxx:82 +#: src/TitleBar.cxx:85 msgid "n/a" msgstr "недоступна" @@ -1153,70 +1153,70 @@ msgstr "Замінити %s [%s/%s] ? " msgid "Saved {}" msgstr "Збережений {}" -#: src/screen.cxx:151 +#: src/screen.cxx:155 msgid "Repeat mode is on" msgstr "Режим повторення увімкнений" -#: src/screen.cxx:152 +#: src/screen.cxx:156 msgid "Repeat mode is off" msgstr "Режим повторення вимкнений" -#: src/screen.cxx:156 +#: src/screen.cxx:160 msgid "Random mode is on" msgstr "Режим випадкового програвання увімкнений" -#: src/screen.cxx:157 +#: src/screen.cxx:161 msgid "Random mode is off" msgstr "Режим випадкового програвання вимкнений" #. "single" mode means that MPD will #. automatically stop after playing one #. single song -#: src/screen.cxx:164 +#: src/screen.cxx:168 msgid "Single mode is on" msgstr "Режим повторення однієї доріжки увімкнений" -#: src/screen.cxx:165 +#: src/screen.cxx:169 msgid "Single mode is off" msgstr "Режим повторення однієї доріжки вимкнений" #. "consume" mode means that MPD removes #. each song which has finished #. playing -#: src/screen.cxx:172 +#: src/screen.cxx:176 msgid "Consume mode is on" msgstr "Режим вичерпання увімкнений" -#: src/screen.cxx:173 +#: src/screen.cxx:177 msgid "Consume mode is off" msgstr "Режим вичерпання вимкнений" -#: src/screen.cxx:176 +#: src/screen.cxx:180 #, c++-format msgid "Crossfade {} seconds" msgstr "Плавний перехід: {}с" -#: src/screen.cxx:188 +#: src/screen.cxx:192 msgid "Database updated" msgstr "База даних оновлена" -#: src/screen.cxx:233 +#: src/screen.cxx:237 msgid "Find mode: Wrapped" msgstr "Режим пошуку: завернутий (розділений???)" -#: src/screen.cxx:234 +#: src/screen.cxx:238 msgid "Find mode: Normal" msgstr "Режим пошуку: звичайний" -#: src/screen.cxx:240 +#: src/screen.cxx:244 msgid "Auto center mode: On" msgstr "Режим автоматичного центрування: увімкнено" -#: src/screen.cxx:241 +#: src/screen.cxx:245 msgid "Auto center mode: Off" msgstr "Режим автоматичного центрування: вимкнено" -#: src/screen.cxx:386 +#: src/screen.cxx:402 msgid "Password" msgstr "Пароль" diff --git a/po/zh_CN.po b/po/zh_CN.po index 0e796ad1..3530001d 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-12 11:54+0200\n" +"POT-Creation-Date: 2024-09-14 22:21+0200\n" "PO-Revision-Date: 2021-01-19 16:32+0000\n" "Last-Translator: Lilian Wang \n" "Language-Team: Chinese (Simplified) +#include + #include #include #include @@ -103,8 +104,8 @@ Instance::OnReconnectTimer() noexcept { assert(client.IsDead()); - screen_status_printf(_("Connecting to %s"), - client.GetSettingsName().c_str()); + screen_manager.Alert(fmt::format(fmt::runtime(_("Connecting to {}")), + client.GetSettingsName())); doupdate(); client.Connect(); @@ -119,9 +120,9 @@ Instance::OnMpdConnected() noexcept if (mpd_connection_cmp_server_version(connection, 0, 21, 0) < 0) { const unsigned *version = mpd_connection_get_server_version(connection); - screen_status_printf(_("Error: MPD version %d.%d.%d is too old (%s needed)"), - version[0], version[1], version[2], - "0.21.0"); + screen_manager.Alert(fmt::format(fmt::runtime(_("Error: MPD version {} is too old ({} needed)")), + fmt::format("{}.{}.{}"sv, version[0], version[1], version[2]), + "0.21.0"sv)); client.Disconnect(); doupdate(); @@ -199,7 +200,7 @@ Instance::OnCommand(Command cmd) noexcept try { screen_manager.OnCommand(GetClient(), GetSeek(), cmd); } catch (...) { - screen_status_error(std::current_exception()); + screen_manager.Alert(GetFullMessage(std::current_exception())); return; } @@ -218,7 +219,7 @@ Instance::OnMouse(Point p, mmask_t bstate) noexcept try { screen_manager.OnMouse(GetClient(), GetSeek(), p, bstate); } catch (...) { - screen_status_error(std::current_exception()); + screen_manager.Alert(GetFullMessage(std::current_exception())); } } diff --git a/src/callbacks.cxx b/src/callbacks.cxx index 2745ce05..67bee5eb 100644 --- a/src/callbacks.cxx +++ b/src/callbacks.cxx @@ -2,8 +2,8 @@ // Copyright The Music Player Daemon Project #include "Instance.hxx" -#include "screen_status.hxx" #include "ui/Bell.hxx" +#include "util/Exception.hxx" #include @@ -24,7 +24,7 @@ Instance::OnMpdAuth() noexcept void Instance::OnMpdError(std::string_view message) noexcept { - screen_status_message(message); + screen_manager.Alert(std::string{message}); Bell(); doupdate(); } @@ -32,7 +32,7 @@ Instance::OnMpdError(std::string_view message) noexcept void Instance::OnMpdError(std::exception_ptr e) noexcept { - screen_status_error(std::move(e)); + screen_manager.Alert(GetFullMessage(std::move(e))); Bell(); doupdate(); } diff --git a/src/page/Page.cxx b/src/page/Page.cxx index 66f0be8b..570cbf94 100644 --- a/src/page/Page.cxx +++ b/src/page/Page.cxx @@ -4,7 +4,7 @@ #include "Page.hxx" #include "Container.hxx" #include "ui/Window.hxx" -#include "screen_status.hxx" +#include "util/Exception.hxx" void Page::OnClose() noexcept @@ -54,7 +54,7 @@ inline void Page::_OnCoComplete(std::exception_ptr error) noexcept { if (error) - screen_status_error(std::move(error)); + parent.Alert(GetFullMessage(std::move(error))); else OnCoComplete(); } diff --git a/src/screen.cxx b/src/screen.cxx index 01c28acf..4aed9909 100644 --- a/src/screen.cxx +++ b/src/screen.cxx @@ -4,7 +4,6 @@ #include "screen.hxx" #include "PageMeta.hxx" #include "screen_list.hxx" -#include "screen_status.hxx" #include "Command.hxx" #include "config.h" #include "i18n.h" @@ -21,6 +20,7 @@ #include "ui/Options.hxx" #include "co/Task.hxx" #include "client/mpdclient.hxx" +#include "util/Exception.hxx" #include "util/ScopeExit.hxx" #include "util/StringAPI.hxx" @@ -453,7 +453,7 @@ inline void ScreenManager::OnCoComplete(std::exception_ptr error) noexcept { if (error) - screen_status_error(std::move(error)); + Alert(GetFullMessage(std::move(error))); } void