[Groonga-commit] pgroonga/pgroonga.github.io at a32610a [master] Translate

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Nov 30 15:36:34 JST 2016


Kouhei Sutou	2016-11-30 15:36:34 +0900 (Wed, 30 Nov 2016)

  New Revision: a32610a80e1653aff8911b5a5e60170ec0b5fc73
  https://github.com/pgroonga/pgroonga.github.io/commit/a32610a80e1653aff8911b5a5e60170ec0b5fc73

  Message:
    Translate

  Modified files:
    _po/ja/reference/functions/pgroonga-command.po
    _po/ja/reference/functions/pgroonga-query-extract-keywords.po

  Modified: _po/ja/reference/functions/pgroonga-command.po (+262 -3)
===================================================================
--- _po/ja/reference/functions/pgroonga-command.po    2016-11-30 15:35:58 +0900 (b9468ea)
+++ _po/ja/reference/functions/pgroonga-command.po    2016-11-30 15:36:34 +0900 (fb63b8f)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2016-11-11 23:06+0900\n"
+"PO-Revision-Date: 2016-11-30 15:32+0900\n"
 "Language: ja\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -39,14 +39,49 @@ msgstr "この関数の構文は次の通りです。"
 msgid ""
 "```text\n"
 "text pgroonga.command(command)\n"
+"text pgroonga.command(name,\n"
+"                      ARRAY[argument_name1, argument_value1,\n"
+"                            argument_name2, argument_value2,\n"
+"                            ...])\n"
 "```"
 msgstr ""
 
 msgid ""
+"The second syntax is recommended because it escapes argument values automatica"
+"lly. It prevents syntax error and Groonga command injection."
+msgstr "2つめの構文を推奨します。理由は引数の値を自動でエスケープするからです。これによりシンタックスエラーとGroongaコマンドインジェクションを防げます。"
+
+msgid "Here is the description about the first syntax:"
+msgstr "1つめの構文の説明は以下の通りです。"
+
+msgid ""
 "`command` is a `text` type value. `pgroonga.command` executes `command` as a G"
 "roonga command."
 msgstr "`command`は`text`型の値です。`pgroonga.command`は`command`をGroongaのコマンドとして実行します。"
 
+msgid "Here is the description about the second syntax:"
+msgstr "2つめの構文の説明は以下の通りです。"
+
+msgid "`name` is a `text` type value. It's a command name to be executed."
+msgstr "`name`は`text`型の値です。実行するコマンド名です。"
+
+msgid ""
+"`argument_name` is a `text` type value. It's an argument name followed by the "
+"corresponded argument value."
+msgstr "`argument_name`は`text`型の値です。引数名です。この後に対応する引数の値が続きます。"
+
+msgid ""
+"`argument_value` is a `text` type value. It's an argument value of the precedi"
+"ng argument name."
+msgstr "`argument_value`は`text`型の値です。直前にした引数名に対応する値です。"
+
+msgid ""
+"`pgroonga.command` builds a Groonga command from `name` and `argument_name`s a"
+"nd `argument_value`s and executes the built Groonga command."
+msgstr ""
+"`pgroonga.command`は`name`と`argument_name`と`argument_value`からGroongaコマンドを作り、そのG"
+"roongaコマンドを実行します。"
+
 msgid ""
 "Groonga command returns result as JSON. `pgroonga.command` returns the JSON as"
 " `text` type value. You can use [JSON functions and operations provided by Pos"
@@ -60,8 +95,229 @@ msgstr ""
 msgid "## Usage"
 msgstr "## 使い方"
 
