From db4d9af510b268ebcff59d5de98dfd7d21191ee7 Mon Sep 17 00:00:00 2001 From: Uchijo Date: Fri, 29 Dec 2023 23:34:04 +0900 Subject: [PATCH 1/4] translate nip-25 --- 25.md | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/25.md b/25.md index 3b4aa590..b9c91f9b 100644 --- a/25.md +++ b/25.md @@ -2,40 +2,40 @@ NIP-25 ====== -Reactions +リアクション --------- `draft` `optional` -A reaction is a `kind 7` event that is used to react to other events. +リアクションとは`kind 7`のイベントであり、他のイベントに対しての反応を表現するために使用される。 -The generic reaction, represented by the `content` set to a `+` string, SHOULD -be interpreted as a "like" or "upvote". +`content`が`+`の文字列のものが汎用的なリアクションとして定められており、 +これは「いいね」または「賛成」(それぞれ原文ではlike, upvote)として解釈されるべきである (SHOULD) 。 -A reaction with `content` set to `-` SHOULD be interpreted as a "dislike" or -"downvote". It SHOULD NOT be counted as a "like", and MAY be displayed as a -downvote or dislike on a post. A client MAY also choose to tally likes against -dislikes in a reddit-like system of upvotes and downvotes, or display them as -separate tallies. +`content`が`-`になっているリアクションは「低評価」または「反対」(それぞれ原文ではdislike, downvote)として解釈されるべきである (SHOULD) 。 +また、これらは「いいね」としてカウントされるべきではなく (SHOULD NOT) 、 +低評価・反対として投稿に表示してよい (MAY) 。 +クライアントはこれらを表示する際、redditのように高評価数-低評価数として1つの数値に集計して表示するか、 +あるいはそのまま分けて表示してよい (MAY) 。 -The `content` MAY be an emoji, or [NIP-30](30.md) custom emoji in this case it MAY be interpreted as a "like" or "dislike", -or the client MAY display this emoji reaction on the post. If the `content` is an empty string then the client should -consider it a "+". +`content`には、絵文字及びカスタム絵文字([NIP-30](30.md))を利用してもよく (MAY) 、この場合「高評価」あるいは「低評価」として解釈してもよい (MAY) 。 +また、クライアントは絵文字によるリアクションを投稿に表示してもよい (MAY) 。 +もし`content`が空文字列だった場合は、クライアントはそれを"+"として解釈すべきである。 -Tags +タグ ---- -The reaction event SHOULD include `e` and `p` tags from the note the user is -reacting to. This allows users to be notified of reactions to posts they were -mentioned in. Including the `e` tags enables clients to pull all the reactions -associated with individual posts or all the posts in a thread. +リアクションイベントには、リアクション対象としているイベントに含まれる`e`及び`p`タグを含めるべきである (SHOULD) 。 +これにより、各ユーザはメンションされている投稿へのリアクションがあった際、通知を受け取ることが可能になる。 +また、クライアントはこのようにして付与された`e`タグを使用することで、1つの投稿あるいはスレッド全体に関連する +リアクションを取得することが可能となる。 -The last `e` tag MUST be the `id` of the note that is being reacted to. +タグのリストの中で最後に現れる`e`タグでは、リアクション対象となるノートの`id`を指定しなければならない (MUST) 。 -The last `p` tag MUST be the `pubkey` of the event being reacted to. +タグのリストの中で最後に現れる`p`タグでは、リアクション対象となるイベントの`pubkey`を指定しなければならない (MUST) 。 -The reaction event MAY include a `k` tag with the stringified kind number -of the reacted event as its value. +リアクションイベントには`k`タグを含めることができ (MAY) 、 +この場合値としてはリアクション対象イベントのkindを文字列として指定する。 Example code @@ -54,12 +54,12 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost } ``` -Custom Emoji Reaction +カスタム絵文字によるリアクション --------------------- -The client may specify a custom emoji ([NIP-30](30.md)) `:shortcode:` in the -reaction content. The client should refer to the emoji tag and render the -content as an emoji if shortcode is specified. +クライアントは、リアクション内容として[NIP-30](30.md)のカスタム絵文字における`:shortcode:`を使用してもよい。 +ショートコードがリアクションに含まれる場合、クライアントはemojiタグを参照し、 +その内容を絵文字として描画すべきである。 ```json { @@ -73,4 +73,4 @@ content as an emoji if shortcode is specified. } ``` -The content can be set only one `:shortcode:`. And emoji tag should be one. +`content`に含めて良い`:shortcode:`は1つのみで、emojiタグについても同様に1つのみ指定可能である。 From 8b70a7c7620578e3af914e302d62acb84aca9fe7 Mon Sep 17 00:00:00 2001 From: Uchijo Date: Fri, 29 Dec 2023 23:34:54 +0900 Subject: [PATCH 2/4] change readme.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62d5d5f9..d18c588a 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos - [NIP-21: `nostr:` URI scheme](21.md) - [NIP-23: 長文投稿](23.md) - [NIP-24: 追加のメタデータフィールドとタグ](24.md) -- [NIP-25: Reactions](25.md) +- [NIP-25: リアクション](25.md) - [NIP-26: イベント署名の委任](26.md) - [NIP-27: Text Note References](27.md) - [NIP-28: Public Chat](28.md) From dc8fb4bd116696d65c9bc59d3b584a4f3db7ba44 Mon Sep 17 00:00:00 2001 From: Yuta Uchijo <70194083+uchijo@users.noreply.github.com> Date: Sat, 30 Dec 2023 14:59:56 +0900 Subject: [PATCH 3/4] Update 25.md Co-authored-by: Don --- 25.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/25.md b/25.md index b9c91f9b..f9297384 100644 --- a/25.md +++ b/25.md @@ -34,8 +34,8 @@ NIP-25 タグのリストの中で最後に現れる`p`タグでは、リアクション対象となるイベントの`pubkey`を指定しなければならない (MUST) 。 -リアクションイベントには`k`タグを含めることができ (MAY) 、 -この場合値としてはリアクション対象イベントのkindを文字列として指定する。 +リアクションイベントには、リアクションされたイベントの文字列化されたkind番号を値とする +`k`タグを含めてもよい (MAY) 。 Example code From dc607535d5f95783dd10b20afd9ed12b7fe0a314 Mon Sep 17 00:00:00 2001 From: Yuta Uchijo <70194083+uchijo@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:52:27 +0900 Subject: [PATCH 4/4] Update 25.md Co-authored-by: penpenpng --- 25.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/25.md b/25.md index f9297384..4fba7a6a 100644 --- a/25.md +++ b/25.md @@ -12,7 +12,7 @@ NIP-25 `content`が`+`の文字列のものが汎用的なリアクションとして定められており、 これは「いいね」または「賛成」(それぞれ原文ではlike, upvote)として解釈されるべきである (SHOULD) 。 -`content`が`-`になっているリアクションは「低評価」または「反対」(それぞれ原文ではdislike, downvote)として解釈されるべきである (SHOULD) 。 +`content`が`-`であるリアクションは「低評価」または「反対」(それぞれ原文ではdislike, downvote)として解釈されるべきである (SHOULD) 。 また、これらは「いいね」としてカウントされるべきではなく (SHOULD NOT) 、 低評価・反対として投稿に表示してよい (MAY) 。 クライアントはこれらを表示する際、redditのように高評価数-低評価数として1つの数値に集計して表示するか、