diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-19 17:42:12 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-19 17:42:12 +0100 |
commit | e4f181beb3279eef22a58f8e79c57264321cbd5a (patch) | |
tree | 9fe1f2888345a0dcfe4833a25c979f6433d6fa80 | |
parent | 6bd49dd595c766ca3105666c8d7d6c07920f47ad (diff) | |
download | weechat-e4f181beb3279eef22a58f8e79c57264321cbd5a.zip |
core: display an error with `/bar add` when the bar already exists
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 7 | ||||
-rw-r--r-- | po/es.po | 6 | ||||
-rw-r--r-- | po/fr.po | 8 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/it.po | 6 | ||||
-rw-r--r-- | po/ja.po | 7 | ||||
-rw-r--r-- | po/pl.po | 7 | ||||
-rw-r--r-- | po/pt.po | 7 | ||||
-rw-r--r-- | po/pt_BR.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/sr.po | 7 | ||||
-rw-r--r-- | po/tr.po | 7 | ||||
-rw-r--r-- | po/weechat.pot | 6 | ||||
-rw-r--r-- | src/core/wee-command.c | 9 |
15 files changed, 86 insertions, 15 deletions
@@ -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)" @@ -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)" @@ -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)" @@ -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)" @@ -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" @@ -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" @@ -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)" @@ -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)" @@ -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" @@ -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" @@ -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)" @@ -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) { |