-msgid "See [examples in tutorial](../../tutorial/#groonga)."
-msgstr "[チュートリアルの例](../../tutorial/#groonga)も参照してください。"
+msgid "Here are sample schema and data:"
+msgstr "サンプルスキーマとデータは次の通りです。"
+
+msgid ""
+"```sql\n"
+"CREATE TABLE memos (\n"
+"  content text\n"
+");"
+msgstr ""
+
+msgid ""
+"CREATE INDEX pgroonga_memos_index\n"
+"          ON memos\n"
+"       USING pgroonga (content);"
+msgstr ""
+
+msgid ""
+"INSERT INTO memos VALUES ('PGroonga (PostgreSQL+Groonga) is great!');\n"
+"```"
+msgstr ""
+
+msgid ""
+"Here is an example to run [`status` Groonga command](http://groonga.org/en/doc"
+"s/reference/commands/status.html) that doesn't have any arguments:"
+msgstr ""
+"以下は[`status` Groongaコマンド](http://groonga.org/ja/docs/reference/commands/status"
+".html)の実行例です。このコマンドには引数はありません。"
+
+msgid ""
+"```sql\n"
+"SELECT jsonb_pretty(pgroonga.command('status')::jsonb);\n"
+"--               jsonb_pretty               \n"
+"-- -----------------------------------------\n"
+"--  [                                      +\n"
+"--      [                                  +\n"
+"--          0,                             +\n"
+"--          1480484730.607103,             +\n"
+"--          0.0001363754272460938          +\n"
+"--      ],                                 +\n"
+"--      {                                  +\n"
+"--          \"uptime\": 859,                 +\n"
+"--          \"version\": \"6.1.0-53-g460b5c9\",+\n"
+"--          \"n_queries\": 6,                +\n"
+"--          \"starttime\": 1480483871,       +\n"
+"--          \"start_time\": 1480483871,      +\n"
+"--          \"alloc_count\": 14034,          +\n"
+"--          \"cache_hit_rate\": 0.0,         +\n"
+"--          \"command_version\": 1,          +\n"
+"--          \"max_command_version\": 3,      +\n"
+"--          \"default_command_version\": 1   +\n"
+"--      }                                  +\n"
+"--  ]\n"
+"-- (1 row)\n"
+"```"
+msgstr ""
+
+msgid ""
+"Here is an example to search inserted data. You can use [`select` Groonga comm"
+"and](http://groonga.org/docs/reference/commands/select.html) for the purpose. "
+"You need to convert PGroonga index name to Groonga table name by [`pgroonga.ta"
+"ble_name` function](pgroonga-table-name.html)."
+msgstr ""
+"以下は挿入したデータを検索する例です。検索には[`select` Groongaコマンド](http://groonga.org/ja/docs/refer"
+"ence/commands/select.html)を使います。[`pgroonga.table_name`関数](pgroonga-table-name."
+"html)を使ってPGroongaのインデックス名をGroongaのテーブル名に変換する必要があります。"
+
+msgid ""
+"```sql\n"
+"SELECT jsonb_pretty(\n"
+"  pgroonga.command(\n"
+"    'select ' ||\n"
+"    '--table ' || pgroonga.table_name('pgroonga_memos_index')\n"
+"  )::jsonb\n"
+");\n"
+"--                         jsonb_pretty                        \n"
+"-- ------------------------------------------------------------\n"
+"--  [                                                         +\n"
+"--      [                                                     +\n"
+"--          0,                                                +\n"
+"--          1480484984.533947,                                +\n"
+"--          0.0005786418914794922                             +\n"
+"--      ],                                                    +\n"
+"--      [                                                     +\n"
+"--          [                                                 +\n"
+"--              [                                             +\n"
+"--                  1                                         +\n"
+"--              ],                                            +\n"
+"--              [                                             +\n"
+"--                  [                                         +\n"
+"--                      \"_id\",                                +\n"
+"--                      \"UInt32\"                              +\n"
+"--                  ],                                        +\n"
+"--                  [                                         +\n"
+"--                      \"content\",                            +\n"
+"--                      \"LongText\"                            +\n"
+"--                  ],                                        +\n"
+"--                  [                                         +\n"
+"--                      \"ctid\",                               +\n"
+"--                      \"UInt64\"                              +\n"
+"--                  ]                                         +\n"
+"--              ],                                            +\n"
+"--              [                                             +\n"
+"--                  1,                                        +\n"
+"--                  \"PGroonga (PostgreSQL+Groonga) is great!\",+\n"
+"--                  1                                         +\n"
+"--              ]                                             +\n"
+"--          ]                                                 +\n"
+"--      ]                                                     +\n"
+"--  ]\n"
+"-- (1 row)\n"
+"```"
+msgstr ""
+
+msgid ""
+"Here is an example that searches records that contains \"PostgreSQL\" and \"Groon"
+"ga\". Note that you need to quote \"PostgreSQL Groonga\" to treat as one argument"
+" value:"
+msgstr ""
+"以下は「PostgreSQL」と「Groonga」を含むレコードを検索する例です。「PostgreSQL Groonga」を1つの引数値として扱うためにダブ"
+"ルクォート(またはシングルクォート)で囲む必要がある点に注意してください。"
+
+msgid ""
+"```sql\n"
+"SELECT jsonb_pretty(\n"
+"  pgroonga.command(\n"
+"    'select ' ||\n"
+"    '--table ' || pgroonga.table_name('pgroonga_memos_index') || ' ' ||\n"
+"    '--match_columns content ' ||\n"
+"    '--query \"PostgreSQL Groonga\"'\n"
+"  )::jsonb\n"
+");\n"
+"--                         jsonb_pretty                        \n"
+"-- ------------------------------------------------------------\n"
+"--  [                                                         +\n"
+"--      [                                                     +\n"
+"--          0,                                                +\n"
+"--          1480485153.923481,                                +\n"
+"--          0.002448797225952148                              +\n"
+"--      ],                                                    +\n"
+"--      [                                                     +\n"
+"--          [                                                 +\n"
+"--              [                                             +\n"
+"--                  1                                         +\n"
+"--              ],                                            +\n"
+"--              [                                             +\n"
+"--                  [                                         +\n"
+"--                      \"_id\",                                +\n"
+"--                      \"UInt32\"                              +\n"
+"--                  ],                                        +\n"
+"--                  [                                         +\n"
+"--                      \"content\",                            +\n"
+"--                      \"LongText\"                            +\n"
+"--                  ],                                        +\n"
+"--                  [                                         +\n"
+"--                      \"ctid\",                               +\n"
+"--                      \"UInt64\"                              +\n"
+"--                  ]                                         +\n"
+"--              ],                                            +\n"
+"--              [                                             +\n"
+"--                  1,                                        +\n"
+"--                  \"PGroonga (PostgreSQL+Groonga) is great!\",+\n"
+"--                  1                                         +\n"
+"--              ]                                             +\n"
+"--          ]                                                 +\n"
+"--      ]                                                     +\n"
+"--  ]\n"
+"-- (1 row)\n"
+"```"
+msgstr ""
+
+msgid "If you use arguments array style, you don't need to care about quoting:"
+msgstr "引数を配列で指定するスタイルと使うと、ダブルクォートで囲むことについて気にする必要がなくなります。"
+
+msgid ""
+"```sql\n"
+"SELECT jsonb_pretty(\n"
+"  pgroonga.command(\n"
+"    'select',\n"
+"    ARRAY[\n"
+"      'table', pgroonga.table_name('pgroonga_memos_index'),\n"
+"      'match_columns', 'content',\n"
+"      'query', 'PostgreSQL Groonga'\n"
+"    ]\n"
+"  )::jsonb\n"
+");\n"
+"--                         jsonb_pretty                        \n"
+"-- ------------------------------------------------------------\n"
+"--  [                                                         +\n"
+"--      [                                                     +\n"
+"--          0,                                                +\n"
+"--          1480485246.841189,                                +\n"
+"--          0.00008869171142578125                            +\n"
+"--      ],                                                    +\n"
+"--      [                                                     +\n"
+"--          [                                                 +\n"
+"--              [                                             +\n"
+"--                  1                                         +\n"
+"--              ],                                            +\n"
+"--              [                                             +\n"
+"--                  [                                         +\n"
+"--                      \"_id\",                                +\n"
+"--                      \"UInt32\"                              +\n"
+"--                  ],                                        +\n"
+"--                  [                                         +\n"
+"--                      \"content\",                            +\n"
+"--                      \"LongText\"                            +\n"
+"--                  ],                                        +\n"
+"--                  [                                         +\n"
+"--                      \"ctid\",                               +\n"
+"--                      \"UInt64\"                              +\n"
+"--                  ]                                         +\n"
+"--              ],                                            +\n"
+"--              [                                             +\n"
+"--                  1,                                        +\n"
+"--                  \"PGroonga (PostgreSQL+Groonga) is great!\",+\n"
+"--                  1                                         +\n"
+"--              ]                                             +\n"
+"--          ]                                                 +\n"
+"--      ]                                                     +\n"
+"--  ]\n"
+"-- (1 row)\n"
+"```"
+msgstr ""
 
 msgid "## Attention for `select` Groonga command {#attention}"
 msgstr "## Groongaの`select`コマンドに関する注意事項 {#attention}"
