From c197beacf742553f0ed8d89faa1407a0d97f352c Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Wed, 15 Jul 2026 07:09:38 +0200 Subject: [PATCH] Translate menu labels after locale setup --- CMakeLists.txt | 2 +- po/de.po | 6 +++--- po/prozgui.pot | 2 +- src/main.cpp | 13 +++++++++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51e6954..18156f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.20) -project(prozgui VERSION 2.4.5 LANGUAGES C CXX) +project(prozgui VERSION 2.4.6 LANGUAGES C CXX) include(GNUInstallDirs) find_package(Threads REQUIRED) diff --git a/po/de.po b/po/de.po index ea79a0f..dbb32ab 100644 --- a/po/de.po +++ b/po/de.po @@ -557,7 +557,7 @@ msgstr "&Einstellungen" #: src/main.cpp:312 msgid "&Quit" -msgstr "&Aufhören" +msgstr "&Beenden" #: src/main.cpp:314 msgid "&Download" @@ -577,11 +577,11 @@ msgstr "&Aus Liste entfernen" #: src/main.cpp:319 msgid "&Help" -msgstr "&Helfen" +msgstr "&Hilfe" #: src/main.cpp:320 msgid "&About" -msgstr "&Um" +msgstr "&Über" #: src/main.cpp:447 msgid "Error: Invalid option\n" diff --git a/po/prozgui.pot b/po/prozgui.pot index 60ac1fc..779977e 100644 --- a/po/prozgui.pot +++ b/po/prozgui.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: prozgui 2.4.5\n" +"Project-Id-Version: prozgui 2.4.6\n" "POT-Creation-Date: 2003-02-18 05:45+0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" diff --git a/src/main.cpp b/src/main.cpp index 3d4b98b..4af4b5a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -672,6 +672,19 @@ int main(int argc, char **argv) bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE); + /* menuitems has static storage and is constructed before setlocale(). + Refresh its labels now that the selected gettext domain is active. */ + menuitems[0].label(_("&File")); + menuitems[1].label(_("&New URL")); + menuitems[2].label(_("&Preferences")); + menuitems[3].label(_("&Quit")); + menuitems[5].label(_("&Download")); + menuitems[6].label(_("&Start")); + menuitems[7].label(_("&Stop")); + menuitems[8].label(_("&Remove from list")); + menuitems[10].label(_("&Help")); + menuitems[11].label(_("&About")); + apply_desktop_scheme(); set_defaults(&argc, &argv);