summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-03-19 17:42:12 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-03-19 17:42:12 +0100
commite4f181beb3279eef22a58f8e79c57264321cbd5a (patch)
tree9fe1f2888345a0dcfe4833a25c979f6433d6fa80
parent6bd49dd595c766ca3105666c8d7d6c07920f47ad (diff)
downloadweechat-e4f181beb3279eef22a58f8e79c57264321cbd5a.zip
core: display an error with `/bar add` when the bar already exists
-rw-r--r--po/cs.po6
-rw-r--r--po/de.po7
-rw-r--r--po/es.po6
-rw-r--r--po/fr.po8
-rw-r--r--po/hu.po6
-rw-r--r--po/it.po6
-rw-r--r--po/ja.po7
-rw-r--r--po/pl.po7
-rw-r--r--po/pt.po7
-rw-r--r--po/pt_BR.po6
-rw-r--r--po/ru.po6
-rw-r--r--po/sr.po7
-rw-r--r--po/tr.po7
-rw-r--r--po/weechat.pot6
-rw-r--r--src/core/wee-command.c9
15 files changed, 86 insertions, 15 deletions
diff --git a/po/cs.po b/po/cs.po
index 93b5fca4b..c4a6e0df8 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-10-15 22:51+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -365,6 +365,10 @@ msgstr " %s (plugin: %s)"
msgid "No bar item defined"
msgstr "Žádné položky pole nejsou definovány"
+#, fuzzy, c-format
+msgid "%sBar \"%s\" already exists"
+msgstr "%s%s: vzorec přesměrování \"%s\" již existuje"
+
#, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sNedostatek paměti (%s)"
diff --git a/po/de.po b/po/de.po
index 2306ff7a3..ae0f0ff5b 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: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2023-02-01 11:05+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German - Germany <weechatter@arcor.de>\n"
@@ -396,6 +396,11 @@ msgstr " %s (Erweiterung: %s)"
msgid "No bar item defined"
msgstr "Es wurde kein Bar-Item festgelegt"
+#, fuzzy, c-format
+#| msgid "%sAlias \"%s\" already exists"
+msgid "%sBar \"%s\" already exists"
+msgstr "%sAlias \"%s\" existiert bereits"
+
#, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sNicht ausreichend Speicher (%s)"
diff --git a/po/es.po b/po/es.po
index 3e3cb0992..9d998f7f2 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-10-15 22:51+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -416,6 +416,10 @@ msgstr " %s (plugin: %s)"
msgid "No bar item defined"
msgstr "Ningún elemento definido"
+#, fuzzy, c-format
+msgid "%sBar \"%s\" already exists"
+msgstr "%sError: el filtro \"%s\" ya existe"
+
#, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sNo hay suficiente memoria (%s)"
diff --git a/po/fr.po b/po/fr.po
index b616ea1c6..b7a7e3210 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
-"PO-Revision-Date: 2023-03-19 07:57+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
+"PO-Revision-Date: 2023-03-19 17:41+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -382,6 +382,10 @@ msgid "No bar item defined"
msgstr "Pas d'objet de barre défini"
#, c-format
+msgid "%sBar \"%s\" already exists"
+msgstr "%sLa barre \"%s\" existe déjà"
+
+#, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sPas assez de mémoire (%s)"
diff --git a/po/hu.po b/po/hu.po
index be0daff1b..25d28bcd9 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-10-15 22:51+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -344,6 +344,10 @@ msgid "No bar item defined"
msgstr "Nincs aliasz definiálva.\n"
#, fuzzy, c-format
+msgid "%sBar \"%s\" already exists"
+msgstr "%s az ignore már létezik\n"
+
+#, fuzzy, c-format
msgid "%sNot enough memory (%s)"
msgstr "Nincs elég memória az új sorhoz\n"
diff --git a/po/it.po b/po/it.po
index 8546f35fa..769765299 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-10-15 22:51+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -342,6 +342,10 @@ msgid "No bar item defined"
msgstr "Nessun elemento barra definito"
#, fuzzy, c-format
+msgid "%sBar \"%s\" already exists"
+msgstr "%sErrore: il filtro \"%s\" esiste già"
+
+#, fuzzy, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sSpazio non sufficiente"
diff --git a/po/ja.po b/po/ja.po
index cb2ffa7e5..05d5d32b8 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-10-15 22:51+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -381,6 +381,11 @@ msgstr " %s (プラグイン: %s)"
msgid "No bar item defined"
msgstr "バー要素が定義されていません"
+#, fuzzy, c-format
+#| msgid "%s%s: trigger \"%s\" already exists"
+msgid "%sBar \"%s\" already exists"
+msgstr "%s%s: トリガ \"%s\" は既に存在します"
+
#, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sメモリ不足 (%s)"
diff --git a/po/pl.po b/po/pl.po
index a94763b34..0e184db80 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-12-30 14:10+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -382,6 +382,11 @@ msgstr " %s (wtyczka: %s)"
msgid "No bar item defined"
msgstr "Nie zdefiniowano elementów paska"
+#, fuzzy, c-format
+#| msgid "%s%s: trigger \"%s\" already exists"
+msgid "%sBar \"%s\" already exists"
+msgstr "%s%s: trigger \"%s\" już istnieje"
+
#, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sZa mało pamięci (%s)"
diff --git a/po/pt.po b/po/pt.po
index cd4c6e151..9f2c4c2d3 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-10-15 22:51+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -366,6 +366,11 @@ msgstr " %s (plugin: %s)"
msgid "No bar item defined"
msgstr "Nenhum item de barra definido"
+#, fuzzy, c-format
+#| msgid "%s%s: trigger \"%s\" already exists"
+msgid "%sBar \"%s\" already exists"
+msgstr "%s%s: o acionador \"%s\" já existe"
+
#, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sMemória insuficiente (%s)"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 72f6197cf..708859fd5 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-10-15 22:51+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -374,6 +374,10 @@ msgid "No bar item defined"
msgstr "Nenhum item da barra definido"
#, fuzzy, c-format
+msgid "%sBar \"%s\" already exists"
+msgstr "%sErro: filtro \"%s\" já existe"
+
+#, fuzzy, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sMemória insuficiente"
diff --git a/po/ru.po b/po/ru.po
index ba0ecf1b3..595a62f12 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-10-15 22:51+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -353,6 +353,10 @@ msgid "No bar item defined"
msgstr "Сокращения не заданы.\n"
#, fuzzy, c-format
+msgid "%sBar \"%s\" already exists"
+msgstr "%s игнорирование уже существует\n"
+
+#, fuzzy, c-format
msgid "%sNot enough memory (%s)"
msgstr "Недостаточно памяти для новой строчки\n"
diff --git a/po/sr.po b/po/sr.po
index b2d31a510..b2656cf96 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2023-02-01 14:25+0400\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -379,6 +379,11 @@ msgstr " %s (додатак: %s)"
msgid "No bar item defined"
msgstr "Није дефинисана ниједна ставка траке"
+#, fuzzy, c-format
+#| msgid "%sAlias \"%s\" already exists"
+msgid "%sBar \"%s\" already exists"
+msgstr "%sАлијас „%s” већ постоји"
+
#, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sНема довољно меморије (%s)"
diff --git a/po/tr.po b/po/tr.po
index a59cf2cbd..3f91d7549 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2022-10-15 22:51+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -379,6 +379,11 @@ msgstr " %s (eklenti: %s)"
msgid "No bar item defined"
msgstr "Çubuk ögesi tanımlanmamış"
+#, fuzzy, c-format
+#| msgid "%s%s: trigger \"%s\" already exists"
+msgid "%sBar \"%s\" already exists"
+msgstr "%s%s: \"%s\" tetiği halihazırda mevcut"
+
#, c-format
msgid "%sNot enough memory (%s)"
msgstr "%sBellek yetersiz (%s)"
diff --git a/po/weechat.pot b/po/weechat.pot
index 5c37fee92..ee27b2be8 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-03-19 07:53+0100\n"
+"POT-Creation-Date: 2023-03-19 17:41+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -307,6 +307,10 @@ msgid "No bar item defined"
msgstr ""
#, c-format
+msgid "%sBar \"%s\" already exists"
+msgstr ""
+
+#, c-format
msgid "%sNot enough memory (%s)"
msgstr ""
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index d1e3ec953..a79faefc0 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -277,6 +277,15 @@ COMMAND_CALLBACK(bar)
if (string_strcmp (argv[1], "add") == 0)
{
COMMAND_MIN_ARGS(8, "add");
+ ptr_bar = gui_bar_search (argv[2]);
+ if (ptr_bar)
+ {
+ gui_chat_printf (NULL,
+ _("%sBar \"%s\" already exists"),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
+ argv[2]);
+ return WEECHAT_RC_OK;
+ }
pos_condition = strchr (argv[3], ',');
if (pos_condition)
{