[Groonga-commit] droonga/droonga.org at fd40f1f [gh-pages] po: update

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Feb 23 22:46:29 JST 2014


Kouhei Sutou	2014-02-23 22:46:29 +0900 (Sun, 23 Feb 2014)

  New Revision: fd40f1f75fcdbcc21fee7be54a6efaa6f8419817
  https://github.com/droonga/droonga.org/commit/fd40f1f75fcdbcc21fee7be54a6efaa6f8419817

  Message:
    po: update

  Modified files:
    _po/ja/reference/plugin/error/index.po
    _po/ja/reference/plugin/matching-pattern/index.po
    _po/ja/tutorial/plugin-development/adapter/index.po

  Modified: _po/ja/reference/plugin/error/index.po (+7 -5)
===================================================================
--- _po/ja/reference/plugin/error/index.po    2014-02-23 22:43:38 +0900 (2c8481c)
+++ _po/ja/reference/plugin/error/index.po    2014-02-23 22:46:29 +0900 (2cfe75a)
@@ -37,8 +37,10 @@ msgstr ""
 
 msgid ""
 "If you want formatted error information to be returned, then rescue errors and"
-" raise your custom errors inheriting `Droonga::MessageProcessingError` instead"
-" of raw errors."
+" raise your custom errors inheriting `Droonga::ErrorMessage::BadRequest` or `D"
+"roonga::ErrorMessage::InternalServerError` instead of raw errors.\n"
+"(By the way, they are already included to the base class of plugins so you can"
+" define your custom errors easily like: `class CustomError < BadRequest`)"
 msgstr ""
 
 msgid "## Built-in error classes {#builtin-errors}"
@@ -49,7 +51,7 @@ msgid ""
 "nga Engine itself."
 msgstr ""
 
-msgid "### `Droonga::NotFound`"
+msgid "### `Droonga::ErrorMessage::NotFound`"
 msgstr ""
 
 msgid ""
@@ -63,7 +65,7 @@ msgid ""
 "sed_time)"
 msgstr ""
 
-msgid "### `Droonga::BadRequest`"
+msgid "### `Droonga::ErrorMessage::BadRequest`"
 msgstr ""
 
 msgid ""
@@ -77,7 +79,7 @@ msgid ""
 ")"
 msgstr ""
 
-msgid "### `Droonga::MessageProcessingError`"
+msgid "### `Droonga::ErrorMessage::InternalServerError`"
 msgstr ""
 
 msgid ""

  Modified: _po/ja/reference/plugin/matching-pattern/index.po (+218 -8)
===================================================================
--- _po/ja/reference/plugin/matching-pattern/index.po    2014-02-23 22:43:38 +0900 (1d422c4)
+++ _po/ja/reference/plugin/matching-pattern/index.po    2014-02-23 22:46:29 +0900 (27ede3a)
@@ -69,7 +69,7 @@ msgid ""
 "    }"
 msgstr ""
 
-msgid "Not matches to:"
+msgid "Doesn't match to:"
 msgstr ""
 
 msgid ""
@@ -88,7 +88,7 @@ msgid ""
 "    pattern = [\n"
 "                 [\"type\", :equal, \"table_create\"],\n"
 "                 :or,\n"
-"                 [\"type\", :equal, \"column_create\"]\n"
+"                 [\"body.success\", :equal, true]\n"
 "              ]"
 msgstr ""
 
@@ -109,6 +109,9 @@ msgid ""
 "    {\n"
 "      \"type\": \"column_create\",\n"
 "      ...\n"
+"      \"body\": {\n"
+"        \"success\": true\n"
+"      }\n"
 "    }"
 msgstr ""
 
@@ -116,10 +119,217 @@ msgid "## Syntax {#syntax}"
 msgstr ""
 
 msgid ""
