From 39ff28e9ef77c2c1badc466e004b7d1c0fb3ab4c Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Thu, 27 Mar 2014 18:50:04 +0900 Subject: [PATCH] Translate more sections --- _po/ja/reference/plugin/adapter/index.po | 17 ------------ .../plugin-development/adapter/index.po | 16 +++++------- ja/reference/plugin/adapter/index.md | 4 --- .../plugin-development/adapter/index.md | 26 ++++++++----------- 4 files changed, 18 insertions(+), 45 deletions(-) diff --git a/_po/ja/reference/plugin/adapter/index.po b/_po/ja/reference/plugin/adapter/index.po index c2ccfe35..aaab85a0 100644 --- a/_po/ja/reference/plugin/adapter/index.po +++ b/_po/ja/reference/plugin/adapter/index.po @@ -217,15 +217,6 @@ msgstr "" ": 出力メッセージに対する[マッチングパターン][matching pattern]。\n" " パターンが指定されていない(もしくは`nil`が指定された)場合は、すべてのメッセージがマッチします。" -msgid "" -"Note: On Droonga 0.9.9, they are named as `message.input_pattern` and `message" -".output_pattern` but changed to new configurations on Droonga 1.0.0, like abov" -"e. If you write plugins for Droonga 0.9.9, you have to migrate it." -msgstr "" -"注意: Droonga 0.9.9では、これらの設定は`message.input_pattern`および`message.output_pattern`と" -"いう名前でしたが、Droonga 1.0.0で上記の通りに変更されました。Droonga 0.9.9用に開発されたプラグインは、移行のために書き換える必要が" -"あります。" - msgid "## Classes and methods {#classes}" msgstr "## クラスとメソッド {#classes}" @@ -357,14 +348,6 @@ msgstr "" "end\n" "~~~" -msgid "" -"Note: On Droonga 0.9.9, this method is named as `command` but changed to `type" -"` on Droonga 1.0.0, like above. If you write plugins for Droonga 0.9.9, you ha" -"ve to migrate it." -msgstr "" -"注意: Droonga 0.9.9では、このメソッドは`command`という名前でしたが、Droonga 1.0.0で上記の通りに`type`に変更されま" -"した。Droonga 0.9.9用に開発されたプラグインは、移行のために書き換える必要があります。" - msgid "#### `#body`, `#body=(body)` {#classes-Droonga-InputMessage-body}" msgstr "" diff --git a/_po/ja/tutorial/plugin-development/adapter/index.po b/_po/ja/tutorial/plugin-development/adapter/index.po index eee748ee..120de56a 100644 --- a/_po/ja/tutorial/plugin-development/adapter/index.po +++ b/_po/ja/tutorial/plugin-development/adapter/index.po @@ -346,23 +346,19 @@ msgstr "" "この例では、プラグインを`\"type\":\"search\"`という情報を持つすべての入力メッセージに対して働くように定義しています。.\n" "詳しくは[リファレンスマニュアルの設定のセクション](../../../reference/plugin/adapter/#config)を参照して下さい。" -msgid "" -"(Note: `input_message.pattern` is for Droonga 1.0.0 and later. On Droonga 0.9." -"9, you have to use a deprecated configuration `message.input_pattern` instead." -")" -msgstr "" - msgid "" "The method `adapt_input` is called for every incoming message matching to the " "pattern.\n" "The argument `input_message` is a wrapped version of the incoming message." msgstr "" +"`adapt_input`メソッドは、パターンに当てはまるすべての入力メッセージに対して毎回呼ばれます。\n" +"引数の`input_message`は、入力メッセージをラップした物です。" msgid "Restart fluentd:" -msgstr "" +msgstr "fluentdを再起動します:" msgid "Send the request same as the previous section:" -msgstr "" +msgstr "前のセクションと同じリクエストを送信します:" msgid "" "~~~\n" @@ -394,7 +390,7 @@ msgid "" msgstr "" msgid "You will see something like below fluentd's log in `fluentd.log`:" -msgstr "" +msgstr "すると、fluentdのログファイルである`fluentd.log`に以下のようなログが出力される事を確認できるでしょう。" msgid "" "~~~\n" @@ -414,6 +410,8 @@ msgid "" "en passed to Droonga. Here we can modify the message before the actual data pr" "ocessing." msgstr "" +"このログは、メッセージが`SampleLoggerPlugin::Adapter`によって受信されて、Droongaに渡されたことを示しています。実際のデー" +"タ処理の前に、この時点でメッセージを加工することができます。" msgid "### Modify messages with the plugin" msgstr "### プラグインでメッセージを加工する" diff --git a/ja/reference/plugin/adapter/index.md b/ja/reference/plugin/adapter/index.md index 875f9694..ef4ef4df 100644 --- a/ja/reference/plugin/adapter/index.md +++ b/ja/reference/plugin/adapter/index.md @@ -98,8 +98,6 @@ end : 出力メッセージに対する[マッチングパターン][matching pattern]。 パターンが指定されていない(もしくは`nil`が指定された)場合は、すべてのメッセージがマッチします。 -注意: Droonga 0.9.9では、これらの設定は`message.input_pattern`および`message.output_pattern`という名前でしたが、Droonga 1.0.0で上記の通りに変更されました。Droonga 0.9.9用に開発されたプラグインは、移行のために書き換える必要があります。 - ## クラスとメソッド {#classes} ### `Droonga::Adapter` {#classes-Droonga-Adapter} @@ -173,8 +171,6 @@ module Droonga::Plugins::MySearch end ~~~ -注意: Droonga 0.9.9では、このメソッドは`command`という名前でしたが、Droonga 1.0.0で上記の通りに`type`に変更されました。Droonga 0.9.9用に開発されたプラグインは、移行のために書き換える必要があります。 - #### `#body`, `#body=(body)` {#classes-Droonga-InputMessage-body} 入力メッセージの`"body"`の値を返します。 diff --git a/ja/tutorial/plugin-development/adapter/index.md b/ja/tutorial/plugin-development/adapter/index.md index 1fa6f4de..d8af6a58 100644 --- a/ja/tutorial/plugin-development/adapter/index.md +++ b/ja/tutorial/plugin-development/adapter/index.md @@ -215,19 +215,17 @@ lib/droonga/plugins/sample-logger.rb: この例では、プラグインを`"type":"search"`という情報を持つすべての入力メッセージに対して働くように定義しています。. 詳しくは[リファレンスマニュアルの設定のセクション](../../../reference/plugin/adapter/#config)を参照して下さい。 -(Note: `input_message.pattern` is for Droonga 1.0.0 and later. On Droonga 0.9.9, you have to use a deprecated configuration `message.input_pattern` instead.) +`adapt_input`メソッドは、パターンに当てはまるすべての入力メッセージに対して毎回呼ばれます。 +引数の`input_message`は、入力メッセージをラップした物です。 -The method `adapt_input` is called for every incoming message matching to the pattern. -The argument `input_message` is a wrapped version of the incoming message. - -Restart fluentd: +fluentdを再起動します: ~~~ # kill $(cat fluentd.pid) # RUBYLIB=./lib fluentd --config fluentd.conf --log fluentd.log --daemon fluentd.pid ~~~ -Send the request same as the previous section: +前のセクションと同じリクエストを送信します: ~~~ # droonga-request --tag starbucks search-columbus.json @@ -256,13 +254,13 @@ Elapsed time: 0.014714 ] ~~~ -You will see something like below fluentd's log in `fluentd.log`: +すると、fluentdのログファイルである`fluentd.log`に以下のようなログが出力される事を確認できるでしょう。 ~~~ 2014-02-17 15:20:37 +0900 [info]: SampleLoggerPlugin::Adapter message=#"Starbucks", "type"=>"search", "body"=>{"queries"=>{"stores"=>{"source"=>"Store", "condition"=>{"query"=>"Columbus", "matchTo"=>"_key"}, "output"=>{"elements"=>["startTime", "elapsedTime", "count", "attributes", "records"], "attributes"=>["_key"], "limit"=>-1}}}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64591/droonga"}, "id"=>"1392618037.935901", "date"=>"2014-02-17 15:20:37 +0900", "appliedAdapters"=>[]}> ~~~ -This shows the message is received by our `SampleLoggerPlugin::Adapter` and then passed to Droonga. Here we can modify the message before the actual data processing. +このログは、メッセージが`SampleLoggerPlugin::Adapter`によって受信されて、Droongaに渡されたことを示しています。実際のデータ処理の前に、この時点でメッセージを加工することができます。 ### プラグインでメッセージを加工する @@ -284,7 +282,7 @@ lib/droonga/plugins/sample-logger.rb: Like above, you can modify the incoming message via methods of the argument `input_message`. See the [reference manual for the message class](../../../reference/plugin/adapter/#classes-Droonga-InputMessage). -Restart fluentd: +fluentdを再起動します: ~~~ # kill $(cat fluentd.pid) @@ -321,7 +319,7 @@ Elapsed time: 0.017343 Note that `count` is still `2` because `limit` does not affect to `count`. See [search][] for details of the `search` command. -You will see something like below fluentd's log in `fluentd.log`: +すると、fluentdのログファイルである`fluentd.log`に以下のようなログが出力される事を確認できるでしょう。 ~~~ 2014-02-17 15:24:39 +0900 [info]: SampleLoggerPlugin::Adapter message=#"Starbucks", "type"=>"search", "body"=>{"queries"=>{"stores"=>{"source"=>"Store", "condition"=>{"query"=>"Columbus", "matchTo"=>"_key"}, "output"=>{"elements"=>["startTime", "elapsedTime", "count", "attributes", "records"], "attributes"=>["_key"], "limit"=>-1}}}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64616/droonga"}, "id"=>"1392618279.0578449", "date"=>"2014-02-17 15:24:39 +0900", "appliedAdapters"=>[]}> @@ -429,7 +427,7 @@ lib/droonga/plugins/sample-logger.rb: Like above, you can modify the outgoing message via methods of the argument `output_message`. See the [reference manual for the message class](../../../reference/plugin/adapter/#classes-Droonga-OutputMessage). -Restart fluentd: +fluentdを再起動します: ~~~ # kill $(cat fluentd.pid) @@ -542,8 +540,6 @@ module Droonga end ~~~ -(Note: `input_message.pattern` is for Droonga 1.0.0 and later. On Droonga 0.9.9, you have to use a deprecated configuration `message.input_pattern` instead.) - Then update your `catalog.json` to activate the plugin. Remove the `sample-logger` plugin previously created. @@ -560,7 +556,7 @@ catalog.json: Remember, you must place your plugin `"store-search"` before the `"search"` because yours depends on it. -Restart fluentd: +fluentdを再起動します: ~~~ # kill $(cat fluentd.pid) @@ -653,7 +649,7 @@ lib/droonga/plugins/store-search.rb: The `adapt_output` method receives outgoing messages only corresponding to the incoming messages processed by the `adapt_input` method. -Restart fluentd: +fluentdを再起動します: ~~~ # kill $(cat fluentd.pid)