Kouhei Sutou
null+****@clear*****
Fri Feb 28 16:37:02 JST 2014
Kouhei Sutou 2014-02-28 16:37:02 +0900 (Fri, 28 Feb 2014) New Revision: 5ad7fa3113e118997a7420f85eb738643d75389b https://github.com/droonga/droonga.org/commit/5ad7fa3113e118997a7420f85eb738643d75389b Message: Update Modified files: _po/ja/tutorial/plugin-development/adapter/index.po _po/ja/tutorial/plugin-development/handler/index.po ja/tutorial/plugin-development/adapter/index.md ja/tutorial/plugin-development/handler/index.md Modified: _po/ja/tutorial/plugin-development/adapter/index.po (+33 -23) =================================================================== --- _po/ja/tutorial/plugin-development/adapter/index.po 2014-02-28 16:35:56 +0900 (61bb879) +++ _po/ja/tutorial/plugin-development/adapter/index.po 2014-02-28 16:37:02 +0900 (a653528) @@ -27,9 +27,9 @@ msgid "Learning steps to develop a Droonga plugin by yourself." msgstr "" msgid "" -"This page focuses on the adaption phase for Droonga plugins.\n" -"At the last, wraps up them to make a small practical plugin named `store-searc" -"h`, for the adaption phase." +"This page focuses on the \"adaption\" by Droonga plugins.\n" +"At the last, we create a new command `storeSearch` based on the existing `sear" +"ch` command, with a small practical plugin." msgstr "" msgid "## Precondition" @@ -123,7 +123,7 @@ msgid "" "~~~" msgstr "" -msgid "This plugin does nothing except registering itself to Droonga." +msgid "This plugin does nothing except registering itself to the Droonga Engine." msgstr "" msgid "" @@ -165,7 +165,7 @@ msgid "" " plugin dependencies by your hand (for now)." msgstr "" -msgid "### Run" +msgid "### Run and test" msgstr "" msgid "" @@ -182,10 +182,9 @@ msgid "" "~~~" msgstr "" -msgid "### Test" -msgstr "" - -msgid "Check if the engine is working. First, create a request as a JSON." +msgid "" +"Then, verify that the engine is correctly working.\n" +"First, create a request as a JSON." msgstr "" msgid "search-columbus.json:" @@ -224,8 +223,9 @@ msgstr "" msgid "" "This is corresponding to the example to search \"Columbus\" in the [basic tutori" -"al][]. Note that the request for the Protocol Adapter is encapsulated in `\"bod" -"y\"` element." +"al][].\n" +"Note that the request for the Protocol Adapter is encapsulated in `\"body\"` ele" +"ment." msgstr "" msgid "Send the request to engine with `droonga-request`:" @@ -497,6 +497,9 @@ msgid "" "pter/) for more details." msgstr "" +msgid "### Run" +msgstr "" + msgid "Let's restart fluentd:" msgstr "" @@ -634,7 +637,7 @@ msgid "" "~~~" msgstr "" -msgid "## Translation for both incoming and outgoing messages" +msgid "## Adaption for both incoming and outgoing messages" msgstr "" msgid "" @@ -649,14 +652,15 @@ msgid "" " new plugin named `store-search`." msgstr "" -msgid "### Accept simple requests" +msgid "### Accepting of simple requests" msgstr "" msgid "" -"First, create the `store-searach` plugin. Remember, you must put codes into a " -"file which has the name same to the plugin now you are creating. So, the file " -"is `store-search.rb` in the `droonga/plugins` directory. Then define your `Sto" -"reSearchPlugin` as follows:" +"First, create the `store-searach` plugin.\n" +"Remember, you must put codes into a file which has the name same to the plugin" +" now you are creating.\n" +"So, the file is `store-search.rb` in the `droonga/plugins` directory. Then def" +"ine your `StoreSearchPlugin` as follows:" msgstr "" msgid "lib/droonga/plugins/store-search.rb:" @@ -724,8 +728,8 @@ msgid "" msgstr "" msgid "" -"Then update catalog.json to activate the plugin. Remove the `sample-logger` pl" -"ugin previously created." +"Then update your `catalog.json` to activate the plugin.\n" +"Remove the `sample-logger` plugin previously created." msgstr "" msgid "" @@ -820,7 +824,7 @@ msgid "" "the method `adapt_input`." msgstr "" -msgid "### Return simple response" +msgid "### Returning of simple responses" msgstr "" msgid "" @@ -921,9 +925,15 @@ msgid "## Conclusion" msgstr "## まとめ" msgid "" -"We have learned how to create an addon working around the adaption phase, how " -"to receive and modify messages, both of incoming and outgoing. See also the [r" -"eference manual](../../../reference/plugin/adapter/) for more details." +"We have learned how to add a new command based only on a custom adapter and an" +" existing command.\n" +"In the process, we also have learned how to receive and modify messages, both " +"of incoming and outgoing." +msgstr "" + +msgid "" +"See also the [reference manual](../../../reference/plugin/adapter/) for more d" +"etails." msgstr "" msgid "" Modified: _po/ja/tutorial/plugin-development/handler/index.po (+4 -1) =================================================================== --- _po/ja/tutorial/plugin-development/handler/index.po 2014-02-28 16:35:56 +0900 (23f664d) +++ _po/ja/tutorial/plugin-development/handler/index.po 2014-02-28 16:37:02 +0900 (2b9370c) @@ -694,7 +694,10 @@ msgstr "" msgid "## Conclusion" msgstr "## まとめ" -msgid "We have learned how to create plugins work in handling phrase." +msgid "" +"We have learned how to add a new simple command working around the data.\n" +"In the process, we also have learned how to create plugins working in the hand" +"ling phrase." msgstr "" msgid "" Modified: ja/tutorial/plugin-development/adapter/index.md (+20 -14) =================================================================== --- ja/tutorial/plugin-development/adapter/index.md 2014-02-28 16:35:56 +0900 (8caa931) +++ ja/tutorial/plugin-development/adapter/index.md 2014-02-28 16:37:02 +0900 (cb18bf8) @@ -19,8 +19,8 @@ layout: en Learning steps to develop a Droonga plugin by yourself. -This page focuses on the adaption phase for Droonga plugins. -At the last, wraps up them to make a small practical plugin named `store-search`, for the adaption phase. +This page focuses on the "adaption" by Droonga plugins. +At the last, we create a new command `storeSearch` based on the existing `search` command, with a small practical plugin. ## 前提条件 @@ -83,7 +83,7 @@ module Droonga end ~~~ -This plugin does nothing except registering itself to Droonga. +This plugin does nothing except registering itself to the Droonga Engine. * The `sample-logger` is the name of the plugin itself. You'll use it in your `catalog.json`, to activate the plugin. * As the example above, you must define your plugin as a module. @@ -109,7 +109,7 @@ catalog.json: Note: you must place `"sample-logger"` before `"search"`, because the `sample-logger` plugin depends on the `search`. Droonga Engine applies plugins at the adaption phase in the order defined in the `catalog.json`, so you must resolve plugin dependencies by your hand (for now). -### Run +### Run and test Let's get Droonga started. Note that you need to specify `./lib` directory in `RUBYLIB` environment variable in order to make ruby possible to find your plugin. @@ -119,9 +119,8 @@ Note that you need to specify `./lib` directory in `RUBYLIB` environment variabl # RUBYLIB=./lib fluentd --config fluentd.conf --log fluentd.log --daemon fluentd.pid ~~~ -### Test - -Check if the engine is working. First, create a request as a JSON. +Then, verify that the engine is correctly working. +First, create a request as a JSON. search-columbus.json: @@ -154,7 +153,8 @@ search-columbus.json: } ~~~ -This is corresponding to the example to search "Columbus" in the [basic tutorial][]. Note that the request for the Protocol Adapter is encapsulated in `"body"` element. +This is corresponding to the example to search "Columbus" in the [basic tutorial][]. +Note that the request for the Protocol Adapter is encapsulated in `"body"` element. Send the request to engine with `droonga-request`: @@ -476,7 +476,7 @@ The results in `fluentd.log` will be like this: ~~~ -## Translation for both incoming and outgoing messages +## Adaption for both incoming and outgoing messages We have learned the basics of plugins for the adaption phase so far. Let's try to build more practical plugin. @@ -484,9 +484,11 @@ Let's try to build more practical plugin. You may feel the Droonga's `search` command is too flexible for your purpose. Here, we're going to add our own `storeSearch` command to wrap the `search` command in order to provide an application-specific and simple interface, with a new plugin named `store-search`. -### Accept simple requests +### Accepting of simple requests -First, create the `store-searach` plugin. Remember, you must put codes into a file which has the name same to the plugin now you are creating. So, the file is `store-search.rb` in the `droonga/plugins` directory. Then define your `StoreSearchPlugin` as follows: +First, create the `store-searach` plugin. +Remember, you must put codes into a file which has the name same to the plugin now you are creating. +So, the file is `store-search.rb` in the `droonga/plugins` directory. Then define your `StoreSearchPlugin` as follows: lib/droonga/plugins/store-search.rb: @@ -544,7 +546,8 @@ 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 catalog.json to activate the plugin. Remove the `sample-logger` plugin previously created. +Then update your `catalog.json` to activate the plugin. +Remove the `sample-logger` plugin previously created. catalog.json: @@ -620,7 +623,7 @@ Now we can perform store search with simple requests. Note: look at the `"type"` of the response message. Now it became `"storeSearch.result"`, from `"search.result"`. Because it is triggered from the incoming message with the type `"storeSearch"`, the outgoing message has the type `"(incoming command).result"` automatically. In other words, you don't have to change the type of the outgoing messages, like `input_message.type = "search"` in the method `adapt_input`. -### Return simple response +### Returning of simple responses Second, let's return results in more simple way: just an array of the names of stores. @@ -693,7 +696,10 @@ In the way just described, we can use adapter to implement the application speci ## まとめ -We have learned how to create an addon working around the adaption phase, how to receive and modify messages, both of incoming and outgoing. See also the [reference manual](../../../reference/plugin/adapter/) for more details. +We have learned how to add a new command based only on a custom adapter and an existing command. +In the process, we also have learned how to receive and modify messages, both of incoming and outgoing. + +See also the [reference manual](../../../reference/plugin/adapter/) for more details. [basic tutorial]: ../../basic/ Modified: ja/tutorial/plugin-development/handler/index.md (+2 -1) =================================================================== --- ja/tutorial/plugin-development/handler/index.md 2014-02-28 16:35:56 +0900 (0184995) +++ ja/tutorial/plugin-development/handler/index.md 2014-02-28 16:37:02 +0900 (720c5bc) @@ -532,7 +532,8 @@ This means that 4 or some records are deleted from each partitions. ## まとめ -We have learned how to create plugins work in handling phrase. +We have learned how to add a new simple command working around the data. +In the process, we also have learned how to create plugins working in the handling phrase. [adapter]: ../adapter -------------- next part -------------- HTML����������������������������...Download