Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/translate nip25 #73

Merged
merged 5 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions 25.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
リアクションイベントには、リアクションされたイベントの文字列化されたkind番号を値とする
`k`タグを含めてもよい (MAY) 。

Example code

Expand All @@ -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
{
Expand All @@ -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つのみ指定可能である。
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down