summaryrefslogtreecommitdiff
path: root/doc/ja
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ja')
-rw-r--r--doc/ja/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/ja/weechat_plugin_api.ja.asciidoc25
-rw-r--r--doc/ja/weechat_scripting.ja.asciidoc67
-rw-r--r--doc/ja/weechat_user.ja.asciidoc4
4 files changed, 84 insertions, 14 deletions
diff --git a/doc/ja/autogen/plugin_api/infos_hashtable.asciidoc b/doc/ja/autogen/plugin_api/infos_hashtable.asciidoc
index b60a5c304..189070678 100644
--- a/doc/ja/autogen/plugin_api/infos_hashtable.asciidoc
+++ b/doc/ja/autogen/plugin_api/infos_hashtable.asciidoc
@@ -6,7 +6,7 @@
|===
| プラグイン | 名前 | 説明 | ハッシュテーブル (入力) | ハッシュテーブル (出力)
-| irc | irc_message_parse | IRC メッセージを解析 | "message": IRC メッセージ、"server": サーバ名 (任意) | "tags": タグ、"message_without_tags": タグを含まないメッセージ、"nick": ニックネーム、"host": ホスト名、"command": コマンド、"channel": チャンネル、"arguments": 引数 (チャンネルを含む)
+| irc | irc_message_parse | IRC メッセージを解析 | "message": IRC メッセージ、"server": サーバ名 (任意) | "tags": tags, "message_without_tags": message without the tags, "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel), "text": text (for example user message), "pos_text": index of text in message ("-1" if no text found)
| irc | irc_message_split | IRC メッセージを分割 (512 バイトに収める) | "message": IRC メッセージ、"server": サーバ名 (任意) | "msg1" ... "msgN": 送信メッセージ (最後の "\r\n" は無し), "args1" ... "argsN": メッセージの引数、"count": メッセージの数
diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc
index 4a943113d..091018eba 100644
--- a/doc/ja/weechat_plugin_api.ja.asciidoc
+++ b/doc/ja/weechat_plugin_api.ja.asciidoc
@@ -12901,23 +12901,34 @@ hashtable_in = weechat_hashtable_new (8,
NULL);
if (hashtable_in)
{
- weechat_hashtable_set (hashtable_in, "message",
- ":nick!user@host PRIVMSG #weechat :message here");
+ weechat_hashtable_set (
+ hashtable_in,
+ "message",
+ "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!");
hashtable_out = weechat_info_get_hashtable ("irc_message_parse",
hashtable_in);
/*
* now hashtable_out has following keys/values:
- * "nick" : "nick"
- * "host" : "nick!user@host"
- * "command" : "PRIVMSG"
- * "channel" : "#weechat"
- * "arguments": "#weechat :message here"
+ * "tags" : "time=2015-06-27T16:40:35.000Z"
+ * "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!"
+ * "nick" : "nick"
+ * "host" : "nick!user@host"
+ * "command" : "PRIVMSG"
+ * "channel" : "#weechat"
+ * "arguments" : "#weechat :hello!"
+ * "text" : "hello!"
+ * "pos_text" : "65"
*/
weechat_hashtable_free (hashtable_in);
weechat_hashtable_free (hashtable_out);
}
----
+// TRANSLATION MISSING
+[NOTE]
+See the 'WeeChat Scripting Guide' for more info about "irc_message_parse"
+output.
+
スクリプト (Python) での使用例:
[source,python]
diff --git a/doc/ja/weechat_scripting.ja.asciidoc b/doc/ja/weechat_scripting.ja.asciidoc
index 9db3410ac..8ec667104 100644
--- a/doc/ja/weechat_scripting.ja.asciidoc
+++ b/doc/ja/weechat_scripting.ja.asciidoc
@@ -902,14 +902,69 @@ _バージョン 0.3.4 の新機能_
"irc_message_parse" と呼ばれる info_hashtable を使って IRC メッセージを構文解析できます。
+// TRANSLATION MISSING
+The result is a hashtable with following keys
+(the example values are built with this message:
+`@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!`):
+
+[width="100%",cols="1,^2,10,8",options="header"]
+|===
+| Key | WeeChat version | Description | Example
+
+| tags | ≥ 0.4.0 |
+ The tags in message (can be empty) |
+ `time=2015-06-27T16:40:35.000Z`
+
+| message_without_tags | ≥ 0.4.0 |
+ The message without the tags (the same as message if there are no tags) |
+ `:nick!user@host PRIVMSG #weechat :hello!`
+
+| nick | ≥ 0.3.4 |
+ The origin nick |
+ `nick`
+
+| host | ≥ 0.3.4 |
+ The origin host (includes the nick) |
+ `nick!user@host`
+
+| command | ≥ 0.3.4 |
+ The command ('PRIVMSG', 'NOTICE', ...) |
+ `PRIVMSG`
+
+| channel | ≥ 0.3.4 |
+ The target channel |
+ `#weechat`
+
+| arguments | ≥ 0.3.4 |
+ The command arguments (includes the channel) |
+ `#weechat :hello!`
+
+| text | ≥ 1.3 |
+ The text (for example user message) |
+ `hello!`
+
+| pos_text | ≥ 1.3 |
+ The index of text in message ("-1" if text was not found) |
+ `65`
+|===
+
[source,python]
----
-dict = weechat.info_get_hashtable("irc_message_parse",
- {"message": ":nick!user@host PRIVMSG #weechat :message here"})
-weechat.prnt("", "dict: %s" % dict)
-
-# 出力:
-# dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'}
+dict = weechat.info_get_hashtable(
+ "irc_message_parse",
+ {"message": "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!"})
+
+# dict == {
+# "tags": "time=2015-06-27T16:40:35.000Z",
+# "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!",
+# "nick": "nick",
+# "host": "nick!user@host",
+# "command": "PRIVMSG",
+# "channel": "#weechat",
+# "arguments": "#weechat :hello!",
+# "text": "hello!",
+# "pos_text": "65",
+# }
----
[[infos]]
diff --git a/doc/ja/weechat_user.ja.asciidoc b/doc/ja/weechat_user.ja.asciidoc
index e49aa6d4a..8d309ec0d 100644
--- a/doc/ja/weechat_user.ja.asciidoc
+++ b/doc/ja/weechat_user.ja.asciidoc
@@ -3235,6 +3235,10 @@ ${tg_highlight} || ${tg_msg_pv}
| command | string | IRC コマンド (例: "PRIVMSG"、"NOTICE"、...)
| channel | string | IRC チャンネル
| arguments | string | コマンドの引数 ('channel' の値を含みます)
+// TRANSLATION MISSING
+| text | string | Text (for example user message)
+// TRANSLATION MISSING
+| pos_text | string | The index of text in message ("-1" if text was not found)
|===
// TRANSLATION MISSING