From d06028d45a394aa2b8cf1a03a2088c79df9317e7 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 25 Oct 2008 20:11:02 +0200 Subject: [PATCH] Fix creation of filters (many filters with same content are authorized) --- po/cs.po | 4 ++-- po/de.po | 4 ++-- po/es.po | 4 ++-- po/fr.po | 8 ++++---- po/hu.po | 4 ++-- po/ru.po | 4 ++-- po/weechat.pot | 4 ++-- src/core/wee-command.c | 7 ++++--- 8 files changed, 20 insertions(+), 19 deletions(-) diff --git a/po/cs.po b/po/cs.po index e23ea4e61..e3e3f6ce4 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-10-25 17:52+0200\n" +"POT-Creation-Date: 2008-10-25 20:09+0200\n" "PO-Revision-Date: 2008-09-17 16:19+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -262,7 +262,7 @@ msgid "Filter \"%s\" disabled" msgstr "uživatel byl zablokován" #, fuzzy, c-format -msgid "%sError: filter already exists" +msgid "%sError: filter \"%s\" already exists" msgstr "%s ignorování již existuje\n" #, c-format diff --git a/po/de.po b/po/de.po index 4c3ba0802..b01e9bf5c 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-10-25 17:52+0200\n" +"POT-Creation-Date: 2008-10-25 20:09+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -267,7 +267,7 @@ msgid "Filter \"%s\" disabled" msgstr "/users wurde deaktiviert" #, fuzzy, c-format -msgid "%sError: filter already exists" +msgid "%sError: filter \"%s\" already exists" msgstr "%s diese /ignore-Regel existiert bereits\n" #, c-format diff --git a/po/es.po b/po/es.po index bce45f3de..328ec51b3 100644 --- a/po/es.po +++ b/po/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-10-25 17:52+0200\n" +"POT-Creation-Date: 2008-10-25 20:09+0200\n" "PO-Revision-Date: 2007-09-19 12:09+0200\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -263,7 +263,7 @@ msgid "Filter \"%s\" disabled" msgstr "los usuarios han sido desactivados" #, fuzzy, c-format -msgid "%sError: filter already exists" +msgid "%sError: filter \"%s\" already exists" msgstr "el ignore %s ya existe\n" #, c-format diff --git a/po/fr.po b/po/fr.po index 85a609151..ec647fd05 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-10-25 17:52+0200\n" -"PO-Revision-Date: 2008-10-25 17:52+0200\n" +"POT-Creation-Date: 2008-10-25 20:09+0200\n" +"PO-Revision-Date: 2008-10-25 20:09+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -253,8 +253,8 @@ msgid "Filter \"%s\" disabled" msgstr "Filtre \"%s\" désactivé" #, c-format -msgid "%sError: filter already exists" -msgstr "%sErreur: le filtre existe déjà" +msgid "%sError: filter \"%s\" already exists" +msgstr "%sErreur: le filtre \"%s\" existe déjà" #, c-format msgid "%sError: you must specify at least tag(s) or regex for filter" diff --git a/po/hu.po b/po/hu.po index d27a21f49..08c252561 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-10-25 17:52+0200\n" +"POT-Creation-Date: 2008-10-25 20:09+0200\n" "PO-Revision-Date: 2007-10-10 18:07+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -268,7 +268,7 @@ msgid "Filter \"%s\" disabled" msgstr "a felhasználók le lettek tiltva" #, fuzzy, c-format -msgid "%sError: filter already exists" +msgid "%sError: filter \"%s\" already exists" msgstr "%s az ignore már létezik\n" #, c-format diff --git a/po/ru.po b/po/ru.po index 32f319e3e..3e64e383d 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-10-25 17:52+0200\n" +"POT-Creation-Date: 2008-10-25 20:09+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -264,7 +264,7 @@ msgid "Filter \"%s\" disabled" msgstr "команда users отключена" #, fuzzy, c-format -msgid "%sError: filter already exists" +msgid "%sError: filter \"%s\" already exists" msgstr "%s игнорирование уже существует\n" #, c-format diff --git a/po/weechat.pot b/po/weechat.pot index d7faac5eb..ba7adb5bd 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-10-25 17:52+0200\n" +"POT-Creation-Date: 2008-10-25 20:09+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -234,7 +234,7 @@ msgid "Filter \"%s\" disabled" msgstr "" #, c-format -msgid "%sError: filter already exists" +msgid "%sError: filter \"%s\" already exists" msgstr "" #, c-format diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 118155fab..03137274a 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -946,11 +946,12 @@ command_filter (void *data, struct t_gui_buffer *buffer, "filter add"); return WEECHAT_RC_ERROR; } - if (gui_filter_search (argv[3], argv[4], argv_eol[5])) + if (gui_filter_search_by_name (argv[2])) { gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER, - _("%sError: filter already exists"), - gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + _("%sError: filter \"%s\" already exists"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + argv[2]); return WEECHAT_RC_ERROR; } if ((strcmp (argv[4], "*") == 0) && (strcmp (argv_eol[5], "*") == 0))