@@ -86,6 +342,9 @@ msgstr "## 参考"
 msgid "  * [Examples in tutorial](../../tutorial/#groonga)"
 msgstr "  * [チュートリアルにある例](../../tutorial/#groonga)"
 
+msgid "  * [`pgroonga.table_name` function](pgroonga-table-name.html)"
+msgstr "  * [`pgroonga.table_name`関数](pgroonga-table-name.html)"
+
 msgid ""
 "  * [`pgroonga_tuple_is_alive` Groonga function](../groonga-functions/pgroonga"
 "-tuple-is-alive.html)"

  Modified: _po/ja/reference/functions/pgroonga-query-extract-keywords.po (+17 -17)
===================================================================
--- _po/ja/reference/functions/pgroonga-query-extract-keywords.po    2016-11-30 15:35:58 +0900 (2281133)
+++ _po/ja/reference/functions/pgroonga-query-extract-keywords.po    2016-11-30 15:36:34 +0900 (d096995)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2016-04-24 22:16+0900\n"
+"PO-Revision-Date: 2016-11-29 18:22+0900\n"
 "Language: ja\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -85,10 +85,10 @@ msgstr "ANDのみの場合はすべての語がキーワードになります。
 msgid ""
 "```sql\n"
 "SELECT pgroonga.query_extract_keywords('Groonga PostgreSQL');\n"
