From c72fa72aeff0c3dc814d678e4e0aeb40781dedcd Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 18 Apr 2012 08:05:46 +0200 Subject: [PATCH] doc: fix arguments sent to callback of hook_command in plugin API reference --- doc/en/weechat_plugin_api.en.txt | 20 ++++++++++++-------- doc/fr/weechat_plugin_api.fr.txt | 24 ++++++++++++++---------- doc/it/weechat_plugin_api.it.txt | 19 ++++++++++++------- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index 19eb6f48a..50dd70244 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -6560,17 +6560,21 @@ struct t_hook *my_command_hook = NULL); ---------------------------------------- -For example, if command called is `/command abc def ghi`, then argv and -argv_eol contain following values: +For example, if command called is `/command abc def ghi`, then 'argv' and +'argv_eol' have following values: * 'argv': -** 'argv[0]' == "abc" -** 'argv[1]' == "def" -** 'argv[2]' == "ghi" +** 'argv[0]' == "/command" +** 'argv[1]' == "abc" +** 'argv[2]' == "def" +** 'argv[3]' == "ghi" * 'argv_eol': -** 'argv_eol[0]' == "abc def ghi" -** 'argv_eol[1]' == "def ghi" -** 'argv_eol[2]' == "ghi" +** 'argv_eol[0]' == "/command abc def ghi" +** 'argv_eol[1]' == "abc def ghi" +** 'argv_eol[2]' == "def ghi" +** 'argv_eol[3]' == "ghi" + +For scripts, 'args' has value "abc def ghi". Script (Python): diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt index 9c9b3da58..a03c7501f 100644 --- a/doc/fr/weechat_plugin_api.fr.txt +++ b/doc/fr/weechat_plugin_api.fr.txt @@ -6645,17 +6645,21 @@ struct t_hook *my_command_hook = NULL); ---------------------------------------- -Par exemple, si la commande appelée est `/command abc def ghi`, alors argv et -argv_eol contiendront les valeurs suivantes : +Par exemple, si la commande appelée est `/command abc def ghi`, alors 'argv' et +'argv_eol' ont les valeurs suivantes : -* 'argv' : -** 'argv[0]' == "abc" -** 'argv[1]' == "def" -** 'argv[2]' == "ghi" -* 'argv_eol' : -** 'argv_eol[0]' == "abc def ghi" -** 'argv_eol[1]' == "def ghi" -** 'argv_eol[2]' == "ghi" +* 'argv': +** 'argv[0]' == "/command" +** 'argv[1]' == "abc" +** 'argv[2]' == "def" +** 'argv[3]' == "ghi" +* 'argv_eol': +** 'argv_eol[0]' == "/command abc def ghi" +** 'argv_eol[1]' == "abc def ghi" +** 'argv_eol[2]' == "def ghi" +** 'argv_eol[3]' == "ghi" + +Pour les scripts, 'args' a la valeur "abc def ghi". Script (Python) : diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index c696fad67..1141e35ec 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -6574,16 +6574,21 @@ struct t_hook *my_command_hook = ---------------------------------------- Ad esempio, se il comando chiamato è `/comando abc def ghi`, allora -argv e argv_eol contengono i seguenti valori: +'argv' e 'argv_eol' contengono i seguenti valori: * 'argv': -** 'argv[0]' == "abc" -** 'argv[1]' == "def" -** 'argv[2]' == "ghi" +** 'argv[0]' == "/command" +** 'argv[1]' == "abc" +** 'argv[2]' == "def" +** 'argv[3]' == "ghi" * 'argv_eol': -** 'argv_eol[0]' == "abc def ghi" -** 'argv_eol[1]' == "def ghi" -** 'argv_eol[2]' == "ghi" +** 'argv_eol[0]' == "/command abc def ghi" +** 'argv_eol[1]' == "abc def ghi" +** 'argv_eol[2]' == "def ghi" +** 'argv_eol[3]' == "ghi" + +// TRANSLATION MISSING +For scripts, 'args' has value "abc def ghi". Script (Python):