From 1b669cd13cd543e80868dac17c2c4a6ad7bf4432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 14 Oct 2025 22:56:41 +0200 Subject: [PATCH] irc: fix warning on creation of irc.msgbuffer option when the server name contains upper case letters (closes #2281) Now the following command is OK without warning: /set irc.msgbuffer.TEST.notice current And the following command returns an error instead of a warning (that means the option is NOT created): /set irc.msgbuffer.TEST.NOTICE current --- CHANGELOG.md | 1 + po/cs.po | 17 ++++++----- po/de.po | 27 ++++++++++------- po/es.po | 17 ++++++----- po/fr.po | 32 ++++++++++++-------- po/hu.po | 16 +++++----- po/it.po | 17 ++++++----- po/ja.po | 17 ++++++----- po/pl.po | 27 ++++++++++------- po/pt.po | 17 ++++++----- po/pt_BR.po | 17 ++++++----- po/ru.po | 16 +++++----- po/sr.po | 27 ++++++++++------- po/tr.po | 17 ++++++----- po/weechat.pot | 16 +++++----- src/plugins/irc/irc-config.c | 57 +++++++++++++++++++++--------------- 16 files changed, 192 insertions(+), 146 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f1cdb4f0..18fa7f34d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ SPDX-License-Identifier: GPL-3.0-or-later ### Fixed - api: fix parsing of date/times with timezone offset in function util_parse_time +- irc: fix warning on creation of irc.msgbuffer option when the server name contains upper case letters ([#2281](https://github.com/weechat/weechat/issues/2281)) - relay/api: fix crash when an invalid HTTP request is received from a client ## Version 4.7.1 (2025-08-16) diff --git a/po/cs.po b/po/cs.po index 3059dd809..07819f7f9 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-04 09:24+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -10645,17 +10645,18 @@ msgstr "" "%s%s: varování: server \"%s\" nenalezen v konfiguračním souboru, nesmazáno z " "paměti, protože se stále používá" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" - msgid "buffer used to display message received from IRC server" msgstr "buffer použitý pro zobrazení zprávy obdržené od IRC serveru" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: chyba vytváření \"%s\" => \"%s\"" #, c-format diff --git a/po/de.po b/po/de.po index ce181d3ce..bd380495d 100644 --- a/po/de.po +++ b/po/de.po @@ -28,7 +28,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-05 09:24+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -11722,20 +11722,19 @@ msgstr "" "gefunden werden. Da der Server zur Zeit genutzt wird, konnte er noch nicht " "entfernt werden" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" -"%s%s: Warnung: Der Befehl \"%s\" muss in Kleinbuchstaben geschrieben werden, " -"die Option \"irc.msgbuffer.%s\" funktioniert nicht" - msgid "buffer used to display message received from IRC server" msgstr "" "Buffer welcher zur Ausgabe von IRC Server Nachrichten genutzt werden soll" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: Fehler beim Erstellen von \"%s\" => \"%s\"" #, c-format @@ -19046,3 +19045,11 @@ 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" + +#, c-format +#~ msgid "" +#~ "%s%s: warning: the command name \"%s\" must be lower case, the option " +#~ "\"irc.msgbuffer.%s\" will not work" +#~ msgstr "" +#~ "%s%s: Warnung: Der Befehl \"%s\" muss in Kleinbuchstaben geschrieben " +#~ "werden, die Option \"irc.msgbuffer.%s\" funktioniert nicht" diff --git a/po/es.po b/po/es.po index 1cbdf1f56..9a98ea2f8 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-04 09:25+0200\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -10871,17 +10871,18 @@ msgstr "" "%s%s: atención: servidor \"%s\" no encontrado en el archivo de " "configuración, no es borrado de la memoria porque aún está en uso" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" - msgid "buffer used to display message received from IRC server" msgstr "buffer donde mostrar los mensajes recibidos desde el servidor IRC" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: error al crear \"%s\" => \"%s\"" #, c-format diff --git a/po/fr.po b/po/fr.po index 9df6d07bf..72f452d86 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: 2025-10-12 17:27+0200\n" -"PO-Revision-Date: 2025-10-12 17:30+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" +"PO-Revision-Date: 2025-10-14 22:54+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -11529,20 +11529,20 @@ msgstr "" "%s%s : attention : le serveur \"%s\" n'a pas été trouvé dans le fichier de " "configuration, non supprimé en mémoire car il est en cours d'utilisation" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" -"%s%s : attention : le nom de commande \"%s\" doit être en minuscules, " -"l'option \"irc.msgbuffer.%s\" ne fonctionnera pas" - msgid "buffer used to display message received from IRC server" msgstr "tampon utilisé pour afficher le message reçu du serveur IRC" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" -msgstr "%s%s : erreur de création \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" +"%s%s : erreur : option \"%s.%s\" invalide, le nom de commande ou alias " +"\"%s\" doit être en minuscules" + +#, c-format +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" +msgstr "%s%s : erreur de création \"%s.%s\" => \"%s\"" #, c-format msgid "" @@ -18684,3 +18684,11 @@ msgid "" 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" + +#, c-format +#~ msgid "" +#~ "%s%s: warning: the command name \"%s\" must be lower case, the option " +#~ "\"irc.msgbuffer.%s\" will not work" +#~ msgstr "" +#~ "%s%s : attention : le nom de commande \"%s\" doit être en minuscules, " +#~ "l'option \"irc.msgbuffer.%s\" ne fonctionnera pas" diff --git a/po/hu.po b/po/hu.po index 89b15f74c..f2366e229 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-04 09:25+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -10204,17 +10204,17 @@ msgid "" "memory because it's currently used" msgstr "" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" - msgid "buffer used to display message received from IRC server" msgstr "" +#, c-format +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + #, fuzzy, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s nincs elég memória az információs pult üzenethez\n" #, c-format diff --git a/po/it.po b/po/it.po index 8da4fd207..f829c5b8b 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-04 09:25+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -10858,17 +10858,18 @@ msgstr "" "%s%s: attenzione: il server \"%s\" non è stato trovato nel file di " "configurazione, e non è stato eliminato perché è attivo" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" - msgid "buffer used to display message received from IRC server" msgstr "buffer usato per visualizzare i messaggi ricevuti dal server IRC" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: errore nella creazione \"%s\" => \"%s\"" #, c-format diff --git a/po/ja.po b/po/ja.po index e7d051c57..0722e8dcb 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-04 09:25+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: 作成中のエラー \"%s\" => \"%s\"" #, c-format diff --git a/po/pl.po b/po/pl.po index 01c311a0c..642c3d074 100644 --- a/po/pl.po +++ b/po/pl.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-04 09:25+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -11482,19 +11482,18 @@ msgstr "" "%s%s: ostrzeżenie: serwer \"%s\" nie znaleziony w pliku konfiguracyjnym, nie " "usunięty z pamięci, ponieważ jest obecnie używany" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" -"%s%s: ostrzeżenie: nazwa komendy „%s” musi być pisana małymi literami, opcja " -"„irc.msgbuffer.%s” nie będzie działać" - msgid "buffer used to display message received from IRC server" msgstr "bufor używany do wyświetlania wiadomości otrzymanych od serwera IRC" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: błąd podczas tworzenia \"%s\" => \"%s\"" #, c-format @@ -18615,3 +18614,11 @@ msgid "" msgstr "" "%s%s: nie można zaakceptować wznowienia pliku \"%s\" (port: %d, pozycja " "startowa: %llu): xfer nie znaleziony lub nie gotowy do transferu" + +#, c-format +#~ msgid "" +#~ "%s%s: warning: the command name \"%s\" must be lower case, the option " +#~ "\"irc.msgbuffer.%s\" will not work" +#~ msgstr "" +#~ "%s%s: ostrzeżenie: nazwa komendy „%s” musi być pisana małymi literami, " +#~ "opcja „irc.msgbuffer.%s” nie będzie działać" diff --git a/po/pt.po b/po/pt.po index 43fee8995..cded5d30c 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-04 09:25+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -11173,17 +11173,18 @@ msgstr "" "%s%s: aviso: o servidor \"%s\" não foi encontrado no ficheiro de " "configuração, não foi eliminado da memória porque está a ser utilizado" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" - msgid "buffer used to display message received from IRC server" msgstr "buffer usado para mostrar mensagens recebidas do servidor IRC" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: erro ao criar \"%s\" => \"%s\"" #, c-format diff --git a/po/pt_BR.po b/po/pt_BR.po index d5964168b..247a685e4 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-04 09:25+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -10539,17 +10539,18 @@ msgstr "" "%s%s: aviso: servidor \"%s\" não encontrado no arquivo de configuração, não " "foi excluído da memória porque está sendo utilizado atualmente" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" - msgid "buffer used to display message received from IRC server" msgstr "buffer utilizado para exibir mensagem recebida do servidor IRC" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: erro ao criar \"%s\" => \"%s\"" #, c-format diff --git a/po/ru.po b/po/ru.po index c1173e358..da2b03c71 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-05-04 09:25+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -10244,17 +10244,17 @@ msgid "" "memory because it's currently used" msgstr "" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" - msgid "buffer used to display message received from IRC server" msgstr "" +#, c-format +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + #, fuzzy, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s недостаточно памяти для сообщения в строке информации\n" #, c-format diff --git a/po/sr.po b/po/sr.po index 63abcdd71..6a5ecffbe 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-09-22 11:16+0400\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -11158,19 +11158,18 @@ msgstr "" "%s%s: упозорење: у конфигурационом фајлу није пронађен сервер „%s”, није " "обрисан из меморије јер се тренутно користи" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" -"%s%s: упозорење: име команде „%s” мора бити исписано малим словима, опција " -"„irc.msgbuffer.%s” неће функционисати" - msgid "buffer used to display message received from IRC server" msgstr "бафер који се користи за приказ поруке која се прими од IRC сервера" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: грешка при креирању „%s” => „%s”" #, c-format @@ -18139,3 +18138,11 @@ msgid "" msgstr "" "%s%s: не може да се прихвати настављање фајла „%s” (порт: %d, почетна " "позиција: %llu): xfer није пронађен или није спреман за трансфер" + +#, c-format +#~ msgid "" +#~ "%s%s: warning: the command name \"%s\" must be lower case, the option " +#~ "\"irc.msgbuffer.%s\" will not work" +#~ msgstr "" +#~ "%s%s: упозорење: име команде „%s” мора бити исписано малим словима, " +#~ "опција „irc.msgbuffer.%s” неће функционисати" diff --git a/po/tr.po b/po/tr.po index 7c430c002..43f5b9ca1 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2025-07-06 09:25+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -11249,18 +11249,19 @@ msgstr "" "%s%s: uyarı: \"%s\" sunucusu yapılandırma dosyasında bulunamadı, bellekten " "silinmedi çünkü şu anda kullanılıyor" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" - msgid "buffer used to display message received from IRC server" msgstr "" "IRC sunucusundan alınan iletileri görüntülemek için kullanılan arabellek" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, fuzzy, c-format +#| msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "%s%s: \"%s\" => \"%s\" oluşturulurken hata" #, c-format diff --git a/po/weechat.pot b/po/weechat.pot index 9331ed858..5be7a561d 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: 2025-10-12 17:27+0200\n" +"POT-Creation-Date: 2025-10-14 22:54+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -9312,17 +9312,17 @@ msgid "" "memory because it's currently used" msgstr "" -#, c-format -msgid "" -"%s%s: warning: the command name \"%s\" must be lower case, the option " -"\"irc.msgbuffer.%s\" will not work" -msgstr "" - msgid "buffer used to display message received from IRC server" msgstr "" #, c-format -msgid "%s%s: error creating \"%s\" => \"%s\"" +msgid "" +"%s%s: error: invalid option \"%s.%s\", the command name or alias \"%s\" must " +"be lower case" +msgstr "" + +#, c-format +msgid "%s%s: error creating \"%s.%s\" => \"%s\"" msgstr "" #, c-format diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 16c52161a..2d69fa57f 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -1580,7 +1580,7 @@ irc_config_msgbuffer_create_option_cb (const void *pointer, void *data, const char *option_name, const char *value) { struct t_config_option *ptr_option; - char *name_lower; + char *pos, *name_lower; int rc; /* make C compiler happy */ @@ -1607,29 +1607,37 @@ irc_config_msgbuffer_create_option_cb (const void *pointer, void *data, { if (value) { - name_lower = weechat_string_tolower (option_name); - if (name_lower && (strcmp (option_name, name_lower) != 0)) + pos = strrchr (option_name, '.'); + if (pos) { - weechat_printf ( - NULL, - _("%s%s: warning: the command name \"%s\" must be " - "lower case, the option \"irc.msgbuffer.%s\" will " - "not work"), - weechat_prefix ("error"), IRC_PLUGIN_NAME, - option_name, option_name); + pos++; + name_lower = weechat_string_tolower (pos); + if (name_lower && (strcmp (pos, name_lower) == 0)) + { + ptr_option = weechat_config_new_option ( + config_file, section, + option_name, "enum", + _("buffer used to display message received from IRC " + "server"), + "weechat|server|current|private", 0, 0, value, value, 0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + rc = (ptr_option) ? + WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : + WEECHAT_CONFIG_OPTION_SET_ERROR; + } + else + { + weechat_printf ( + NULL, + _("%s%s: error: invalid option \"%s.%s\", the command " + "name or alias \"%s\" must be lower case"), + weechat_prefix ("error"), IRC_PLUGIN_NAME, + "irc.msgbuffer", option_name, pos); + free (name_lower); + return rc; + } + free (name_lower); } - free (name_lower); - - ptr_option = weechat_config_new_option ( - config_file, section, - option_name, "enum", - _("buffer used to display message received from IRC " - "server"), - "weechat|server|current|private", 0, 0, value, value, 0, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - rc = (ptr_option) ? - WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : - WEECHAT_CONFIG_OPTION_SET_ERROR; } else rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; @@ -1640,8 +1648,9 @@ irc_config_msgbuffer_create_option_cb (const void *pointer, void *data, { weechat_printf ( NULL, - _("%s%s: error creating \"%s\" => \"%s\""), - weechat_prefix ("error"), IRC_PLUGIN_NAME, option_name, value); + _("%s%s: error creating \"%s.%s\" => \"%s\""), + weechat_prefix ("error"), IRC_PLUGIN_NAME, + "irc.msgbuffer", option_name, value); } return rc;