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

translate NIP-30 #70

Merged
merged 5 commits into from
Dec 25, 2023
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
22 changes: 11 additions & 11 deletions 30.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
NIP-30
======

Custom Emoji
カスタム絵文字
------------

`draft` `optional`

Custom emoji may be added to **kind 0** and **kind 1** events by including one or more `"emoji"` tags, in the form:
以下の形式の`"emoji"`タグを1つ以上含めることで、**kind 0**及び**kind 1**のイベントに対し、カスタム絵文字を付与してもよい:

```
["emoji", <shortcode>, <image-url>]
```

Where:
ここで、`<shortcode>`及び`<image-url>`は以下の通りである:

- `<shortcode>` is a name given for the emoji, which MUST be comprised of only alphanumeric characters and underscores.
- `<image-url>` is a URL to the corresponding image file of the emoji.
- `<shortcode>`は絵文字の名前であり、英数字及びアンダースコアのみによって構成されなければならない (MUST) 。
- `<image-url>`は対応する絵文字の画像ファイルのURLである。

For each emoji tag, clients should parse emoji shortcodes (aka "emojify") like `:shortcode:` in the event to display custom emoji.
それぞれの`"emoji"`タグについて、クライアントは`:shortcode:`といった形式で表される絵文字ショートコードを解釈し、カスタム絵文字を表示する(なおこの操作を「絵文字化」という)べきである。

Clients may allow users to add custom emoji to an event by including `:shortcode:` identifier in the event, and adding the relevant `"emoji"` tags.
クライアントはユーザに対し、`:shortcode:`識別子を使用することでイベントにカスタム絵文字を含める機能、対応する`"emoji"`タグを付与する機能を提供してもよい。

### Kind 0 events
### Kind 0 イベント

In kind 0 events, the `name` and `about` fields should be emojified.
kind 0のイベントにおいては、`name`及び`about`フィールドにカスタム絵文字を使用してよく、クライアントはこれを「絵文字化」すべきである。

```json
{
Expand All @@ -37,9 +37,9 @@ In kind 0 events, the `name` and `about` fields should be emojified.
}
```

### Kind 1 events
### Kind 1 イベント

In kind 1 events, the `content` should be emojified.
kind 1のイベントにおいては、`content`フィールドにカスタム絵文字を使用してよく、クライアントはこれを「絵文字化」すべきである。

```json
{
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
- [NIP-26: イベント署名の委任](26.md)
- [NIP-27: Text Note References](27.md)
- [NIP-28: Public Chat](28.md)
- [NIP-30: Custom Emoji](30.md)
- [NIP-30: カスタム絵文字](30.md)
- [NIP-31: Dealing with Unknown Events](31.md)
- [NIP-32: Labeling](32.md)
- [NIP-36: センシティブコンテンツ / コンテンツの警告](36.md)
Expand Down