summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-03-24 18:10:21 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-03-24 18:10:21 +0100
commitfad848bf7caff763ace7a8b88f06307feca77bac (patch)
treede4283956e5b051579b4ddccada99ddee9e4e383 /doc
parenta08603c24c2a2b33fe8cdcb6e591ebf4cb7bd986 (diff)
downloadweechat-fad848bf7caff763ace7a8b88f06307feca77bac.zip
doc: add note about constants in lua, fix lua example (scripting guide)
Diffstat (limited to 'doc')
-rw-r--r--doc/de/weechat_scripting.de.txt5
-rw-r--r--doc/en/weechat_scripting.en.txt4
-rw-r--r--doc/fr/weechat_scripting.fr.txt4
-rw-r--r--doc/it/weechat_scripting.it.txt5
-rw-r--r--doc/ja/weechat_scripting.ja.txt5
-rw-r--r--doc/pl/weechat_scripting.pl.txt5
6 files changed, 22 insertions, 6 deletions
diff --git a/doc/de/weechat_scripting.de.txt b/doc/de/weechat_scripting.de.txt
index 155c7793a..5cb53362c 100644
--- a/doc/de/weechat_scripting.de.txt
+++ b/doc/de/weechat_scripting.de.txt
@@ -71,6 +71,9 @@ Lua
^^^
* Funktionen werden im Format `weechat.xxx(arg1, arg2, ...)` ausgeführt
+// TRANSLATION MISSING
+* Constants in API are in fact functions, the returned value must be used as
+ constant (not the function itself).
Tcl
^^^
@@ -331,7 +334,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
----------------------------------------
function timer_cb(data, remaining_calls)
weechat.print("", "timer! data="..data)
- return weechat.WEECHAT_RC_OK
+ return weechat.WEECHAT_RC_OK()
end
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
diff --git a/doc/en/weechat_scripting.en.txt b/doc/en/weechat_scripting.en.txt
index 32e3859a3..eed6c4965 100644
--- a/doc/en/weechat_scripting.en.txt
+++ b/doc/en/weechat_scripting.en.txt
@@ -70,6 +70,8 @@ Lua
^^^
* Functions are called with `weechat.xxx(arg1, arg2, ...)`
+* Constants in API are in fact functions, the returned value must be used as
+ constant (not the function itself).
Tcl
^^^
@@ -323,7 +325,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
----------------------------------------
function timer_cb(data, remaining_calls)
weechat.print("", "timer! data="..data)
- return weechat.WEECHAT_RC_OK
+ return weechat.WEECHAT_RC_OK()
end
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
diff --git a/doc/fr/weechat_scripting.fr.txt b/doc/fr/weechat_scripting.fr.txt
index 22b505b30..bcecc0d0e 100644
--- a/doc/fr/weechat_scripting.fr.txt
+++ b/doc/fr/weechat_scripting.fr.txt
@@ -72,6 +72,8 @@ Lua
^^^
* Les fonctions sont appelées par `weechat.xxx(arg1, arg2, ...)`
+* Les constantes dans l'API sont en fait des fonctions, la valeur retournée doit
+ être utilisée comme constante (et non la fonction elle-même).
Tcl
^^^
@@ -333,7 +335,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
----------------------------------------
function timer_cb(data, remaining_calls)
weechat.print("", "timer! data="..data)
- return weechat.WEECHAT_RC_OK
+ return weechat.WEECHAT_RC_OK()
end
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
diff --git a/doc/it/weechat_scripting.it.txt b/doc/it/weechat_scripting.it.txt
index 03c6950ea..4dee4472f 100644
--- a/doc/it/weechat_scripting.it.txt
+++ b/doc/it/weechat_scripting.it.txt
@@ -72,6 +72,9 @@ Lua
^^^
* Le funzioni sono chiamate con `weechat.xxx(arg1, arg2, ...)`
+// TRANSLATION MISSING
+* Constants in API are in fact functions, the returned value must be used as
+ constant (not the function itself).
Tcl
^^^
@@ -336,7 +339,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
----------------------------------------
function timer_cb(data, remaining_calls)
weechat.print("", "timer! data="..data)
- return weechat.WEECHAT_RC_OK
+ return weechat.WEECHAT_RC_OK()
end
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
diff --git a/doc/ja/weechat_scripting.ja.txt b/doc/ja/weechat_scripting.ja.txt
index 70ab66b2c..7e75d2a42 100644
--- a/doc/ja/weechat_scripting.ja.txt
+++ b/doc/ja/weechat_scripting.ja.txt
@@ -63,6 +63,9 @@ Weechat.config_new_option(config, section, "name", "string", "description of opt
==== Lua ====
* 関数は `weechat.xxx(arg1, arg2, ...)` のように呼び出してください。
+// TRANSLATION MISSING
+* Constants in API are in fact functions, the returned value must be used as
+ constant (not the function itself).
==== Tcl ====
@@ -316,7 +319,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
----------------------------------------
function timer_cb(data, remaining_calls)
weechat.print("", "timer! data="..data)
- return weechat.WEECHAT_RC_OK
+ return weechat.WEECHAT_RC_OK()
end
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
diff --git a/doc/pl/weechat_scripting.pl.txt b/doc/pl/weechat_scripting.pl.txt
index 03a0dcf50..9fa67ae0a 100644
--- a/doc/pl/weechat_scripting.pl.txt
+++ b/doc/pl/weechat_scripting.pl.txt
@@ -71,6 +71,9 @@ Lua
^^^
* Funkcje są wywoływane za pomocą `weechat.xxx(arg1, arg2, ...)`
+// TRANSLATION MISSING
+* Constants in API are in fact functions, the returned value must be used as
+ constant (not the function itself).
Tcl
^^^
@@ -327,7 +330,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
----------------------------------------
function timer_cb(data, remaining_calls)
weechat.print("", "timer! data="..data)
- return weechat.WEECHAT_RC_OK
+ return weechat.WEECHAT_RC_OK()
end
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")