Skip to content

Commit 1ed18f1

Browse files
committed
mongodb#1206: Completed translation
1 parent f5c9b8e commit 1ed18f1

File tree

1 file changed

+123
-61
lines changed

1 file changed

+123
-61
lines changed

locale/zh/LC_MESSAGES/mongo.po

Lines changed: 123 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ msgstr ""
44
"Project-Id-Version: mongodb-manual 3.2\n"
55
"Report-Msgid-Bugs-To: \n"
66
"POT-Creation-Date: 2016-05-31 19:15-0400\n"
7-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9-
"Language-Team: LANGUAGE <[email protected]>\n"
7+
"PO-Revision-Date: 2016-07-06 08:51+0800\n"
108
"MIME-Version: 1.0\n"
119
"Content-Type: text/plain; charset=UTF-8\n"
1210
"Content-Transfer-Encoding: 8bit\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"X-Generator: Poedit 1.8.8\n"
14+
"Language: zh_CN\n"
1315

1416
#: ../source/mongo.txt:3
1517
msgid "The ``mongo`` Shell"
16-
msgstr " ``mongo`` shell"
18+
msgstr "``mongo`` shell"
1719

1820
#: ../source/mongo.txt:0
1921
msgid "On this page"
@@ -29,132 +31,169 @@ msgid ""
2931
"MongoDB. You can use the :program:`mongo` shell to query and update data as "
3032
"well as perform administrative operations."
3133
msgstr ""
34+
" :program:`mongo` shell是一个与MongoDB交互的JavaScript接口。你可以使用 :"
35+
"program:`mongo` shell查询和更新数据以及执行管理操作。"
3236

3337
#: ../source/mongo.txt:20
3438
msgid ""
3539
"The :program:`mongo` shell is a component of the `MongoDB distributions "
36-
"<http://www.mongodb.org/downloads>`_. Once you have :doc:`installed and have"
37-
" started MongoDB </installation>`, connect the :program:`mongo` shell to "
38-
"your running MongoDB instance."
40+
"<http://www.mongodb.org/downloads>`_. Once you have :doc:`installed and "
41+
"have started MongoDB </installation>`, connect the :program:`mongo` shell "
42+
"to your running MongoDB instance."
3943
msgstr ""
44+
" :program:`mongo` shell作为 `MongoDB distributions <http://www.mongodb.org/"
45+
"downloads>`_ 的一个组件。一旦你 :doc:`installed and have started MongoDB </"
46+
"installation>` ,即可以用 :program:`mongo` shell连接你运行的MongoDB实例。"
4047

4148
#: ../source/mongo.txt:25
4249
msgid ""
43-
"Most examples in the :doc:`MongoDB Manual </index>` use the :program:`mongo`"
44-
" shell; however, many :doc:`drivers </applications/drivers>` provide similar"
45-
" interfaces to MongoDB."
50+
"Most examples in the :doc:`MongoDB Manual </index>` use the :program:"
51+
"`mongo` shell; however, many :doc:`drivers </applications/drivers>` provide "
52+
"similar interfaces to MongoDB."
4653
msgstr ""
54+
" :doc:`MongoDB Manual </index>` 中大多数示例使用 :program:`mongo` shell ;不"
55+
"过,很多 :doc:`drivers </applications/drivers>` 也为MongoDB提供类似的接口。"
4756

4857
#: ../source/mongo.txt:30
4958
msgid "Start the ``mongo`` Shell"
50-
msgstr ""
59+
msgstr "开始 ``mongo`` Shell"
5160

5261
#: ../source/mongo.txt:33
5362
msgid ""
54-
"Ensure that MongoDB is running before attempting to start the "
55-
":program:`mongo` shell."
56-
msgstr ""
63+
"Ensure that MongoDB is running before attempting to start the :program:"
64+
"`mongo` shell."
65+
msgstr "在尝试启动 :program:`mongo` shell前请确保MongoDB实例正在运行。"
5766

5867
#: ../source/mongo.txt:36
5968
msgid ""
60-
"To start the :program:`mongo` shell and connect to your :doc:`MongoDB "
61-
"</reference/program/mongod>` instance running on **localhost** with "
62-
"**default port**:"
69+
"To start the :program:`mongo` shell and connect to your :doc:`MongoDB </"
70+
"reference/program/mongod>` instance running on **localhost** with **default "
71+
"port**:"
6372
msgstr ""
73+
"开始使用 :program:`mongo` shell连接到你运行在**localhost默认端口号**的"
74+
"MongoDB实例。"
6475

