[Groonga-commit] pgroonga/pgroonga.github.io at 1bd3a02 [master] Translate pgroonga.escape()

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Nov 30 16:05:04 JST 2016


Kouhei Sutou	2016-11-30 16:05:04 +0900 (Wed, 30 Nov 2016)

  New Revision: 1bd3a020f881834c824d9e92044a0db39cf41be4
  https://github.com/pgroonga/pgroonga.github.io/commit/1bd3a020f881834c824d9e92044a0db39cf41be4

  Message:
    Translate pgroonga.escape()

  Added files:
    _po/ja/reference/functions/pgroonga-escape.po
  Copied files:
    ja/reference/functions/pgroonga-escape.md
      (from reference/functions/pgroonga-escape.md)
  Modified files:
    reference/functions/pgroonga-escape.md

  Added: _po/ja/reference/functions/pgroonga-escape.po (+283 -0) 100644
===================================================================
--- /dev/null
+++ _po/ja/reference/functions/pgroonga-escape.po    2016-11-30 16:05:04 +0900 (7c7338b)
@@ -0,0 +1,283 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"PO-Revision-Date: 2016-11-30 16:02+0900\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+msgid ""
+"---\n"
+"title: pgroonga.escape function\n"
+"---"
+msgstr ""
+"---\n"
+"title: pgroonga.escape関数\n"
+"---"
+
+msgid "# `pgroonga.escape` function"
+msgstr "# `pgroonga.escape`関数"
+
+msgid "Since 1.1.9."
+msgstr "1.1.9で追加。"
+
+msgid "## Summary"
+msgstr "## 概要"
+
+msgid ""
+"`pgroonga.escape` function converts the given value to a literal for [script s"
+"yntax](http://groonga.org/docs/reference/grn_expr/script_syntax.html). The lit"
+"eral is safely used in script syntax. Script syntax is used by [jsonb `@@` ope"
+"rator](../operators/jsonb-query.html) and so on."
+msgstr ""
+"`pgroonga.escape`関数は渡された値を[スクリプト構文](http://groonga.org/ja/docs/reference/grn_e"
+"xpr/script_syntax.html)のリテラルに変換します。このリテラルはスクリプト構文内で安全に使えます。スクリプト構文は[JSONBの`@@`"
+"演算子](../operators/jsonb-query.html)などで使っています。"
+
+msgid ""
+"`pgroonga.escape` function is useful to prevent Groonga command injection via "
+"[`pgroonga.command` function](pgroonga-command.html). See also [`pgroonga.comm"
+"and_escape_value` function](pgroonga-command-escape-value.html) and [`pgroonga"
+".query_escape` function](pgroonga-query-escape.html) for preventing Groonga co"
+"mmand injection."
+msgstr ""
+"`pgroonga.escape`関数は[`pgroonga.command`関数](pgroonga-command.html)経由でのGroongaコマ"
+"ンドインジェクションが発生することを防ぐために使えます。Groongaコマンドインジェクションを防ぐことについては[`pgroonga.command_es"
+"cape_value`関数](pgroonga-command-escape-value.html)と[`pgroonga.query_escape`関数]"
+"(pgroonga-query-escape.html)も見てください。"
+
+msgid "## Syntax"
+msgstr "## 構文"
+
+msgid "Here is the syntax of this function:"
+msgstr "この関数の構文は次の通りです。"
+
+msgid ""
+"```text\n"
+"text pgroonga.escape(value)\n"
+"```"
+msgstr ""
+
+msgid "`value` type is one of the following types:"
+msgstr "`value`の型は次のどれかです。"
+
+msgid "  * `text`"
+msgstr ""
+
+msgid "  * `boolean`"
+msgstr ""
+
+msgid "  * `int2`"
+msgstr ""
+
+msgid "  * `int4`"
+msgstr ""
+
+msgid "  * `int8`"
+msgstr ""
+
+msgid "  * `float4`"
+msgstr ""
+
+msgid "  * `float8`"
+msgstr ""
+
+msgid "  * `timestamp`"
+msgstr ""
+
+msgid "  * `timestamptz`"
+msgstr ""
+
+msgid ""
+"`value` is a literal to be used in [script syntax](http://groonga.org/docs/ref"
+"erence/grn_expr/script_syntax.html)."
+msgstr ""
+"`value`は[スクリプト構文](http://groonga.org/ja/docs/reference/grn_expr/script_syntax."
+"html)で使うリテラルです。"
+
+msgid ""
+"`pgroonga.query_escape` returns a `text` type value. The value can be used as "
+"a literal in script syntax safely."
+msgstr "`pgroonga.query_escape`は`text`型の値を返します。この値はスクリプト構文中でリテラルとして安全に使えます。"
+
+msgid ""
+"If `value` is a `text` type value, you can specify characters to be escaped li"
+"ke the following:"
+msgstr "もし`value`が`text`型の値の場合は、次のようにエスケープ対象の文字を0個以上指定できます。"
+
+msgid ""
+"```text\n"
+"text pgroonga.escape(value, special_characters)\n"
+"```"
+msgstr ""
+
+msgid ""
+"`special_characters` is a `text` type value. It contains all characters to be "
+"escaped. If you want to escape \"(\" and \")\", you should specify `'()'`."
+msgstr ""
+"`special_characters`は`text`型の値です。この値にエスケープ対象の文字をすべて含めます。「(」と「)」をエスケープしたい場合は`'("
+")'`と指定します。"
+
+msgid "## Usage"
+msgstr "## 使い方"
+
+msgid "Here are sample schema and data:"
+msgstr "サンプルスキーマとデータは次の通りです。"
+
+msgid ""
+"```sql\n"
+"CREATE TABLE logs (\n"
+"  message jsonb\n"
+");"
+msgstr ""
+
+msgid ""
+"CREATE INDEX pgroonga_logs_index\n"
+"          ON logs\n"
+"       USING pgroonga (message);"
+msgstr ""
+
+msgid ""
+"INSERT INTO logs VALUES ('{\"body\": \"\\\"index.html\\\" not found\"}');\n"
+"```"
+msgstr ""
+
+msgid ""
+"If you want to search `\"index.html\" not found`, you need to escape `\"` as `\\\"`"
+" like the following:"
+msgstr "`\"index.html\" not found`を検索したい場合は、次のように`\"`を`\\\"`とエスケープします。"
+
+msgid ""
+"```sql\n"
+"SELECT * FROM logs\n"
+" WHERE message @@ 'string @ \"\\\"index.html\\\" not found\"';\n"
+"--                message                \n"
+"-- --------------------------------------\n"
+"--  {\"body\": \"\\\"index.html\\\" not found\"}\n"
+"-- (1 row)\n"
+"```"
+msgstr ""
+
+msgid "You can use `pgroonga.escape` function for it:"
+msgstr "この用途に`pgroonga.escape`関数を使えます。"
+
+msgid ""
+"```sql\n"
+"SELECT * FROM logs\n"
+" WHERE message @@ ('string @ ' || pgroonga.escape('\"index.html\" not found'));\n"
+"--                message                \n"
+"-- --------------------------------------\n"
+"--  {\"body\": \"\\\"index.html\\\" not found\"}\n"
+"-- (1 row)\n"
+"```"
+msgstr ""
+
+msgid ""
+"`pgroonga.escape` function is also useful with [`pgroonga.command` function](p"
+"groonga-command.html):"
+msgstr ""
+"`pgroonga.escape`関数は[`pgroonga.command`関数](pgroonga-command.html)と組み合わせたときも便利で"
+"す。"
+
+msgid ""
+"```sql\n"
+"SELECT jsonb_pretty(\n"
+"  pgroonga.command('select',\n"
+"                   ARRAY[\n"
+"                     'table', pgroonga.table_name('pgroonga_logs_index'),\n"
+"                     'output_columns', 'message.string',\n"
+"                     'filter', 'message.string @ ' || pgroonga.escape('\"index."
+"html\" not found')\n"
+"                   ])::jsonb\n"
+");\n"
+"--                   jsonb_pretty                  \n"
+"-- ------------------------------------------------\n"
+"--  [                                             +\n"
+"--      [                                         +\n"
+"--          0,                                    +\n"
+"--          1480435379.074671,                    +\n"
+"--          0.0004425048828125                    +\n"
+"--      ],                                        +\n"
+"--      [                                         +\n"
+"--          [                                     +\n"
+"--              [                                 +\n"
+"--                  1                             +\n"
+"--              ],                                +\n"
+"--              [                                 +\n"
+"--                  [                             +\n"
+"--                      \"message.string\",         +\n"
+"--                      \"LongText\"                +\n"
+"--                  ]                             +\n"
+"--              ],                                +\n"
+"--              [                                 +\n"
+"--                  [                             +\n"
+"--                      \"\",                       +\n"
+"--                      \"\\\"index.html\\\" not found\"+\n"
+"--                  ]                             +\n"
+"--              ]                                 +\n"
+"--          ]                                     +\n"
+"--      ]                                         +\n"
+"--  ]\n"
+"-- (1 row)\n"
+"```"
+msgstr ""
+
+msgid ""
+"You can use `pgroonga.escape` function for non `text` type value such as integ"
+"er:"
+msgstr "数値のように`text`型以外の値にも`pgroonga.escape`関数を使えます。"
+
+msgid ""
+"```sql\n"
+"SELECT jsonb_pretty(\n"
+"  pgroonga.command('select',\n"
+"                   ARRAY[\n"
+"                     'table', pgroonga.table_name('pgroonga_logs_index'),\n"
+"                     'output_columns', '_id',\n"
+"                     'filter', '_id == ' || pgroonga.escape(1)\n"
+"                   ])::jsonb\n"
+");\n"
+"--           jsonb_pretty          \n"
+"-- --------------------------------\n"
+"--  [                             +\n"
+"--      [                         +\n"
+"--          0,                    +\n"
+"--          1480435504.153011,    +\n"
+"--          0.00009799003601074219+\n"
+"--      ],                        +\n"
+"--      [                         +\n"
+"--          [                     +\n"
+"--              [                 +\n"
+"--                  1             +\n"
+"--              ],                +\n"
+"--              [                 +\n"
+"--                  [             +\n"
+"--                      \"_id\",    +\n"
+"--                      \"UInt32\"  +\n"
+"--                  ]             +\n"
+"--              ],                +\n"
+"--              [                 +\n"
+"--                  1             +\n"
+"--              ]                 +\n"
+"--          ]                     +\n"
+"--      ]                         +\n"
+"--  ]\n"
+"-- (1 row)\n"
+"```"
+msgstr ""
+
+msgid "## See also"
+msgstr "## 参考"
+
+msgid "  * [`pgroonga.command` function](pgroonga-command.html)"
+msgstr "  * [`pgroonga.command`関数](pgroonga-command.html)"
+
+msgid ""
+"  * [`pgroonga.command_escape_value` function](pgroonga-command-escape-value.h"
+"tml)"
+msgstr "  * [`pgroonga.command_escape_value`関数](pgroonga-command-escape-value.html)"
+
+msgid "  * [`pgroonga.query_escape` function](pgroonga-query-escape.html)"
+msgstr "  * [`pgroonga.query_escape`関数](pgroonga-query-escape.html)"

  Copied: ja/reference/functions/pgroonga-escape.md (+23 -23) 63%
