summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-10-04 17:26:16 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-10-04 17:26:16 +0200
commit67726a94514fca53b0a775d294ac4f36c2b10350 (patch)
tree4590854a31043fedbf0c2bdf644671c17d06cb97
parentirc: fix display of items "away" and "lag" in root bars, refresh all irc bar items on signal "buffer_switch" (bug #34466) (diff)
downloadweechat-67726a94514fca53b0a775d294ac4f36c2b10350.tar.xz
weechat-67726a94514fca53b0a775d294ac4f36c2b10350.zip
doc: add note about prefix for function weechat_printf in plugin API reference
-rw-r--r--doc/en/weechat_plugin_api.en.txt10
-rw-r--r--doc/fr/weechat_plugin_api.fr.txt11
-rw-r--r--doc/it/weechat_plugin_api.it.txt11
3 files changed, 32 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index 996305803..d7787efbb 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -5936,12 +5936,20 @@ Arguments:
* 'buffer': buffer pointer, if NULL, message is displayed on WeeChat buffer
* 'message': message to display
+[NOTE]
+The first tabulation in message ("\t") is used to separate prefix from message. +
+If your message has some tabs and if you don't want prefix, then use a space,
+a tab, then message (see example below): this will disable prefix (the space
+before tab will not be displayed).
+
C example:
[source,C]
----------------------------------------
weechat_printf (NULL, "Hello on WeeChat buffer");
weechat_printf (buffer, "Hello on this buffer");
+weechat_printf (buffer, "%sThis is an error!", weechat_prefix ("error"));
+weechat_printf (buffer, " \tMessage without prefix but with \t some \t tabs");
----------------------------------------
Script (Python):
@@ -5954,6 +5962,8 @@ weechat.prnt(buffer, message)
# example
weechat.prnt("", "Hello on WeeChat buffer")
weechat.prnt(buffer, "Hello on this buffer")
+weechat.prnt(buffer, "%sThis is an error!" % weechat.prefix("error"))
+weechat.prnt(buffer, " \tMessage without prefix but with \t some \t tabs")
----------------------------------------
[NOTE]
diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt
index 3060706cc..869714978 100644
--- a/doc/fr/weechat_plugin_api.fr.txt
+++ b/doc/fr/weechat_plugin_api.fr.txt
@@ -6001,12 +6001,21 @@ Paramètres :
tampon WeeChat
* 'message' : message à afficher
+[NOTE]
+La première tabulation dans le message ("\t") est utilisée pour séparer le
+préfixe du message. +
+Si votre message contient des tabulations et si vous ne voulez pas de préfixe,
+utilisez un espace, une tabulation, puis le message : cela désactivera le
+préfixe (l'espace avant la tabulation ne sera pas affiché).
+
Exemple en C :
[source,C]
----------------------------------------
weechat_printf (NULL, "Bonjour sur le tampon WeeChat");
weechat_printf (buffer, "Bonjour sur ce tampon");
+weechat_printf (buffer, "%sCeci est une erreur !", weechat_prefix ("error"));
+weechat_printf (buffer, " \tMessage sans préfixe mais avec \t quelques \t tabulations");
----------------------------------------
Script (Python) :
@@ -6019,6 +6028,8 @@ weechat.prnt(buffer, message)
# exemple
weechat.prnt("", "Bonjour sur le tampon WeeChat")
weechat.prnt(buffer, "Bonjour sur ce tampon")
+weechat.prnt(buffer, "%sCeci est une erreur !" % weechat.prefix("error"))
+weechat.prnt(buffer, " \tMessage sans préfixe mais avec \t quelques \t tabulations")
----------------------------------------
[NOTE]
diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt
index b98728d3a..9bddc133d 100644
--- a/doc/it/weechat_plugin_api.it.txt
+++ b/doc/it/weechat_plugin_api.it.txt
@@ -5945,12 +5945,21 @@ Argomenti:
* 'buffer': puntatore al buffer, se NULL il messaggio viene visualizzato sul buffer di WeeChat
* 'message': messaggio da visualizzare
+// TRANSLATION MISSING
+[NOTE]
+The first tabulation in message ("\t") is used to separate prefix from message. +
+If your message has some tabs and if you don't want prefix, then use a space,
+a tab, then message (see example below): this will disable prefix (the space
+before tab will not be displayed).
+
Esempio in C:
[source,C]
----------------------------------------
weechat_printf (NULL, "Benvenuto sul buffer di WeeChat");
weechat_printf (buffer, "Benvenuto su questo buffer");
+weechat_printf (buffer, "%sThis is an error!", weechat_prefix ("error"));
+weechat_printf (buffer, " \tMessage without prefix but with \t some \t tabs");
----------------------------------------
Script (Python):
@@ -5963,6 +5972,8 @@ weechat.prnt(buffer, message)
# esempio
weechat.prnt("", "Benvenuto sul buffer di WeeChat")
weechat.prnt(buffer, "Benvenuto su questo buffer")
+weechat.prnt(buffer, "%sThis is an error!" % weechat.prefix("error"))
+weechat.prnt(buffer, " \tMessage without prefix but with \t some \t tabs")
----------------------------------------
[NOTE]