6576
#: ../source/mongo.txt:40
6677
msgid ""
6778
"At a prompt in a terminal window (or a command prompt for Windows), go to "
6879
"your ``<mongodb installation dir>``:"
6980
msgstr ""
81+
"在终端命窗口提示符(或Windows命令提示符)中,进入到你的Mongodb安装目录 "
82+
"``<mongodb installation dir>``:"
7083

7184
#: ../source/mongo.txt:47
7285
msgid "Type ``./bin/mongo`` to start :program:`mongo`:"
73-
msgstr ""
86+
msgstr "输入``./bin/mongo``运行 :program:`mongo` 。"
7487

7588
#: ../source/mongo.txt:53
7689
msgid ""
7790
"If you have added the ``<mongodb installation dir>/bin`` to the ``PATH`` "
78-
"environment variable, you can just type ``mongo`` instead of "
79-
"``./bin/mongo``."
91+
"environment variable, you can just type ``mongo`` instead of ``./bin/"
92+
"mongo``."
8093
msgstr ""
94+
"如果你已经添加``<mongodb 安装目录>/bin``到环境变量``PATH``中,则你只需直接输"
95+
"入``mongo``。"
8196

8297
#: ../source/mongo.txt:58
8398
msgid "Options"
84-
msgstr ""
99+
msgstr "选项"
85100

86101
#: ../source/mongo.txt:60
87102
msgid ""
88103
"When you run :program:`mongo` without any arguments, the :program:`mongo` "
89104
"shell will attempt to connect to the MongoDB instance running on the "
90105
"``localhost`` interface on port ``27017``. To specify a different host or "
91106
"port number, as well as other options, see :ref:`examples of starting up "
92-
"mongo <mongo-usage-examples>` and :doc:`mongo reference "
93-
"</reference/program/mongo>` which provides details on the available options."
107+
"mongo <mongo-usage-examples>` and :doc:`mongo reference </reference/program/"
108+
"mongo>` which provides details on the available options."
94109
msgstr ""
110+
"如果你不带任何参数运行 :program:`mongo` , :program:`mongo` shell将尝试连接"
111+
"运行在``localhost``上端口号为``27017``的MongoDB实例。要指定不同的主机或端口"
112+
"号,以及其他选项,请参看 :ref:`examples of starting up mongo <mongo-usage-"
113+
"examples>` 与 :doc:`mongo reference </reference/program/mongo>` 提供的可用选"
114+
"项的详细内容。"
95115

96116
#: ../source/mongo.txt:69
97117
msgid "``.mongorc.js`` File"
98-
msgstr ""
118+
msgstr "``.mongorc.js`` 文件"
99119

100120
#: ../source/mongo.txt:71
101121
msgid ""
102122
"When starting, :program:`mongo` checks the user's :envvar:`HOME` directory "
103123
"for a JavaScript file named :ref:`.mongorc.js <mongo-mongorc-file>`. If "
104-
"found, :program:`mongo` interprets the content of :file:`.mongorc.js` before"
105-
" displaying the prompt for the first time. If you use the shell to evaluate "
106-
"a JavaScript file or expression, either by using the :option:`--eval <mongo "
107-
"--eval>` option on the command line or by specifying :ref:`a .js file to "
108-
"mongo <mongo-shell-file>`, :program:`mongo` will read the ``.mongorc.js`` "
109-
"file *after* the JavaScript has finished processing. You can prevent "
110-
"``.mongorc.js`` from being loaded by using the :option:`--norc` option."
111-
msgstr ""
124+
"found, :program:`mongo` interprets the content of :file:`.mongorc.js` "
125+
"before displaying the prompt for the first time. If you use the shell to "
126+
"evaluate a JavaScript file or expression, either by using the :option:`--"
127+
"eval <mongo --eval>` option on the command line or by specifying :ref:`a ."
128+
"js file to mongo <mongo-shell-file>`, :program:`mongo` will read the ``."
129+
"mongorc.js`` file *after* the JavaScript has finished processing. You can "
130+
"prevent ``.mongorc.js`` from being loaded by using the :option:`--norc` "
131+
"option."
132+
msgstr ""
133+
"Shell开始运行时, :program:`mongo` 将在用户 :envvar:`HOME` 目录下检查名为 :"
134+
"ref:`.mongorc.js <mongo-mongorc-file>` 的JavaScript文件。如果找到, :"
135+
"program:`mongo` 将在首次命令行显示之前解释执行 :file:`.mongorc.js` 的内容。"
136+
"如果你使用shell执行一个JavaScript或表达式,无论是通过命令行使用 :option:`--"
137+
"eval <mongo --eval>` 选项,或通过指定 :ref:`a .js file to mongo <mongo-"
138+
"shell-file>` , :program:`mongo` 都将在JavaScript 处理完成 *之后* 读取 ``."
139+
"mongorc.js``文件。你可以通过使用 :option:`--norc` 选项禁止加载``.mongorc."
140+
"js``。"
112141

