From 20f9ca7d4acf7629a9d8e884d99054f55bae76d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 19 Feb 2018 21:27:08 +0100 Subject: [PATCH] scripts: display the script name in stdout/stderr output from scripts --- ChangeLog.adoc | 1 + po/cs.po | 4 ++-- po/de.po | 7 +++---- po/es.po | 4 ++-- po/fr.po | 8 ++++---- po/hu.po | 4 ++-- po/it.po | 4 ++-- po/ja.po | 6 +++--- po/pl.po | 6 +++--- po/pt.po | 4 ++-- po/pt_BR.po | 4 ++-- po/ru.po | 4 ++-- po/tr.po | 4 ++-- po/weechat.pot | 4 ++-- src/plugins/guile/weechat-guile.c | 9 ++++++--- src/plugins/lua/weechat-lua.c | 9 ++++++--- src/plugins/perl/weechat-perl.c | 9 ++++++--- src/plugins/python/weechat-python.c | 9 ++++++--- src/plugins/ruby/weechat-ruby.c | 9 ++++++--- 19 files changed, 62 insertions(+), 47 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 2e19f733b..8c96b0e46 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -38,6 +38,7 @@ Improvements:: * api: add time in info "date" (WeeChat compilation date/time) (issue #1138) * irc: allow ${irc_server.xxx} and ${server} in server evaluated options (issue #1144) * script: change default value of option script.look.sort from "p,n" to "i,p,n" + * scripts: display the script name in stdout/stderr output from scripts Build:: diff --git a/po/cs.po b/po/cs.po index f0275fc5e..0aa20f1f5 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -6101,7 +6101,7 @@ msgid "Support of scheme scripts (with Guile)" msgstr "Podpora scriptů v Sheme (pomocí Guile)" #, fuzzy, c-format -msgid "%s: stdout/stderr: %s" +msgid "%s: stdout/stderr (%s): %s" msgstr "%s: stdout/stderr: %s%s" #, c-format diff --git a/po/de.po b/po/de.po index 503623da4..9999c60c5 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2018-02-10 10:14+0100\n" "Last-Translator: w8rabbit \n" "Language-Team: German \n" @@ -7502,8 +7502,8 @@ msgstr "%s: registriertes Skript \"%s\", Version %s (%s)" msgid "Support of scheme scripts (with Guile)" msgstr "Unterstützung von Scheme-Skripten (mittels Guile)" -#, c-format -msgid "%s: stdout/stderr: %s" +#, fuzzy, c-format +msgid "%s: stdout/stderr (%s): %s" msgstr "%s: stdout/stderr: %s" #, c-format @@ -14501,4 +14501,3 @@ msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "" "%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)" - diff --git a/po/es.po b/po/es.po index 9af1f4ecc..4e72368c0 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -6330,7 +6330,7 @@ msgid "Support of scheme scripts (with Guile)" msgstr "" #, fuzzy, c-format -msgid "%s: stdout/stderr: %s" +msgid "%s: stdout/stderr (%s): %s" msgstr "%s: stdout/stderr: %s%s" #, c-format diff --git a/po/fr.po b/po/fr.po index 02dfa8d94..1c4b1d625 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: 2018-02-10 08:21+0100\n" -"PO-Revision-Date: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" +"PO-Revision-Date: 2018-02-19 21:26+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -7343,8 +7343,8 @@ msgid "Support of scheme scripts (with Guile)" msgstr "Support des scripts scheme (avec Guile)" #, c-format -msgid "%s: stdout/stderr: %s" -msgstr "%s : stdout/stderr : %s" +msgid "%s: stdout/stderr (%s): %s" +msgstr "%s : stdout/stderr (%s) : %s" #, c-format msgid "%s%s: function \"%s\" must return a valid value" diff --git a/po/hu.po b/po/hu.po index 2db77a583..9bded03bc 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -5627,7 +5627,7 @@ msgid "Support of scheme scripts (with Guile)" msgstr "" #, fuzzy, c-format -msgid "%s: stdout/stderr: %s" +msgid "%s: stdout/stderr (%s): %s" msgstr "%sSzerver: %s%s\n" #, fuzzy, c-format diff --git a/po/it.po b/po/it.po index 496bd895a..228bfa0b1 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -6504,7 +6504,7 @@ msgid "Support of scheme scripts (with Guile)" msgstr "Supporto agli script scheme (con Guile)" #, fuzzy, c-format -msgid "%s: stdout/stderr: %s" +msgid "%s: stdout/stderr (%s): %s" msgstr "%s: stdout/stderr: %s%s" #, c-format diff --git a/po/ja.po b/po/ja.po index b2a8cb26b..568fb47d6 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2018-02-10 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: weechat-dev \n" @@ -7153,8 +7153,8 @@ msgstr "%s: zarejestrowano skrypt \"%s\", wersja %s (%s)" msgid "Support of scheme scripts (with Guile)" msgstr "Wsparcie dla skryptów scheme (za pomocą Guile)" -#, c-format -msgid "%s: stdout/stderr: %s" +#, fuzzy, c-format +msgid "%s: stdout/stderr (%s): %s" msgstr "%s: stdout/stderr: %s" #, c-format diff --git a/po/pt.po b/po/pt.po index 21658a44c..7ee14695b 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -6862,7 +6862,7 @@ msgid "Support of scheme scripts (with Guile)" msgstr "Suporte de scripts scheme (com Guile)" #, fuzzy, c-format -msgid "%s: stdout/stderr: %s" +msgid "%s: stdout/stderr (%s): %s" msgstr "%s: stdout/stderr: %s%s" #, c-format diff --git a/po/pt_BR.po b/po/pt_BR.po index e70cacfa6..a5319b6d6 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2018-02-05 21:30+0100\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -6287,7 +6287,7 @@ msgid "Support of scheme scripts (with Guile)" msgstr "" #, fuzzy, c-format -msgid "%s: stdout/stderr: %s" +msgid "%s: stdout/stderr (%s): %s" msgstr "%s: stdout/stderr: %s%s" #, c-format diff --git a/po/ru.po b/po/ru.po index e58caeb66..a1dc8b78a 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -5665,7 +5665,7 @@ msgid "Support of scheme scripts (with Guile)" msgstr "" #, fuzzy, c-format -msgid "%s: stdout/stderr: %s" +msgid "%s: stdout/stderr (%s): %s" msgstr "%sСервер: %s%s\n" #, fuzzy, c-format diff --git a/po/tr.po b/po/tr.po index 8f5fc24a1..64df22f84 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2017-06-26 23:33+0200\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -5193,7 +5193,7 @@ msgid "Support of scheme scripts (with Guile)" msgstr "" #, fuzzy, c-format -msgid "%s: stdout/stderr: %s" +msgid "%s: stdout/stderr (%s): %s" msgstr "%s%s: hata: %s" #, c-format diff --git a/po/weechat.pot b/po/weechat.pot index da3584e7c..af654853e 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: 2018-02-10 08:21+0100\n" +"POT-Creation-Date: 2018-02-19 21:26+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -5134,7 +5134,7 @@ msgid "Support of scheme scripts (with Guile)" msgstr "" #, c-format -msgid "%s: stdout/stderr: %s" +msgid "%s: stdout/stderr (%s): %s" msgstr "" #, c-format diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c index 304fe906b..bc5c39d96 100644 --- a/src/plugins/guile/weechat-guile.c +++ b/src/plugins/guile/weechat-guile.c @@ -162,9 +162,12 @@ weechat_guile_output_flush () else { /* script (no eval mode) */ - weechat_printf (NULL, - weechat_gettext ("%s: stdout/stderr: %s"), - GUILE_PLUGIN_NAME, *guile_buffer_output); + weechat_printf ( + NULL, + weechat_gettext ("%s: stdout/stderr (%s): %s"), + GUILE_PLUGIN_NAME, + (guile_current_script) ? guile_current_script->name : "?", + *guile_buffer_output); } weechat_string_dyn_copy (guile_buffer_output, NULL); diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c index 1fe13133f..7229551b4 100644 --- a/src/plugins/lua/weechat-lua.c +++ b/src/plugins/lua/weechat-lua.c @@ -234,9 +234,12 @@ weechat_lua_output_flush () else { /* script (no eval mode) */ - weechat_printf (NULL, - weechat_gettext ("%s: stdout/stderr: %s"), - LUA_PLUGIN_NAME, *lua_buffer_output); + weechat_printf ( + NULL, + weechat_gettext ("%s: stdout/stderr (%s): %s"), + LUA_PLUGIN_NAME, + (lua_current_script) ? lua_current_script->name : "?", + *lua_buffer_output); } weechat_string_dyn_copy (lua_buffer_output, NULL); diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c index e5b702651..4b8bb6116 100644 --- a/src/plugins/perl/weechat-perl.c +++ b/src/plugins/perl/weechat-perl.c @@ -270,9 +270,12 @@ weechat_perl_output_flush () else { /* script (no eval mode) */ - weechat_printf (NULL, - weechat_gettext ("%s: stdout/stderr: %s"), - PERL_PLUGIN_NAME, *perl_buffer_output); + weechat_printf ( + NULL, + weechat_gettext ("%s: stdout/stderr (%s): %s"), + PERL_PLUGIN_NAME, + (perl_current_script) ? perl_current_script->name : "?", + *perl_buffer_output); } weechat_string_dyn_copy (perl_buffer_output, NULL); diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c index 8c89f84f7..f8cc8752b 100644 --- a/src/plugins/python/weechat-python.c +++ b/src/plugins/python/weechat-python.c @@ -381,9 +381,12 @@ weechat_python_output_flush () else { /* script (no eval mode) */ - weechat_printf (NULL, - weechat_gettext ("%s: stdout/stderr: %s"), - PYTHON_PLUGIN_NAME, *python_buffer_output); + weechat_printf ( + NULL, + weechat_gettext ("%s: stdout/stderr (%s): %s"), + PYTHON_PLUGIN_NAME, + (python_current_script) ? python_current_script->name : "?", + *python_buffer_output); } weechat_string_dyn_copy (python_buffer_output, NULL); diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c index a5bc4d0de..d593ad79e 100644 --- a/src/plugins/ruby/weechat-ruby.c +++ b/src/plugins/ruby/weechat-ruby.c @@ -406,9 +406,12 @@ weechat_ruby_output_flush () else { /* script (no eval mode) */ - weechat_printf (NULL, - weechat_gettext ("%s: stdout/stderr: %s"), - RUBY_PLUGIN_NAME, *ruby_buffer_output); + weechat_printf ( + NULL, + weechat_gettext ("%s: stdout/stderr (%s): %s"), + RUBY_PLUGIN_NAME, + (ruby_current_script) ? ruby_current_script->name : "?", + *ruby_buffer_output); } weechat_string_dyn_copy (ruby_buffer_output, NULL);