-" query_extract_keywords \n"
-"------------------------\n"
-" {PostgreSQL,Groonga}\n"
-"(1 row)\n"
+"--  query_extract_keywords \n"
+"-- ------------------------\n"
+"--  {PostgreSQL,Groonga}\n"
+"-- (1 row)\n"
 "```"
 msgstr ""
 
@@ -98,10 +98,10 @@ msgstr "ORのみの場合はすべての語がキーワードになります。"
 msgid ""
 "```sql\n"
 "SELECT pgroonga.query_extract_keywords('Groonga OR PostgreSQL');\n"
-" query_extract_keywords \n"
-"------------------------\n"
-" {PostgreSQL,Groonga}\n"
-"(1 row)\n"
+"--  query_extract_keywords \n"
+"-- ------------------------\n"
+"--  {PostgreSQL,Groonga}\n"
+"-- (1 row)\n"
 "```"
 msgstr ""
 
@@ -111,10 +111,10 @@ msgstr "カッコを使えます。"
 msgid ""
 "```sql\n"
 "SELECT pgroonga.query_extract_keywords('Groonga (MySQL OR PostgreSQL)');\n"
-"   query_extract_keywords   \n"
-"----------------------------\n"
-" {Groonga,PostgreSQL,MySQL}\n"
-"(1 row)\n"
+"--    query_extract_keywords   \n"
+"-- ----------------------------\n"
+"--  {Groonga,PostgreSQL,MySQL}\n"
+"-- (1 row)\n"
 "```"
 msgstr ""
 
@@ -124,10 +124,10 @@ msgstr "NOT条件の語はキーワードになりません。"
 msgid ""
 "```sql\n"
 "SELECT pgroonga.query_extract_keywords('Groonga - MySQL PostgreSQL');\n"
-" query_extract_keywords \n"
-"------------------------\n"
-" {PostgreSQL,Groonga}\n"
-"(1 row)\n"
+"--  query_extract_keywords \n"
+"-- ------------------------\n"
+"--  {PostgreSQL,Groonga}\n"
+"-- (1 row)\n"
 "```"
 msgstr ""
 
-------------- next part --------------
HTML����������������������������...
Download 



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