113142
#: ../source/mongo.txt:86
114143
msgid "Working with the ``mongo`` Shell"
115-
msgstr ""
144+
msgstr "使用``mongo`` Shell"
116145

117146
#: ../source/mongo.txt:88
118147
msgid "To display the database you are using, type ``db``:"
119-
msgstr ""
148+
msgstr "输入``db``,显示你当前正在使用的数据库:"
120149

121150
#: ../source/mongo.txt:94
122151
msgid ""
123152
"The operation should return ``test``, which is the default database. To "
124153
"switch databases, issue the ``use <db>`` helper, as in the following "
125154
"example:"
126155
msgstr ""
156+
"此操作将返回默认数据库``test``, 要切换数据库,使用``use <db>``,如下例所"
157+
"示:"
127158

128159
#: ../source/mongo.txt:102
129160
msgid ""
130-
"To list the available databases, use the helper ``show dbs``. See also "
131-
":method:`db.getSiblingDB()` method to access a different database from the "
161+
"To list the available databases, use the helper ``show dbs``. See also :"
162+
"method:`db.getSiblingDB()` method to access a different database from the "
132163
"current database without switching your current database context (i.e. "
133164
"``db``)."
134165
msgstr ""
166+
"使用``show dbs``列出所有可用的数据库。要在不切换当前数据库上下文(即 db)情"
167+
"况下,从当前数据库访问不同数据库,请参见 :method:`db.getSiblingDB()` 方法。"
135168

136169
#: ../source/mongo.txt:107
137170
msgid ""
138171
"You can switch to non-existing databases. When you first store data in the "
139172
"database, such as by creating a collection, MongoDB creates the database. "
140173
"For example, the following creates both the database ``myNewDatabase`` and "
141-
"the :term:`collection` ``myCollection`` during the "
142-
":method:`~db.collection.insert()` operation:"
174+
"the :term:`collection` ``myCollection`` during the :method:`~db.collection."
175+
"insert()` operation:"
143176
msgstr ""
177+
"你可以切换到一个不存在的数据库。当你第一次向数据库存储数据,如通过创建一个集"
178+
"合,MongoDB将自动创建数据库。例如,当执行 :method:`~db.collection.insert()` "
179+
"操作期间,数据库``myNewDatabase`` 和 :term:`collection` ``myCollection``都将"
180+
"被创建。"
144181

145182
#: ../source/mongo.txt:118
146183
msgid ""
147184
"The :method:`db.myCollection.insert() <db.collection.insert()>` is one of "
148185
"the :doc:`methods available in the mongo shell </reference/method>`"
149186
msgstr ""
187+
" :method:`db.myCollection.insert() <db.collection.insert()>` 方法是 :doc:"
188+
"`methods available in the mongo shell </reference/method>` 之一"
150189

151190
#: ../source/mongo.txt:121
152191
msgid "``db`` refers to the current database."
153-
msgstr ""
192+
msgstr "``db``指当前数据库。"
154193

155194
#: ../source/mongo.txt:123
156195
msgid "``myCollection`` is the name of the collection."
157-
msgstr ""
196+
msgstr "``myCollection``是集合的名称。"
158197

159198
#: ../source/mongo.txt:125
160199
msgid ""
@@ -163,12 +202,14 @@ msgid ""
163202
"you can use an alternate syntax to refer to the collection, as in the "
164203
"following:"
165204
msgstr ""
205+
"如果 :program:`mongo` shell不接受集合的名称,例如如果名称中包含空格,连字符"
206+
"\"-\",或者以数字开始,你可以使用代替语法来指代集合,如下所示:"
166207