===================================================================
--- reference/functions/pgroonga-escape.md    2016-11-30 15:36:34 +0900 (04a9c3b)
+++ ja/reference/functions/pgroonga-escape.md    2016-11-30 16:05:04 +0900 (b18eb50)
@@ -1,26 +1,26 @@
 ---
-title: pgroonga.escape function
+title: pgroonga.escape関数
 ---
 
-# `pgroonga.escape` function
+# `pgroonga.escape`関数
 
-Since 1.1.9.
+1.1.9で追加。
 
-## Summary
+## 概要
 
-`pgroonga.escape` function converts the given value to a literal for [script syntax](http://groonga.org/docs/reference/grn_expr/script_syntax.html). The literal is safely used in script syntax. Script syntax is used by [jsonb `@@` operator](../operators/jsonb-query.html) and so on.
+`pgroonga.escape`関数は渡された値を[スクリプト構文](http://groonga.org/ja/docs/reference/grn_expr/script_syntax.html)のリテラルに変換します。このリテラルはスクリプト構文内で安全に使えます。スクリプト構文は[JSONBの`@@`演算子](../operators/jsonb-query.html)などで使っています。
 
-`pgroonga.escape` function is useful to prevent Groonga command injection via [`pgroonga.command` function](pgroonga-command.html). See also [`pgroonga.command_escape_value` function](pgroonga-command-escape-value.html) and [`pgroonga.query_escape` function](pgroonga-query-escape.html) for prevent Groonga command injection.
+`pgroonga.escape`関数は[`pgroonga.command`関数](pgroonga-command.html)経由でのGroongaコマンドインジェクションが発生することを防ぐために使えます。Groongaコマンドインジェクションを防ぐことについては[`pgroonga.command_escape_value`関数](pgroonga-command-escape-value.html)と[`pgroonga.query_escape`関数](pgroonga-query-escape.html)も見てください。
 
-## Syntax
+## 構文
 
-Here is the syntax of this function:
+この関数の構文は次の通りです。
 
 ```text
 text pgroonga.escape(value)
 ```
 
-`value` is one of the following types:
+`value`の型は次のどれかです。
 
   * `text`
 
@@ -40,21 +40,21 @@ text pgroonga.escape(value)
 
   * `timestamptz`
 
-`value` is a literal to be used in [script syntax](http://groonga.org/docs/reference/grn_expr/script_syntax.html).
+`value`は[スクリプト構文](http://groonga.org/ja/docs/reference/grn_expr/script_syntax.html)で使うリテラルです。
 
-`pgroonga.query_escape` returns a text. The text can be used as a literal in script syntax safely.
+`pgroonga.query_escape`は`text`型の値を返します。この値はスクリプト構文中でリテラルとして安全に使えます。
 
-If `value` is a `text` type, you can specify characters to be escaped like the following:
+もし`value`が`text`型の値の場合は、次のようにエスケープ対象の文字を0個以上指定できます。
 
 ```text
 text pgroonga.escape(value, special_characters)
 ```
 
-`special_characters` is a text that contains all characters to be escaped. If you want to escape `(` and `)`, you should specify `'()'`.
+`special_characters`は`text`型の値です。この値にエスケープ対象の文字をすべて含めます。「(」と「)」をエスケープしたい場合は`'()'`と指定します。
 
-## Usage
+## 使い方
 
-Here are sample schema and data:
+サンプルスキーマとデータは次の通りです。
 
 ```sql
 CREATE TABLE logs (
@@ -68,7 +68,7 @@ CREATE INDEX pgroonga_logs_index
 INSERT INTO logs VALUES ('{"body": "\"index.html\" not found"}');
 ```
 
-If you want to search `"index.html" not found`, you need to escape `"` as `\"` like the following:
+`"index.html" not found`を検索したい場合は、次のように`"`を`\"`とエスケープします。
 
 ```sql
 SELECT * FROM logs
@@ -79,7 +79,7 @@ SELECT * FROM logs
 -- (1 row)
 ```
 
-You can use `pgroonga.escape` function for it:
+この用途に`pgroonga.escape`関数を使えます。
 
 ```sql
 SELECT * FROM logs
@@ -90,7 +90,7 @@ SELECT * FROM logs
 -- (1 row)
 ```
 
-`pgroonga.escape` function is also useful with [`pgroonga.command`](pgroonga-command.html):
+`pgroonga.escape`関数は[`pgroonga.command`関数](pgroonga-command.html)と組み合わせたときも便利です。
 
 ```sql
 SELECT jsonb_pretty(
@@ -132,7 +132,7 @@ SELECT jsonb_pretty(
 -- (1 row)
 ```
 
-You can use `pgroonga.escape` function for non text type value such as integer:
+数値のように`text`型以外の値にも`pgroonga.escape`関数を使えます。
 
 ```sql
 SELECT jsonb_pretty(
@@ -171,10 +171,10 @@ SELECT jsonb_pretty(
 -- (1 row)
 ```
 
-## See also
+## 参考
 
-  * [`pgroonga.command` function](pgroonga-command.html)
+  * [`pgroonga.command`関数](pgroonga-command.html)
 
-  * [`pgroonga.command_escape_value` function](pgroonga-command-escape-value.html)
+  * [`pgroonga.command_escape_value`関数](pgroonga-command-escape-value.html)
 
-  * [`pgroonga.query_escape` function](pgroonga-query-escape.html)
+  * [`pgroonga.query_escape`関数](pgroonga-query-escape.html)

  Modified: reference/functions/pgroonga-escape.md (+7 -7)
===================================================================
--- reference/functions/pgroonga-escape.md    2016-11-30 15:36:34 +0900 (04a9c3b)
+++ reference/functions/pgroonga-escape.md    2016-11-30 16:05:04 +0900 (3708b8a)
@@ -10,7 +10,7 @@ Since 1.1.9.
 
 `pgroonga.escape` function converts the given value to a literal for [script syntax](http://groonga.org/docs/reference/grn_expr/script_syntax.html). The literal is safely used in script syntax. Script syntax is used by [jsonb `@@` operator](../operators/jsonb-query.html) and so on.
 
-`pgroonga.escape` function is useful to prevent Groonga command injection via [`pgroonga.command` function](pgroonga-command.html). See also [`pgroonga.command_escape_value` function](pgroonga-command-escape-value.html) and [`pgroonga.query_escape` function](pgroonga-query-escape.html) for prevent Groonga command injection.
+`pgroonga.escape` function is useful to prevent Groonga command injection via [`pgroonga.command` function](pgroonga-command.html). See also [`pgroonga.command_escape_value` function](pgroonga-command-escape-value.html) and [`pgroonga.query_escape` function](pgroonga-query-escape.html) for preventing Groonga command injection.
 
 ## Syntax
 
@@ -20,7 +20,7 @@ Here is the syntax of this function:
 text pgroonga.escape(value)
 ```
 
-`value` is one of the following types:
+`value` type is one of the following types:
 
   * `text`
 
@@ -42,15 +42,15 @@ text pgroonga.escape(value)
 
 `value` is a literal to be used in [script syntax](http://groonga.org/docs/reference/grn_expr/script_syntax.html).
 
-`pgroonga.query_escape` returns a text. The text can be used as a literal in script syntax safely.
+`pgroonga.query_escape` returns a `text` type value. The value can be used as a literal in script syntax safely.
 
-If `value` is a `text` type, you can specify characters to be escaped like the following:
+If `value` is a `text` type value, you can specify characters to be escaped like the following:
 
 ```text
 text pgroonga.escape(value, special_characters)
 ```
 
-`special_characters` is a text that contains all characters to be escaped. If you want to escape `(` and `)`, you should specify `'()'`.
+`special_characters` is a `text` type value. It contains all characters to be escaped. If you want to escape "(" and ")", you should specify `'()'`.
 
 ## Usage
 
@@ -90,7 +90,7 @@ SELECT * FROM logs
 -- (1 row)
 ```
 
-`pgroonga.escape` function is also useful with [`pgroonga.command`](pgroonga-command.html):
+`pgroonga.escape` function is also useful with [`pgroonga.command` function](pgroonga-command.html):
 
 ```sql
 SELECT jsonb_pretty(
@@ -132,7 +132,7 @@ SELECT jsonb_pretty(
 -- (1 row)
 ```
 
-You can use `pgroonga.escape` function for non text type value such as integer:
+You can use `pgroonga.escape` function for non `text` type value such as integer:
 
 ```sql
 SELECT jsonb_pretty(
-------------- next part --------------
HTML����������������������������...
Download 



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