[Groonga-commit] droonga/droonga.org at 48b7ae8 [gh-pages] Translate error references

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Mar 3 17:46:42 JST 2014


YUKI Hiroshi	2014-03-03 17:46:42 +0900 (Mon, 03 Mar 2014)

  New Revision: 48b7ae855f57036f9b61aeb77623a213cfc997c0
  https://github.com/droonga/droonga.org/commit/48b7ae855f57036f9b61aeb77623a213cfc997c0

  Message:
    Translate error references

  Modified files:
    _po/ja/reference/plugin/error/index.po
    ja/reference/plugin/error/index.md

  Modified: _po/ja/reference/plugin/error/index.po (+31 -6)
===================================================================
--- _po/ja/reference/plugin/error/index.po    2014-03-03 17:24:23 +0900 (00c4aeb)
+++ _po/ja/reference/plugin/error/index.po    2014-03-03 17:46:42 +0900 (5122110)
@@ -31,6 +31,8 @@ msgid ""
 "for the corresponding incoming message, with the status code `500` (means \"int"
 "ernal error\")."
 msgstr ""
+"プラグイン内部で発生した例外のうち、そのプラグイン自身によって補足されなかった物は、すべて、入力メッセージに対する[エラーレスポンス][error resp"
+"onse]として返されます。この時のエラーレスポンスのステータスコードは`500`(Internal Errorを意味する)です。"
 
 msgid ""
 "If you want formatted error information to be returned, then rescue errors and"
@@ -39,14 +41,18 @@ msgid ""
 "(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 ""
+"整形されたエラー情報を返したい場合は、低レベルのエラーを捕捉した上で、`Droonga::ErrorMessage::BadRequest`または`Droo"
+"nga::ErrorMessage::InternalServerError`を継承したカスタムエラークラスでラップして再度`raise`して下さい。\n"
+"(ちなみに、これらの基底クラスはプラグインの名前空間に初期状態で`include`されているため、エラークラスの定義時には単に`class CustomEr"
+"ror < BadRequest`などと書くだけで参照できます。)"
 
 msgid "## Built-in error classes {#builtin-errors}"
-msgstr ""
+msgstr "## 組み込みのエラークラス {#builtin-errors}"
 
 msgid ""
 "There are some pre-defined error classes used by built-in plugins and the Droo"
 "nga Engine itself."
-msgstr ""
+msgstr "組み込みのプラグインやDroonga Engine自身によってあらかじめ定義されているエラークラスとしては、以下の物があります。"
 
 msgid "### `Droonga::ErrorMessage::NotFound`"
 msgstr ""
@@ -54,13 +60,16 @@ msgstr ""
 msgid ""
 "Means an error which the specified resource is not found in the dataset or any"
 " source. For example:"
-msgstr ""
+msgstr "データセットまたは指定された情報ソースの中に、探している情報が見つからなかったことを示す。例:"
 
 msgid ""
 "    # the second argument means \"details\" of the error. (optional)\n"
 "    raise Droonga::NotFound.new(\"#{name} is not found!\", :elapsed_time => elap"
 "sed_time)"
 msgstr ""
+"    # 第2引数はエラーの詳細な情報。(省略可能)\n"
+"    raise Droonga::NotFound.new(\"#{name} is not found!\", :elapsed_time => elap"
+"sed_time)"
 
 msgid "### `Droonga::ErrorMessage::BadRequest`"
 msgstr ""
@@ -68,13 +77,16 @@ msgstr ""
 msgid ""
 "Means any error originated from the incoming message itself, ex. syntax error,"
 " validation error, and so on. For example:"
-msgstr ""
+msgstr "文法エラーやバリデーションエラーなど、入力メッセージ自体にエラーが含まれていたことを示す。例:"
 
 msgid ""
 "    # the second argument means \"details\" of the error. (optional)\n"
 "    raise Droonga::NotFound.new(\"Syntax error in #{query}!\", :detail => detail"
 ")"
 msgstr ""
+"    # 第2引数はエラーの詳細な情報。(省略可能)\n"
+"    raise Droonga::NotFound.new(\"Syntax error in #{query}!\", :detail => detail"
+")"
 
 msgid "### `Droonga::ErrorMessage::InternalServerError`"
 msgstr ""
@@ -82,41 +94,54 @@ msgstr ""
 msgid ""
 "Means other unknown error, ex. timed out, file I/O error, and so on. For examp"
 "le:"
-msgstr ""
+msgstr "タイムアウト、ファイル入出力のエラーなど、その他の未知のエラーであることを示す。例:"
 
 msgid ""
 "    # the second argument means \"details\" of the error. (optional)\n"
 "    raise Droonga::MessageProcessingError.new(\"busy!\", :elapsed_time => elapse"
 "d_time)"
 msgstr ""
+"    # 第2引数はエラーの詳細な情報。(省略可能)\n"
+"    raise Droonga::MessageProcessingError.new(\"busy!\", :elapsed_time => elapse"
+"d_time)"
 
 msgid "## Built-in status codes {#builtin-status-codes}"
-msgstr ""
+msgstr "## 組み込みのステータスコード {#builtin-status-codes}"
 
 msgid ""
 "You should use following or other status codes as [a matter of principle](../."
 "./message/#error-status)."
 msgstr ""