167208
#: ../source/mongo.txt:136
168209
msgid ""
169210
"For more documentation of basic MongoDB operations in the :program:`mongo` "
170211
"shell, see:"
171-
msgstr ""
212+
msgstr "更多 :program:`mongo` shell中的MongoDB基本操作请参看如下文档:"
172213

173214
#: ../source/mongo.txt:139 ../source/mongo.txt:240
174215
msgid ":gettingstarted:`Getting Started Guide </shell>`"
@@ -196,7 +237,7 @@ msgstr ""
196237

197238
#: ../source/mongo.txt:147
198239
msgid "Format Printed Results"
199-
msgstr ""
240+
msgstr "格式化打印结果"
200241

201242
#: ../source/mongo.txt:149
202243
msgid ""
@@ -207,45 +248,54 @@ msgid ""
207248
"that match the query. The :program:`mongo` shell will prompt ``Type it`` to "
208249
"iterate another 20 times."
209250
msgstr ""
251+
" :method:`db.collection.find()` 方法返回一个 :term:`cursor` 到结果中;然而,"
252+
"在 :program:`mongo` shell中,如果返回游标没有赋值给一个使用``var``关键字的变"
253+
"量,那么游标将自动迭代20次打印前面20条符合查询条件的文档。 :program:`mongo` "
254+
"shell 将提示``Type it``进行一下一个20条迭代输出。"
210255

211256
#: ../source/mongo.txt:156
212257
msgid ""
213258
"To format the printed result, you can add the ``.pretty()`` to the "
214259
"operation, as in the following:"
215-
msgstr ""
260+
msgstr "你可以在操作中添加``.pretty()``,以格式化打印结果,如下例所示:"
216261

217262
#: ../source/mongo.txt:163
218263
msgid ""
219-
"In addition, you can use the following explicit print methods in the "
220-
":program:`mongo` shell:"
221-
msgstr ""
264+
"In addition, you can use the following explicit print methods in the :"
265+
"program:`mongo` shell:"
266+
msgstr "此外,你可以在 :program:`mongo` shell中使用下面的显式打印方法:"
222267

223268
#: ../source/mongo.txt:166
224269
msgid "``print()`` to print without formatting"
225-
msgstr ""
270+
msgstr "``print()`` 无格式打印"
226271

227272
#: ../source/mongo.txt:168
228273
msgid ""
229274
"``print(tojson(<obj>))`` to print with :term:`JSON` formatting and "
230275
"equivalent to ``printjson()``"
231276
msgstr ""
277+
"``print(tojson(<obj>))`` 用 :term:`JSON` 格式打印,等效于 ``printjson()``"
232278

233279
#: ../source/mongo.txt:171
234280
msgid ""
235281
"``printjson()`` to print with :term:`JSON` formatting and equivalent to "
236282
"``print(tojson(<obj>))``"
237283
msgstr ""
284+
"``printjson()`` 用 :term:`JSON` 格式打印,等效于 ``print(tojson(<obj>))``"
238285

239286
#: ../source/mongo.txt:174
240287
msgid ""
241-
"For more information and examples on cursor handling in the :program:`mongo`"
242-
" shell, see :doc:`/tutorial/iterate-a-cursor`. See also :ref:`mongo-shell-"
243-
"help-cursor` for list of cursor help in the :program:`mongo` shell."
288+
"For more information and examples on cursor handling in the :program:"
289+
"`mongo` shell, see :doc:`/tutorial/iterate-a-cursor`. See also :ref:`mongo-"
290+
"shell-help-cursor` for list of cursor help in the :program:`mongo` shell."
244291
msgstr ""
292+
" :program:`mongo` shell中游标处理的更多详情和示例,请参看 :doc:`/tutorial/"
293+
"iterate-a-cursor`。 :program:`mongo` shell中游标列表帮助文档参看 :ref:"
294+
"`mongo-shell-help-cursor` 。"
245295

246296
#: ../source/mongo.txt:180
247297
msgid "Multi-line Operations in the ``mongo`` Shell"
248-
msgstr ""
298+
msgstr "``mongo`` Shell中的多行操作"
249299

