From 071f8f87e7aaaa8afd20450be671762a008468c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 12 Aug 2024 21:35:04 +0200 Subject: [PATCH] core: add command line option `--build-info` / `-i` to display information about build options (closes #449) --- CHANGELOG.md | 1 + CMakeLists.txt | 1 - config.h.cmake | 40 +++++++++++ po/cs.po | 23 ++++--- po/de.po | 156 ++++++++++++++++++++++++------------------ po/es.po | 12 +++- po/fr.po | 26 +++---- po/hu.po | 12 +++- po/it.po | 21 +++--- po/ja.po | 22 +++--- po/pl.po | 52 ++++++++++---- po/pt.po | 22 +++--- po/pt_BR.po | 12 +++- po/ru.po | 12 +++- po/sr.po | 52 ++++++++++---- po/tr.po | 22 +++--- po/weechat.pot | 11 ++- src/core/core-debug.c | 66 ++++++++++++++++++ src/core/core-debug.h | 1 + src/core/core-doc.c | 8 +-- src/core/weechat.c | 12 +++- src/core/weechat.h | 4 +- 22 files changed, 422 insertions(+), 166 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b9802864..b8b71d1f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ ### Added +- core: add command line option `--build-info` / `-i` to display information about build options ([#449](https://github.com/weechat/weechat/issues/449)) - irc: add option `-export` in command `/list`, add option irc.look.list_buffer_format_export - relay: add option relay.network.websocket_permessage_deflate ([#1549](https://github.com/weechat/weechat/issues/1549)) - relay: add option relay.look.raw_messages_max_length ([#2122](https://github.com/weechat/weechat/issues/2122)) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0f52cb81..c99273c6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,7 +260,6 @@ add_subdirectory(icons) if(ENABLE_NLS) find_package(Gettext REQUIRED) - add_definitions(-DENABLE_NLS) find_package(Intl REQUIRED) list(APPEND EXTRA_LIBS "${Intl_LIBRARIES}") add_subdirectory(po) diff --git a/config.h.cmake b/config.h.cmake index 9f6b2c3f3..80ca72920 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,3 +1,39 @@ +#cmakedefine01 ENABLE_NCURSES +#cmakedefine01 ENABLE_HEADLESS +#cmakedefine01 ENABLE_NLS +#cmakedefine01 ENABLE_LARGEFILE +#cmakedefine01 ENABLE_ZSTD +#cmakedefine01 ENABLE_CJSON +#cmakedefine01 ENABLE_ALIAS +#cmakedefine01 ENABLE_BUFLIST +#cmakedefine01 ENABLE_CHARSET +#cmakedefine01 ENABLE_EXEC +#cmakedefine01 ENABLE_FIFO +#cmakedefine01 ENABLE_FSET +#cmakedefine01 ENABLE_IRC +#cmakedefine01 ENABLE_LOGGER +#cmakedefine01 ENABLE_RELAY +#cmakedefine01 ENABLE_SCRIPT +#cmakedefine01 ENABLE_SCRIPTS +#cmakedefine01 ENABLE_PERL +#cmakedefine01 ENABLE_PYTHON +#cmakedefine01 ENABLE_RUBY +#cmakedefine01 ENABLE_LUA +#cmakedefine01 ENABLE_TCL +#cmakedefine01 ENABLE_GUILE +#cmakedefine01 ENABLE_JAVASCRIPT +#cmakedefine01 ENABLE_PHP +#cmakedefine01 ENABLE_SPELL +#cmakedefine01 ENABLE_ENCHANT +#cmakedefine01 ENABLE_TRIGGER +#cmakedefine01 ENABLE_TYPING +#cmakedefine01 ENABLE_XFER +#cmakedefine01 ENABLE_MAN +#cmakedefine01 ENABLE_DOC +#cmakedefine01 ENABLE_DOC_INCOMPLETE +#cmakedefine01 ENABLE_TESTS +#cmakedefine01 ENABLE_CODE_COVERAGE + #cmakedefine HAVE_SYS_RESOURCE_H #cmakedefine HAVE_FLOCK #cmakedefine HAVE_LANGINFO_CODESET @@ -11,6 +47,10 @@ #cmakedefine HAVE_ASPELL_VERSION_STRING #cmakedefine HAVE_ENCHANT_GET_VERSION #cmakedefine HAVE_GUILE_GMP_MEMORY_FUNCTIONS + +#cmakedefine CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@" +#cmakedefine CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" + #define PACKAGE_VERSION "@VERSION@" #define PACKAGE "@PROJECT_NAME@" #define PACKAGE_NAME "@PROJECT_NAME@" diff --git a/po/cs.po b/po/cs.po index a9e7e850d..9e65bed4b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-11 12:15+0200\n" -"PO-Revision-Date: 2024-06-11 07:49+0200\n" +"POT-Creation-Date: 2024-08-12 21:29+0200\n" +"PO-Revision-Date: 2024-08-12 21:35+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" "Language: cs\n" @@ -102,6 +102,7 @@ msgid "" "delete it on exit\n" " (incompatible with option \"-d\")\n" " -h, --help display this help and exit\n" +" -i, --build-info display build information and exit\n" " -l, --license display WeeChat license and exit\n" " -p, --no-plugin don't load any plugin at startup\n" " -P, --plugins load only these plugins at startup\n" @@ -5585,6 +5586,16 @@ msgstr "%sUpozornění: %s, řádek %d: nevalidní syntaxe, chybí \"]\"" msgid "Reloading configuration file %s" msgstr "Znovunačítám konfigurační soubor %s" +#. TRANSLATORS: "%s %s" after "compiled on" is date and time +#, c-format +msgid "WeeChat %s, compiled on %s %s\n" +msgstr "" + +#, fuzzy +#| msgid "(old options?)" +msgid "Build options:\n" +msgstr "(staré volby?)" + msgid "Windows tree:" msgstr "Strom oken:" @@ -17083,11 +17094,3 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)" - -#, fuzzy -#~ msgid "" -#~ "use IPv6 protocol for server communication (try IPv6 then fallback to " -#~ "IPv4); if disabled, only IPv4 is used" -#~ msgstr "" -#~ "použije IPv6 pro komunikaci se serverem (vyzkouší IPv6 a pokud selže " -#~ "použije IPv4); pokud je vypnuta použije pouze IPv4" diff --git a/po/de.po b/po/de.po index e683477a7..7337cc33e 100644 --- a/po/de.po +++ b/po/de.po @@ -26,8 +26,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-11 12:15+0200\n" -"PO-Revision-Date: 2024-08-12 12:04+0200\n" +"POT-Creation-Date: 2024-08-12 21:29+0200\n" +"PO-Revision-Date: 2024-08-12 21:35+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" "Language: de_DE\n" @@ -98,6 +98,32 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "Aufruf: %s [Option...] [Erweiterung:Option...]\n" +#, fuzzy +#| msgid "" +#| " -a, --no-connect disable auto-connect to servers at startup\n" +#| " -c, --colors display default colors in terminal and exit\n" +#| " -d, --dir force a single WeeChat home directory\n" +#| " or 5 different directories separated by colons " +#| "(in this order: config, data, state, cache, runtime)\n" +#| " (environment variable WEECHAT_HOME is read if " +#| "this option is not given)\n" +#| " -t, --temp-dir create a temporary WeeChat home directory and " +#| "delete it on exit\n" +#| " (incompatible with option \"-d\")\n" +#| " -h, --help display this help and exit\n" +#| " -l, --license display WeeChat license and exit\n" +#| " -p, --no-plugin don't load any plugin at startup\n" +#| " -P, --plugins load only these plugins at startup\n" +#| " (see /help weechat.plugin.autoload)\n" +#| " -r, --run-command run command(s) after startup;\n" +#| " many commands can be separated by semicolons " +#| "and are evaluated,\n" +#| " this option can be given multiple times\n" +#| " -s, --no-script don't load any script at startup\n" +#| " --upgrade upgrade WeeChat using session files (see /help " +#| "upgrade in WeeChat)\n" +#| " -v, --version display WeeChat version and exit\n" +#| " plugin:option option for plugin (see man weechat)\n" msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -c, --colors display default colors in terminal and exit\n" @@ -110,6 +136,7 @@ msgid "" "delete it on exit\n" " (incompatible with option \"-d\")\n" " -h, --help display this help and exit\n" +" -i, --build-info display build information and exit\n" " -l, --license display WeeChat license and exit\n" " -p, --no-plugin don't load any plugin at startup\n" " -P, --plugins load only these plugins at startup\n" @@ -2138,11 +2165,11 @@ msgstr "" "undOperatoren (+, -, *, /, //, %, **)" msgid "" -" - ${random:min,max}: a random integer number between \"min\" and " -"\"max\" (inclusive)" +" - ${random:min,max}: a random integer number between \"min\" and \"max\" " +"(inclusive)" msgstr "" -" - ${random:min,max}: eine zufällige ganze Zahl zwischen \"min\" " -"und\"max\" (einschließlich)" +" - ${random:min,max}: eine zufällige ganze Zahl zwischen \"min\" und\"max\" " +"(einschließlich)" msgid " - ${translate:string}: the translated string" msgstr " - ${translate:string}: die übersetzte Zeichenkette" @@ -3082,8 +3109,8 @@ msgid "" " raw[chat(xxx)]: chat area for buffer with name \"xxx\" (full name " "including plugin)" msgstr "" -" raw[chat(xxx)]: Chatbereich für einen Buffer mit dem Namen " -"\"xxx\" (vollständiger Name, mit Erweiterung)" +" raw[chat(xxx)]: Chatbereich für einen Buffer mit dem Namen \"xxx\" " +"(vollständiger Name, mit Erweiterung)" msgid " raw[bar(*)]: any bar" msgstr " raw[bar(*)]: beliebige Bar" @@ -5033,8 +5060,8 @@ msgstr "" "\"-yes\" ausgeführt werden (siehe /help quit)" msgid "" -"if set, /upgrade command must be confirmed with extra argument \"-" -"yes\" (see /help upgrade)" +"if set, /upgrade command must be confirmed with extra argument \"-yes\" " +"(see /help upgrade)" msgstr "" "ist diese Einstellung aktiviert, muss der \"/upgrade\" Befehl mit dem " "Argument \"-yes\" ausgeführt werden (siehe /help upgrade)" @@ -5090,10 +5117,10 @@ msgid "" "weechat.color.emphasized* are used" msgstr "" "Attribute um Textpassagen hervorzuheben: Das setzen von ein- oder mehreren " -"Attributen ist möglich (\"%\" für blinkenden Text, \".\" zum " -"\"dimmen\" (halbe Helligkeit),\"*\" für fett, \"!\" für invertiert, \"/\" " -"für kursiv, \"_\" für unterstrichen); wenn die Zeichenkette leer ist, werden " -"die Farben genutzt die durch weechat.color.emphasized* definiert sind" +"Attributen ist möglich (\"%\" für blinkenden Text, \".\" zum \"dimmen\" " +"(halbe Helligkeit),\"*\" für fett, \"!\" für invertiert, \"/\" für kursiv, " +"\"_\" für unterstrichen); wenn die Zeichenkette leer ist, werden die Farben " +"genutzt die durch weechat.color.emphasized* definiert sind" msgid "" "comma separated list of words to highlight; case insensitive comparison (use " @@ -6381,6 +6408,16 @@ msgstr "" msgid "Reloading configuration file %s" msgstr "Konfigurationsdatei \"%s\" wird erneut geladen" +#. TRANSLATORS: "%s %s" after "compiled on" is date and time +#, c-format +msgid "WeeChat %s, compiled on %s %s\n" +msgstr "" + +#, fuzzy +#| msgid "(old options?)" +msgid "Build options:\n" +msgstr "(alte Einstellungen?)" + msgid "Windows tree:" msgstr "Fensterstruktur:" @@ -7066,24 +7103,24 @@ msgstr "" "Bedingungen um eine Infobar anzuzeigen. Eine einfache Bedingung: \"active\", " "\"inactive\", \"nicklist\" (Fenster muss aktiv/inaktiv sein oder der Buffer " "enthält eine Benutzerliste), oder man nutzt einen Ausdruck mit Bedingungen " -"(siehe /help eval). Beispiele: \"${nicklist} && ${info:term_width} > " -"100\" (lokale Variablen für den Ausdruck sind ${active}, ${inactive} und " +"(siehe /help eval). Beispiele: \"${nicklist} && ${info:term_width} > 100\" " +"(lokale Variablen für den Ausdruck sind ${active}, ${inactive} und " "${nicklist})" msgid "bar position (bottom, top, left, right)" msgstr "Position der Infobar (unten, oben, links, rechts)" msgid "" -"bar filling direction (\"horizontal\" (from left to right) or " -"\"vertical\" (from top to bottom)) when bar position is top or bottom" +"bar filling direction (\"horizontal\" (from left to right) or \"vertical\" " +"(from top to bottom)) when bar position is top or bottom" msgstr "" "Darstellung innerhalb der Infobar, falls die Infobar oben/unten angezeigt " "wird (\"horizontal\" (von links nach rechts) oder \"vertikal\" (von oben " "nach unten))" msgid "" -"bar filling direction (\"horizontal\" (from left to right) or " -"\"vertical\" (from top to bottom)) when bar position is left or right" +"bar filling direction (\"horizontal\" (from left to right) or \"vertical\" " +"(from top to bottom)) when bar position is left or right" msgstr "" "Darstellung innerhalb der Infobar, falls die Infobar links/rechts angezeigt " "wird (\"horizontal\" (von links nach rechts) oder \"vertikal\" (von oben " @@ -7123,9 +7160,9 @@ msgid "separator line between bar and other bars/windows" msgstr "Trennzeichen zwischen verschieden Infobars und Fenstern" msgid "" -"items of bar, they can be separated by comma (space between items) or \"+" -"\" (glued items); special syntax \"@buffer:item\" can be used to force " -"buffer used when displaying the bar item" +"items of bar, they can be separated by comma (space between items) or \"+\" " +"(glued items); special syntax \"@buffer:item\" can be used to force buffer " +"used when displaying the bar item" msgstr "" "Items einer Bar können entweder durch Kommata (\",\") voneinander getrennt " "(setzt ein Leerzeichen zwischen die Items), oder durch ein \"+\" Zeichen " @@ -8883,8 +8920,8 @@ msgid " - ${description}: option description (translated)" msgstr " - ${description}: Beschreibung der Option (übersetzt)" msgid "" -" - ${description2}: option description (translated), \"(no " -"description)\" (translated) if there's no description" +" - ${description2}: option description (translated), \"(no description)\" " +"(translated) if there's no description" msgstr "" " - ${description2}: Beschreibung der Option (übersetzt), \"(keine " "Beschreibung)\" (übersetzt) falls keine Beschreibung vorhanden" @@ -9575,8 +9612,8 @@ msgstr "" #, c-format msgid "" -"%s%s: if you want to add a standard server, use the command \"/server " -"add\" (see /help server); if you really want to add a temporary server (NOT " +"%s%s: if you want to add a standard server, use the command \"/server add\" " +"(see /help server); if you really want to add a temporary server (NOT " "SAVED), turn on the option irc.look.temporary_servers" msgstr "" "%s%s: falls ein Standardserver erstellt werden soll, muss der Befehl \"/" @@ -12796,8 +12833,8 @@ msgid "" "interval between two checks for notify with IRC command \"whois\" (in " "minutes)" msgstr "" -"Intervall zwischen zwei notify Überprüfungen mit dem IRC Befehl " -"\"whois\" (in Minuten)" +"Intervall zwischen zwei notify Überprüfungen mit dem IRC Befehl \"whois\" " +"(in Minuten)" msgid "" "cause SASL authentication failure when SASL is requested but unavailable on " @@ -15154,19 +15191,19 @@ msgstr "%s%s: Interpreter kann nicht freigeben werden" #, c-format msgid "" -"%s%s: too few arguments received from client %s%s%s for resource " -"\"%s\" (received: %d arguments, expected: at least %d)" +"%s%s: too few arguments received from client %s%s%s for resource \"%s\" " +"(received: %d arguments, expected: at least %d)" msgstr "" "%s%s: Zu wenige Argumente von Client %s%s%s für die Ressource \"%s\" " "erhalten (Empfangen: %d Argumente, mindestens erwartet: %d)" #, c-format msgid "" -"%s%s: too many arguments received from client %s%s%s for resource " -"\"%s\" (received: %d arguments, expected: at most %d)" +"%s%s: too many arguments received from client %s%s%s for resource \"%s\" " +"(received: %d arguments, expected: at most %d)" msgstr "" -"%s%s: Zu viele Argumente von Client erhalten %s%s%s für die Ressource " -"\"%s\" (Empfangen: %d Argumente, höchstens erwartet: %d)" +"%s%s: Zu viele Argumente von Client erhalten %s%s%s für die Ressource \"%s\" " +"(Empfangen: %d Argumente, höchstens erwartet: %d)" #, c-format msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" @@ -16341,8 +16378,8 @@ msgid "" "%s%s: error: file with TLS certificate/key is not readable: \"%s\" (option " "relay.network.tls_cert_key)" msgstr "" -"%s%s: Fehler: Datei mit TLS Zertifikat/Schlüssel ist nicht lesbar: " -"\"%s\" (Option relay.network.tls_cert_key)" +"%s%s: Fehler: Datei mit TLS Zertifikat/Schlüssel ist nicht lesbar: \"%s\" " +"(Option relay.network.tls_cert_key)" #, c-format msgid "%s%s: unable to initialize priority for TLS" @@ -16494,8 +16531,8 @@ msgstr "" #, c-format msgid "" -"%s%s: too few arguments received from client %s%s%s for command " -"\"%s\" (received: %d arguments, expected: at least %d)" +"%s%s: too few arguments received from client %s%s%s for command \"%s\" " +"(received: %d arguments, expected: at least %d)" msgstr "" "%s%s: Zu wenige Argumente von Client %s%s%s für den Befehl \"%s\" erhalten " "(Empfangen: %d Argumente, mindestens Erwartet: %d)" @@ -17681,22 +17718,22 @@ msgstr "verwaltet Trigger, das Schweizer Armeemesser für WeeChat" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated msgid "" "list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace " -" " -"[\"\" [\"\" [\"\" [\"\" [\"\" [\"\"]]]]]] " -"|| addinput [] || input|output|recreate || set