-" * `PATTERN` = [`TARGET_PATH`, `OPERATOR`, `ARGUMENTS*`]\n"
-" * `PATTERN` = [`PATTERN`, `LOGICAL_OPERATOR`, `PATTERN`]\n"
-" * `TARGET_PATH` = `\"COMPONENT(.COMPONENT)*\"`\n"
-" * `OPERATOR` = `:equal`, `:in`, `:include`, `:exist`, `:start_with`\n"
-" * `ARGUMENTS` = `OBJECT_DEFINED_IN_JSON*`\n"
-" * `LOGICAL_OPERATOR` = `:or`"
+"There are two typeos of matching patterns: \"basic pattern\" and \"nested pattern"
+"\"."
+msgstr ""
+
+msgid "### Basic pattern {#syntax-basic}"
+msgstr ""
+
+msgid "#### Structure {#syntax-basic-structure}"
+msgstr ""
+
+msgid ""
+"A basic pattern is described as an array including 2 or more elements, like fo"
+"llowing:"
+msgstr ""
+
+msgid "    [\"type\", :equal, \"search\"]"
+msgstr ""
+
+msgid ""
+" * The first element is a *target path*. It means the location of the informat"
+"ion to be checked, in the [message][].\n"
+" * The second element is an *operator*. It means how the information specified"
+" by the target path should be checked.\n"
+" * The third element is an *argument for the oeprator*. It is a primitive valu"
+"e (string, numeric, or boolean) or an array of values. Some operators require "
+"no argument."
+msgstr ""
+
+msgid "#### Target path {#syntax-basic-target-path}"
+msgstr ""
+
+msgid "The target path is specified as a string, like:"
+msgstr ""
+
+msgid "    \"body.success\""
+msgstr ""
+
+msgid ""
+"The matching mechanism of the Droonga Engine interprets it as a dot-separated "
+"list of *path components*.\n"
+"A path component represents the property in the message with same name.\n"
+"So, the example above means the location:"
+msgstr ""
+
+msgid ""
+"    {\n"
+"      \"body\": {\n"
+"        \"success\": <target>\n"
+"      }\n"
+"    }"
+msgstr ""
+
+msgid "#### Avialable operators {#syntax-basic-operators}"
+msgstr ""
+
+msgid "The operator is specified as a symbol."
+msgstr ""
+
+msgid ""
+"`:equal`\n"
+": Returns `true`, if the target value is equal to the given value. Otherwise `"
+"false`.\n"
+"  For example,"
+msgstr ""
+
+msgid "      [\"type\", :equal, \"search\"]"
+msgstr ""
+
+msgid "  The pattern above matches to a message like following:"
+msgstr ""
+
+msgid ""
+"      {\n"
+"        \"type\": \"search\",\n"
+"        ...\n"
+"      }"
+msgstr ""
+
+msgid ""
+"`:in`\n"
+": Returns `true`, if the target value is in the given array of values. Otherwi"
+"se `false`.\n"
+"  For example,"
+msgstr ""
+
+msgid "      [\"type\", :in, [\"search\", \"select\"]]"
+msgstr ""
+
+msgid ""
+"      {\n"
+"        \"type\": \"select\",\n"
+"        ...\n"
+"      }"
+msgstr ""
+
+msgid "  But it doesn't match to:"
+msgstr ""
+
+msgid ""
+"      {\n"
+"        \"type\": \"find\",\n"
+"        ...\n"
+"      }"
+msgstr ""
+
+msgid ""
+"`:include`\n"
+": Returns `true` if the target array of values includes the given value. Other"
+"wise `false`.\n"
+"  In other words, this is the opposite of the `:in` operator.\n"
+"  For example,"
+msgstr ""
+
+msgid "      [\"body.tags\", :include, \"News\"]"
+msgstr ""
+
+msgid ""
+"      {\n"
+"        \"type\": \"my.notification\",\n"
+"        \"body\": {\n"
+"          \"tags\": [\"News\", \"Groonga\", \"Droonga\", \"Fluentd\"]\n"
+"        }\n"
+"      }"
+msgstr ""
+
+msgid ""
+"`:exist`\n"
+": Returns `true` if the target exists. Otherwise `false`.\n"
+"  For example,"
+msgstr ""
+
+msgid "      [\"body.comments\", :exist, \"News\"]"
+msgstr ""
+
+msgid ""
+"      {\n"
+"        \"type\": \"my.notification\",\n"
+"        \"body\": {\n"
+"          \"title\": \"Hello!\",\n"
+"          \"comments\": []\n"
+"        }\n"
+"      }"
+msgstr ""
+
+msgid ""
+"      {\n"
+"        \"type\": \"my.notification\",\n"
+"        \"body\": {\n"
+"          \"title\": \"Hello!\"\n"
+"        }\n"
+"      }"
+msgstr ""
+
+msgid ""
+"`:start_with`\n"
+": Returns `true` if the target string value starts with the given string. Othe"
+"rwise `false`.\n"
+"  For example,"
+msgstr ""
+
+msgid "      [\"body.path\", :start_with, \"/archive/\"]"
+msgstr ""
+
+msgid ""
+"      {\n"
+"        \"type\": \"my.notification\",\n"
+"        \"body\": {\n"
+"          \"path\": \"/archive/2014/02/28.html\"\n"
+"        }\n"
+"      }"
+msgstr ""
+
+msgid "### Nested pattern {#syntax-nested}"
+msgstr ""
+
+msgid "#### Structure {#syntax-nested-structure}"
+msgstr ""
+
+msgid ""
+"A nested pattern is described as an array including 3 elements, like following"
+":"
+msgstr ""
+
+msgid ""
+"    [\n"
+"      [\"type\", :equal, \"table_create\"],\n"
+"      :or,\n"
+"      [\"type\", :equal, \"column_create\"]\n"
+"    ]"
+msgstr ""
+
+msgid ""
+" * The first and the third elements are patterns, basic or nested. (In other w"
+"ords, you can nest patterns recursively.)\n"
+" * The second element is a *logical operator*."
+msgstr ""
+
+msgid "#### Avialable operators {#syntax-nested-operators}"
+msgstr ""
+
+msgid ""
+"`:and`\n"
+": Returns `true` if both given patterns are evaluated as `true`. Otherwise `fa"
+"lse`."
+msgstr ""
+
+msgid ""
+"`:or`\n"
+": Returns `true` if one of given patterns (the first or the third element) is "
+"evaluated as `true`. Otherwise `false`."
+msgstr ""
+
+msgid "  [message]:../../message/"
 msgstr ""

  Modified: _po/ja/tutorial/plugin-development/adapter/index.po (+52 -10)