250300
#: ../source/mongo.txt:182
251301
msgid ""
@@ -257,54 +307,66 @@ msgid ""
257307
"closing brace, or the closing bracket before evaluating the code, as in the "
258308
"following example:"
259309
msgstr ""
310+
"如果你的代码行以左括号 (``'('``),左大括号 (``'{'``)或左中括号 (``'['``) 结"
311+
"束,那么随后的一行将以省略号 (``\"...\"``) 开始,直到你输入对应的右括号 "
312+
"(``')'``),右大括号 (``'}'``)或右中括号 (``']'``) 。 :program:`mongo` shell"
313+
"在执行代码以前将一直等待右括号,右大括号或右中括号,如下例所示:"
260314

261315
#: ../source/mongo.txt:197
262316
msgid ""
263317
"You can exit the line continuation mode if you enter two blank lines, as in "
264318
"the following example:"
265-
msgstr ""
319+
msgstr "你可以通过输入两行空白行以结束连续行模式,如下所示:"
266320

267321
#: ../source/mongo.txt:208
268322
msgid "Tab Completion and Other Keyboard Shortcuts"
269-
msgstr ""
323+
msgstr "Tab命令补全和其他键盘快捷键"
270324

271325
#: ../source/mongo.txt:210
272326
msgid "The :program:`mongo` shell supports keyboard shortcuts. For example,"
273-
msgstr ""
327+
msgstr " :program:`mongo` shell支持键盘快捷键。例如,"
274328

275329
#: ../source/mongo.txt:212
276330
msgid ""
277-
"Use the up/down arrow keys to scroll through command history. See "
278-
":ref:`.dbshell <mongo-dbshell-file>` documentation for more information on "
279-
"the ``.dbshell`` file."
331+
"Use the up/down arrow keys to scroll through command history. See :ref:`."
332+
"dbshell <mongo-dbshell-file>` documentation for more information on the ``."
333+
"dbshell`` file."
280334
msgstr ""
335+
"使用上/下箭头键在历史命令中进行切换。更多信息参见 :ref:`.dbshell <mongo-"
336+
"dbshell-file>` 文档的``.dbshell``文件节。"
281337

282338
#: ../source/mongo.txt:216
283339
msgid ""
284-
"Use ``<Tab>`` to autocomplete or to list the completion possibilities, as in"
285-
" the following example which uses ``<Tab>`` to complete the method name "
340+
"Use ``<Tab>`` to autocomplete or to list the completion possibilities, as "
341+
"in the following example which uses ``<Tab>`` to complete the method name "
286342
"starting with the letter ``'c'``:"
287343
msgstr ""
344+
"使用 ``<Tab>`` 键自动补全或列出可能的补全命令,在下面的示例中,即是使用 "
345+
"``<Tab>`` 键补全以字母 ``'c'`` 开始的方法名:"
288346

289347
#: ../source/mongo.txt:224
290348
msgid ""
291349
"Because there are many collection methods starting with the letter ``'c'``, "
292350
"the ``<Tab>`` will list the various methods that start with ``'c'``."
293351
msgstr ""
352+
"由于Shell中有很多以字母``'c'``开始的集合方法,所以使用``<Tab>`` 补全后将列出"
353+
"各种以``'c'``开头的方法。"
294354

295355
#: ../source/mongo.txt:228
296356
msgid ""
297357
"For a full list of the shortcuts, see :ref:`Shell Keyboard Shortcuts <mongo-"
298358
"keyboard-shortcuts>`"
299359
msgstr ""
360+
"完整快捷键列表,请参看 :ref:`Shell Keyboard Shortcuts <mongo-keyboard-"
361+
"shortcuts>`"
300362

301363
#: ../source/mongo.txt:234
302364
msgid "Exit the Shell"
303-
msgstr ""
365+
msgstr "退出Shell"
304366

305367
#: ../source/mongo.txt:236
306368
msgid "To exit the shell, type ``quit()`` or use the ``<Ctrl-c>`` shortcut."
307-
msgstr ""
369+
msgstr "输入``quit()``或使用``<Ctrl-c>``快捷方式退出Shell。"
308370

309371
#: ../source/mongo.txt:241
310372
msgid ":program:`mongo Reference Page <mongo>`"

0 commit comments

Comments
 (0)