From 664876bde665c40f7e091372a1a38b04582c4a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 12 Sep 2015 09:23:48 +0200 Subject: [PATCH] alias: display completion in /alias list (closes #518) --- ChangeLog.asciidoc | 1 + po/cs.po | 6 +++++- po/de.po | 6 +++++- po/es.po | 6 +++++- po/fr.po | 7 +++++-- po/hu.po | 6 +++++- po/it.po | 6 +++++- po/ja.po | 6 +++++- po/pl.po | 6 +++++- po/pt_BR.po | 6 +++++- po/ru.po | 6 +++++- po/tr.po | 6 +++++- po/weechat.pot | 5 ++++- src/plugins/alias/alias-command.c | 35 ++++++++++++++++++++++++++----- 14 files changed, 90 insertions(+), 18 deletions(-) diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index bbb9e7639..9b3c9e1ea 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -23,6 +23,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] (issue #522) * api: add function string_hex_dump() * api: add argument "length" in function utf8_is_valid() +* alias: display completion in /alias list (issue #518) * irc: add command /cap (issue #8) * irc: add hex dump of messages in raw buffer when debug is enabled for irc plugin (level 2 or more) diff --git a/po/cs.po b/po/cs.po index 42e232c96..312d0c06c 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -4450,6 +4450,10 @@ msgstr "Servery s \"%s\":" msgid "All aliases:" msgstr "Aliasy barev:" +#, fuzzy +msgid "completion:" +msgstr "kompilováno" + #, c-format msgid "No alias found matching \"%s\"" msgstr "Žádný alias odpovídající \"%s\" nenalezen" diff --git a/po/de.po b/po/de.po index 28ad4b0e4..0ce21d28c 100644 --- a/po/de.po +++ b/po/de.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German <>\n" @@ -5230,6 +5230,10 @@ msgstr "Alternativnamen mit \"%s\":" msgid "All aliases:" msgstr "Alle Alternativnamen:" +#, fuzzy +msgid "completion:" +msgstr "kompiliert am" + #, c-format msgid "No alias found matching \"%s\"" msgstr "keinen passenden Alias zu \"%s\" gefunden" diff --git a/po/es.po b/po/es.po index 912c5f3d5..a544e4144 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: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -4653,6 +4653,10 @@ msgstr "Servidores con \"%s\":" msgid "All aliases:" msgstr "Alias de colores:" +#, fuzzy +msgid "completion:" +msgstr "compilado en" + #, c-format msgid "No alias found matching \"%s\"" msgstr "Ningún alias encontrado con \"%s\"" diff --git a/po/fr.po b/po/fr.po index a2df8792b..b9f88d633 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: 2015-09-09 09:16+0200\n" -"PO-Revision-Date: 2015-09-09 09:24+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" +"PO-Revision-Date: 2015-09-12 09:18+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -5115,6 +5115,9 @@ msgstr "Alias avec \"%s\" :" msgid "All aliases:" msgstr "Tous les alias :" +msgid "completion:" +msgstr "complétion :" + #, c-format msgid "No alias found matching \"%s\"" msgstr "Pas d'alias trouvé correspondant à \"%s\"" diff --git a/po/hu.po b/po/hu.po index 5855e36cc..3f8d6efe3 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: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -4048,6 +4048,10 @@ msgstr "A(z) '%s' szerverek listája:\n" msgid "All aliases:" msgstr "Aliaszok listája:\n" +#, fuzzy +msgid "completion:" +msgstr "lefordítva:" + #, fuzzy, c-format msgid "No alias found matching \"%s\"" msgstr "Nem található '%s' szerver.\n" diff --git a/po/it.po b/po/it.po index a5f0c5725..24e7f1c21 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: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -4786,6 +4786,10 @@ msgstr "Server con \"%s\":" msgid "All aliases:" msgstr "Alias colore:" +#, fuzzy +msgid "completion:" +msgstr "compilato il" + #, c-format msgid "No alias found matching \"%s\"" msgstr "Nessun alias corrispondente a \"%s\" trovato" diff --git a/po/ja.po b/po/ja.po index 73b25f81a..d8e520ab9 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: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-09-11 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -4889,6 +4889,10 @@ msgstr "\"%s\" を含む別名:" msgid "All aliases:" msgstr "すべての別名:" +#, fuzzy +msgid "completion:" +msgstr "コンパイル日時" + #, c-format msgid "No alias found matching \"%s\"" msgstr "\"%s\" にマッチする別名が見つかりません" diff --git a/po/pl.po b/po/pl.po index bbe580648..fe918a3c0 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -5009,6 +5009,10 @@ msgstr "Aliasy z \"%s\":" msgid "All aliases:" msgstr "Wszystkie aliasy:" +#, fuzzy +msgid "completion:" +msgstr "skompilowano" + #, c-format msgid "No alias found matching \"%s\"" msgstr "Nie znaleziono aliasu pasującego do \"%s\"" diff --git a/po/pt_BR.po b/po/pt_BR.po index be33c695c..3bf70eef9 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: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -4640,6 +4640,10 @@ msgstr "" msgid "All aliases:" msgstr "Atalhos de Cor:" +#, fuzzy +msgid "completion:" +msgstr "compilado em" + #, c-format msgid "No alias found matching \"%s\"" msgstr "Nenhum atalho semelhante a \"%s\" foi encontrado" diff --git a/po/ru.po b/po/ru.po index f49a2602a..c9fc5d85e 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: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -4087,6 +4087,10 @@ msgstr "Серверы с '%s':\n" msgid "All aliases:" msgstr "Список сокращений:\n" +#, fuzzy +msgid "completion:" +msgstr "собран:" + #, fuzzy, c-format msgid "No alias found matching \"%s\"" msgstr "Серверы с '%s' не найдены.\n" diff --git a/po/tr.po b/po/tr.po index b9ee3f34d..b4fc678e2 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: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2015-03-10 21:33+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -3667,6 +3667,10 @@ msgstr "" msgid "All aliases:" msgstr "Tüm sunucular:" +#, fuzzy +msgid "completion:" +msgstr "derlenme" + #, c-format msgid "No alias found matching \"%s\"" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index b824968a2..a73cfa29d 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: 2015-09-09 09:16+0200\n" +"POT-Creation-Date: 2015-09-12 09:17+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -3660,6 +3660,9 @@ msgstr "" msgid "All aliases:" msgstr "" +msgid "completion:" +msgstr "" + #, c-format msgid "No alias found matching \"%s\"" msgstr "" diff --git a/src/plugins/alias/alias-command.c b/src/plugins/alias/alias-command.c index b579841ab..0f71a3957 100644 --- a/src/plugins/alias/alias-command.c +++ b/src/plugins/alias/alias-command.c @@ -123,11 +123,36 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc, weechat_printf (NULL, _("All aliases:")); } } - weechat_printf (NULL, " %s %s=>%s %s", - ptr_alias->name, - weechat_color ("chat_delimiters"), - weechat_color ("chat"), - ptr_alias->command); + ptr_option = weechat_config_search_option ( + alias_config_file, + alias_config_section_completion, + ptr_alias->name); + if (ptr_option) + { + weechat_printf ( + NULL, + " %s %s=>%s %s %s(%s%s %s%s)%s", + ptr_alias->name, + weechat_color ("chat_delimiters"), + weechat_color ("chat"), + ptr_alias->command, + weechat_color ("chat_delimiters"), + weechat_color ("chat"), + _("completion:"), + weechat_config_string (ptr_option), + weechat_color ("chat_delimiters"), + weechat_color ("chat")); + } + else + { + weechat_printf ( + NULL, + " %s %s=>%s %s", + ptr_alias->name, + weechat_color ("chat_delimiters"), + weechat_color ("chat"), + ptr_alias->command); + } alias_found = 1; } }