===================================================================
--- _po/ja/tutorial/plugin-development/adapter/index.po    2014-02-23 22:43:38 +0900 (bdda28a)
+++ _po/ja/tutorial/plugin-development/adapter/index.po    2014-02-23 22:46:29 +0900 (bae1509)
@@ -285,7 +285,7 @@ msgstr ""
 
 msgid ""
 "      class Adapter < Droonga::Adapter\n"
-"        message.input_pattern = [\"type\", :equal, \"search\"]"
+"        input_message.pattern = [\"type\", :equal, \"search\"]"
 msgstr ""
 
 msgid ""
@@ -298,6 +298,26 @@ msgid ""
 "~~~"
 msgstr ""
 
+msgid ""
+"The line beginning with `input_message.pattern` is a configuration.\n"
+"This example defines a plugin for any incoming message with `\"type\":\"search\"`."
+"\n"
+"See the [reference manual's configuration section](../../../reference/plugin/a"
+"dapter/#config)"
+msgstr ""
+
+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 ""
+
 msgid "Restart fluentd:"
 msgstr ""
 
@@ -360,8 +380,9 @@ msgstr ""
 
 msgid ""
 "Suppose that we want to restrict the number of records returned in the respons"
-"e, say `1`. What we need to do is set `limit` to be `1` for every request. Upd"
-"ate plugin like below:"
+"e, say `1`.\n"
+"What we need to do is set `limit` to be `1` for every request.\n"
+"Update plugin like below:"
 msgstr ""
 
 msgid ""
@@ -376,6 +397,13 @@ msgid ""
 msgstr ""
 
 msgid ""
+"Like above, you can modify the incoming message via methods of the argument `i"
+"nput_message`.\n"
+"See the [reference manual for the message class](../../../reference/plugin/ada"
+"pter/#classes-Droonga-InputMessage)."
+msgstr ""
+
+msgid ""
 "After restart, the response always includes only one record in `records` secti"
 "on."
 msgstr ""
@@ -447,6 +475,10 @@ msgstr ""
 
 msgid ""
 "      class Adapter < Droonga::Adapter\n"
+"        (snip)"
+msgstr ""
+
+msgid ""
 "        def adapt_output(output_message)\n"
 "          $log.info(\"SampleLoggerPlugin::Adapter\", :message => output_message)"
 "\n"
@@ -457,6 +489,13 @@ msgid ""
 "~~~"
 msgstr ""
 
+msgid ""
+"The method `adapt_output` is called only for outgoing messages triggered by in"
+"coming messages processed by the plugin itself.\n"
+"See the [reference manual for plugin developers](../../../reference/plugin/ada"
+"pter/) for more details."
+msgstr ""
+
 msgid "Let's restart fluentd:"
 msgstr ""
 
@@ -536,6 +575,13 @@ msgid ""
 "~~~"
 msgstr ""
 
+msgid ""
+"Like above, you can modify the outgoing message via methods of the argument `o"
+"utput_message`. \n"
+"See the [reference manual for the message class](../../../reference/plugin/ada"
+"pter/#classes-Droonga-OutputMessage)."
+msgstr ""
+
 msgid "Send the same search request:"
 msgstr ""
 
@@ -624,7 +670,7 @@ msgstr ""
 
 msgid ""
 "      class Adapter < Droonga::Adapter\n"
-"        message.input_pattern = [\"type\", :equal, \"storeSearch\"]"
+"        input_message.pattern = [\"type\", :equal, \"storeSearch\"]"
 msgstr ""
 
 msgid ""
@@ -791,11 +837,6 @@ msgid ""
 msgstr ""
 
 msgid ""
-"      class Adapter < Droonga::Adapter\n"
-"        (snip)"
-msgstr ""
-
-msgid ""
 "        def adapt_output(output_message)\n"
 "          $log.info(\"StoreSearchPlugin::Adapter\", :message => output_message)"
 msgstr ""
@@ -877,7 +918,8 @@ 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."
+"to receive and modify messages, both of incoming and outgoing. See also the [r"
+"eference manual](../../../reference/plugin/adapter/) for more details."
 msgstr ""
 
 msgid ""
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index