From 20e4d9b138cf5873f600bff991285386379d7ea6 Mon Sep 17 00:00:00 2001 From: gemmaro Date: Thu, 23 Feb 2023 22:17:09 +0900 Subject: [PATCH] Add Japanese translation * Change Japanese readme document format from RDoc to Markdown * Add translation Rake task * Record po4a version * Translate readme into Japanese --- README.ja.md | 266 ++++++++++++ README.ja.rdoc | 13 - Rakefile | 10 + translation/.po4a-version | 7 + translation/po/all.pot | 875 ++++++++++++++++++++++++++++++++++++++ translation/po/ja.po | 868 +++++++++++++++++++++++++++++++++++++ translation/po4a.cfg | 9 + 7 files changed, 2035 insertions(+), 13 deletions(-) create mode 100644 README.ja.md delete mode 100644 README.ja.rdoc create mode 100644 translation/.po4a-version create mode 100644 translation/po/all.pot create mode 100644 translation/po/ja.po create mode 100644 translation/po4a.cfg diff --git a/README.ja.md b/README.ja.md new file mode 100644 index 000000000..0735e1e90 --- /dev/null +++ b/README.ja.md @@ -0,0 +1,266 @@ +# pg + +home :: https://github.com/ged/ruby-pg +docs :: http://deveiate.org/code/pg +clog :: link:/History.md + +[![https://gitter.im/ged/ruby-pg +でチャットに参加](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ged/ruby-pg?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + + +## 説明 + +Pgは[PostgreSQL +RDBMS](http://www.postgresql.org/)へのRubyのインターフェースです。[PostgreSQL +9.3以降](http://www.postgresql.org/support/versioning/)で動作します。 + +簡単な使用例は次の通りです。 +```ruby + #!/usr/bin/env ruby + + require 'pg' + + # データベースへの現在の接続を表に出力します + conn = PG.connect( dbname: 'sales' ) + conn.exec( "SELECT * FROM pg_stat_activity" ) do |result| + puts " PID | User | Query" + result.each do |row| + puts " %7d | %-16s | %s " % + row.values_at('pid', 'usename', 'query') + end + end +``` + +## ビルド状況 + +[![Github +Actionsのビルド状況](https://github.com/ged/ruby-pg/actions/workflows/source-gem.yml/badge.svg?branch=master)](https://github.com/ged/ruby-pg/actions/workflows/source-gem.yml) +[![バイナリgem](https://github.com/ged/ruby-pg/actions/workflows/binary-gems.yml/badge.svg?branch=master)](https://github.com/ged/ruby-pg/actions/workflows/binary-gems.yml) +[![Appveyorのビルド状況](https://ci.appveyor.com/api/projects/status/gjx5axouf3b1wicp?svg=true)](https://ci.appveyor.com/project/ged/ruby-pg-9j8l3) + + +## 要件 + +* Ruby 2.4かそれより新しいバージョン +* PostgreSQL 9.3.xかそれ以降のバージョン(ヘッダー付属のもの、例えば-devの名前のパッケージ)。 + +それより前のバージョンのRubyやPostgreSQLでも通常は同様に動作しますが、定期的なテストはされていません。 + + +## バージョン管理 + +[セマンティックバージョニング](http://semver.org/)の原則にしたがってgemをタグ付けしてリリースしています。 + +この方針の結果として、2つの数字を指定する[悲観的バージョン制約](http://guides.rubygems.org/patterns/#pessimistic-version-constraint)を使ってこのgemへの依存関係を指定することができます(またそうすべきです)。 + +例えば次の通りです。 + +```ruby + spec.add_dependency 'pg', '~> 1.0' +``` + +## インストール方法 + +RubyGemsを経由してインストールするには以下とします。 + + gem install pg + +Postgresと一緒にインストールされた'pg_config'プログラムへのパスを指定する必要があるかもしれません。 + + gem install pg -- --with-pg-config= + +Bundlerを介してインストールした場合は次のようにコンパイルのためのヒントを与えられます。 + + bundle config build.pg --with-pg-config= + +MacOS Xへインストールする詳しい情報については README-OS_X.rdoc を、Windows用のビルドやインストールの説明については +README-Windows.rdoc を参照してください。 + +詰まったときやただ何か喋りたいときのために[Google+グループ](http://goo.gl/TFy1U)と[メーリングリスト](http://groups.google.com/group/ruby-pg)もあります。 + +署名されたgemとしてインストールしたい場合は、リポジトリの[`certs`ディレクトリ](https://github.com/ged/ruby-pg/tree/master/certs)にgemの署名をする公開証明書があります。 + + +## 型変換 + +PgにはおまけとしてRubyとネイティブCコードにある結果の値やクエリ引数の型変換ができます。 +こうすることでデータベースとのデータの往来を加速させられますが、それは文字列のアロケーションが減り、(より遅い)Rubyのコードでの変換部分が除かれるからです。 + +とても基本的な型変換は次のようにできます。 +```ruby + conn.type_map_for_results = PG::BasicTypeMapForResults.new conn + # ……これは結果の値の対応付けに作用します。 + conn.exec("select 1, now(), '{2,3}'::int[]").values + # => [[1, 2014-09-21 20:51:56 +0200, [2, 3]]] + + conn.type_map_for_queries = PG::BasicTypeMapForQueries.new conn + # ……そしてこれは引数値の対応付けのためのものです。 + conn.exec_params("SELECT $1::text, $2::text, $3::text", [1, 1.23, [2,3]]).values + # => [["1", "1.2300000000000000E+00", "{2,3}"]] +``` + +しかしPgの型変換はかなり調整が効きます。2層に分かれているのがその理由です。 + +### エンコーダーとデコーダー (ext/pg_*coder.c, lib/pg/*coder.rb) + +こちらはより低層で、DBMSへ転送するためにRubyのオブジェクトを変換するエンコーディングクラスと取得してきたデータをRubyのオブジェクトに変換し戻すデコーディングクラスが含まれています。クラスはそれぞれの形式によって名前空間PG::TextEncoder、PG::TextDecoder、PG::BinaryEncoder、そしてPG::BinaryDecoderに分かれています。 + +エンコーダーないしデコーダーオブジェクトにOIDデータ型や形式コード(テキストないしバイナリ)や任意で名前を割り当てることができます。要素のエンコーダーないしデコーダーを割り当てることによって複合型を構築することもできます。PG::CoderオブジェクトはPG::TypeMapをセットアップしたりその代わりに単一の値と文字列表現とを相互に変換したりするのに使えます。 + +ruby-pgでは以下のPostgreSQLカラム型に対応しています(TE = Text Encoder、TD = Text Decoder、BE = +Binary Encoder、BD = Binary Decoder)。 + +* Integer: + [TE](rdoc-ref:PG::TextEncoder::Integer)、[TD](rdoc-ref:PG::TextDecoder::Integer)、[BD](rdoc-ref:PG::BinaryDecoder::Integer) + 💡 + リンクがないでしょうか。[こちら](https://deveiate.org/code/pg/README_rdoc.html#label-Type+Casts)を代わりに見てください + 💡 + * BE: + [Int2](rdoc-ref:PG::BinaryEncoder::Int2)、[Int4](rdoc-ref:PG::BinaryEncoder::Int4)、[Int8](rdoc-ref:PG::BinaryEncoder::Int8) +* Float: + [TE](rdoc-ref:PG::TextEncoder::Float)、[TD](rdoc-ref:PG::TextDecoder::Float)、[BD](rdoc-ref:PG::BinaryDecoder::Float) +* Numeric: + [TE](rdoc-ref:PG::TextEncoder::Numeric)、[TD](rdoc-ref:PG::TextDecoder::Numeric) +* Boolean: + [TE](rdoc-ref:PG::TextEncoder::Boolean)、[TD](rdoc-ref:PG::TextDecoder::Boolean)、[BE](rdoc-ref:PG::BinaryEncoder::Boolean)、[BD](rdoc-ref:PG::BinaryDecoder::Boolean) +* String: + [TE](rdoc-ref:PG::TextEncoder::String)、[TD](rdoc-ref:PG::TextDecoder::String)、[BE](rdoc-ref:PG::BinaryEncoder::String)、[BD](rdoc-ref:PG::BinaryDecoder::String) +* Bytea: + [TE](rdoc-ref:PG::TextEncoder::Bytea)、[TD](rdoc-ref:PG::TextDecoder::Bytea)、[BE](rdoc-ref:PG::BinaryEncoder::Bytea)、[BD](rdoc-ref:PG::BinaryDecoder::Bytea) +* Base64: + [TE](rdoc-ref:PG::TextEncoder::ToBase64)、[TD](rdoc-ref:PG::TextDecoder::FromBase64)、[BE](rdoc-ref:PG::BinaryEncoder::FromBase64)、[BD](rdoc-ref:PG::BinaryDecoder::ToBase64) +* Timestamp: + * TE: + [現地時間](rdoc-ref:PG::TextEncoder::TimestampWithoutTimeZone)、[UTC](rdoc-ref:PG::TextEncoder::TimestampUtc)、[タイムゾーン付き](rdoc-ref:PG::TextEncoder::TimestampWithTimeZone) + * TD: + [現地時間](rdoc-ref:PG::TextDecoder::TimestampLocal)、[UTC](rdoc-ref:PG::TextDecoder::TimestampUtc)、[UTCから現地時間へ](rdoc-ref:PG::TextDecoder::TimestampUtcToLocal) + * BD: + [現地時間](rdoc-ref:PG::BinaryDecoder::TimestampLocal)、[UTC](rdoc-ref:PG::BinaryDecoder::TimestampUtc)、[UTCから現地時間へ](rdoc-ref:PG::BinaryDecoder::TimestampUtcToLocal) +* Date: + [TE](rdoc-ref:PG::TextEncoder::Date)、[TD](rdoc-ref:PG::TextDecoder::Date) +* JSONとJSONB: + [TE](rdoc-ref:PG::TextEncoder::JSON)、[TD](rdoc-ref:PG::TextDecoder::JSON) +* Inet: + [TE](rdoc-ref:PG::TextEncoder::Inet)、[TD](rdoc-ref:PG::TextDecoder::Inet) +* Array: + [TE](rdoc-ref:PG::TextEncoder::Array)、[TD](rdoc-ref:PG::TextDecoder::Array) +* 複合型(「行」や「レコード」などとも言います):[TE](rdoc-ref:PG::TextEncoder::Record)、[TD](rdoc-ref:PG::TextDecoder::Record) + +カラム型として使われていませんが以下のテキスト形式もエンコードできます。 + +* COPYの入出力データ:[TE](rdoc-ref:PG::TextEncoder::CopyRow)、[TD](rdoc-ref:PG::TextDecoder::CopyRow) +* SQL文字列に挿入するリテラル:[TE](rdoc-ref:PG::TextEncoder::QuotedLiteral) +* SQLの識別子: + [TE](rdoc-ref:PG::TextEncoder::Identifier)、[TD](rdoc-ref:PG::TextDecoder::Identifier) + +### PG::TypeMapとその派生 (ext/pg_type_map*.c, lib/pg/type_map*.rb) + +TypeMapはエンコーダーまたはデコーダーのどちらによってどの値を変換するかを定義します。様々な型の対応付け戦略があるので、このクラスにはいくつかの派生が実装されています。型変換の特有の需要に合わせてそれらの派生から選んで調整を加えることができます。既定の型の対応付けはPG::TypeMapAllStringsです。 + +型の対応付けは、結果の集合それぞれに対し、接続毎ないしクエリ毎に割り当てることができます。型の対応付けはCOPYの入出力データストリーミングでも使うことができます。PG::Connection#copy_dataを参照してください。 + +以下の基底となる型の対応付けが使えます。 + +* PG::TypeMapAllStrings - 全ての値と文字列について相互にエンコードとデコードを行います(既定) +* PG::TypeMapByClass - 送信する値のクラスに基づいてエンコーダーを選択します +* PG::TypeMapByColumn - カラムの順番によってエンコーダーとデコーダーを選択します +* PG::TypeMapByOid - PostgreSQLのOIDデータ型によってデコーダーを選択します +* PG::TypeMapInRuby - Rubyで独自の型の対応付けを定義します + +以下の型の対応付けはPG::BasicTypeRegistry由来の型の対応付けが入った状態になっています。 + +* PG::BasicTypeMapForResults - + PG::TypeMapByOidによくあるPostgreSQLカラム型用にデコーダーが入った状態になっています +* PG::BasicTypeMapBasedOnResult - + PG::TypeMapByOidによくあるPostgreSQLカラム型用のエンコーダーが入った状態になっています +* PG::BasicTypeMapForQueries - + PG::TypeMapByClassによくあるRubyの値クラス用にエンコーダーが入った状態になっています + + +## スレッド対応 + +PGには個々のスレッドが別々のPG::Connectionオブジェクトを同時に使えるという点でスレッド安全性があります。しかし1つ以上のスレッドから同時にPgのオブジェクトにアクセスすると安全ではありません。そのため必ず、毎回新しいスレッドを作るときに新しいデータベースサーバー接続を開くか、スレッド安全性のある方法で接続を管理するActiveRecordのようなラッパーライブラリを使うようにしてください。 + +以下のようなメッセージが標準エラー出力に表示された場合、恐らく複数のスレッドが1つの接続を使っています。 + + message type 0x31 arrived from server while idle + message type 0x32 arrived from server while idle + message type 0x54 arrived from server while idle + message type 0x43 arrived from server while idle + message type 0x5a arrived from server while idle + + +## Fiber IOスケジューラー対応 + +PgはRuby-3.0で導入された`Fiber.scheduler`に完全に対応しています。`Fiber.scheduler`のWindows対応についてはRuby-3.1以降で使えます。`Fiber.scheduler`が走らせているスレッドに登録されている場合、起こりうる全てのブロッキングIO操作はそのスケジューラーを経由します。同期的であったりブロックしたりするメソッド呼び出しについてもpgが内部的に非同期のlibpqインターフェースを使っているのはそれが理由です。またlibpqの組み込み関数に代えてRubyのDNS解決を使っています。 + +内部的にPgは常にlibpqのノンブロッキング接続モードを使います。それからブロッキングモードで走っているように振舞いますが、もし`Fiber.scheduler`が登録されていれば全てのブロッキングIOはそのスケジューラーを通じてRubyで制御されます。`PG::Connection.setnonblocking(true)`が呼ばれたらノンブロッキング状態が有効になったままになりますが、それ以降のブロッキング状態の制御が無効になるので、呼び出しているプログラムはブロッキング状態を自力で制御しなければなりません。 + +この規則の1つの例外には、`PG::Connection#lo_create`や外部ライブラリを使う認証メソッド(GSSAPI認証など)のような、大きめのオブジェクト用のメソッドがあります。これらは`Fiber.scheduler`と互換性がないため、ブロッキング状態は登録されたIOスケジューラに渡されません。つまり操作は適切に実行されますが、IO待ち状態に別のIOを扱うFiberから使用を切り替えてくることができなくなります。 + + +## 貢献 + +バグを報告したり機能を提案したりGitでソースをチェックアウトしたりするには[プロジェクトページをご確認ください](https://github.com/ged/ruby-pg)。 + +ソースをチェックアウトしたあとは全ての依存関係をインストールします。 + + $ bundle install + +拡張ファイル、パッケージファイル、テストデータベースを一掃するには次のようにします。 + + $ rake clean + +拡張をコンパイルするには次のようにします。 + + $ rake compile + +パスにある`initdb`といったPostgreSQLのツールを使ってテストやスペックを走らせるには次のようにします。 + + $ PATH=$PATH:/usr/lib/postgresql/14/bin rake test + +あるいは行番号を使って特定のテストを走らせるには次のようにします。 + + $ PATH=$PATH:/usr/lib/postgresql/14/bin rspec -Ilib -fd spec/pg/connection_spec.rb:455 + +APIドキュメントを生成するには次のようにします。 + + $ rake docs + +必ず全てのバグと新機能についてテストを使って検証してください。 + +現在のメンテナはMichael Granger とLars Kanis +です。 + + +## 著作権 + +Copyright (c) 1997-2022 by the authors. + +* Jeff Davis +* Guy Decoux (ts) +* Michael Granger +* Lars Kanis +* Dave Lee +* Eiji Matsumoto +* Yukihiro Matsumoto +* Noboru Saitou + +You may redistribute this software under the same terms as Ruby itself; see +https://www.ruby-lang.org/en/about/license.txt or the BSDL file in the +source for details. +(参考訳:このソフトウェアはRuby自体と同じ条件の元で再配布することができます。詳細については +https://www.ruby-lang.org/en/about/license.txt やソース中のBSDLファイルを参照してください) + +Portions of the code are from the PostgreSQL project, and are distributed " +"under the terms of the PostgreSQL license, included in the file POSTGRES. +(参考訳:コードの一部はPostgreSQLプロジェクトから来ており、PostgreSQLの使用許諾の条件の元で配布されます。ファイルPOSTGRESに含まれています) + +Portions copyright LAIKA, Inc. + + +## 謝辞 + +長年にわたって貢献してくださった方々についてはContributors.rdocを参照してください。 + +ruby-listとruby-devメーリングリストの方々に感謝します。またPostgreSQLを開発された方々へも謝意を表します。 diff --git a/README.ja.rdoc b/README.ja.rdoc deleted file mode 100644 index f4bfb610d..000000000 --- a/README.ja.rdoc +++ /dev/null @@ -1,13 +0,0 @@ -= pg - -home :: https://github.com/ged/ruby-pg -docs :: http://deveiate.org/code/pg - - -== Description - -This file needs a translation of the English README. Pull requests, patches, or -volunteers gladly accepted. - -Until such time, please accept my sincere apologies for not knowing Japanese. - diff --git a/Rakefile b/Rakefile index 5391a6190..cf920699b 100644 --- a/Rakefile +++ b/Rakefile @@ -103,3 +103,13 @@ file 'ext/pg_errors.c' => ['ext/errorcodes.def'] do # trigger compilation of changed errorcodes.def touch 'ext/pg_errors.c' end + +desc "Translate readme" +task :translate do + cd "translation" do + # po4a's lexer might change, so record its version for reference + sh "po4a --version > .po4a-version" + + sh "po4a po4a.cfg" + end +end diff --git a/translation/.po4a-version b/translation/.po4a-version new file mode 100644 index 000000000..710dfe7d2 --- /dev/null +++ b/translation/.po4a-version @@ -0,0 +1,7 @@ +po4a version 0.68. +Written by Martin Quinson and Denis Barbier. + +Copyright © 2002-2022 Software in the Public Interest, Inc. +This is free software; see source code for copying +conditions. There is NO warranty; not even for +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/translation/po/all.pot b/translation/po/all.pot new file mode 100644 index 000000000..4eff538dc --- /dev/null +++ b/translation/po/all.pot @@ -0,0 +1,875 @@ +# translation template for Pg. +# Copyright (C) 1997-2022 Pg authors. +# This file is distributed under the same license as the Pg. +# +msgid "" +msgstr "" +"Project-Id-Version: Pg 1.4.5\n" +"POT-Creation-Date: 2023-02-23 22:20+0900\n" +"PO-Revision-Date: 2023-02-25 14:02+0900\n" +"Last-Translator: none\n" +"Language-Team: none\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. type: Title # +#: ../README.md:1 +#, markdown-text, no-wrap +msgid "pg" +msgstr "" + +#. type: Plain text +#: ../README.md:6 +#, markdown-text +msgid "" +"home :: https://github.com/ged/ruby-pg docs :: http://deveiate.org/code/pg " +"clog :: link:/History.md" +msgstr "" + +#. type: Plain text +#: ../README.md:8 +#, markdown-text +msgid "" +"[![Join the chat at " +"https://gitter.im/ged/ruby-pg](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ged/ruby-pg?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)" +msgstr "" + +#. type: Title ## +#: ../README.md:10 +#, markdown-text, no-wrap +msgid "Description" +msgstr "" + +#. type: Plain text +#: ../README.md:14 +#, markdown-text +msgid "" +"Pg is the Ruby interface to the [PostgreSQL " +"RDBMS](http://www.postgresql.org/). It works with [PostgreSQL 9.3 and " +"later](http://www.postgresql.org/support/versioning/)." +msgstr "" + +#. type: Plain text +#: ../README.md:16 +#, markdown-text +msgid "A small example usage:" +msgstr "" + +#. type: Fenced code block (ruby) +#: ../README.md:16 +#, no-wrap +msgid "" +" #!/usr/bin/env ruby\n" +"\n" +" require 'pg'\n" +"\n" +" # Output a table of current connections to the DB\n" +" conn = PG.connect( dbname: 'sales' )\n" +" conn.exec( \"SELECT * FROM pg_stat_activity\" ) do |result|\n" +" puts \" PID | User | Query\"\n" +" result.each do |row|\n" +" puts \" %7d | %-16s | %s \" %\n" +" row.values_at('pid', 'usename', 'query')\n" +" end\n" +" end\n" +msgstr "" + +#. type: Title ## +#: ../README.md:32 +#, markdown-text, no-wrap +msgid "Build Status" +msgstr "" + +#. type: Plain text +#: ../README.md:37 +#, markdown-text +msgid "" +"[![Build Status Github " +"Actions](https://github.com/ged/ruby-pg/actions/workflows/source-gem.yml/badge.svg?branch=master)](https://github.com/ged/ruby-pg/actions/workflows/source-gem.yml) " +"[![Binary " +"gems](https://github.com/ged/ruby-pg/actions/workflows/binary-gems.yml/badge.svg?branch=master)](https://github.com/ged/ruby-pg/actions/workflows/binary-gems.yml) " +"[![Build Status " +"Appveyor](https://ci.appveyor.com/api/projects/status/gjx5axouf3b1wicp?svg=true)](https://ci.appveyor.com/project/ged/ruby-pg-9j8l3)" +msgstr "" + +#. type: Title ## +#: ../README.md:39 +#, markdown-text, no-wrap +msgid "Requirements" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:43 +#, markdown-text +msgid "Ruby 2.4 or newer" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:43 +#, markdown-text +msgid "PostgreSQL 9.3.x or later (with headers, -dev packages, etc)." +msgstr "" + +#. type: Plain text +#: ../README.md:46 +#, markdown-text +msgid "" +"It usually works with earlier versions of Ruby/PostgreSQL as well, but those " +"are not regularly tested." +msgstr "" + +#. type: Title ## +#: ../README.md:48 +#, markdown-text, no-wrap +msgid "Versioning" +msgstr "" + +#. type: Plain text +#: ../README.md:51 +#, markdown-text +msgid "" +"We tag and release gems according to the [Semantic " +"Versioning](http://semver.org/) principle." +msgstr "" + +#. type: Plain text +#: ../README.md:53 +#, markdown-text +msgid "" +"As a result of this policy, you can (and should) specify a dependency on " +"this gem using the [Pessimistic Version " +"Constraint](http://guides.rubygems.org/patterns/#pessimistic-version-constraint) " +"with two digits of precision." +msgstr "" + +#. type: Plain text +#: ../README.md:55 +#, markdown-text +msgid "For example:" +msgstr "" + +#. type: Fenced code block (ruby) +#: ../README.md:56 +#, no-wrap +msgid " spec.add_dependency 'pg', '~> 1.0'\n" +msgstr "" + +#. type: Title ## +#: ../README.md:60 +#, markdown-text, no-wrap +msgid "How To Install" +msgstr "" + +#. type: Plain text +#: ../README.md:63 +#, markdown-text +msgid "Install via RubyGems:" +msgstr "" + +#. type: Plain text +#: ../README.md:65 +#, markdown-text, no-wrap +msgid " gem install pg\n" +msgstr "" + +#. type: Plain text +#: ../README.md:68 +#, markdown-text +msgid "" +"You may need to specify the path to the 'pg_config' program installed with " +"Postgres:" +msgstr "" + +#. type: Plain text +#: ../README.md:70 +#, markdown-text, no-wrap +msgid " gem install pg -- --with-pg-config=\n" +msgstr "" + +#. type: Plain text +#: ../README.md:72 +#, markdown-text +msgid "If you're installing via Bundler, you can provide compile hints like so:" +msgstr "" + +#. type: Plain text +#: ../README.md:74 +#, markdown-text, no-wrap +msgid " bundle config build.pg --with-pg-config=\n" +msgstr "" + +#. type: Plain text +#: ../README.md:77 +#, markdown-text +msgid "" +"See README-OS_X.rdoc for more information about installing under MacOS X, " +"and README-Windows.rdoc for Windows build/installation instructions." +msgstr "" + +#. type: Plain text +#: ../README.md:81 +#, markdown-text +msgid "" +"There's also [a Google+ group](http://goo.gl/TFy1U) and a [mailing " +"list](http://groups.google.com/group/ruby-pg) if you get stuck, or just want " +"to chat about something." +msgstr "" + +#. type: Plain text +#: ../README.md:85 +#, markdown-text +msgid "" +"If you want to install as a signed gem, the public certs of the gem signers " +"can be found in [the `certs` " +"directory](https://github.com/ged/ruby-pg/tree/master/certs) of the " +"repository." +msgstr "" + +#. type: Title ## +#: ../README.md:87 +#, markdown-text, no-wrap +msgid "Type Casts" +msgstr "" + +#. type: Plain text +#: ../README.md:93 +#, markdown-text +msgid "" +"Pg can optionally type cast result values and query parameters in Ruby or " +"native C code. This can speed up data transfers to and from the database, " +"because String allocations are reduced and conversions in (slower) Ruby code " +"can be omitted." +msgstr "" + +#. type: Plain text +#: ../README.md:95 +#, markdown-text +msgid "Very basic type casting can be enabled by:" +msgstr "" + +#. type: Fenced code block (ruby) +#: ../README.md:95 +#, no-wrap +msgid "" +" conn.type_map_for_results = PG::BasicTypeMapForResults.new conn\n" +" # ... this works for result value mapping:\n" +" conn.exec(\"select 1, now(), '{2,3}'::int[]\").values\n" +" # => [[1, 2014-09-21 20:51:56 +0200, [2, 3]]]\n" +"\n" +" conn.type_map_for_queries = PG::BasicTypeMapForQueries.new conn\n" +" # ... and this for param value mapping:\n" +" conn.exec_params(\"SELECT $1::text, $2::text, $3::text\", [1, 1.23, " +"[2,3]]).values\n" +" # => [[\"1\", \"1.2300000000000000E+00\", \"{2,3}\"]]\n" +msgstr "" + +#. type: Plain text +#: ../README.md:109 +#, markdown-text +msgid "" +"But Pg's type casting is highly customizable. That's why it's divided into 2 " +"layers:" +msgstr "" + +#. type: Title ### +#: ../README.md:110 +#, markdown-text, no-wrap +msgid "Encoders / Decoders (ext/pg_*coder.c, lib/pg/*coder.rb)" +msgstr "" + +#. type: Plain text +#: ../README.md:117 +#, markdown-text +msgid "" +"This is the lower layer, containing encoding classes that convert Ruby " +"objects for transmission to the DBMS and decoding classes to convert " +"received data back to Ruby objects. The classes are namespaced according to " +"their format and direction in PG::TextEncoder, PG::TextDecoder, " +"PG::BinaryEncoder and PG::BinaryDecoder." +msgstr "" + +#. type: Plain text +#: ../README.md:123 +#, markdown-text +msgid "" +"It is possible to assign a type OID, format code (text or binary) and " +"optionally a name to an encoder or decoder object. It's also possible to " +"build composite types by assigning an element encoder/decoder. PG::Coder " +"objects can be used to set up a PG::TypeMap or alternatively to convert " +"single values to/from their string representation." +msgstr "" + +#. type: Plain text +#: ../README.md:125 +#, markdown-text +msgid "" +"The following PostgreSQL column types are supported by ruby-pg (TE = Text " +"Encoder, TD = Text Decoder, BE = Binary Encoder, BD = Binary Decoder):" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Integer: [TE](rdoc-ref:PG::TextEncoder::Integer), " +"[TD](rdoc-ref:PG::TextDecoder::Integer), " +"[BD](rdoc-ref:PG::BinaryDecoder::Integer) 💡 No links? Switch to " +"[here](https://deveiate.org/code/pg/README_md.html#label-Type+Casts) 💡" +msgstr "" + +#. type: Bullet: ' * ' +#: ../README.md:143 +#, markdown-text +msgid "" +"BE: [Int2](rdoc-ref:PG::BinaryEncoder::Int2), " +"[Int4](rdoc-ref:PG::BinaryEncoder::Int4), " +"[Int8](rdoc-ref:PG::BinaryEncoder::Int8)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Float: [TE](rdoc-ref:PG::TextEncoder::Float), " +"[TD](rdoc-ref:PG::TextDecoder::Float), " +"[BD](rdoc-ref:PG::BinaryDecoder::Float)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Numeric: [TE](rdoc-ref:PG::TextEncoder::Numeric), " +"[TD](rdoc-ref:PG::TextDecoder::Numeric)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Boolean: [TE](rdoc-ref:PG::TextEncoder::Boolean), " +"[TD](rdoc-ref:PG::TextDecoder::Boolean), " +"[BE](rdoc-ref:PG::BinaryEncoder::Boolean), " +"[BD](rdoc-ref:PG::BinaryDecoder::Boolean)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"String: [TE](rdoc-ref:PG::TextEncoder::String), " +"[TD](rdoc-ref:PG::TextDecoder::String), " +"[BE](rdoc-ref:PG::BinaryEncoder::String), " +"[BD](rdoc-ref:PG::BinaryDecoder::String)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Bytea: [TE](rdoc-ref:PG::TextEncoder::Bytea), " +"[TD](rdoc-ref:PG::TextDecoder::Bytea), " +"[BE](rdoc-ref:PG::BinaryEncoder::Bytea), " +"[BD](rdoc-ref:PG::BinaryDecoder::Bytea)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Base64: [TE](rdoc-ref:PG::TextEncoder::ToBase64), " +"[TD](rdoc-ref:PG::TextDecoder::FromBase64), " +"[BE](rdoc-ref:PG::BinaryEncoder::FromBase64), " +"[BD](rdoc-ref:PG::BinaryDecoder::ToBase64)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "Timestamp:" +msgstr "" + +#. type: Bullet: ' * ' +#: ../README.md:143 +#, markdown-text +msgid "" +"TE: [local](rdoc-ref:PG::TextEncoder::TimestampWithoutTimeZone), " +"[UTC](rdoc-ref:PG::TextEncoder::TimestampUtc), " +"[with-TZ](rdoc-ref:PG::TextEncoder::TimestampWithTimeZone)" +msgstr "" + +#. type: Bullet: ' * ' +#: ../README.md:143 +#, markdown-text +msgid "" +"TD: [local](rdoc-ref:PG::TextDecoder::TimestampLocal), " +"[UTC](rdoc-ref:PG::TextDecoder::TimestampUtc), " +"[UTC-to-local](rdoc-ref:PG::TextDecoder::TimestampUtcToLocal)" +msgstr "" + +#. type: Bullet: ' * ' +#: ../README.md:143 +#, markdown-text +msgid "" +"BD: [local](rdoc-ref:PG::BinaryDecoder::TimestampLocal), " +"[UTC](rdoc-ref:PG::BinaryDecoder::TimestampUtc), " +"[UTC-to-local](rdoc-ref:PG::BinaryDecoder::TimestampUtcToLocal)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Date: [TE](rdoc-ref:PG::TextEncoder::Date), " +"[TD](rdoc-ref:PG::TextDecoder::Date)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"JSON and JSONB: [TE](rdoc-ref:PG::TextEncoder::JSON), " +"[TD](rdoc-ref:PG::TextDecoder::JSON)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Inet: [TE](rdoc-ref:PG::TextEncoder::Inet), " +"[TD](rdoc-ref:PG::TextDecoder::Inet)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Array: [TE](rdoc-ref:PG::TextEncoder::Array), " +"[TD](rdoc-ref:PG::TextDecoder::Array)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:143 +#, markdown-text +msgid "" +"Composite Type (also called \"Row\" or \"Record\"): " +"[TE](rdoc-ref:PG::TextEncoder::Record), " +"[TD](rdoc-ref:PG::TextDecoder::Record)" +msgstr "" + +#. type: Plain text +#: ../README.md:145 +#, markdown-text +msgid "" +"The following text formats can also be encoded although they are not used as " +"column type:" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:149 +#, markdown-text +msgid "" +"COPY input and output data: [TE](rdoc-ref:PG::TextEncoder::CopyRow), " +"[TD](rdoc-ref:PG::TextDecoder::CopyRow)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:149 +#, markdown-text +msgid "" +"Literal for insertion into SQL string: " +"[TE](rdoc-ref:PG::TextEncoder::QuotedLiteral)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:149 +#, markdown-text +msgid "" +"SQL-Identifier: [TE](rdoc-ref:PG::TextEncoder::Identifier), " +"[TD](rdoc-ref:PG::TextDecoder::Identifier)" +msgstr "" + +#. type: Title ### +#: ../README.md:150 +#, markdown-text, no-wrap +msgid "PG::TypeMap and derivations (ext/pg_type_map*.c, lib/pg/type_map*.rb)" +msgstr "" + +#. type: Plain text +#: ../README.md:156 +#, markdown-text +msgid "" +"A TypeMap defines which value will be converted by which encoder/decoder. " +"There are different type map strategies, implemented by several derivations " +"of this class. They can be chosen and configured according to the particular " +"needs for type casting. The default type map is PG::TypeMapAllStrings." +msgstr "" + +#. type: Plain text +#: ../README.md:160 +#, markdown-text +msgid "" +"A type map can be assigned per connection or per query respectively per " +"result set. Type maps can also be used for COPY in and out data streaming. " +"See PG::Connection#copy_data ." +msgstr "" + +#. type: Plain text +#: ../README.md:162 +#, markdown-text +msgid "The following base type maps are available:" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:168 +#, markdown-text +msgid "" +"PG::TypeMapAllStrings - encodes and decodes all values to and from strings " +"(default)" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:168 +#, markdown-text +msgid "" +"PG::TypeMapByClass - selects encoder based on the class of the value to be " +"sent" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:168 +#, markdown-text +msgid "PG::TypeMapByColumn - selects encoder and decoder by column order" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:168 +#, markdown-text +msgid "PG::TypeMapByOid - selects decoder by PostgreSQL type OID" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:168 +#, markdown-text +msgid "PG::TypeMapInRuby - define a custom type map in ruby" +msgstr "" + +#. type: Plain text +#: ../README.md:170 +#, markdown-text +msgid "" +"The following type maps are prefilled with type mappings from the " +"PG::BasicTypeRegistry :" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:174 +#, markdown-text +msgid "" +"PG::BasicTypeMapForResults - a PG::TypeMapByOid prefilled with decoders for " +"common PostgreSQL column types" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:174 +#, markdown-text +msgid "" +"PG::BasicTypeMapBasedOnResult - a PG::TypeMapByOid prefilled with encoders " +"for common PostgreSQL column types" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:174 +#, markdown-text +msgid "" +"PG::BasicTypeMapForQueries - a PG::TypeMapByClass prefilled with encoders " +"for common Ruby value classes" +msgstr "" + +#. type: Title ## +#: ../README.md:176 +#, markdown-text, no-wrap +msgid "Thread support" +msgstr "" + +#. type: Plain text +#: ../README.md:181 +#, markdown-text +msgid "" +"PG is thread safe in such a way that different threads can use different " +"PG::Connection objects concurrently. However it is not safe to access any " +"Pg objects simultaneously from more than one thread. So make sure to open a " +"new database server connection for every new thread or use a wrapper library " +"like ActiveRecord that manages connections in a thread safe way." +msgstr "" + +#. type: Plain text +#: ../README.md:183 +#, markdown-text +msgid "" +"If messages like the following are printed to stderr, you're probably using " +"one connection from several threads:" +msgstr "" + +#. type: Plain text +#: ../README.md:189 +#, markdown-text, no-wrap +msgid "" +" message type 0x31 arrived from server while idle\n" +" message type 0x32 arrived from server while idle\n" +" message type 0x54 arrived from server while idle\n" +" message type 0x43 arrived from server while idle\n" +" message type 0x5a arrived from server while idle\n" +msgstr "" + +#. type: Title ## +#: ../README.md:191 +#, markdown-text, no-wrap +msgid "Fiber IO scheduler support" +msgstr "" + +#. type: Plain text +#: ../README.md:198 +#, markdown-text +msgid "" +"Pg is fully compatible with `Fiber.scheduler` introduced in Ruby-3.0. On " +"Windows support for `Fiber.scheduler` is available on Ruby-3.1 or newer. " +"All possibly blocking IO operations are routed through the `Fiber.scheduler` " +"if one is registered for the running thread. That is why pg internally uses " +"the asynchronous libpq interface even for synchronous/blocking method " +"calls. It also uses Ruby's DNS resolution instead of libpq's builtin " +"functions." +msgstr "" + +#. type: Plain text +#: ../README.md:202 +#, markdown-text +msgid "" +"Internally Pg always uses the nonblocking connection mode of libpq. It then " +"behaves like running in blocking mode but ensures, that all blocking IO is " +"handled in Ruby through a possibly registered `Fiber.scheduler`. When " +"`PG::Connection.setnonblocking(true)` is called then the nonblocking state " +"stays enabled, but the additional handling of blocking states is disabled, " +"so that the calling program has to handle blocking states on its own." +msgstr "" + +#. type: Plain text +#: ../README.md:206 +#, markdown-text +msgid "" +"An exception to this rule are the methods for large objects like " +"`PG::Connection#lo_create` and authentication methods using external " +"libraries (like GSSAPI authentication). They are not compatible with " +"`Fiber.scheduler`, so that blocking states are not passed to the registered " +"IO scheduler. That means the operation will work properly, but IO waiting " +"states can not be used to switch to another Fiber doing IO." +msgstr "" + +#. type: Title ## +#: ../README.md:208 +#, markdown-text, no-wrap +msgid "Contributing" +msgstr "" + +#. type: Plain text +#: ../README.md:212 +#, markdown-text +msgid "" +"To report bugs, suggest features, or check out the source with Git, [check " +"out the project page](https://github.com/ged/ruby-pg)." +msgstr "" + +#. type: Plain text +#: ../README.md:214 +#, markdown-text +msgid "After checking out the source, install all dependencies:" +msgstr "" + +#. type: Plain text +#: ../README.md:216 +#, markdown-text, no-wrap +msgid " $ bundle install\n" +msgstr "" + +#. type: Plain text +#: ../README.md:218 +#, markdown-text +msgid "Cleanup extension files, packaging files, test databases:" +msgstr "" + +#. type: Plain text +#: ../README.md:220 +#, markdown-text, no-wrap +msgid " $ rake clean\n" +msgstr "" + +#. type: Plain text +#: ../README.md:222 +#, markdown-text +msgid "Compile extension:" +msgstr "" + +#. type: Plain text +#: ../README.md:224 +#, markdown-text, no-wrap +msgid " $ rake compile\n" +msgstr "" + +#. type: Plain text +#: ../README.md:226 +#, markdown-text +msgid "Run tests/specs with PostgreSQL tools like `initdb` in the path:" +msgstr "" + +#. type: Plain text +#: ../README.md:228 +#, markdown-text, no-wrap +msgid " $ PATH=$PATH:/usr/lib/postgresql/14/bin rake test\n" +msgstr "" + +#. type: Plain text +#: ../README.md:230 +#, markdown-text +msgid "Or run a specific test with the line number:" +msgstr "" + +#. type: Plain text +#: ../README.md:232 +#, markdown-text, no-wrap +msgid "" +" $ PATH=$PATH:/usr/lib/postgresql/14/bin rspec -Ilib -fd " +"spec/pg/connection_spec.rb:455\n" +msgstr "" + +#. type: Plain text +#: ../README.md:234 +#, markdown-text +msgid "Generate the API documentation:" +msgstr "" + +#. type: Plain text +#: ../README.md:236 +#, markdown-text, no-wrap +msgid " $ rake docs\n" +msgstr "" + +#. type: Plain text +#: ../README.md:238 +#, markdown-text +msgid "Make sure, that all bugs and new features are verified by tests." +msgstr "" + +#. type: Plain text +#: ../README.md:241 +#, markdown-text +msgid "" +"The current maintainers are Michael Granger and Lars " +"Kanis ." +msgstr "" + +#. type: Title ## +#: ../README.md:243 +#, markdown-text, no-wrap +msgid "Copying" +msgstr "" + +#. type: Plain text +#: ../README.md:246 +#, markdown-text +msgid "Copyright (c) 1997-2022 by the authors." +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:255 +#, markdown-text +msgid "Jeff Davis " +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:255 +#, markdown-text +msgid "Guy Decoux (ts) " +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:255 +#, markdown-text +msgid "Michael Granger " +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:255 +#, markdown-text +msgid "Lars Kanis " +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:255 +#, markdown-text +msgid "Dave Lee" +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:255 +#, markdown-text +msgid "Eiji Matsumoto " +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:255 +#, markdown-text +msgid "Yukihiro Matsumoto " +msgstr "" + +#. type: Bullet: '* ' +#: ../README.md:255 +#, markdown-text +msgid "Noboru Saitou " +msgstr "" + +#. type: Plain text +#: ../README.md:259 +#, markdown-text +msgid "" +"You may redistribute this software under the same terms as Ruby itself; see " +"https://www.ruby-lang.org/en/about/license.txt or the BSDL file in the " +"source for details." +msgstr "" + +#. type: Plain text +#: ../README.md:262 +#, markdown-text +msgid "" +"Portions of the code are from the PostgreSQL project, and are distributed " +"under the terms of the PostgreSQL license, included in the file POSTGRES." +msgstr "" + +#. type: Plain text +#: ../README.md:264 +#, markdown-text +msgid "Portions copyright LAIKA, Inc." +msgstr "" + +#. type: Title ## +#: ../README.md:266 +#, markdown-text, no-wrap +msgid "Acknowledgments" +msgstr "" + +#. type: Plain text +#: ../README.md:270 +#, markdown-text +msgid "" +"See Contributors.rdoc for the many additional fine people that have " +"contributed to this library over the years." +msgstr "" + +#. type: Plain text +#: ../README.md:272 +#, markdown-text +msgid "" +"We are thankful to the people at the ruby-list and ruby-dev mailing lists. " +"And to the people who developed PostgreSQL." +msgstr "" diff --git a/translation/po/ja.po b/translation/po/ja.po new file mode 100644 index 000000000..08dc81d1a --- /dev/null +++ b/translation/po/ja.po @@ -0,0 +1,868 @@ +# Pgの日本語訳 +# Copyright (C) 2023 gemmaro. +# +msgid "" +msgstr "" +"Project-Id-Version: Pg 1.4.5\n" +"POT-Creation-Date: 2023-02-23 22:20+0900\n" +"PO-Revision-Date: 2023-02-25 14:28+0900\n" +"Last-Translator: gemmaro \n" +"Language-Team: none\n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. type: Title # +#: ../README.md:1 +#, no-wrap +msgid "pg" +msgstr "pg" + +#. type: Plain text +#: ../README.md:6 +msgid "" +"home :: https://github.com/ged/ruby-pg docs :: http://deveiate.org/code/pg " +"clog :: link:/History.md" +msgstr "" +"home :: https://github.com/ged/ruby-pg\n" +"docs :: http://deveiate.org/code/pg\n" +"clog :: link:/History.md" + +#. type: Plain text +#: ../README.md:8 +msgid "" +"[![Join the chat at https://gitter.im/ged/ruby-pg](https://badges.gitter.im/" +"Join%20Chat.svg)](https://gitter.im/ged/ruby-pg?" +"utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)" +msgstr "[![https://gitter.im/ged/ruby-pg でチャットに参加](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ged/ruby-pg?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)" + +#. type: Title ## +#: ../README.md:10 +#, no-wrap +msgid "Description" +msgstr "説明" + +#. type: Plain text +#: ../README.md:14 +msgid "" +"Pg is the Ruby interface to the [PostgreSQL RDBMS](http://www.postgresql." +"org/). It works with [PostgreSQL 9.3 and later](http://www.postgresql.org/" +"support/versioning/)." +msgstr "Pgは[PostgreSQL RDBMS](http://www.postgresql.org/)へのRubyのインターフェースです。[PostgreSQL 9.3以降](http://www.postgresql.org/support/versioning/)で動作します。" + +#. type: Plain text +#: ../README.md:16 +msgid "A small example usage:" +msgstr "簡単な使用例は次の通りです。" + +#. type: Fenced code block (ruby) +#: ../README.md:16 +#, no-wrap +msgid "" +" #!/usr/bin/env ruby\n" +"\n" +" require 'pg'\n" +"\n" +" # Output a table of current connections to the DB\n" +" conn = PG.connect( dbname: 'sales' )\n" +" conn.exec( \"SELECT * FROM pg_stat_activity\" ) do |result|\n" +" puts \" PID | User | Query\"\n" +" result.each do |row|\n" +" puts \" %7d | %-16s | %s \" %\n" +" row.values_at('pid', 'usename', 'query')\n" +" end\n" +" end\n" +msgstr "" +" #!/usr/bin/env ruby\n" +"\n" +" require 'pg'\n" +"\n" +" # データベースへの現在の接続を表に出力します\n" +" conn = PG.connect( dbname: 'sales' )\n" +" conn.exec( \"SELECT * FROM pg_stat_activity\" ) do |result|\n" +" puts \" PID | User | Query\"\n" +" result.each do |row|\n" +" puts \" %7d | %-16s | %s \" %\n" +" row.values_at('pid', 'usename', 'query')\n" +" end\n" +" end\n" + +#. type: Title ## +#: ../README.md:32 +#, no-wrap +msgid "Build Status" +msgstr "ビルド状況" + +#. type: Plain text +#: ../README.md:37 +msgid "" +"[![Build Status Github Actions](https://github.com/ged/ruby-pg/actions/" +"workflows/source-gem.yml/badge.svg?branch=master)](https://github.com/ged/" +"ruby-pg/actions/workflows/source-gem.yml) [![Binary gems](https://github." +"com/ged/ruby-pg/actions/workflows/binary-gems.yml/badge.svg?branch=master)]" +"(https://github.com/ged/ruby-pg/actions/workflows/binary-gems.yml) [![Build " +"Status Appveyor](https://ci.appveyor.com/api/projects/status/" +"gjx5axouf3b1wicp?svg=true)](https://ci.appveyor.com/project/ged/ruby-" +"pg-9j8l3)" +msgstr "[![Github Actionsのビルド状況](https://github.com/ged/ruby-pg/actions/workflows/source-gem.yml/badge.svg?branch=master)](https://github.com/ged/ruby-pg/actions/workflows/source-gem.yml) [![バイナリgem](https://github.com/ged/ruby-pg/actions/workflows/binary-gems.yml/badge.svg?branch=master)](https://github.com/ged/ruby-pg/actions/workflows/binary-gems.yml) [![Appveyorのビルド状況](https://ci.appveyor.com/api/projects/status/gjx5axouf3b1wicp?svg=true)](https://ci.appveyor.com/project/ged/ruby-pg-9j8l3)" + +#. type: Title ## +#: ../README.md:39 +#, no-wrap +msgid "Requirements" +msgstr "要件" + +#. type: Bullet: '* ' +#: ../README.md:43 +msgid "Ruby 2.4 or newer" +msgstr "Ruby 2.4かそれより新しいバージョン" + +#. type: Bullet: '* ' +#: ../README.md:43 +msgid "PostgreSQL 9.3.x or later (with headers, -dev packages, etc)." +msgstr "" +"PostgreSQL 9.3.xかそれ以降のバージョン(ヘッダー付属のもの、例えば-devの名前" +"のパッケージ)。" + +#. type: Plain text +#: ../README.md:46 +msgid "" +"It usually works with earlier versions of Ruby/PostgreSQL as well, but those " +"are not regularly tested." +msgstr "" +"それより前のバージョンのRubyやPostgreSQLでも通常は同様に動作しますが、定期的" +"なテストはされていません。" + +#. type: Title ## +#: ../README.md:48 +#, no-wrap +msgid "Versioning" +msgstr "バージョン管理" + +#. type: Plain text +#: ../README.md:51 +msgid "" +"We tag and release gems according to the [Semantic Versioning](http://semver." +"org/) principle." +msgstr "[セマンティックバージョニング](http://semver.org/)の原則にしたがってgemをタグ付けしてリリースしています。" + +#. type: Plain text +#: ../README.md:53 +msgid "" +"As a result of this policy, you can (and should) specify a dependency on " +"this gem using the [Pessimistic Version Constraint](http://guides.rubygems." +"org/patterns/#pessimistic-version-constraint) with two digits of precision." +msgstr "この方針の結果として、2つの数字を指定する[悲観的バージョン制約](http://guides.rubygems.org/patterns/#pessimistic-version-constraint)を使ってこのgemへの依存関係を指定することができます(またそうすべきです)。" + +#. type: Plain text +#: ../README.md:55 +msgid "For example:" +msgstr "例えば次の通りです。" + +#. type: Fenced code block (ruby) +#: ../README.md:56 +#, no-wrap +msgid " spec.add_dependency 'pg', '~> 1.0'\n" +msgstr " spec.add_dependency 'pg', '~> 1.0'\n" + +#. type: Title ## +#: ../README.md:60 +#, no-wrap +msgid "How To Install" +msgstr "インストール方法" + +#. type: Plain text +#: ../README.md:63 +msgid "Install via RubyGems:" +msgstr "RubyGemsを経由してインストールするには以下とします。" + +#. type: Plain text +#: ../README.md:65 +#, no-wrap +msgid " gem install pg\n" +msgstr " gem install pg\n" + +#. type: Plain text +#: ../README.md:68 +msgid "" +"You may need to specify the path to the 'pg_config' program installed with " +"Postgres:" +msgstr "" +"Postgresと一緒にインストールされた'pg_config'プログラムへのパスを指定する必要" +"があるかもしれません。" + +#. type: Plain text +#: ../README.md:70 +#, no-wrap +msgid " gem install pg -- --with-pg-config=\n" +msgstr " gem install pg -- --with-pg-config=\n" + +#. type: Plain text +#: ../README.md:72 +msgid "" +"If you're installing via Bundler, you can provide compile hints like so:" +msgstr "" +"Bundlerを介してインストールした場合は次のようにコンパイルのためのヒントを与え" +"られます。" + +#. type: Plain text +#: ../README.md:74 +#, no-wrap +msgid " bundle config build.pg --with-pg-config=\n" +msgstr " bundle config build.pg --with-pg-config=\n" + +#. type: Plain text +#: ../README.md:77 +msgid "" +"See README-OS_X.rdoc for more information about installing under MacOS X, " +"and README-Windows.rdoc for Windows build/installation instructions." +msgstr "" +"MacOS Xへインストールする詳しい情報については README-OS_X.rdoc を、Windows用" +"のビルドやインストールの説明については README-Windows.rdoc を参照してくださ" +"い。" + +#. type: Plain text +#: ../README.md:81 +msgid "" +"There's also [a Google+ group](http://goo.gl/TFy1U) and a [mailing list]" +"(http://groups.google.com/group/ruby-pg) if you get stuck, or just want to " +"chat about something." +msgstr "詰まったときやただ何か喋りたいときのために[Google+グループ](http://goo.gl/TFy1U)と[メーリングリスト](http://groups.google.com/group/ruby-pg)もあります。" + +#. type: Plain text +#: ../README.md:85 +msgid "" +"If you want to install as a signed gem, the public certs of the gem signers " +"can be found in [the `certs` directory](https://github.com/ged/ruby-pg/tree/" +"master/certs) of the repository." +msgstr "署名されたgemとしてインストールしたい場合は、リポジトリの[`certs`ディレクトリ](https://github.com/ged/ruby-pg/tree/master/certs)にgemの署名をする公開証明書があります。" + +#. type: Title ## +#: ../README.md:87 +#, no-wrap +msgid "Type Casts" +msgstr "型変換" + +#. type: Plain text +#: ../README.md:93 +msgid "" +"Pg can optionally type cast result values and query parameters in Ruby or " +"native C code. This can speed up data transfers to and from the database, " +"because String allocations are reduced and conversions in (slower) Ruby code " +"can be omitted." +msgstr "" +"PgにはおまけとしてRubyとネイティブCコードにある結果の値やクエリ引数の型変換が" +"できます。\n" +"こうすることでデータベースとのデータの往来を加速させられますが、それは文字列" +"のアロケーションが減り、(より遅い)Rubyのコードでの変換部分が除かれるからで" +"す。" + +#. type: Plain text +#: ../README.md:95 +msgid "Very basic type casting can be enabled by:" +msgstr "とても基本的な型変換は次のようにできます。" + +#. type: Fenced code block (ruby) +#: ../README.md:95 +#, no-wrap +msgid "" +" conn.type_map_for_results = PG::BasicTypeMapForResults.new conn\n" +" # ... this works for result value mapping:\n" +" conn.exec(\"select 1, now(), '{2,3}'::int[]\").values\n" +" # => [[1, 2014-09-21 20:51:56 +0200, [2, 3]]]\n" +"\n" +" conn.type_map_for_queries = PG::BasicTypeMapForQueries.new conn\n" +" # ... and this for param value mapping:\n" +" conn.exec_params(\"SELECT $1::text, $2::text, $3::text\", [1, 1.23, [2,3]]).values\n" +" # => [[\"1\", \"1.2300000000000000E+00\", \"{2,3}\"]]\n" +msgstr "" +" conn.type_map_for_results = PG::BasicTypeMapForResults.new conn\n" +" # ……これは結果の値の対応付けに作用します。\n" +" conn.exec(\"select 1, now(), '{2,3}'::int[]\").values\n" +" # => [[1, 2014-09-21 20:51:56 +0200, [2, 3]]]\n" +"\n" +" conn.type_map_for_queries = PG::BasicTypeMapForQueries.new conn\n" +" # ……そしてこれは引数値の対応付けのためのものです。\n" +" conn.exec_params(\"SELECT $1::text, $2::text, $3::text\", [1, 1.23, [2,3]]).values\n" +" # => [[\"1\", \"1.2300000000000000E+00\", \"{2,3}\"]]\n" + +#. type: Plain text +#: ../README.md:109 +msgid "" +"But Pg's type casting is highly customizable. That's why it's divided into 2 " +"layers:" +msgstr "" +"しかしPgの型変換はかなり調整が効きます。2層に分かれているのがその理由です。" + +#. type: Title ### +#: ../README.md:110 +#, no-wrap +msgid "Encoders / Decoders (ext/pg_*coder.c, lib/pg/*coder.rb)" +msgstr "エンコーダーとデコーダー (ext/pg_*coder.c, lib/pg/*coder.rb)" + +#. type: Plain text +#: ../README.md:117 +msgid "" +"This is the lower layer, containing encoding classes that convert Ruby " +"objects for transmission to the DBMS and decoding classes to convert " +"received data back to Ruby objects. The classes are namespaced according to " +"their format and direction in PG::TextEncoder, PG::TextDecoder, PG::" +"BinaryEncoder and PG::BinaryDecoder." +msgstr "こちらはより低層で、DBMSへ転送するためにRubyのオブジェクトを変換するエンコーディングクラスと取得してきたデータをRubyのオブジェクトに変換し戻すデコーディングクラスが含まれています。クラスはそれぞれの形式によって名前空間PG::TextEncoder、PG::TextDecoder、PG::BinaryEncoder、そしてPG::BinaryDecoderに分かれています。" + +# 以下によるとcomposite typeは複合型と訳すのが良さそうです。 +# +# PostgreSQL 15.0文書 +# 第8章 データ型 +# 8.16. 複合型 +# https://pgsql-jp.github.io/current/html/rowtypes.html +# +# また、type OIDはOIDデータ型としました。 +# +# PostgreSQL 15.0文書 +# 第8章 データ型 +# 8.19. オブジェクト識別子データ型 +# https://pgsql-jp.github.io/current/html/datatype-oid.html +#. type: Plain text +#: ../README.md:123 +msgid "" +"It is possible to assign a type OID, format code (text or binary) and " +"optionally a name to an encoder or decoder object. It's also possible to " +"build composite types by assigning an element encoder/decoder. PG::Coder " +"objects can be used to set up a PG::TypeMap or alternatively to convert " +"single values to/from their string representation." +msgstr "エンコーダーないしデコーダーオブジェクトにOIDデータ型や形式コード(テキストないしバイナリ)や任意で名前を割り当てることができます。要素のエンコーダーないしデコーダーを割り当てることによって複合型を構築することもできます。PG::CoderオブジェクトはPG::TypeMapをセットアップしたりその代わりに単一の値と文字列表現とを相互に変換したりするのに使えます。" + +#. type: Plain text +#: ../README.md:125 +msgid "" +"The following PostgreSQL column types are supported by ruby-pg (TE = Text " +"Encoder, TD = Text Decoder, BE = Binary Encoder, BD = Binary Decoder):" +msgstr "ruby-pgでは以下のPostgreSQLカラム型に対応しています(TE = Text Encoder、TD = Text Decoder、BE = Binary Encoder、BD = Binary Decoder)。" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Integer: [TE](rdoc-ref:PG::TextEncoder::Integer), [TD](rdoc-ref:PG::" +"TextDecoder::Integer), [BD](rdoc-ref:PG::BinaryDecoder::Integer) 💡 No links? " +"Switch to [here](https://deveiate.org/code/pg/README_md.html#label-Type" +"+Casts) 💡" +msgstr "Integer: [TE](rdoc-ref:PG::TextEncoder::Integer)、[TD](rdoc-ref:PG::TextDecoder::Integer)、[BD](rdoc-ref:PG::BinaryDecoder::Integer) 💡 リンクがないでしょうか。[こちら](https://deveiate.org/code/pg/README_rdoc.html#label-Type+Casts)を代わりに見てください 💡" + +#. type: Bullet: ' * ' +#: ../README.md:143 +msgid "" +"BE: [Int2](rdoc-ref:PG::BinaryEncoder::Int2), [Int4](rdoc-ref:PG::" +"BinaryEncoder::Int4), [Int8](rdoc-ref:PG::BinaryEncoder::Int8)" +msgstr "BE: [Int2](rdoc-ref:PG::BinaryEncoder::Int2)、[Int4](rdoc-ref:PG::BinaryEncoder::Int4)、[Int8](rdoc-ref:PG::BinaryEncoder::Int8)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Float: [TE](rdoc-ref:PG::TextEncoder::Float), [TD](rdoc-ref:PG::TextDecoder::" +"Float), [BD](rdoc-ref:PG::BinaryDecoder::Float)" +msgstr "Float: [TE](rdoc-ref:PG::TextEncoder::Float)、[TD](rdoc-ref:PG::TextDecoder::Float)、[BD](rdoc-ref:PG::BinaryDecoder::Float)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Numeric: [TE](rdoc-ref:PG::TextEncoder::Numeric), [TD](rdoc-ref:PG::" +"TextDecoder::Numeric)" +msgstr "Numeric: [TE](rdoc-ref:PG::TextEncoder::Numeric)、[TD](rdoc-ref:PG::TextDecoder::Numeric)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Boolean: [TE](rdoc-ref:PG::TextEncoder::Boolean), [TD](rdoc-ref:PG::" +"TextDecoder::Boolean), [BE](rdoc-ref:PG::BinaryEncoder::Boolean), [BD](rdoc-" +"ref:PG::BinaryDecoder::Boolean)" +msgstr "Boolean: [TE](rdoc-ref:PG::TextEncoder::Boolean)、[TD](rdoc-ref:PG::TextDecoder::Boolean)、[BE](rdoc-ref:PG::BinaryEncoder::Boolean)、[BD](rdoc-ref:PG::BinaryDecoder::Boolean)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"String: [TE](rdoc-ref:PG::TextEncoder::String), [TD](rdoc-ref:PG::" +"TextDecoder::String), [BE](rdoc-ref:PG::BinaryEncoder::String), [BD](rdoc-" +"ref:PG::BinaryDecoder::String)" +msgstr "String: [TE](rdoc-ref:PG::TextEncoder::String)、[TD](rdoc-ref:PG::TextDecoder::String)、[BE](rdoc-ref:PG::BinaryEncoder::String)、[BD](rdoc-ref:PG::BinaryDecoder::String)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Bytea: [TE](rdoc-ref:PG::TextEncoder::Bytea), [TD](rdoc-ref:PG::TextDecoder::" +"Bytea), [BE](rdoc-ref:PG::BinaryEncoder::Bytea), [BD](rdoc-ref:PG::" +"BinaryDecoder::Bytea)" +msgstr "Bytea: [TE](rdoc-ref:PG::TextEncoder::Bytea)、[TD](rdoc-ref:PG::TextDecoder::Bytea)、[BE](rdoc-ref:PG::BinaryEncoder::Bytea)、[BD](rdoc-ref:PG::BinaryDecoder::Bytea)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Base64: [TE](rdoc-ref:PG::TextEncoder::ToBase64), [TD](rdoc-ref:PG::" +"TextDecoder::FromBase64), [BE](rdoc-ref:PG::BinaryEncoder::FromBase64), [BD]" +"(rdoc-ref:PG::BinaryDecoder::ToBase64)" +msgstr "Base64: [TE](rdoc-ref:PG::TextEncoder::ToBase64)、[TD](rdoc-ref:PG::TextDecoder::FromBase64)、[BE](rdoc-ref:PG::BinaryEncoder::FromBase64)、[BD](rdoc-ref:PG::BinaryDecoder::ToBase64)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "Timestamp:" +msgstr "Timestamp:" + +#. type: Bullet: ' * ' +#: ../README.md:143 +msgid "" +"TE: [local](rdoc-ref:PG::TextEncoder::TimestampWithoutTimeZone), [UTC](rdoc-" +"ref:PG::TextEncoder::TimestampUtc), [with-TZ](rdoc-ref:PG::TextEncoder::" +"TimestampWithTimeZone)" +msgstr "TE: [現地時間](rdoc-ref:PG::TextEncoder::TimestampWithoutTimeZone)、[UTC](rdoc-ref:PG::TextEncoder::TimestampUtc)、[タイムゾーン付き](rdoc-ref:PG::TextEncoder::TimestampWithTimeZone)" + +#. type: Bullet: ' * ' +#: ../README.md:143 +msgid "" +"TD: [local](rdoc-ref:PG::TextDecoder::TimestampLocal), [UTC](rdoc-ref:PG::" +"TextDecoder::TimestampUtc), [UTC-to-local](rdoc-ref:PG::TextDecoder::" +"TimestampUtcToLocal)" +msgstr "TD: [現地時間](rdoc-ref:PG::TextDecoder::TimestampLocal)、[UTC](rdoc-ref:PG::TextDecoder::TimestampUtc)、[UTCから現地時間へ](rdoc-ref:PG::TextDecoder::TimestampUtcToLocal)" + +#. type: Bullet: ' * ' +#: ../README.md:143 +msgid "" +"BD: [local](rdoc-ref:PG::BinaryDecoder::TimestampLocal), [UTC](rdoc-ref:PG::" +"BinaryDecoder::TimestampUtc), [UTC-to-local](rdoc-ref:PG::BinaryDecoder::" +"TimestampUtcToLocal)" +msgstr "BD: [現地時間](rdoc-ref:PG::BinaryDecoder::TimestampLocal)、[UTC](rdoc-ref:PG::BinaryDecoder::TimestampUtc)、[UTCから現地時間へ](rdoc-ref:PG::BinaryDecoder::TimestampUtcToLocal)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Date: [TE](rdoc-ref:PG::TextEncoder::Date), [TD](rdoc-ref:PG::TextDecoder::" +"Date)" +msgstr "Date: [TE](rdoc-ref:PG::TextEncoder::Date)、[TD](rdoc-ref:PG::TextDecoder::Date)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"JSON and JSONB: [TE](rdoc-ref:PG::TextEncoder::JSON), [TD](rdoc-ref:PG::" +"TextDecoder::JSON)" +msgstr "JSONとJSONB: [TE](rdoc-ref:PG::TextEncoder::JSON)、[TD](rdoc-ref:PG::TextDecoder::JSON)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Inet: [TE](rdoc-ref:PG::TextEncoder::Inet), [TD](rdoc-ref:PG::TextDecoder::" +"Inet)" +msgstr "Inet: [TE](rdoc-ref:PG::TextEncoder::Inet)、[TD](rdoc-ref:PG::TextDecoder::Inet)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Array: [TE](rdoc-ref:PG::TextEncoder::Array), [TD](rdoc-ref:PG::TextDecoder::" +"Array)" +msgstr "Array: [TE](rdoc-ref:PG::TextEncoder::Array)、[TD](rdoc-ref:PG::TextDecoder::Array)" + +#. type: Bullet: '* ' +#: ../README.md:143 +msgid "" +"Composite Type (also called \"Row\" or \"Record\"): [TE](rdoc-ref:PG::" +"TextEncoder::Record), [TD](rdoc-ref:PG::TextDecoder::Record)" +msgstr "複合型(「行」や「レコード」などとも言います):[TE](rdoc-ref:PG::TextEncoder::Record)、[TD](rdoc-ref:PG::TextDecoder::Record)" + +#. type: Plain text +#: ../README.md:145 +msgid "" +"The following text formats can also be encoded although they are not used as " +"column type:" +msgstr "" +"カラム型として使われていませんが以下のテキスト形式もエンコードできます。" + +#. type: Bullet: '* ' +#: ../README.md:149 +msgid "" +"COPY input and output data: [TE](rdoc-ref:PG::TextEncoder::CopyRow), [TD]" +"(rdoc-ref:PG::TextDecoder::CopyRow)" +msgstr "COPYの入出力データ:[TE](rdoc-ref:PG::TextEncoder::CopyRow)、[TD](rdoc-ref:PG::TextDecoder::CopyRow)" + +#. type: Bullet: '* ' +#: ../README.md:149 +msgid "" +"Literal for insertion into SQL string: [TE](rdoc-ref:PG::TextEncoder::" +"QuotedLiteral)" +msgstr "SQL文字列に挿入するリテラル:[TE](rdoc-ref:PG::TextEncoder::QuotedLiteral)" + +#. type: Bullet: '* ' +#: ../README.md:149 +msgid "" +"SQL-Identifier: [TE](rdoc-ref:PG::TextEncoder::Identifier), [TD](rdoc-ref:" +"PG::TextDecoder::Identifier)" +msgstr "SQLの識別子: [TE](rdoc-ref:PG::TextEncoder::Identifier)、[TD](rdoc-ref:PG::TextDecoder::Identifier)" + +#. type: Title ### +#: ../README.md:150 +#, no-wrap +msgid "PG::TypeMap and derivations (ext/pg_type_map*.c, lib/pg/type_map*.rb)" +msgstr "PG::TypeMapとその派生 (ext/pg_type_map*.c, lib/pg/type_map*.rb)" + +#. type: Plain text +#: ../README.md:156 +msgid "" +"A TypeMap defines which value will be converted by which encoder/decoder. " +"There are different type map strategies, implemented by several derivations " +"of this class. They can be chosen and configured according to the particular " +"needs for type casting. The default type map is PG::TypeMapAllStrings." +msgstr "" +"TypeMapはエンコーダーまたはデコーダーのどちらによってどの値を変換するかを定義" +"します。様々な型の対応付け戦略があるので、このクラスにはいくつかの派生が実装" +"されています。型変換の特有の需要に合わせてそれらの派生から選んで調整を加える" +"ことができます。既定の型の対応付けはPG::TypeMapAllStringsです。" + +#. type: Plain text +#: ../README.md:160 +msgid "" +"A type map can be assigned per connection or per query respectively per " +"result set. Type maps can also be used for COPY in and out data streaming. " +"See PG::Connection#copy_data ." +msgstr "" +"型の対応付けは、結果の集合それぞれに対し、接続毎ないしクエリ毎に割り当てるこ" +"とができます。型の対応付けはCOPYの入出力データストリーミングでも使うことがで" +"きます。PG::Connection#copy_dataを参照してください。" + +#. type: Plain text +#: ../README.md:162 +msgid "The following base type maps are available:" +msgstr "以下の基底となる型の対応付けが使えます。" + +#. type: Bullet: '* ' +#: ../README.md:168 +msgid "" +"PG::TypeMapAllStrings - encodes and decodes all values to and from strings " +"(default)" +msgstr "PG::TypeMapAllStrings - 全ての値と文字列について相互にエンコードとデコードを行います(既定)" + +#. type: Bullet: '* ' +#: ../README.md:168 +msgid "" +"PG::TypeMapByClass - selects encoder based on the class of the value to be " +"sent" +msgstr "" +"PG::TypeMapByClass - 送信する値のクラスに基づいてエンコーダーを選択します" + +#. type: Bullet: '* ' +#: ../README.md:168 +msgid "PG::TypeMapByColumn - selects encoder and decoder by column order" +msgstr "" +"PG::TypeMapByColumn - カラムの順番によってエンコーダーとデコーダーを選択しま" +"す" + +#. type: Bullet: '* ' +#: ../README.md:168 +msgid "PG::TypeMapByOid - selects decoder by PostgreSQL type OID" +msgstr "PG::TypeMapByOid - PostgreSQLのOIDデータ型によってデコーダーを選択します" + +#. type: Bullet: '* ' +#: ../README.md:168 +msgid "PG::TypeMapInRuby - define a custom type map in ruby" +msgstr "PG::TypeMapInRuby - Rubyで独自の型の対応付けを定義します" + +#. type: Plain text +#: ../README.md:170 +msgid "" +"The following type maps are prefilled with type mappings from the PG::" +"BasicTypeRegistry :" +msgstr "以下の型の対応付けはPG::BasicTypeRegistry由来の型の対応付けが入った状態になっています。" + +#. type: Bullet: '* ' +#: ../README.md:174 +msgid "" +"PG::BasicTypeMapForResults - a PG::TypeMapByOid prefilled with decoders for " +"common PostgreSQL column types" +msgstr "PG::BasicTypeMapForResults - PG::TypeMapByOidによくあるPostgreSQLカラム型用にデコーダーが入った状態になっています" + +#. type: Bullet: '* ' +#: ../README.md:174 +msgid "" +"PG::BasicTypeMapBasedOnResult - a PG::TypeMapByOid prefilled with encoders " +"for common PostgreSQL column types" +msgstr "PG::BasicTypeMapBasedOnResult - PG::TypeMapByOidによくあるPostgreSQLカラム型用のエンコーダーが入った状態になっています" + +#. type: Bullet: '* ' +#: ../README.md:174 +msgid "" +"PG::BasicTypeMapForQueries - a PG::TypeMapByClass prefilled with encoders " +"for common Ruby value classes" +msgstr "PG::BasicTypeMapForQueries - PG::TypeMapByClassによくあるRubyの値クラス用にエンコーダーが入った状態になっています" + +#. type: Title ## +#: ../README.md:176 +#, no-wrap +msgid "Thread support" +msgstr "スレッド対応" + +#. type: Plain text +#: ../README.md:181 +msgid "" +"PG is thread safe in such a way that different threads can use different PG::" +"Connection objects concurrently. However it is not safe to access any Pg " +"objects simultaneously from more than one thread. So make sure to open a " +"new database server connection for every new thread or use a wrapper library " +"like ActiveRecord that manages connections in a thread safe way." +msgstr "PGには個々のスレッドが別々のPG::Connectionオブジェクトを同時に使えるという点でスレッド安全性があります。しかし1つ以上のスレッドから同時にPgのオブジェクトにアクセスすると安全ではありません。そのため必ず、毎回新しいスレッドを作るときに新しいデータベースサーバー接続を開くか、スレッド安全性のある方法で接続を管理するActiveRecordのようなラッパーライブラリを使うようにしてください。" + +#. type: Plain text +#: ../README.md:183 +msgid "" +"If messages like the following are printed to stderr, you're probably using " +"one connection from several threads:" +msgstr "以下のようなメッセージが標準エラー出力に表示された場合、恐らく複数のスレッドが1つの接続を使っています。" + +#. type: Plain text +#: ../README.md:189 +#, no-wrap +msgid "" +" message type 0x31 arrived from server while idle\n" +" message type 0x32 arrived from server while idle\n" +" message type 0x54 arrived from server while idle\n" +" message type 0x43 arrived from server while idle\n" +" message type 0x5a arrived from server while idle\n" +msgstr "" +" message type 0x31 arrived from server while idle\n" +" message type 0x32 arrived from server while idle\n" +" message type 0x54 arrived from server while idle\n" +" message type 0x43 arrived from server while idle\n" +" message type 0x5a arrived from server while idle\n" + +#. type: Title ## +#: ../README.md:191 +#, no-wrap +msgid "Fiber IO scheduler support" +msgstr "Fiber IOスケジューラー対応" + +#. type: Plain text +#: ../README.md:198 +msgid "" +"Pg is fully compatible with `Fiber.scheduler` introduced in Ruby-3.0. On " +"Windows support for `Fiber.scheduler` is available on Ruby-3.1 or newer. " +"All possibly blocking IO operations are routed through the `Fiber.scheduler` " +"if one is registered for the running thread. That is why pg internally uses " +"the asynchronous libpq interface even for synchronous/blocking method " +"calls. It also uses Ruby's DNS resolution instead of libpq's builtin " +"functions." +msgstr "PgはRuby-3.0で導入された`Fiber.scheduler`に完全に対応しています。`Fiber.scheduler`のWindows対応についてはRuby-3.1以降で使えます。`Fiber.scheduler`が走らせているスレッドに登録されている場合、起こりうる全てのブロッキングIO操作はそのスケジューラーを経由します。同期的であったりブロックしたりするメソッド呼び出しについてもpgが内部的に非同期のlibpqインターフェースを使っているのはそれが理由です。またlibpqの組み込み関数に代えてRubyのDNS解決を使っています。" + +#. type: Plain text +#: ../README.md:202 +msgid "" +"Internally Pg always uses the nonblocking connection mode of libpq. It then " +"behaves like running in blocking mode but ensures, that all blocking IO is " +"handled in Ruby through a possibly registered `Fiber.scheduler`. When `PG::" +"Connection.setnonblocking(true)` is called then the nonblocking state stays " +"enabled, but the additional handling of blocking states is disabled, so that " +"the calling program has to handle blocking states on its own." +msgstr "内部的にPgは常にlibpqのノンブロッキング接続モードを使います。それからブロッキングモードで走っているように振舞いますが、もし`Fiber.scheduler`が登録されていれば全てのブロッキングIOはそのスケジューラーを通じてRubyで制御されます。`PG::Connection.setnonblocking(true)`が呼ばれたらノンブロッキング状態が有効になったままになりますが、それ以降のブロッキング状態の制御が無効になるので、呼び出しているプログラムはブロッキング状態を自力で制御しなければなりません。" + +#. type: Plain text +#: ../README.md:206 +msgid "" +"An exception to this rule are the methods for large objects like `PG::" +"Connection#lo_create` and authentication methods using external libraries " +"(like GSSAPI authentication). They are not compatible with `Fiber." +"scheduler`, so that blocking states are not passed to the registered IO " +"scheduler. That means the operation will work properly, but IO waiting " +"states can not be used to switch to another Fiber doing IO." +msgstr "この規則の1つの例外には、`PG::Connection#lo_create`や外部ライブラリを使う認証メソッド(GSSAPI認証など)のような、大きめのオブジェクト用のメソッドがあります。これらは`Fiber.scheduler`と互換性がないため、ブロッキング状態は登録されたIOスケジューラに渡されません。つまり操作は適切に実行されますが、IO待ち状態に別のIOを扱うFiberから使用を切り替えてくることができなくなります。" + +#. type: Title ## +#: ../README.md:208 +#, no-wrap +msgid "Contributing" +msgstr "貢献" + +#. type: Plain text +#: ../README.md:212 +msgid "" +"To report bugs, suggest features, or check out the source with Git, [check " +"out the project page](https://github.com/ged/ruby-pg)." +msgstr "バグを報告したり機能を提案したりGitでソースをチェックアウトしたりするには[プロジェクトページをご確認ください](https://github.com/ged/ruby-pg)。" + +#. type: Plain text +#: ../README.md:214 +msgid "After checking out the source, install all dependencies:" +msgstr "ソースをチェックアウトしたあとは全ての依存関係をインストールします。" + +#. type: Plain text +#: ../README.md:216 +#, no-wrap +msgid " $ bundle install\n" +msgstr " $ bundle install\n" + +#. type: Plain text +#: ../README.md:218 +msgid "Cleanup extension files, packaging files, test databases:" +msgstr "" +"拡張ファイル、パッケージファイル、テストデータベースを一掃するには次のように" +"します。" + +#. type: Plain text +#: ../README.md:220 +#, no-wrap +msgid " $ rake clean\n" +msgstr " $ rake clean\n" + +#. type: Plain text +#: ../README.md:222 +msgid "Compile extension:" +msgstr "拡張をコンパイルするには次のようにします。" + +#. type: Plain text +#: ../README.md:224 +#, no-wrap +msgid " $ rake compile\n" +msgstr " $ rake compile\n" + +#. type: Plain text +#: ../README.md:226 +msgid "Run tests/specs with PostgreSQL tools like `initdb` in the path:" +msgstr "" +"パスにある`initdb`といったPostgreSQLのツールを使ってテストやスペックを走らせ" +"るには次のようにします。" + +#. type: Plain text +#: ../README.md:228 +#, no-wrap +msgid " $ PATH=$PATH:/usr/lib/postgresql/14/bin rake test\n" +msgstr " $ PATH=$PATH:/usr/lib/postgresql/14/bin rake test\n" + +#. type: Plain text +#: ../README.md:230 +msgid "Or run a specific test with the line number:" +msgstr "あるいは行番号を使って特定のテストを走らせるには次のようにします。" + +#. type: Plain text +#: ../README.md:232 +#, no-wrap +msgid " $ PATH=$PATH:/usr/lib/postgresql/14/bin rspec -Ilib -fd spec/pg/connection_spec.rb:455\n" +msgstr " $ PATH=$PATH:/usr/lib/postgresql/14/bin rspec -Ilib -fd spec/pg/connection_spec.rb:455\n" + +#. type: Plain text +#: ../README.md:234 +msgid "Generate the API documentation:" +msgstr "APIドキュメントを生成するには次のようにします。" + +#. type: Plain text +#: ../README.md:236 +#, no-wrap +msgid " $ rake docs\n" +msgstr " $ rake docs\n" + +#. type: Plain text +#: ../README.md:238 +msgid "Make sure, that all bugs and new features are verified by tests." +msgstr "必ず全てのバグと新機能についてテストを使って検証してください。" + +#. type: Plain text +#: ../README.md:241 +msgid "" +"The current maintainers are Michael Granger and Lars " +"Kanis ." +msgstr "" +"現在のメンテナはMichael Granger とLars Kanis です。" + +#. type: Title ## +#: ../README.md:243 +#, no-wrap +msgid "Copying" +msgstr "著作権" + +#. type: Plain text +#: ../README.md:246 +msgid "Copyright (c) 1997-2022 by the authors." +msgstr "Copyright (c) 1997-2022 by the authors." + +#. type: Bullet: '* ' +#: ../README.md:255 +msgid "Jeff Davis " +msgstr "Jeff Davis " + +#. type: Bullet: '* ' +#: ../README.md:255 +msgid "Guy Decoux (ts) " +msgstr "Guy Decoux (ts) " + +#. type: Bullet: '* ' +#: ../README.md:255 +msgid "Michael Granger " +msgstr "Michael Granger " + +#. type: Bullet: '* ' +#: ../README.md:255 +msgid "Lars Kanis " +msgstr "Lars Kanis " + +#. type: Bullet: '* ' +#: ../README.md:255 +msgid "Dave Lee" +msgstr "Dave Lee" + +#. type: Bullet: '* ' +#: ../README.md:255 +msgid "Eiji Matsumoto " +msgstr "Eiji Matsumoto " + +#. type: Bullet: '* ' +#: ../README.md:255 +msgid "Yukihiro Matsumoto " +msgstr "Yukihiro Matsumoto " + +#. type: Bullet: '* ' +#: ../README.md:255 +msgid "Noboru Saitou " +msgstr "Noboru Saitou " + +#. type: Plain text +#: ../README.md:259 +msgid "" +"You may redistribute this software under the same terms as Ruby itself; see " +"https://www.ruby-lang.org/en/about/license.txt or the BSDL file in the " +"source for details." +msgstr "" +"You may redistribute this software under the same terms as Ruby itself; see https://www.ruby-lang.org/en/about/license.txt or the BSDL file in the source for details.\n" +"(参考訳:このソフトウェアはRuby自体と同じ条件の元で再配布することができます。詳細については https://www.ruby-lang.org/en/about/license.txt やソース中のBSDLファイルを参照してください)" + +#. type: Plain text +#: ../README.md:262 +msgid "" +"Portions of the code are from the PostgreSQL project, and are distributed " +"under the terms of the PostgreSQL license, included in the file POSTGRES." +msgstr "" +"Portions of the code are from the PostgreSQL project, and are distributed " +"\"\n" +"\"under the terms of the PostgreSQL license, included in the file POSTGRES.\n" +"(参考訳:コードの一部はPostgreSQLプロジェクトから来ており、PostgreSQLの使用" +"許諾の条件の元で配布されます。ファイルPOSTGRESに含まれています)" + +#. type: Plain text +#: ../README.md:264 +msgid "Portions copyright LAIKA, Inc." +msgstr "Portions copyright LAIKA, Inc." + +#. type: Title ## +#: ../README.md:266 +#, no-wrap +msgid "Acknowledgments" +msgstr "謝辞" + +#. type: Plain text +#: ../README.md:270 +msgid "" +"See Contributors.rdoc for the many additional fine people that have " +"contributed to this library over the years." +msgstr "長年にわたって貢献してくださった方々についてはContributors.rdocを参照してください。" + +#. type: Plain text +#: ../README.md:272 +msgid "" +"We are thankful to the people at the ruby-list and ruby-dev mailing lists. " +"And to the people who developed PostgreSQL." +msgstr "" +"ruby-listとruby-devメーリングリストの方々に感謝します。またPostgreSQLを開発さ" +"れた方々へも謝意を表します。" diff --git a/translation/po4a.cfg b/translation/po4a.cfg new file mode 100644 index 000000000..155167e1c --- /dev/null +++ b/translation/po4a.cfg @@ -0,0 +1,9 @@ +[po_directory] po + +[options] --master-charset UTF-8 \ + --localized-charset UTF-8 \ + --master-language en \ + --option markdown \ + --keep 0 + +[type:text] ../README.md ja:../README.ja.md