+"エラーのステータスコードとしては、以下のステータスコードか、もしくは[慣習に従ったステータスコード](../../message/#error-status"
+")を使用します。"
 
 msgid ""
 "`Droonga::StatusCode::OK`\n"
 ": Equals to `200`."
 msgstr ""
+"`Droonga::StatusCode::OK`\n"
+": `200`と等価。"
 
 msgid ""
 "`Droonga::StatusCode::NOT_FOUND`\n"
 ": Equals to `404`."
 msgstr ""
+"`Droonga::StatusCode::NOT_FOUND`\n"
+": `404`と等価。"
 
 msgid ""
 "`Droonga::StatusCode::BAD_REQUEST`\n"
 ": Equals to `400`."
 msgstr ""
+"`Droonga::StatusCode::BAD_REQUEST`\n"
+": `400`と等価。"
 
 msgid ""
 "`Droonga::StatusCode::INTERNAL_ERROR`\n"
 ": Equals to `500`."
 msgstr ""
+"`Droonga::StatusCode::INTERNAL_ERROR`\n"
+": `500`と等価。"
 
 msgid "  [error response]: ../../message/#error"
 msgstr ""

  Modified: ja/reference/plugin/error/index.md (+17 -17)
===================================================================
--- ja/reference/plugin/error/index.md    2014-03-03 17:24:23 +0900 (668cc13)
+++ ja/reference/plugin/error/index.md    2014-03-03 17:46:42 +0900 (32fa908)
@@ -18,53 +18,53 @@ layout: ja
 
 ## 概要 {#abstract}
 
-Any unhandled error raised from a plugin is returned as an [error response][] for the corresponding incoming message, with the status code `500` (means "internal error").
+プラグイン内部で発生した例外のうち、そのプラグイン自身によって補足されなかった物は、すべて、入力メッセージに対する[エラーレスポンス][error response]として返されます。この時のエラーレスポンスのステータスコードは`500`(Internal Errorを意味する)です。
 
-If you want formatted error information to be returned, then rescue errors and raise your custom errors inheriting `Droonga::ErrorMessage::BadRequest` or `Droonga::ErrorMessage::InternalServerError` instead of raw errors.
-(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`)
+整形されたエラー情報を返したい場合は、低レベルのエラーを捕捉した上で、`Droonga::ErrorMessage::BadRequest`または`Droonga::ErrorMessage::InternalServerError`を継承したカスタムエラークラスでラップして再度`raise`して下さい。
+(ちなみに、これらの基底クラスはプラグインの名前空間に初期状態で`include`されているため、エラークラスの定義時には単に`class CustomError < BadRequest`などと書くだけで参照できます。)
 
 
-## Built-in error classes {#builtin-errors}
+## 組み込みのエラークラス {#builtin-errors}
 
-There are some pre-defined error classes used by built-in plugins and the Droonga Engine itself.
+組み込みのプラグインやDroonga Engine自身によってあらかじめ定義されているエラークラスとしては、以下の物があります。
 
 ### `Droonga::ErrorMessage::NotFound`
 
-Means an error which the specified resource is not found in the dataset or any source. For example:
+データセットまたは指定された情報ソースの中に、探している情報が見つからなかったことを示す。例:
 
-    # the second argument means "details" of the error. (optional)
+    # 第2引数はエラーの詳細な情報。(省略可能)
     raise Droonga::NotFound.new("#{name} is not found!", :elapsed_time => elapsed_time)
 
 ### `Droonga::ErrorMessage::BadRequest`
 
-Means any error originated from the incoming message itself, ex. syntax error, validation error, and so on. For example:
+文法エラーやバリデーションエラーなど、入力メッセージ自体にエラーが含まれていたことを示す。例:
 
-    # the second argument means "details" of the error. (optional)
+    # 第2引数はエラーの詳細な情報。(省略可能)
     raise Droonga::NotFound.new("Syntax error in #{query}!", :detail => detail)
 
 ### `Droonga::ErrorMessage::InternalServerError`
 
-Means other unknown error, ex. timed out, file I/O error, and so on. For example:
+タイムアウト、ファイル入出力のエラーなど、その他の未知のエラーであることを示す。例:
 
-    # the second argument means "details" of the error. (optional)
+    # 第2引数はエラーの詳細な情報。(省略可能)
     raise Droonga::MessageProcessingError.new("busy!", :elapsed_time => elapsed_time)
 
 
-## Built-in status codes {#builtin-status-codes}
+## 組み込みのステータスコード {#builtin-status-codes}
 
-You should use following or other status codes as [a matter of principle](../../message/#error-status).
+エラーのステータスコードとしては、以下のステータスコードか、もしくは[慣習に従ったステータスコード](../../message/#error-status)を使用します。
 
 `Droonga::StatusCode::OK`
-: Equals to `200`.
+: `200`と等価。
 
 `Droonga::StatusCode::NOT_FOUND`
-: Equals to `404`.
+: `404`と等価。
 
 `Droonga::StatusCode::BAD_REQUEST`
-: Equals to `400`.
+: `400`と等価。
 
 `Droonga::StatusCode::INTERNAL_ERROR`
-: Equals to `500`.
+: `500`と等価。
 
 
   [error response]: ../../message/#error
-------------- next part --------------
HTML����������������������������...
Download 



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