From 41b59ac844d6de05fd9cbfc13f9d7f580e9f8180 Mon Sep 17 00:00:00 2001 From: dagargo Date: Thu, 5 Dec 2024 10:29:38 +0100 Subject: [PATCH] GUI: Add acknowledgements section to about dialog from THANKS file --- po/ca.po | 36 ++++++++++++++++++++---------------- po/en.po | 36 ++++++++++++++++++++---------------- po/es.po | 36 ++++++++++++++++++++---------------- po/overwitch.pot | 38 +++++++++++++++++++++----------------- res/Makefile.am | 2 +- res/THANKS | 1 + src/main.c | 13 +++++++++++++ 7 files changed, 96 insertions(+), 66 deletions(-) create mode 120000 res/THANKS diff --git a/po/ca.po b/po/ca.po index 41a3cd4..4d8387c 100644 --- a/po/ca.po +++ b/po/ca.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: overwitch 1.1\n" "Report-Msgid-Bugs-To: dagargo@gmail.com\n" -"POT-Creation-Date: 2024-10-05 18:33+0200\n" +"POT-Creation-Date: 2024-12-05 12:23+0100\n" "PO-Revision-Date: 2022-09-21 19:08+0200\n" "Last-Translator: David García Goñi \n" "Language-Team: Catalan\n" @@ -17,45 +17,49 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/main.c:98 +#: src/main.c:103 msgid "Error" msgstr "Error" -#: src/main.c:100 +#: src/main.c:105 msgid "Stopped" msgstr "Parat" -#: src/main.c:102 +#: src/main.c:107 msgid "Ready" msgstr "Preparat" -#: src/main.c:104 +#: src/main.c:109 msgid "Booting" msgstr "Arrancant" -#: src/main.c:106 +#: src/main.c:111 msgid "Tuning" msgstr "Ajustant" -#: src/main.c:108 +#: src/main.c:113 msgid "Running" msgstr "Executant" -#: src/main.c:126 +#: src/main.c:131 #, c-format msgid "Target latency: %.1f ms" msgstr "Latència objectiu: %.1f ms" -#: src/main.c:478 +#: src/main.c:483 #, c-format msgid "JACK at %.5g kHz, %d period" msgstr "JACK a %.5g kHz, període de %d" -#: src/main.c:483 +#: src/main.c:488 #, c-format msgid "JACK not found" msgstr "JACK no trobat" +#: src/main.c:868 +msgid "Acknowledgements" +msgstr "Agraïments" + #: res/overwitch.ui:11 msgid "Refresh At Startup" msgstr "Actualitza a l'arrancament" @@ -64,7 +68,7 @@ msgstr "Actualitza a l'arrancament" msgid "Show All Columns" msgstr "Mostra totes les columnes" -#: res/overwitch.ui:21 res/overwitch.ui:494 +#: res/overwitch.ui:21 res/overwitch.ui:495 msgid "Preferences" msgstr "Preferències" @@ -164,22 +168,22 @@ msgstr "_Cancel·la" msgid "_Save" msgstr "_Alça" -#: res/overwitch.ui:499 +#: res/overwitch.ui:500 msgid "Highest" msgstr "Màxima" -#: res/overwitch.ui:500 +#: res/overwitch.ui:501 msgid "High" msgstr "Alta" -#: res/overwitch.ui:501 +#: res/overwitch.ui:502 msgid "Medium" msgstr "Mitja" -#: res/overwitch.ui:502 +#: res/overwitch.ui:503 msgid "Low" msgstr "Baixa" -#: res/overwitch.ui:503 +#: res/overwitch.ui:504 msgid "Lowest" msgstr "Mínima" diff --git a/po/en.po b/po/en.po index 350e495..401abc8 100644 --- a/po/en.po +++ b/po/en.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: overwitch 1.1\n" "Report-Msgid-Bugs-To: dagargo@gmail.com\n" -"POT-Creation-Date: 2024-10-05 18:33+0200\n" +"POT-Creation-Date: 2024-12-05 12:23+0100\n" "PO-Revision-Date: 2022-09-21 19:03+0200\n" "Last-Translator: David García Goñi \n" "Language-Team: English\n" @@ -17,45 +17,49 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/main.c:98 +#: src/main.c:103 msgid "Error" msgstr "" -#: src/main.c:100 +#: src/main.c:105 msgid "Stopped" msgstr "" -#: src/main.c:102 +#: src/main.c:107 msgid "Ready" msgstr "" -#: src/main.c:104 +#: src/main.c:109 msgid "Booting" msgstr "" -#: src/main.c:106 +#: src/main.c:111 msgid "Tuning" msgstr "" -#: src/main.c:108 +#: src/main.c:113 msgid "Running" msgstr "" -#: src/main.c:126 +#: src/main.c:131 #, c-format msgid "Target latency: %.1f ms" msgstr "" -#: src/main.c:478 +#: src/main.c:483 #, c-format msgid "JACK at %.5g kHz, %d period" msgstr "" -#: src/main.c:483 +#: src/main.c:488 #, c-format msgid "JACK not found" msgstr "" +#: src/main.c:868 +msgid "Acknowledgements" +msgstr "" + #: res/overwitch.ui:11 msgid "Refresh At Startup" msgstr "" @@ -64,7 +68,7 @@ msgstr "" msgid "Show All Columns" msgstr "" -#: res/overwitch.ui:21 res/overwitch.ui:494 +#: res/overwitch.ui:21 res/overwitch.ui:495 msgid "Preferences" msgstr "" @@ -164,22 +168,22 @@ msgstr "" msgid "_Save" msgstr "" -#: res/overwitch.ui:499 +#: res/overwitch.ui:500 msgid "Highest" msgstr "" -#: res/overwitch.ui:500 +#: res/overwitch.ui:501 msgid "High" msgstr "" -#: res/overwitch.ui:501 +#: res/overwitch.ui:502 msgid "Medium" msgstr "" -#: res/overwitch.ui:502 +#: res/overwitch.ui:503 msgid "Low" msgstr "" -#: res/overwitch.ui:503 +#: res/overwitch.ui:504 msgid "Lowest" msgstr "" diff --git a/po/es.po b/po/es.po index e39a468..23c8674 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: overwitch 1.1\n" "Report-Msgid-Bugs-To: dagargo@gmail.com\n" -"POT-Creation-Date: 2024-10-05 18:33+0200\n" +"POT-Creation-Date: 2024-12-05 12:23+0100\n" "PO-Revision-Date: 2022-09-21 19:06+0200\n" "Last-Translator: David García Goñi \n" "Language-Team: Spanish\n" @@ -17,45 +17,49 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/main.c:98 +#: src/main.c:103 msgid "Error" msgstr "Error" -#: src/main.c:100 +#: src/main.c:105 msgid "Stopped" msgstr "Parado" -#: src/main.c:102 +#: src/main.c:107 msgid "Ready" msgstr "Preparado" -#: src/main.c:104 +#: src/main.c:109 msgid "Booting" msgstr "Arrancando" -#: src/main.c:106 +#: src/main.c:111 msgid "Tuning" msgstr "Ajustando" -#: src/main.c:108 +#: src/main.c:113 msgid "Running" msgstr "Ejecutando" -#: src/main.c:126 +#: src/main.c:131 #, c-format msgid "Target latency: %.1f ms" msgstr "Latencia objetivo: %.1f ms" -#: src/main.c:478 +#: src/main.c:483 #, c-format msgid "JACK at %.5g kHz, %d period" msgstr "JACK a %.5g kHz, periodo de %d" -#: src/main.c:483 +#: src/main.c:488 #, c-format msgid "JACK not found" msgstr "JACK no encontrado" +#: src/main.c:868 +msgid "Acknowledgements" +msgstr "Agradecimientos" + #: res/overwitch.ui:11 msgid "Refresh At Startup" msgstr "Actualizar al arrancar" @@ -64,7 +68,7 @@ msgstr "Actualizar al arrancar" msgid "Show All Columns" msgstr "Mostrar todas las columnas" -#: res/overwitch.ui:21 res/overwitch.ui:494 +#: res/overwitch.ui:21 res/overwitch.ui:495 msgid "Preferences" msgstr "Preferencias" @@ -164,22 +168,22 @@ msgstr "Cancelar" msgid "_Save" msgstr "Guardar" -#: res/overwitch.ui:499 +#: res/overwitch.ui:500 msgid "Highest" msgstr "Máxima" -#: res/overwitch.ui:500 +#: res/overwitch.ui:501 msgid "High" msgstr "Alta" -#: res/overwitch.ui:501 +#: res/overwitch.ui:502 msgid "Medium" msgstr "Media" -#: res/overwitch.ui:502 +#: res/overwitch.ui:503 msgid "Low" msgstr "Baja" -#: res/overwitch.ui:503 +#: res/overwitch.ui:504 msgid "Lowest" msgstr "Mínima" diff --git a/po/overwitch.pot b/po/overwitch.pot index 68d72a3..141f6af 100644 --- a/po/overwitch.pot +++ b/po/overwitch.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: overwitch 1.1\n" +"Project-Id-Version: overwitch 2.0\n" "Report-Msgid-Bugs-To: dagargo@gmail.com\n" -"POT-Creation-Date: 2024-10-05 18:33+0200\n" +"POT-Creation-Date: 2024-12-05 12:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,45 +17,49 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/main.c:98 +#: src/main.c:103 msgid "Error" msgstr "" -#: src/main.c:100 +#: src/main.c:105 msgid "Stopped" msgstr "" -#: src/main.c:102 +#: src/main.c:107 msgid "Ready" msgstr "" -#: src/main.c:104 +#: src/main.c:109 msgid "Booting" msgstr "" -#: src/main.c:106 +#: src/main.c:111 msgid "Tuning" msgstr "" -#: src/main.c:108 +#: src/main.c:113 msgid "Running" msgstr "" -#: src/main.c:126 +#: src/main.c:131 #, c-format msgid "Target latency: %.1f ms" msgstr "" -#: src/main.c:478 +#: src/main.c:483 #, c-format msgid "JACK at %.5g kHz, %d period" msgstr "" -#: src/main.c:483 +#: src/main.c:488 #, c-format msgid "JACK not found" msgstr "" +#: src/main.c:868 +msgid "Acknowledgements" +msgstr "" + #: res/overwitch.ui:11 msgid "Refresh At Startup" msgstr "" @@ -64,7 +68,7 @@ msgstr "" msgid "Show All Columns" msgstr "" -#: res/overwitch.ui:21 res/overwitch.ui:494 +#: res/overwitch.ui:21 res/overwitch.ui:495 msgid "Preferences" msgstr "" @@ -164,22 +168,22 @@ msgstr "" msgid "_Save" msgstr "" -#: res/overwitch.ui:499 +#: res/overwitch.ui:500 msgid "Highest" msgstr "" -#: res/overwitch.ui:500 +#: res/overwitch.ui:501 msgid "High" msgstr "" -#: res/overwitch.ui:501 +#: res/overwitch.ui:502 msgid "Medium" msgstr "" -#: res/overwitch.ui:502 +#: res/overwitch.ui:503 msgid "Low" msgstr "" -#: res/overwitch.ui:503 +#: res/overwitch.ui:504 msgid "Lowest" msgstr "" diff --git a/res/Makefile.am b/res/Makefile.am index fec5a9c..827781d 100644 --- a/res/Makefile.am +++ b/res/Makefile.am @@ -1,5 +1,5 @@ resdir = $(datadir)/overwitch -res_DATA = overwitch.ui +res_DATA = overwitch.ui THANKS if JSON_DEVS_FILE res_DATA += devices.json diff --git a/res/THANKS b/res/THANKS new file mode 120000 index 0000000..03c4eaf --- /dev/null +++ b/res/THANKS @@ -0,0 +1 @@ +../THANKS \ No newline at end of file diff --git a/src/main.c b/src/main.c index 64b63c1..66e656b 100644 --- a/src/main.c +++ b/src/main.c @@ -832,6 +832,7 @@ overwitch_device_name_changed (GtkEditableLabel *label, GParamSpec *pspec, static void overwitch_build_ui () { + gchar *thanks; GtkBuilderScope *scope = gtk_builder_cscope_new (); gtk_builder_cscope_add_callback (scope, overwitch_device_name_changed); @@ -858,6 +859,18 @@ overwitch_build_ui () GTK_ABOUT_DIALOG (gtk_builder_get_object (builder, "about_dialog")); gtk_about_dialog_set_version (about_dialog, PACKAGE_VERSION); + if (g_file_get_contents (DATADIR "/THANKS", &thanks, NULL, NULL)) + { + gchar *last_new_line = strrchr (thanks, '\n'); + *last_new_line = 0; + gchar **lines = g_strsplit (thanks, "\n", 0); + gtk_about_dialog_add_credit_section (about_dialog, + _("Acknowledgements"), + (const gchar **) lines); + g_free (thanks); + g_strfreev (lines); + } + blocks_spin_button = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "blocks_spin_button")); timeout_spin_button =