summaryrefslogtreecommitdiff
path: root/doc/ja
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-06-30 20:25:35 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-06-30 20:25:35 +0200
commit9bf40517d3fdc48befec9ea4030338e8e98b1852 (patch)
tree0142fb829326ce8305217899ca9dd5a725100792 /doc/ja
parente92a63427f2f3d45646cf0ffc107cf3f0a279f84 (diff)
downloadweechat-9bf40517d3fdc48befec9ea4030338e8e98b1852.zip
api: add support of evaluated sub-strings and current date/time in function string_eval_expression() and command /eval
Diffstat (limited to 'doc/ja')
-rw-r--r--doc/ja/autogen/user/weechat_commands.asciidoc19
-rw-r--r--doc/ja/weechat_plugin_api.ja.asciidoc24
2 files changed, 33 insertions, 10 deletions
diff --git a/doc/ja/autogen/user/weechat_commands.asciidoc b/doc/ja/autogen/user/weechat_commands.asciidoc
index b72545ef6..ab7ab3d0d 100644
--- a/doc/ja/autogen/user/weechat_commands.asciidoc
+++ b/doc/ja/autogen/user/weechat_commands.asciidoc
@@ -276,14 +276,16 @@ To force a string comparison, add double quotes around each expression, for exam
"50" > "100" ==> 1
Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
- 1. a string with escaped chars (format: "esc:xxx" or "\xxx")
- 2. a string with chars to hide (format: "hide:char,string")
- 3. a color (format: "color:xxx")
- 4. an info (format: "info:name,arguments", arguments are optional)
- 5. an environment variable (format: "env:XXX")
- 6. an option (format: "file.section.option")
- 7. a local variable in buffer
- 8. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
+ 1. an evaluated sub-string (format: "eval:xxx")
+ 2. a string with escaped chars (format: "esc:xxx" or "\xxx")
+ 3. a string with chars to hide (format: "hide:char,string")
+ 4. a color (format: "color:xxx")
+ 5. an info (format: "info:name,arguments", arguments are optional)
+ 6. current date/time (format: "date" or "date:format")
+ 7. an environment variable (format: "env:XXX")
+ 8. an option (format: "file.section.option")
+ 9. a local variable in buffer
+ 10. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list, for example:
@@ -303,6 +305,7 @@ Examples (simple strings):
/eval -n ${window.buffer.number} ==> 1
/eval -n ${\t} ==> <tab>
/eval -n ${hide:-,${relay.network.password}} ==> --------
+ /eval -n ${date:%H:%M:%S} ==> 07:46:40
Examples (conditions):
/eval -n -c ${window.buffer.number} > 2 ==> 0
diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc
index 091018eba..66035ba09 100644
--- a/doc/ja/weechat_plugin_api.ja.asciidoc
+++ b/doc/ja/weechat_plugin_api.ja.asciidoc
@@ -1906,7 +1906,8 @@ str3 = weechat.string_input_for_buffer("//test") # "/test"
==== string_eval_expression
-_WeeChat バージョン 0.4.0 以上で利用可、バージョン 0.4.2 と 1.1 で更新。_
+// TRANSLATION MISSING
+_WeeChat ≥ 0.4.0, updated in 0.4.2, 1.0, 1.1, 1.2 and 1.3._
式を評価して文字列として返す。`${variable}`
という書式で書かれた特殊変数は展開されます (以下の表を参照)。
@@ -1958,13 +1959,21 @@ char *weechat_string_eval_expression (const char *expr,
式中で展開される変数のリスト
(優先度の高い順、展開順の早いものを上に遅いものを下に):
-[width="100%",cols="2,8,3,3",options="header"]
+[width="100%",cols="2,8,4,4",options="header"]
|===
| フォーマット | 説明 | 例 | 結果
| `${name}` | 'extra_vars' の変数 `name` の値に展開 |
`${name}` | `value`
+// TRANSLATION MISSING
+| `${eval:xxx}` +
+ (_WeeChat ≥ 1.3_) |
+ String to evaluate |
+ `${eval:${date:${weechat.look.buffer_time_format}}}` |
+ `19:02:45` (with colors if there are color codes in the option
+ weechat.look.buffer_time_format)
+
| `${esc:xxx}` +
`${\xxx}` | エスケープ文字を含む文字列 |
`${esc:prefix\tmessage}` +
@@ -2000,6 +2009,17 @@ char *weechat_string_eval_expression (const char *expr,
`1.0` +
`lightblue`
+// TRANSLATION MISSING
+| `${date}` +
+ `${date:xxx}` +
+ (_WeeChat ≥ 1.3_) |
+ Current date/time, with custom format (see `man strftime`),
+ default format is `%F %T` |
+ `${date}` +
+ `${date:%H:%M:%S}` |
+ `2015-06-30 19:02:45` +
+ `19:02:45`
+
| `${env:NAME}` +
(_WeeChat バージョン 1.2 以上で利用可_) |
Value of the environment variable `NAME` |