From 08280f472d9101c7a808f6cff031776fe5aa0501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 4 Jul 2026 21:28:55 +0200 Subject: [PATCH] core: auto-detect terminal background and apply light theme on first start Detect the terminal background (via COLORFGBG or an OSC 11 query) before GUI init and, on the first start, automatically apply the built-in "light" theme when a light terminal is detected. The function gui_term_theme_is_light returns an int (1 if light, 0 otherwise, 0 being the safe value when detection is unsure). --- CHANGELOG.md | 2 +- po/cs.po | 81 +++++++--- po/de.po | 83 +++++++--- po/es.po | 77 ++++++--- po/fr.po | 84 +++++++--- po/hu.po | 33 ++-- po/it.po | 33 ++-- po/ja.po | 75 ++++++--- po/pl.po | 77 ++++++--- po/pt.po | 79 +++++++--- po/pt_BR.po | 33 ++-- po/ru.po | 33 ++-- po/sr.po | 77 ++++++--- po/tr.po | 76 ++++++--- po/weechat.pot | 33 ++-- src/core/weechat.c | 57 +++++-- src/core/weechat.h | 1 + src/gui/curses/gui-curses-term.c | 146 ++++++++++++++++++ src/gui/gui-main.h | 1 + tests/unit/CMakeLists.txt | 1 + .../unit/gui/curses/test-gui-curses-term.cpp | 87 +++++++++++ tests/unit/tests.cpp | 1 + 22 files changed, 900 insertions(+), 270 deletions(-) create mode 100644 tests/unit/gui/curses/test-gui-curses-term.cpp diff --git a/CHANGELOG.md b/CHANGELOG.md index e5f18e4cc..138fb17ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ SPDX-License-Identifier: GPL-3.0-or-later ### Added - core: add command `/theme` -- core: add built-in "light" theme +- core: add built-in "light" theme, applied automatically on first start on light-background terminals - core: add `themable` flag on configuration options - core: add options weechat.look.theme and weechat.look.theme_backup - api: add function theme_register diff --git a/po/cs.po b/po/cs.po index 6e828bed2..7488e8889 100644 --- a/po/cs.po +++ b/po/cs.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-05-30 14:01+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: Czech \n" @@ -6569,37 +6569,36 @@ msgstr "Konec příkazu '%s', vypršel časový limit (%.1fs)" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "1 pokud se WeeChat aktualizuje (příkaz `/upgrade`)" -#, fuzzy +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" -"Vítejte v WeeChatu!\n" -"\n" -"Pokud objevujete WeeChat je doporučeno si prečíst alespoň \"quickstart\" " -"průvodce, a pokud máte trochu času tak uživatelskou příručku, oboje vám " -"vyvětlí hlavní koncepty WeeChatu.\n" -"Veškerá dokumentace WeeChatu je dostupná na adrese: https://weechat.org/" -"doc/\n" -"\n" -"Navíc je zde dostupná integrovaná nápověda /help fungující na všech " -"příkazech a nastaveních ( použijte Tab klávesu pro doplňování názvů).\n" -"Příkaz /iset (script iset.pl) může pomoci upravit WeeChat\" /script install " -"iset.pl\n" -"\n" -"Můžete přidat IRC server a připojit se k němu pomocí príkazů /server a /" -"connect ( podívejte se na /help server)." + +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format @@ -17753,3 +17752,35 @@ msgid "" msgstr "" "%s%s: nelze akceptovat obnovení souboru \"%s\" (port: %d, počáteční pozice: " "%llu): xfer nenalezen nebo není připraven pro přenos" + +#, fuzzy +#~ msgid "" +#~ "Welcome to WeeChat!\n" +#~ "\n" +#~ "If you are discovering WeeChat, it is recommended to read at least the " +#~ "quickstart guide, and the user's guide if you have some time; they " +#~ "explain main WeeChat concepts.\n" +#~ "All WeeChat docs are available at: https://weechat.org/doc/\n" +#~ "\n" +#~ "Moreover, there is inline help with /help on all commands and options " +#~ "(use Tab key to complete the name).\n" +#~ "The command /fset can help to customize WeeChat.\n" +#~ "\n" +#~ "You can add and connect to an IRC server with /server and /connect " +#~ "commands (see /help server)." +#~ msgstr "" +#~ "Vítejte v WeeChatu!\n" +#~ "\n" +#~ "Pokud objevujete WeeChat je doporučeno si prečíst alespoň \"quickstart\" " +#~ "průvodce, a pokud máte trochu času tak uživatelskou příručku, oboje vám " +#~ "vyvětlí hlavní koncepty WeeChatu.\n" +#~ "Veškerá dokumentace WeeChatu je dostupná na adrese: https://weechat.org/" +#~ "doc/\n" +#~ "\n" +#~ "Navíc je zde dostupná integrovaná nápověda /help fungující na všech " +#~ "příkazech a nastaveních ( použijte Tab klávesu pro doplňování názvů).\n" +#~ "Příkaz /iset (script iset.pl) může pomoci upravit WeeChat\" /script " +#~ "install iset.pl\n" +#~ "\n" +#~ "Můžete přidat IRC server a připojit se k němu pomocí príkazů /server a /" +#~ "connect ( podívejte se na /help server)." diff --git a/po/de.po b/po/de.po index 46a68d5b6..670dd1447 100644 --- a/po/de.po +++ b/po/de.po @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-06-28 08:28+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -7413,37 +7413,36 @@ msgstr "Ende der URL-Übertragung '%s', Übertragung gestoppt" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "WeeChat läuft im Hintergrundmodus (ctrl-c zum Beenden)." +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" -"Willkommen zu WeeChat!\n" -"\n" -"Wenn Du WeeChat nutzen möchtest dann solltest Du zumindest einen Blick in " -"die Quickstart-Anleitung werfen. Wir empfehlen aber um den vollen " -"Funktionsumfang und das Konzept hinter WeeChat kennen zu lernen, die " -"Benutzeranleitung zu lesen.\n" -"Die vollständige Dokumentation findet man unter: https://weechat.org/doc/\n" -"\n" -"Darüber hinaus ist in WeeChat eine interne Hilfe integriert die man mit /" -"help auf alle Befehle und Optionen anwenden kann (mittels der TAB-Taste kann " -"eine Namensvervollständigung durchgeführt werden).\n" -"Mit dem Befehl /fset kann WeeChat sehr einfach und übersichtlich den eigenen " -"Bedürfnissen angepasst werden.\n" -"\n" -"Um einen IRC Server zu erstellen und sich mit selbigem zu Verbinden müssen " -"die Befehle /server und /connect verwendet werden (siehe /help server)." + +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format @@ -19343,3 +19342,37 @@ msgstr "" "%s%s Datei \"%s\" zum Fortsetzen der Übertragung wird nicht akzeptiert " "(Port: %d, Startposition: %llu): xfer nicht gefunden oder nicht bereit für " "Transfer" + +#~ msgid "" +#~ "Welcome to WeeChat!\n" +#~ "\n" +#~ "If you are discovering WeeChat, it is recommended to read at least the " +#~ "quickstart guide, and the user's guide if you have some time; they " +#~ "explain main WeeChat concepts.\n" +#~ "All WeeChat docs are available at: https://weechat.org/doc/\n" +#~ "\n" +#~ "Moreover, there is inline help with /help on all commands and options " +#~ "(use Tab key to complete the name).\n" +#~ "The command /fset can help to customize WeeChat.\n" +#~ "\n" +#~ "You can add and connect to an IRC server with /server and /connect " +#~ "commands (see /help server)." +#~ msgstr "" +#~ "Willkommen zu WeeChat!\n" +#~ "\n" +#~ "Wenn Du WeeChat nutzen möchtest dann solltest Du zumindest einen Blick in " +#~ "die Quickstart-Anleitung werfen. Wir empfehlen aber um den vollen " +#~ "Funktionsumfang und das Konzept hinter WeeChat kennen zu lernen, die " +#~ "Benutzeranleitung zu lesen.\n" +#~ "Die vollständige Dokumentation findet man unter: https://weechat.org/" +#~ "doc/\n" +#~ "\n" +#~ "Darüber hinaus ist in WeeChat eine interne Hilfe integriert die man mit /" +#~ "help auf alle Befehle und Optionen anwenden kann (mittels der TAB-Taste " +#~ "kann eine Namensvervollständigung durchgeführt werden).\n" +#~ "Mit dem Befehl /fset kann WeeChat sehr einfach und übersichtlich den " +#~ "eigenen Bedürfnissen angepasst werden.\n" +#~ "\n" +#~ "Um einen IRC Server zu erstellen und sich mit selbigem zu Verbinden " +#~ "müssen die Befehle /server und /connect verwendet werden (siehe /help " +#~ "server)." diff --git a/po/es.po b/po/es.po index 02b09fc45..92d07bfcd 100644 --- a/po/es.po +++ b/po/es.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-06-28 08:46+0200\n" "Last-Translator: Santiago Forero \n" "Language-Team: Spanish \n" @@ -6733,35 +6733,36 @@ msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "" "WeeChat se está ejecutando en modo de segundo plano (Ctrl-C para salir)." +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" -"¡Bienvenido a WeeChat!\n" -"\n" -"Si estás conociendo WeeChat, es recomendable que leas la guia de inicio, y " -"la guia de usuario si tienes tiempo; en ellas se explicanlo conceptos " -"principales de WeeChat.\n" -"Toda la documentación de WeeChat se encuentra disponible en: https://" -"weechat.org/doc/\n" -"\n" -"Adicionalmente, hay un menú de ayuda con el comando /help con todos los " -"comandos y opciones (usa el tabulador (Tab) para completar el nombre).\n" -"El comando /fset puede ayudar a customizar WeeChat.\n" -"\n" -"Puedes agregar y conectarte a un servidor IRC con los comandos /server y /" -"connect (más información en /help server)." + +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format @@ -18055,3 +18056,33 @@ msgid "" msgstr "" "%s%s: no es posible aceptar la continuación del archivo \"%s\" (puerto: %d, " "posición inicial: %llu): xfer encontrado o no está listo para transferir" + +#~ msgid "" +#~ "Welcome to WeeChat!\n" +#~ "\n" +#~ "If you are discovering WeeChat, it is recommended to read at least the " +#~ "quickstart guide, and the user's guide if you have some time; they " +#~ "explain main WeeChat concepts.\n" +#~ "All WeeChat docs are available at: https://weechat.org/doc/\n" +#~ "\n" +#~ "Moreover, there is inline help with /help on all commands and options " +#~ "(use Tab key to complete the name).\n" +#~ "The command /fset can help to customize WeeChat.\n" +#~ "\n" +#~ "You can add and connect to an IRC server with /server and /connect " +#~ "commands (see /help server)." +#~ msgstr "" +#~ "¡Bienvenido a WeeChat!\n" +#~ "\n" +#~ "Si estás conociendo WeeChat, es recomendable que leas la guia de inicio, " +#~ "y la guia de usuario si tienes tiempo; en ellas se explicanlo conceptos " +#~ "principales de WeeChat.\n" +#~ "Toda la documentación de WeeChat se encuentra disponible en: https://" +#~ "weechat.org/doc/\n" +#~ "\n" +#~ "Adicionalmente, hay un menú de ayuda con el comando /help con todos los " +#~ "comandos y opciones (usa el tabulador (Tab) para completar el nombre).\n" +#~ "El comando /fset puede ayudar a customizar WeeChat.\n" +#~ "\n" +#~ "Puedes agregar y conectarte a un servidor IRC con los comandos /server y /" +#~ "connect (más información en /help server)." diff --git a/po/fr.po b/po/fr.po index d30a6dc7b..dd616314e 100644 --- a/po/fr.po +++ b/po/fr.po @@ -23,8 +23,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" -"PO-Revision-Date: 2026-07-04 20:56+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" +"PO-Revision-Date: 2026-07-04 21:08+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: French \n" "Language: fr\n" @@ -7291,36 +7291,46 @@ msgstr "Fin du transfert d'URL '%s', transfert arrêté" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "WeeChat tourne sans interface (ctrl-c pour quitter)." +msgid "Welcome to WeeChat!" +msgstr "Bienvenue dans WeeChat !" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" +"Si vous découvrez WeeChat, il est recommandé de lire au moins le guide de " +"démarrage rapide, et le guide utilisateur si vous avez le temps ; ils " +"expliquent les concepts principaux de WeeChat." + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "Toutes les documentations WeeChat sont disponibles ici : %s" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" +"De plus, il y a de l'aide en ligne avec /help sur toutes les commandes et " +"options (utilisez la touche Tab pour compléter le nom)." + +msgid "The command /fset can help to customize WeeChat." +msgstr "La commande /fset peut aider à paramétrer WeeChat." + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" -"Bienvenue dans WeeChat !\n" -"\n" -"Si vous découvrez WeeChat, il est recommandé de lire au moins le guide de " -"démarrage rapide, et le guide utilisateur si vous avez le temps ; ils " -"expliquent les concepts principaux de WeeChat.\n" -"Toutes les documentations WeeChat sont disponibles ici : https://weechat.org/" -"doc/\n" -"\n" -"De plus, il y a de l'aide en ligne avec /help sur toutes les commandes et " -"options (utilisez la touche Tab pour compléter le nom).\n" -"La commande /fset peut aider à paramétrer WeeChat.\n" -"\n" "Vous pouvez ajouter et vous connecter à un serveur IRC avec les commandes /" "server et /connect (voir /help server)." +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" +"Le thème \"light\" sera automatiquement appliqué. Utilisez /theme reset pour " +"revenir au thème sombre par défaut." + #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format msgid "" @@ -19005,6 +19015,36 @@ msgstr "" "%s%s : impossible d'accepter de continuer le fichier \"%s\" (port : %d, " "position de départ : %llu) : xfer non trouvé ou non prêt pour le transfert" +#~ msgid "" +#~ "Welcome to WeeChat!\n" +#~ "\n" +#~ "If you are discovering WeeChat, it is recommended to read at least the " +#~ "quickstart guide, and the user's guide if you have some time; they " +#~ "explain main WeeChat concepts.\n" +#~ "All WeeChat docs are available at: https://weechat.org/doc/\n" +#~ "\n" +#~ "Moreover, there is inline help with /help on all commands and options " +#~ "(use Tab key to complete the name).\n" +#~ "The command /fset can help to customize WeeChat.\n" +#~ "\n" +#~ "You can add and connect to an IRC server with /server and /connect " +#~ "commands (see /help server)." +#~ msgstr "" +#~ "Bienvenue dans WeeChat !\n" +#~ "\n" +#~ "Si vous découvrez WeeChat, il est recommandé de lire au moins le guide de " +#~ "démarrage rapide, et le guide utilisateur si vous avez le temps ; ils " +#~ "expliquent les concepts principaux de WeeChat.\n" +#~ "Toutes les documentations WeeChat sont disponibles ici : https://" +#~ "weechat.org/doc/\n" +#~ "\n" +#~ "De plus, il y a de l'aide en ligne avec /help sur toutes les commandes et " +#~ "options (utilisez la touche Tab pour compléter le nom).\n" +#~ "La commande /fset peut aider à paramétrer WeeChat.\n" +#~ "\n" +#~ "Vous pouvez ajouter et vous connecter à un serveur IRC avec les " +#~ "commandes /server et /connect (voir /help server)." + #~ msgid "" #~ "raw[delete]: delete a user theme file (refuses to delete built-in themes, " #~ "which have no file)" diff --git a/po/hu.po b/po/hu.po index 54d354389..b093c7742 100644 --- a/po/hu.po +++ b/po/hu.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: Hungarian \n" @@ -6228,22 +6228,37 @@ msgstr "" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "" +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" + #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format msgid "" diff --git a/po/it.po b/po/it.po index c2f4376df..0332e2b65 100644 --- a/po/it.po +++ b/po/it.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-05-30 14:02+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: Italian \n" @@ -6716,22 +6716,37 @@ msgstr "Fine comando '%s', timeout raggiunto (%.1fs)" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "1 se si sta aggiornando WeeChat (comando `/upgrade`)" +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" + #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format msgid "" diff --git a/po/ja.po b/po/ja.po index 7270bee99..de3ccb1d0 100644 --- a/po/ja.po +++ b/po/ja.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-05-30 14:02+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -6896,34 +6896,36 @@ msgstr "コマンド '%s' の終了、タイムアウトになりました (%.1f msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "WeeChat をヘッドレスモードで実行中 (Ctrl-C で終了します)。" +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" -"WeeChat にようこそ!\n" -"\n" -"WeeChat を初めて使うのなら、少なくともクイックスタートガイドを、時間があるな" -"らユーザーズガイドを読むことをお勧めします。これらは WeeChat の主な構想を説明" -"しています。\n" -"WeeChat の文書は全てこのサイトから利用可能です: https://weechat.org/doc/\n" -"\n" -"さらに、すべてのコマンドとオプションには /help から見れるインラインヘルプが用" -"意されています (Tab キーで名前補完できます)。\n" -"WeeChat をカスタマイズするには /fset を使うと便利です。\n" -"\n" -"IRC サーバの設定を追加してサーバに接続するには /server と /connect コマンドを" -"使ってください (/help server 参照)。" + +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format @@ -18728,3 +18730,32 @@ msgid "" msgstr "" "%s%s: ファイル \"%s\" のリジュームが承認されませんでした (ポート: %d、開始位" "置: %llu): xfer が見つからないか、転送準備が整っていません" + +#~ msgid "" +#~ "Welcome to WeeChat!\n" +#~ "\n" +#~ "If you are discovering WeeChat, it is recommended to read at least the " +#~ "quickstart guide, and the user's guide if you have some time; they " +#~ "explain main WeeChat concepts.\n" +#~ "All WeeChat docs are available at: https://weechat.org/doc/\n" +#~ "\n" +#~ "Moreover, there is inline help with /help on all commands and options " +#~ "(use Tab key to complete the name).\n" +#~ "The command /fset can help to customize WeeChat.\n" +#~ "\n" +#~ "You can add and connect to an IRC server with /server and /connect " +#~ "commands (see /help server)." +#~ msgstr "" +#~ "WeeChat にようこそ!\n" +#~ "\n" +#~ "WeeChat を初めて使うのなら、少なくともクイックスタートガイドを、時間がある" +#~ "ならユーザーズガイドを読むことをお勧めします。これらは WeeChat の主な構想" +#~ "を説明しています。\n" +#~ "WeeChat の文書は全てこのサイトから利用可能です: https://weechat.org/doc/\n" +#~ "\n" +#~ "さらに、すべてのコマンドとオプションには /help から見れるインラインヘルプ" +#~ "が用意されています (Tab キーで名前補完できます)。\n" +#~ "WeeChat をカスタマイズするには /fset を使うと便利です。\n" +#~ "\n" +#~ "IRC サーバの設定を追加してサーバに接続するには /server と /connect コマン" +#~ "ドを使ってください (/help server 参照)。" diff --git a/po/pl.po b/po/pl.po index 70f66b8dd..331ce6f87 100644 --- a/po/pl.po +++ b/po/pl.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-06-28 08:55+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: Polish \n" @@ -7071,35 +7071,36 @@ msgstr "Zakończono transfer URL '%s', transfer zatrzymany" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "WeeChat działa w trybie bez interfejsu (naciśnij ctrl-c żeby wyjść)." +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" -"Witaj w WeeChat!\n" -"\n" -"Jeśli dopiero poznajesz WeeChat, zaleca się abyś przeczytał przynajmniej " -"szybki start i poradnik użytkownika jeśli znajdziesz na to chwilę; wyjaśnią " -"one główne założenia WeeChat.\n" -"Wszystkie dokumenty dotyczące WeeChat dostępne są pod adresem: https://" -"weechat.org/doc/\n" -"\n" -"Ponadto, dostępna jest wbudowana pomoc /help dla wszystkich komend i opcji " -"(klawisz Tab dopełnia nazwy).\n" -"Komenda /fset pomaga w dostosowaniu WeeChat do swoich preferencji.\n" -"\n" -"Możesz dodać i połączyć się z serwerem IRC za pomocą komend /server i /" -"connect (zobacz /help server)." + +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format @@ -18509,3 +18510,33 @@ msgid "" msgstr "" "%s%s: nie można zaakceptować wznowienia pliku \"%s\" (port: %d, pozycja " "startowa: %llu): xfer nie znaleziony lub nie gotowy do transferu" + +#~ msgid "" +#~ "Welcome to WeeChat!\n" +#~ "\n" +#~ "If you are discovering WeeChat, it is recommended to read at least the " +#~ "quickstart guide, and the user's guide if you have some time; they " +#~ "explain main WeeChat concepts.\n" +#~ "All WeeChat docs are available at: https://weechat.org/doc/\n" +#~ "\n" +#~ "Moreover, there is inline help with /help on all commands and options " +#~ "(use Tab key to complete the name).\n" +#~ "The command /fset can help to customize WeeChat.\n" +#~ "\n" +#~ "You can add and connect to an IRC server with /server and /connect " +#~ "commands (see /help server)." +#~ msgstr "" +#~ "Witaj w WeeChat!\n" +#~ "\n" +#~ "Jeśli dopiero poznajesz WeeChat, zaleca się abyś przeczytał przynajmniej " +#~ "szybki start i poradnik użytkownika jeśli znajdziesz na to chwilę; " +#~ "wyjaśnią one główne założenia WeeChat.\n" +#~ "Wszystkie dokumenty dotyczące WeeChat dostępne są pod adresem: https://" +#~ "weechat.org/doc/\n" +#~ "\n" +#~ "Ponadto, dostępna jest wbudowana pomoc /help dla wszystkich komend i " +#~ "opcji (klawisz Tab dopełnia nazwy).\n" +#~ "Komenda /fset pomaga w dostosowaniu WeeChat do swoich preferencji.\n" +#~ "\n" +#~ "Możesz dodać i połączyć się z serwerem IRC za pomocą komend /server i /" +#~ "connect (zobacz /help server)." diff --git a/po/pt.po b/po/pt.po index ce8075fec..314de1f69 100644 --- a/po/pt.po +++ b/po/pt.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-06-28 08:48+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese \n" @@ -6948,36 +6948,36 @@ msgstr "Fim do comando '%s', tempo limite atingido (%.1fs)" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "1 se o WeeChat está a atualizar (comando `/upgrade`)" -#, fuzzy +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" -"Bem-vindo ao WeeChat!\n" -"\n" -"Se é a primeira vez que usa o WeeChat, recomenda-se que leia pelo menos o " -"guia de introdução, e o manual do utilizador se dispõe de algum tempo; estes " -"explicam os principais conceitos do WeeChat.\n" -"A documentação do WeeChat está disponível em: https://weechat.org/doc/\n" -"\n" -"Além disso, pode consultar a ajuda incorporada com /help sobre todos os " -"comandos e opções (use a tecla Tab para completar o nome).\n" -"O comando /iset (script iset.pl) pode ajudá-lo a personalizar o WeeChat: /" -"script install iset.pl\n" -"\n" -"Pode adicionar e conectar-se a um ser servidor de IRC pelos comandos /server " -"e /connect (ver /help server)." + +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format @@ -18633,3 +18633,34 @@ msgstr "" "%s%s: não foi possível aceitar o ficheiro a retomar \"%s\" (porto: %d, " "posição inicial: %llu): xfer não foi encontrado ou não está pronto para ser " "transferido" + +#, fuzzy +#~ msgid "" +#~ "Welcome to WeeChat!\n" +#~ "\n" +#~ "If you are discovering WeeChat, it is recommended to read at least the " +#~ "quickstart guide, and the user's guide if you have some time; they " +#~ "explain main WeeChat concepts.\n" +#~ "All WeeChat docs are available at: https://weechat.org/doc/\n" +#~ "\n" +#~ "Moreover, there is inline help with /help on all commands and options " +#~ "(use Tab key to complete the name).\n" +#~ "The command /fset can help to customize WeeChat.\n" +#~ "\n" +#~ "You can add and connect to an IRC server with /server and /connect " +#~ "commands (see /help server)." +#~ msgstr "" +#~ "Bem-vindo ao WeeChat!\n" +#~ "\n" +#~ "Se é a primeira vez que usa o WeeChat, recomenda-se que leia pelo menos o " +#~ "guia de introdução, e o manual do utilizador se dispõe de algum tempo; " +#~ "estes explicam os principais conceitos do WeeChat.\n" +#~ "A documentação do WeeChat está disponível em: https://weechat.org/doc/\n" +#~ "\n" +#~ "Além disso, pode consultar a ajuda incorporada com /help sobre todos os " +#~ "comandos e opções (use a tecla Tab para completar o nome).\n" +#~ "O comando /iset (script iset.pl) pode ajudá-lo a personalizar o WeeChat: /" +#~ "script install iset.pl\n" +#~ "\n" +#~ "Pode adicionar e conectar-se a um ser servidor de IRC pelos comandos /" +#~ "server e /connect (ver /help server)." diff --git a/po/pt_BR.po b/po/pt_BR.po index 0a7413f76..feca89b91 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -46,7 +46,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-06-28 08:49+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: Portuguese (Brazil) \n" @@ -6607,22 +6607,37 @@ msgstr "" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "1 se o WeeChat está sendo atualizado (comando `/upgrade`)" +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" + #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format msgid "" diff --git a/po/ru.po b/po/ru.po index 50e43e7af..7a90e06e2 100644 --- a/po/ru.po +++ b/po/ru.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: Russian \n" @@ -6265,22 +6265,37 @@ msgstr "" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "" +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" + #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format msgid "" diff --git a/po/sr.po b/po/sr.po index 29cc17824..7a7567650 100644 --- a/po/sr.po +++ b/po/sr.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-06-28 08:52+0200\n" "Last-Translator: Ivan Pešić \n" "Language-Team: Serbian \n" @@ -7053,35 +7053,36 @@ msgstr "Крај URL трансфера ’%s’, трансфер је заус msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "WeeChat се извршава у режиму без интерфејса (ctrl-c за излаз)." +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" -"Добродошли у WeeChat!\n" -"\n" -"Ако се тек упознајете са програмом WeeChat, препоручује се да прочитате " -"барем водич за брзи почетак, и корисничко упутство ако имате више времена; " -"они објашњавају основне концепте програма WeeChat.\n" -"Комплетна WeeChat документација је доступна на адреси: https://weechat.org/" -"doc/\n" -"\n" -"Такође је доступна и активна помоћ са /help за све команде и опције " -"(користите тастер Tab да довршите име).\n" -"Команда /fset може да вам помогне за прилагођавање програма WeeChat.\n" -"\n" -"Командама /server и /connect додајете и повезујете се на IRC сервер " -"(погледајте /help server)." + +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format @@ -18432,3 +18433,33 @@ msgid "" msgstr "" "%s%s: не може да се прихвати настављање фајла „%s” (порт: %d, почетна " "позиција: %llu): xfer није пронађен или није спреман за трансфер" + +#~ msgid "" +#~ "Welcome to WeeChat!\n" +#~ "\n" +#~ "If you are discovering WeeChat, it is recommended to read at least the " +#~ "quickstart guide, and the user's guide if you have some time; they " +#~ "explain main WeeChat concepts.\n" +#~ "All WeeChat docs are available at: https://weechat.org/doc/\n" +#~ "\n" +#~ "Moreover, there is inline help with /help on all commands and options " +#~ "(use Tab key to complete the name).\n" +#~ "The command /fset can help to customize WeeChat.\n" +#~ "\n" +#~ "You can add and connect to an IRC server with /server and /connect " +#~ "commands (see /help server)." +#~ msgstr "" +#~ "Добродошли у WeeChat!\n" +#~ "\n" +#~ "Ако се тек упознајете са програмом WeeChat, препоручује се да прочитате " +#~ "барем водич за брзи почетак, и корисничко упутство ако имате више " +#~ "времена; они објашњавају основне концепте програма WeeChat.\n" +#~ "Комплетна WeeChat документација је доступна на адреси: https://" +#~ "weechat.org/doc/\n" +#~ "\n" +#~ "Такође је доступна и активна помоћ са /help за све команде и опције " +#~ "(користите тастер Tab да довршите име).\n" +#~ "Команда /fset може да вам помогне за прилагођавање програма WeeChat.\n" +#~ "\n" +#~ "Командама /server и /connect додајете и повезујете се на IRC сервер " +#~ "(погледајте /help server)." diff --git a/po/tr.po b/po/tr.po index 856efdd39..77cda1aaf 100644 --- a/po/tr.po +++ b/po/tr.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2026-06-28 08:53+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: Turkish \n" @@ -6849,34 +6849,36 @@ msgstr "\"%s\" URL aktarımının sonu; aktarım durduruldu" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "WeeChat başsız kipte çalışıyor (çıkmak için ctrl-c yapın)." +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" -"WeeChat'e hoş geldiniz!\n" -"\n" -"WeeChat'e yeniyseniz hızlı başlangıç kılavuzunu veya biraz daha vaktiniz " -"varsa kullanıcı kılavuzunu okumanız önerilir; bu belgeler WeeChat'in temel " -"konseptlerini açıklarlar.\n" -"Tüm WeeChat belgelendirmesi https://weechat.org/doc/ adresinde mevcuttur.\n" -"\n" -"Ek olarak, /help komutu ile doğrudan satır içi yardım alabilirsiniz (komutu " -"tamamlamak için Sekme düğmesini kullanın).\n" -"/fset komutu WeeChat'i özelleştirmenize yardımcı olur.\n" -"\n" -"IRC sunucularına /server ve /connect komutları ile bağlanabilirsiniz (bkz. /" -"help server)." + +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format @@ -18845,3 +18847,33 @@ msgid "" msgstr "" "%s%s: \"%s\" dosyası sürdürümü kabul edilemiyor (kapı: %d, başlangıç konumu: " "%llu): xfer bulunamadı veya aktarım için hazır değil" + +#~ msgid "" +#~ "Welcome to WeeChat!\n" +#~ "\n" +#~ "If you are discovering WeeChat, it is recommended to read at least the " +#~ "quickstart guide, and the user's guide if you have some time; they " +#~ "explain main WeeChat concepts.\n" +#~ "All WeeChat docs are available at: https://weechat.org/doc/\n" +#~ "\n" +#~ "Moreover, there is inline help with /help on all commands and options " +#~ "(use Tab key to complete the name).\n" +#~ "The command /fset can help to customize WeeChat.\n" +#~ "\n" +#~ "You can add and connect to an IRC server with /server and /connect " +#~ "commands (see /help server)." +#~ msgstr "" +#~ "WeeChat'e hoş geldiniz!\n" +#~ "\n" +#~ "WeeChat'e yeniyseniz hızlı başlangıç kılavuzunu veya biraz daha vaktiniz " +#~ "varsa kullanıcı kılavuzunu okumanız önerilir; bu belgeler WeeChat'in " +#~ "temel konseptlerini açıklarlar.\n" +#~ "Tüm WeeChat belgelendirmesi https://weechat.org/doc/ adresinde " +#~ "mevcuttur.\n" +#~ "\n" +#~ "Ek olarak, /help komutu ile doğrudan satır içi yardım alabilirsiniz " +#~ "(komutu tamamlamak için Sekme düğmesini kullanın).\n" +#~ "/fset komutu WeeChat'i özelleştirmenize yardımcı olur.\n" +#~ "\n" +#~ "IRC sunucularına /server ve /connect komutları ile bağlanabilirsiniz " +#~ "(bkz. /help server)." diff --git a/po/weechat.pot b/po/weechat.pot index 7b1ea483c..4f00d5c0d 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 20:55+0200\n" +"POT-Creation-Date: 2026-07-04 21:01+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -5816,22 +5816,37 @@ msgstr "" msgid "WeeChat is running in headless mode (ctrl-c to quit)." msgstr "" +msgid "Welcome to WeeChat!" +msgstr "" + msgid "" -"Welcome to WeeChat!\n" -"\n" "If you are discovering WeeChat, it is recommended to read at least the " "quickstart guide, and the user's guide if you have some time; they explain " -"main WeeChat concepts.\n" -"All WeeChat docs are available at: https://weechat.org/doc/\n" -"\n" +"main WeeChat concepts." +msgstr "" + +#, c-format +msgid "All WeeChat docs are available at: %s" +msgstr "" + +msgid "" "Moreover, there is inline help with /help on all commands and options (use " -"Tab key to complete the name).\n" -"The command /fset can help to customize WeeChat.\n" -"\n" +"Tab key to complete the name)." +msgstr "" + +msgid "The command /fset can help to customize WeeChat." +msgstr "" + +msgid "" "You can add and connect to an IRC server with /server and /connect commands " "(see /help server)." msgstr "" +msgid "" +"The \"light\" theme will be automatically applied. Use /theme reset to " +"switch back to the default dark theme." +msgstr "" + #. TRANSLATORS: the "under %s" can be "under screen" or "under tmux" #, c-format msgid "" diff --git a/src/core/weechat.c b/src/core/weechat.c index 2ade07fa5..1b5d967f9 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -135,10 +135,13 @@ int weechat_auto_load_scripts = 1; /* auto-load scripts */ /* * Display WeeChat startup message. + * + * If "term_theme_light" is set, a notice about the automatic "light" theme is + * displayed on first start. */ void -weechat_startup_message (void) +weechat_startup_message (int term_theme_light) { if (weechat_headless) { @@ -183,22 +186,34 @@ weechat_startup_message (void) if (weechat_first_start) { /* message on first run (when weechat.conf is created) */ - gui_chat_printf (NULL, ""); + gui_chat_printf (NULL, _("Welcome to WeeChat!")); gui_chat_printf ( NULL, - _("Welcome to WeeChat!\n" - "\n" - "If you are discovering WeeChat, it is recommended to read at " - "least the quickstart guide, and the user's guide if you have " - "some time; they explain main WeeChat concepts.\n" - "All WeeChat docs are available at: https://weechat.org/doc/\n" - "\n" - "Moreover, there is inline help with /help on all commands and " - "options (use Tab key to complete the name).\n" - "The command /fset can help to customize WeeChat.\n" - "\n" - "You can add and connect to an IRC server with /server and " + _("If you are discovering WeeChat, it is recommended to " + "read at least the quickstart guide, and the user's guide if " + "you have some time; they explain main WeeChat concepts.")); + gui_chat_printf ( + NULL, + _("All WeeChat docs are available at: %s"), + WEECHAT_WEBSITE_DOC); + gui_chat_printf ( + NULL, + _("Moreover, there is inline help with /help on all commands and " + "options (use Tab key to complete the name).")); + gui_chat_printf ( + NULL, + _("The command /fset can help to customize WeeChat.")); + gui_chat_printf ( + NULL, + _("You can add and connect to an IRC server with /server and " "/connect commands (see /help server).")); + if (term_theme_light) + { + gui_chat_printf ( + NULL, + _("The \"light\" theme will be automatically applied. " + "Use /theme reset to switch back to the default dark theme.")); + } gui_chat_printf (NULL, ""); gui_chat_printf (NULL, "---"); gui_chat_printf (NULL, ""); @@ -361,6 +376,8 @@ weechat_init_gettext (void) void weechat_init (int argc, char *argv[], void (*gui_init_cb)(void)) { + int term_theme_light; /* 1 if a light terminal detected */ + weechat_first_start_time = time (NULL); /* initialize start time */ gettimeofday (&weechat_current_start_timeval, NULL); @@ -369,6 +386,9 @@ weechat_init (int argc, char *argv[], void (*gui_init_cb)(void)) * weechat_current_start_timeval.tv_usec) ^ getpid ()); + /* detect the terminal theme, before initializing the GUI */ + term_theme_light = gui_term_theme_is_light (); + weeurl_init (); /* initialize URL */ string_init (); /* initialize string */ signal_init (); /* initialize signals */ @@ -408,7 +428,7 @@ weechat_init (int argc, char *argv[], void (*gui_init_cb)(void)) weechat_upgrading = 0; } if (!weechat_doc_gen) - weechat_startup_message (); /* display WeeChat startup message */ + weechat_startup_message (term_theme_light); /* startup message */ gui_chat_print_lines_waiting_buffer (NULL); /* display lines waiting */ weechat_term_check (); /* warning about wrong $TERM */ weechat_locale_check (); /* warning about wrong locale */ @@ -426,6 +446,13 @@ weechat_init (int argc, char *argv[], void (*gui_init_cb)(void)) weechat_doc_gen_ok = doc_generate (weechat_doc_gen_path); weechat_quit = 1; } + + if (weechat_first_start && isatty (STDOUT_FILENO) && !weechat_headless && !weechat_doc_gen) + { + /* switch to "light" theme if terminal background was detected as "light" */ + if (term_theme_light) + theme_apply ("light"); + } } /* diff --git a/src/core/weechat.h b/src/core/weechat.h index 9259e0978..1ec562534 100644 --- a/src/core/weechat.h +++ b/src/core/weechat.h @@ -55,6 +55,7 @@ #define WEECHAT_COPYRIGHT_DATE "(C) 2003-2026" #define WEECHAT_WEBSITE "https://weechat.org/" +#define WEECHAT_WEBSITE_DOC "https://weechat.org/doc/" #define WEECHAT_WEBSITE_DOWNLOAD "https://weechat.org/download/" #define WEECHAT_AUTHOR_NAME "Sébastien Helleu" #define WEECHAT_AUTHOR_EMAIL "flashcode@flashtux.org" diff --git a/src/gui/curses/gui-curses-term.c b/src/gui/curses/gui-curses-term.c index d31dee2f3..cb3c57642 100644 --- a/src/gui/curses/gui-curses-term.c +++ b/src/gui/curses/gui-curses-term.c @@ -25,6 +25,14 @@ #include "config.h" #endif +#include +#include +#include +#include +#include +#include +#include + #ifndef WEECHAT_HEADLESS #ifdef HAVE_NCURSESW_CURSES_H #ifdef __sun @@ -37,6 +45,8 @@ #endif /* HAVE_NCURSESW_CURSES_H */ #endif /* WEECHAT_HEADLESS */ +#include "../../core/weechat.h" + /* * Set "eat_newline_glitch" variable. @@ -56,3 +66,139 @@ gui_term_set_eat_newline_glitch (int value) (void) value; #endif } + +/* + * Auto-detects the terminal background as "light" or "dark". + * + * Best-effort, in order: + * + * 1. Environment variable COLORFGBG (set by rxvt, urxvt, Konsole, + * ...): "fg;bg" or "fg;default;bg"; the last ';'-separated + * component is the bg ANSI color index. 0-6 + 8 are dark, + * 7 + 9-15 are light. + * + * 2. OSC 11 escape query on /dev/tty: write "\033]11;?\033\\", + * wait up to 100 ms for a reply of the form + * "...rgb:RRRR/GGGG/BBBB..." (each component is 1-4 hex digits + * depending on the terminal). Classify the answer by Rec. 601 + * luminance computed on the high nibble of each component + * (resolution is plenty for a light/dark binary decision and + * avoids width-normalization headaches). + * + * /dev/tty is used rather than stdin/stdout so a pipe redirection + * does not defeat detection. The select() timeout caps how long a + * silent terminal can stall startup. Headless mode and any I/O error + * short-circuit to the safe default 0 (dark), which is also returned + * when both probes are inconclusive. + * + * MUST be called before curses init: it briefly puts the tty in raw + * mode and reads/writes escape sequences directly. + * + * Returns 1 if a light background is detected, otherwise 0 (0 is the + * preferred value when detection is unsure). + */ + +int +gui_term_theme_is_light (void) +{ + const char *colorfgbg, *p; + char *endptr; + long bg; + int fd, n, i, len; + struct termios old_attr, new_attr; + fd_set rfds; + struct timeval tv; + char buf[256], *q, *qend; + unsigned long comp_high[3], luminance; + + if (weechat_headless) + return 0; + + /* 1. COLORFGBG */ + colorfgbg = getenv ("COLORFGBG"); + if (colorfgbg && colorfgbg[0]) + { + p = strrchr (colorfgbg, ';'); + if (p) + { + bg = strtol (p + 1, &endptr, 10); + if (endptr != p + 1 && *endptr == '\0') + { + if (bg == 7 || (bg >= 9 && bg <= 15)) + return 1; + if ((bg >= 0 && bg <= 6) || bg == 8) + return 0; + } + } + } + + /* 2. OSC 11 query on the controlling terminal */ + fd = open ("/dev/tty", O_RDWR | O_NOCTTY); + if (fd < 0) + return 0; + + if (tcgetattr (fd, &old_attr) != 0) + { + close (fd); + return 0; + } + new_attr = old_attr; + new_attr.c_lflag &= (tcflag_t) ~(ICANON | ECHO); + new_attr.c_cc[VMIN] = 0; + new_attr.c_cc[VTIME] = 0; + if (tcsetattr (fd, TCSANOW, &new_attr) != 0) + { + close (fd); + return 0; + } + + n = -1; + if (write (fd, "\033]11;?\033\\", 8) == 8) + { + FD_ZERO (&rfds); + FD_SET (fd, &rfds); + tv.tv_sec = 0; + tv.tv_usec = 100000; /* 100 ms cap on terminals that won't reply */ + if (select (fd + 1, &rfds, NULL, NULL, &tv) > 0) + n = read (fd, buf, sizeof (buf) - 1); + } + + tcsetattr (fd, TCSANOW, &old_attr); + close (fd); + + if (n <= 0) + return 0; + buf[n] = '\0'; + + q = strstr (buf, "rgb:"); + if (!q) + return 0; + q += 4; + + for (i = 0; i < 3; i++) + { + qend = q; + while ((*qend >= '0' && *qend <= '9') + || (*qend >= 'a' && *qend <= 'f') + || (*qend >= 'A' && *qend <= 'F')) + qend++; + len = (int)(qend - q); + if (len < 1 || len > 4) + return 0; + /* high nibble of this component: width-independent brightness */ + comp_high[i] = strtoul (q, NULL, 16) >> ((len - 1) * 4); + q = qend; + if (i < 2) + { + if (*q != '/') + return 0; + q++; + } + } + + /* Rec. 601 with coefficients summing to 1000; max = 15 * 1000 */ + luminance = (299UL * comp_high[0] + + 587UL * comp_high[1] + + 114UL * comp_high[2]); + return (luminance > 7500) ? 1 : 0; +} diff --git a/src/gui/gui-main.h b/src/gui/gui-main.h index 01ea87ed1..3702842b9 100644 --- a/src/gui/gui-main.h +++ b/src/gui/gui-main.h @@ -31,5 +31,6 @@ extern void gui_main_end (int clean_exit); /* terminal functions (GUI dependent) */ extern void gui_term_set_eat_newline_glitch (int value); +extern int gui_term_theme_is_light (void); #endif /* WEECHAT_GUI_MAIN_H */ diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 2fed50c47..9567ea665 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -114,6 +114,7 @@ set(LIB_WEECHAT_UNIT_TESTS_CORE_SRC gui/test-gui-nick.cpp gui/test-gui-nicklist.cpp gui/curses/test-gui-curses-mouse.cpp + gui/curses/test-gui-curses-term.cpp scripts/test-scripts.cpp ) add_library(weechat_unit_tests_core STATIC ${LIB_WEECHAT_UNIT_TESTS_CORE_SRC}) diff --git a/tests/unit/gui/curses/test-gui-curses-term.cpp b/tests/unit/gui/curses/test-gui-curses-term.cpp new file mode 100644 index 000000000..9522f1a60 --- /dev/null +++ b/tests/unit/gui/curses/test-gui-curses-term.cpp @@ -0,0 +1,87 @@ +/* + * SPDX-FileCopyrightText: 2026 Sébastien Helleu + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see . + */ + +/* Test terminal functions (Curses interface) */ + +#include "CppUTest/TestHarness.h" + +extern "C" +{ +#include +#include + +extern int gui_term_theme_is_light (void); +} + +/* + * Asserts the value returned by gui_term_theme_is_light() when COLORFGBG + * is set to the given value (a definitive background index, so detection + * returns without falling back to the terminal query on /dev/tty). + */ + +#define WEE_CHECK_THEME(__result, __colorfgbg) \ + setenv ("COLORFGBG", __colorfgbg, 1); \ + LONGS_EQUAL(__result, gui_term_theme_is_light ()); + +TEST_GROUP(GuiCursesTerm) +{ +}; + +/* + * Test functions: + * gui_term_theme_is_light + */ + +TEST(GuiCursesTerm, ThemeIsLight) +{ + const char *saved_colorfgbg; + char *colorfgbg; + + /* save COLORFGBG to restore it at the end of the test */ + saved_colorfgbg = getenv ("COLORFGBG"); + colorfgbg = (saved_colorfgbg) ? strdup (saved_colorfgbg) : NULL; + + /* dark background ("fg;bg"): indices 0-6 and 8 */ + WEE_CHECK_THEME(0, "15;0"); + WEE_CHECK_THEME(0, "15;1"); + WEE_CHECK_THEME(0, "15;6"); + WEE_CHECK_THEME(0, "15;8"); + + /* light background ("fg;bg"): index 7 and 9-15 */ + WEE_CHECK_THEME(1, "0;7"); + WEE_CHECK_THEME(1, "0;9"); + WEE_CHECK_THEME(1, "0;15"); + + /* "fg;default;bg" form: last component is the background */ + WEE_CHECK_THEME(0, "0;default;0"); + WEE_CHECK_THEME(1, "0;default;15"); + + /* restore COLORFGBG */ + if (colorfgbg) + { + setenv ("COLORFGBG", colorfgbg, 1); + free (colorfgbg); + } + else + { + unsetenv ("COLORFGBG"); + } +} diff --git a/tests/unit/tests.cpp b/tests/unit/tests.cpp index 4732a8032..840d5c512 100644 --- a/tests/unit/tests.cpp +++ b/tests/unit/tests.cpp @@ -119,6 +119,7 @@ IMPORT_TEST_GROUP(GuiNick); IMPORT_TEST_GROUP(GuiNicklist); /* GUI - Curses */ IMPORT_TEST_GROUP(GuiCursesMouse); +IMPORT_TEST_GROUP(GuiCursesTerm); /* scripts */ IMPORT_TEST_GROUP(Scripts);