Translate Objects to Japanese (#3)
This commit is contained in:
parent
74f23c99ea
commit
c9e725bf80
199
index.html
199
index.html
|
@ -404,44 +404,41 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="obj">
|
<section id="obj">
|
||||||
<h2>Objects</h2>
|
<h2>オブジェクト</h2>
|
||||||
<p>
|
<p>
|
||||||
Objects are the core concept around which both [[!ActivityStreams]] and
|
オブジェクトは、[[!ActivityStreams]] と ActivityPub を構成する基本的な概念です。
|
||||||
ActivityPub are built.
|
オブジェクトは多くの場合 activity に包まれたり、collection の stream に含まれたりします。
|
||||||
Objects are often wrapped in Activities and are contained in streams of
|
collection 自身もまたオブジェクトのサブクラスです。
|
||||||
Collections, which are themselves subclasses of Objects.
|
詳しくは、[[!Activity-Vocabulary]] のドキュメントの、特に
|
||||||
See the [[!Activity-Vocabulary]] document, particularly the
|
<a href="https://www.w3.org/TR/activitystreams-vocabulary/#types">Core Classes</a>
|
||||||
<a href="https://www.w3.org/TR/activitystreams-vocabulary/#types">Core Classes</a>;
|
の章を参照してください。
|
||||||
ActivityPub follows the mapping of this vocabulary very closely.
|
ActivityPub は、この語彙の対応関係に厳密に従っています。
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
ActivityPub defines some terms in addition to those provided by
|
ActivityPub は、ActivityStreams が提供するものに加えて、いくつかの用語を定義します。
|
||||||
ActivityStreams.
|
これらの用語は
|
||||||
These terms are provided in the ActivityPub
|
<code>https://www.w3.org/ns/activitystreams</code>
|
||||||
|
にある ActivityPub の
|
||||||
<a href="http://www.w3.org/TR/json-ld/#the-context">JSON-LD context</a>
|
<a href="http://www.w3.org/TR/json-ld/#the-context">JSON-LD context</a>
|
||||||
at
|
で提供されています。
|
||||||
<code>https://www.w3.org/ns/activitystreams</code>.
|
実装者は自身のオブジェクトの定義の中に ActivityPub の context を含めるべきです。
|
||||||
Implementers SHOULD include the ActivityPub context in their
|
実装者は適切に追加の context を含めてもよいです。
|
||||||
object definitions.
|
|
||||||
Implementers MAY include additional context as appropriate.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
ActivityPub shares the same
|
ActivityPub は
|
||||||
<a href="https://www.w3.org/TR/activitystreams-core/#urls">
|
<a href="https://www.w3.org/TR/activitystreams-core/#urls">
|
||||||
URI / IRI conventions as in ActivityStreams</a>.
|
ActivityStreams の URI / IRI の慣例</a>
|
||||||
|
と同じものを共有しています。
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Servers SHOULD validate the content they receive to avoid content
|
サーバーは、内容のスプーフィング攻撃を避けるために受け取った内容を検証すべきです
|
||||||
spoofing attacks.
|
(少なくとも、オブジェクトが元の場所で受信されたように見えることを確認するのと同じぐらい堅牢な処理を行うべきですが、
|
||||||
(A server should do something at least as robust as checking that
|
署名の確認などの方法が利用できるとより良いでしょう)。
|
||||||
the object appears as received at its origin, but mechanisms
|
検証のための特定の方法がこのドキュメントできちんと指定されている訳ではないですが、
|
||||||
such as checking signatures would be better if available).
|
<a href="#security-considerations">セキュリティについての考慮事項</a>にある提案やグッドプラクティスには目を通してください。
|
||||||
No particular mechanism for verification is authoritatively specified by
|
|
||||||
this document, but please see <a href="#security-considerations">Security
|
|
||||||
Considerations</a> for some suggestions and good practices.
|
|
||||||
</p>
|
</p>
|
||||||
<div class="informative">
|
<div class="informative">
|
||||||
As an example, if example.com receives the activity
|
例として、もし example.com が次の activity を受け取ったとき
|
||||||
<pre class="example">
|
<pre class="example">
|
||||||
{
|
{
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
|
@ -450,163 +447,111 @@
|
||||||
"to": ["https://hatchat.example/sarah/",
|
"to": ["https://hatchat.example/sarah/",
|
||||||
"https://example.com/peeps/john/"],
|
"https://example.com/peeps/john/"],
|
||||||
"object": {
|
"object": {
|
||||||
"@context": {"@language": "en"},
|
"@context": {"@language": "ja"},
|
||||||
"id": "https://example.org/~alice/note/23",
|
"id": "https://example.org/~alice/note/23",
|
||||||
"type": "Note",
|
"type": "Note",
|
||||||
"attributedTo": "https://example.org/~alice",
|
"attributedTo": "https://example.org/~alice",
|
||||||
"content": "I'm a goat"
|
"content": "わたしはヤギ"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
it should dereference the <code>id</code> both to ensure that it exists
|
<code>id</code> の参照外しを行うことで、それが有効なオブジェクトとして存在していることと、
|
||||||
and is a valid object, and that it is not misrepresenting the object.
|
オブジェクトを不正確に表現していないことの両方を確かめるべきです
|
||||||
(In this example, Mallory could be spoofing an object allegedly posted
|
(この例では、Alice が投稿したと伝えられているオブジェクトは Mallory が勝手に作ったものかもしれない)。
|
||||||
by Alice).
|
|
||||||
</div>
|
</div>
|
||||||
<section id="obj-id">
|
<section id="obj-id">
|
||||||
<h2>Object Identifiers</h2>
|
<h2>オブジェクトの識別子</h2>
|
||||||
<p>
|
<p>
|
||||||
All Objects in [[!ActivityStreams]] should have unique global
|
[[!ActivityStreams]] のすべてのオブジェクトは、固有のグローバルな識別子を持つべきです。
|
||||||
identifiers.
|
ActivityPub はこの要求を拡張しています。ActivityPub プロトコルによって分配されるすべてのオブジェクトは、それらが意図的に一時的なもの(チャットメッセージやゲームの通知などの、生存期間が短くて検索されることを意図していない activity)でない場合には、固有のグローバルな識別子を持たなければいけません。
|
||||||
ActivityPub extends this requirement; all objects distributed by the
|
これらの識別子は、次の分類のうちどれか 1 つに入っていなければいけません。
|
||||||
ActivityPub protocol MUST have unique global identifiers, unless they
|
|
||||||
are intentionally transient (short lived activities that are not
|
|
||||||
intended to be able to be looked up, such as some kinds of chat
|
|
||||||
messages or game notifications).
|
|
||||||
These identifiers must fall into one of the following groups:
|
|
||||||
</p>
|
</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
Publicly dereferencable URIs, such as HTTPS URIs, with their
|
public に参照外しができる、HTTPS URI などの URI で、その一存が元のサーバーに属しているようなもの
|
||||||
authority belonging to that of their originating server.
|
(公開されているコンテンツには HTTPS URI を使うべきです)。
|
||||||
(Publicly facing content SHOULD use HTTPS URIs).
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
An ID explicitly specified as the JSON <code>null</code> object,
|
|
||||||
which implies an anonymous object (a part of its parent context)
|
|
||||||
</li>
|
</li>
|
||||||
|
<li>匿名のオブジェクト(親の context の一部となるもの)を示す、明示的に JSON の <code>null</code> オブジェクトが指定された ID</li>
|
||||||
</ol>
|
</ol>
|
||||||
<p>
|
<p>
|
||||||
Identifiers MUST be provided for activities posted in server to
|
識別子は、その activity が意図的に一時的なものでない場合には、サーバー間の伝達において送信される activity に与えられていなければなりません。
|
||||||
server communication, unless the activity is intentionally transient.
|
しかしながら、クライアント-サーバー間の伝達においては、サーバーに対して <code>id</code> が指定されていないオブジェクトが outbox に送信された場合、そのサーバーはその actor の名前空間内でオブジェクトの ID を確保し、それを送信されたオブジェクトに付与すべきです。
|
||||||
However, for client to server communication, a server receiving an
|
|
||||||
object posted to the outbox with no specified <code>id</code> SHOULD
|
|
||||||
allocate an object ID in the actor's namespace and attach it to the
|
|
||||||
posted object.
|
|
||||||
</p>
|
</p>
|
||||||
<p>All objects have the following properties:</p>
|
<p>すべてのオブジェクトは次のプロパティを持ちます:</p>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>id</dt>
|
<dt>id</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The object's unique global identifier (unless the object is transient,
|
オブジェクトの固有のグローバルな識別子(オブジェクトが一時的なものであれば、<code>id</code> を省いてもよい)。
|
||||||
in which case the <code>id</code> MAY be omitted).
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>type</dt>
|
<dt>type</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The type of the object.
|
オブジェクトの型。
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="retrieving-objects">
|
<section id="retrieving-objects">
|
||||||
<h2>Retrieving objects</h2>
|
<h2>オブジェクトの取得</h2>
|
||||||
<p>
|
<p>
|
||||||
The HTTP GET method may be dereferenced against an object's
|
HTTP の GET メソッドは、オブジェクトの <code>id</code> に対して参照外しがなされ、activity を取得できます。
|
||||||
<code>id</code> property to retrieve the activity.
|
サーバーは [[!RFC7231]] で定められているように、HTTP コンテントネゴシエーションを利用してリクエストに対するレスポンスで返すデータの型を選択してもよいですが、<code>application/ld+json; profile="https://www.w3.org/ns/activitystreams"</code> に対するレスポンスでは ActivityStreams のオブジェクトの表現を渡さなければいけませんし、<code>application/activity+json</code> に対するレスポンスでも同様に ActivityStreams の表現を渡すべきです。
|
||||||
Servers MAY use HTTP content negotiation as defined in [[!RFC7231]] to
|
クライアントは、activity を取得するためには <code>Accept</code> ヘッダーに
|
||||||
select the type of data to return in response to a request,
|
|
||||||
but MUST present the ActivityStreams object representation
|
|
||||||
in response to
|
|
||||||
<code>application/ld+json; profile="https://www.w3.org/ns/activitystreams"</code>,
|
|
||||||
and SHOULD also present the ActivityStreams representation in
|
|
||||||
response to <code>application/activity+json</code> as well.
|
|
||||||
The client MUST specify an <code>Accept</code> header with the
|
|
||||||
<code>application/ld+json; profile="https://www.w3.org/ns/activitystreams"</code>
|
<code>application/ld+json; profile="https://www.w3.org/ns/activitystreams"</code>
|
||||||
media type in order to retrieve the activity.
|
というメディアタイプを指定しなければいけません。
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Servers MAY implement other behavior for requests which do not comply
|
サーバーは、上記の要件に適合しないようなリクエストへのふるまい方を実装してもよいです
|
||||||
with the above requirement.
|
(例えば、サーバーは追加でレガシーなプロトコルを実装したり、リソースの HTML および ActivityStreams における表現のために同一の URI を使ってもよい)。
|
||||||
(For example, servers may implement additional legacy protocols, or
|
|
||||||
may use the same URI for both HTML and ActivityStreams
|
|
||||||
representations of a resource).
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Servers MAY require authorization as specified in
|
サーバーは <a href="#authorization"></a> で指定されているように認可を要求してもよく、独自の認可ルールを実装することも許されます。
|
||||||
<a href="#authorization"></a>, and may additionally implement their
|
サーバーは、認可チェックを通らないようなリクエストについては、適切な HTTP エラーコードまたは 403 Forbidden エラーコードでオブジェクトの存在が秘密であるとみなした上で失敗させるべきです。
|
||||||
own authorization rules.
|
非公開な対象の存在を明らかにしたくないと願う配信元のサーバーは、404 Not Found ステータスコードで応答してもよいです。
|
||||||
Servers SHOULD fail requests which do not pass their authorization
|
|
||||||
checks with the appropriate HTTP error code, or the 403 Forbidden
|
|
||||||
error code where the existence of the object is considered private.
|
|
||||||
An origin server which does not wish to disclose the existence of
|
|
||||||
a private target MAY instead respond with a status code of
|
|
||||||
404 Not Found.
|
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="source-property">
|
<section id="source-property">
|
||||||
<h2>The source property</h2>
|
<h2>source プロパティ</h2>
|
||||||
<p>
|
<p>
|
||||||
In addition to all the properties defined by the
|
[[!Activity-Vocabulary]] で定められるすべてのプロパティに加えて、ActivityPub は <code>Object</code> に <code>source</code> プロパティを入れるという拡張を行っています。
|
||||||
[[!Activity-Vocabulary]], ActivityPub extends the <code>Object</code> by
|
<code>source</code> プロパティは、<code>content</code> のマークアップの出所となる一種のソースを伝えたり、クライアントによる将来の編集を意図したものです。
|
||||||
supplying the <code>source</code> property.
|
一般に、クライアントは <code>source</code> から <code>content</code> への変換を行い、その反対は行いません。
|
||||||
The <code>source</code> property is intended to convey some
|
|
||||||
sort of source from which the <code>content</code> markup
|
|
||||||
was derived, as a form of provenance, or to support future
|
|
||||||
editing by clients.
|
|
||||||
In general, clients do the conversion from <code>source</code>
|
|
||||||
to <code>content</code>, not the other way around.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The value of <code>source</code> is itself an object
|
The value of <code>source</code> is itself an object
|
||||||
which uses its own <code>content</code> and <code>mediaType</code>
|
which uses its own <code>content</code> and <code>mediaType</code>
|
||||||
fields to supply source information.
|
fields to supply source information.
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<code>source</code> の値そのものは、<code>content</code> と <code>mediaType</code> フィールドを持つオブジェクトであり、これでソースの情報を提供します。
|
||||||
|
</p>
|
||||||
<pre class="example">
|
<pre class="example">
|
||||||
{
|
{
|
||||||
"@context": ["https://www.w3.org/ns/activitystreams",
|
"@context": ["https://www.w3.org/ns/activitystreams",
|
||||||
{"@language": "en"}],
|
{"@language": "ja"}],
|
||||||
"type": "Note",
|
"type": "Note",
|
||||||
"id": "http://postparty.example/p/2415",
|
"id": "http://postparty.example/p/2415",
|
||||||
"content": "<p>I <em>really</em> like strawberries!</p>",
|
"content": "<p>イチゴが <em>本当に</em> 好き!</p>",
|
||||||
"source": {
|
"source": {
|
||||||
"content": "I *really* like strawberries!",
|
"content": "イチゴが *本当に* 好き!",
|
||||||
"mediaType": "text/markdown"}
|
"mediaType": "text/markdown"}
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
<div class="note"
|
<div class="note"
|
||||||
title="What to do when clients can't meaningfully handle a mediaType?">
|
title="クライアントが意味を解釈して mediaType を扱えないときにはどうする?">
|
||||||
<p>
|
<p>
|
||||||
In general, it's best to let a user edit their original post
|
一般には、ユーザーに彼らの投稿を編集させるときには、元々書いたときと同じソースのフォーマットで編集させるのが一番です。
|
||||||
in the same source format they originally composed it in.
|
しかし、すべてのクライアントが確実にすべてのソースの種類に対する立派なインターフェイスを提供できる訳ではないし、クライアントは <code>source</code> から <code>content</code> への変換を行うことを期待されているので、いくつかのクライアントは他のクライアントが扱い方を知らないような media type を扱うようなことがあるでしょう。
|
||||||
But not all clients can reliably provide a nice interface for
|
クライアントがソースを無視して <code>content</code> マークアップを編集できるような形で提供することは可能だとしても、将来の版ではより望ましかったオリジナルの <code>source</code> の形式を失ってしまうことを意味します。
|
||||||
all source types, and since clients are expected to do the
|
したがって、そのような挙動をするクライアントは、元のソースフォーマットは扱えずに無視されてしまうという旨の、最小限の目立ちすぎない警告を提供すべきです。
|
||||||
conversion from <code>source</code> to <code>content</code>,
|
|
||||||
some clients may work with a media type that another client
|
|
||||||
does not know how to work with.
|
|
||||||
While a client could feasibly provide the <code>content</code>
|
|
||||||
markup to be edited and ignore the source, this means that the
|
|
||||||
user will lose the more desirable form of the original
|
|
||||||
<code>source</code> in any future revisions.
|
|
||||||
A client doing so should thus provide a minimally obtrusive warning
|
|
||||||
cautioning that the original source format is not understood and is
|
|
||||||
thus being ignored.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
For example, Alyssa P. Hacker likes to post to her ActivityPub
|
例えば、Alyssa P. Hacker は、彼女が書いた Emacs クライアントを使って、<a href="http://orgmode.org/">Org mode</a> を活用して自分の ActivityPub 搭載ブログに投稿するのが好きです。
|
||||||
powered blog via an Emacs client she has written, leveraging
|
後に、彼女は携帯電話のクライアントで編集を行おうとしましたが、そこでは <code>text/x-org</code> が解釈されず、クライアントはそれを HTML に書き出す方法も知らないので、元の <code>content</code> を編集するためのテキストボックスを表示しました。
|
||||||
<a href="http://orgmode.org/">Org mode</a>.
|
編集エリアの上には、
|
||||||
Later she switches to editing on her phone's client, which
|
「この投稿は元々、このクライアントで扱う方法が不明なマークアップ言語で記述されています。編集すると、元のソースを失います!」
|
||||||
has no idea what <code>text/x-org</code> is or how to render
|
という有益な警告が表示されました。
|
||||||
it to HTML, so it provides a text box to edit the original
|
Alyssa は、ただの typo の修正はすばらしい org-mode のマークアップを失うほど価値がある訳ではないと考え、家に帰ってから更新することにしました。
|
||||||
<code>content</code> instead.
|
|
||||||
A helpful warning displays above the edit area saying,
|
|
||||||
"This was originally written in another markup language we don't
|
|
||||||
know how to handle. If you edit, you'll lose your original
|
|
||||||
source!"
|
|
||||||
Alyssa decides the small typo fix isn't worth losing her nice
|
|
||||||
org-mode markup and decides to make the update when she gets
|
|
||||||
home.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue