Skip to content

Commit

Permalink
Translate protocols reference
Browse files Browse the repository at this point in the history
  • Loading branch information
iku000888 committed Sep 13, 2016
1 parent 3469db3 commit becc4a5
Showing 1 changed file with 60 additions and 12 deletions.
72 changes: 60 additions & 12 deletions i18n/po/content/reference/protocols/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: clojure-site-ja 0.0.1\n"
"POT-Creation-Date: 2016-06-27 08:47+0900\n"
"PO-Revision-Date: 2016-06-27 08:47+0900\n"
"PO-Revision-Date: 2016-09-13 09:06+0900\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ja\n"
Expand Down Expand Up @@ -55,7 +55,7 @@ msgstr "toc::[]"
#: en/content/reference/datatypes.adoc:17 en/content/reference/protocols.adoc:16
#, no-wrap
msgid "Motivation"
msgstr ""
msgstr "動機づけ"

#. type: Plain text
#: en/content/reference/datatypes.adoc:20 en/content/reference/protocols.adoc:19
Expand All @@ -67,35 +67,42 @@ msgid ""
"<<datatypes#,datatypes>> features add powerful and flexible mechanisms for abstraction and data structure definition "
"with no compromises vs the facilities of the host platform."
msgstr ""
"Clojureは抽象に基づいて記述されている。シーケンス、コレクション、呼び出し可能性等の抽象が存在する。加えて、Clojureはこ"
"れらの抽象の様々な実装を提供している。抽象はホストのインターフェース、実装はホストのクラスによって定義される。言語の"
"ブートストラップにはこれで十分だったが、Clojureにおいて似たような抽象可、低レベルな実装の機構を欠いた状態だった。"
"<<protocols#,protocols>> と <<datatypes#,datatypes>> の機能は強力で柔軟な、ホストプラットフォームに対して妥協をするこ"
"とのない、抽象化とデータ構造定義を提供する。"

#. type: Title ==
#: en/content/reference/datatypes.adoc:21 en/content/reference/protocols.adoc:36 en/content/about/dynamic.adoc:42
#, no-wrap
msgid "Basics"
msgstr ""
msgstr "基礎"

#. type: Title =
#: en/content/reference/protocols.adoc:1
#, no-wrap
msgid "Protocols"
msgstr ""
msgstr "Protocol (プロトコル)"

#. type: Plain text
#: en/content/reference/protocols.adoc:21
msgid "There are several motivations for protocols:"
msgstr ""
msgstr "プロトコルにはいくつかの動機がある:"

#. type: Plain text
#: en/content/reference/protocols.adoc:23
msgid "Provide a high-performance, dynamic polymorphism construct as an alternative to interfaces"
msgstr ""
msgstr "インターフェースに代わる、高パフォーマンスな動的ポリモーフィズムを提供する。"

#. type: Plain text
#: en/content/reference/protocols.adoc:26
msgid ""
"Support the best parts of interfaces ** specification only, no implementation ** a single type can implement multiple "
"protocols"
msgstr ""
"インターフェースの良いところだけをサポートする。 ** 仕様のみ指定し、実装は指定しない ** 単一のデータ型が複数のプロトコ"
"ルを実装することができる"

#. type: Plain text
#: en/content/reference/protocols.adoc:29
Expand All @@ -104,6 +111,9 @@ msgid ""
"cannot be extended later (although interface injection might eventually address this) ** implementing an interface "
"creates an isa/instanceof type relationship and hierarchy"
msgstr ""
"と同時にいくつかのデメリットを避ける ** どのインターフェースを実装するかは、作者の設計段階での判断であり、後から拡張す"
"ることが出来ない (将来、インターフェースインジェクションがこれに対する解決策になる可能性がある) ** インターフェースを"
"実装することで isa/instanceof のような関係性とヒエラルキーが作成される"

#. type: Plain text
#: en/content/reference/protocols.adoc:31
Expand All @@ -121,7 +131,7 @@ msgstr ""
#. type: Plain text
#: en/content/reference/protocols.adoc:35
msgid "Protocols were introduced in Clojure 1.2."
msgstr ""
msgstr "プロトコルはClojure 1.2で導入された。"

#. type: Plain text
#: en/content/reference/protocols.adoc:39
Expand All @@ -139,11 +149,15 @@ msgid ""
" (bar [a b] \"bar docs\")\n"
" (baz [a] [a b] [a b c] \"baz docs\"))\n"
msgstr ""
"(defprotocol AProtocol\n"
" \"A doc string for AProtocol abstraction\"\n"
" (bar [a b] \"bar docs\")\n"
" (baz [a] [a b] [a b c] \"baz docs\"))\n"

#. type: Plain text
#: en/content/reference/protocols.adoc:49
msgid "No implementations are provided"
msgstr ""
msgstr "実装は定義されていない"

#. type: Plain text
#: en/content/reference/protocols.adoc:50
Expand Down Expand Up @@ -192,6 +206,9 @@ msgid ""
" (foo [x])\n"
" (bar-me [x] [x y]))\n"
msgstr ""
"(defprotocol P\n"
" (foo [x])\n"
" (bar-me [x] [x y]))\n"

#. type: delimited block -
#: en/content/reference/protocols.adoc:70
Expand All @@ -203,18 +220,23 @@ msgid ""
" (bar-me [x] b)\n"
" (bar-me [x y] (+ c y)))\n"
msgstr ""
"(deftype Foo [a b c]\n"
" P\n"
" (foo [x] a)\n"
" (bar-me [x] b)\n"
" (bar-me [x y] (+ c y)))\n"

#. type: delimited block -
#: en/content/reference/protocols.adoc:72
#, no-wrap
msgid "(bar-me (Foo. 1 2 3) 42)\n"
msgstr ""
msgstr "(bar-me (Foo. 1 2 3) 42)\n"

#. type: Title =
#: en/content/reference/protocols.adoc:72
#, no-wrap
msgid "> 45"
msgstr ""
msgstr "> 45"

#. type: delimited block -
#: en/content/reference/protocols.adoc:80
Expand All @@ -227,12 +249,18 @@ msgid ""
" (bar-me [this] x)\n"
" (bar-me [this y] x))))\n"
msgstr ""
"(foo\n"
" (let [x 42]\n"
" (reify P\n"
" (foo [this] 17)\n"
" (bar-me [this] x)\n"
" (bar-me [this y] x))))\n"

#. type: delimited block -
#: en/content/reference/protocols.adoc:82
#, no-wrap
msgid "> 17\n"
msgstr ""
msgstr "> 17\n"

#. type: Plain text
#: en/content/reference/protocols.adoc:85
Expand Down Expand Up @@ -262,6 +290,14 @@ msgid ""
" {...}\n"
"...)\n"
msgstr ""
"(extend AType\n"
" AProtocol\n"
" {:foo an-existing-fn\n"
" :bar (fn [a b] ...)\n"
" :baz (fn ([a]...) ([a b] ...)...)}\n"
" BProtocol\n"
" {...}\n"
"...)\n"

#. type: Plain text
#: en/content/reference/protocols.adoc:101
Expand Down Expand Up @@ -338,12 +374,18 @@ msgid ""
" (bar [x y] ...)\n"
" (baz ([x] ...) ([x y zs] ...)))\n"
msgstr ""
"(extend-type MyType\n"
" Countable\n"
" (cnt [c] ...)\n"
" Foo\n"
" (bar [x y] ...)\n"
" (baz ([x] ...) ([x y zs] ...)))\n"

#. type: delimited block -
#: en/content/reference/protocols.adoc:129
#, no-wrap
msgid " ;expands into:\n"
msgstr ""
msgstr " ;以下のように展開される:\n"

#. type: delimited block -
#: en/content/reference/protocols.adoc:136
Expand All @@ -356,3 +398,9 @@ msgid ""
" {:baz (fn ([x] ...) ([x y zs] ...))\n"
" :bar (fn [x y] ...)})\n"
msgstr ""
"(extend MyType\n"
" Countable\n"
" {:cnt (fn [c] ...)}\n"
" Foo\n"
" {:baz (fn ([x] ...) ([x y zs] ...))\n"
" :bar (fn [x y] ...)})\n"

0 comments on commit becc4a5

Please sign in to comment.