@@ -4,16 +4,18 @@ msgstr ""
4
4
"Project-Id-Version : mongodb-manual 3.2\n "
5
5
"Report-Msgid-Bugs-To : \n "
6
6
"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 "
10
8
"MIME-Version : 1.0\n "
11
9
"Content-Type : text/plain; charset=UTF-8\n "
12
10
"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 "
13
15
14
16
#: ../source/mongo.txt:3
15
17
msgid "The ``mongo`` Shell"
16
- msgstr " ``mongo`` shell"
18
+ msgstr "``mongo`` shell"
17
19
18
20
#: ../source/mongo.txt:0
19
21
msgid "On this page"
@@ -29,132 +31,169 @@ msgid ""
29
31
"MongoDB. You can use the :program:`mongo` shell to query and update data as "
30
32
"well as perform administrative operations."
31
33
msgstr ""
34
+ " :program:`mongo` shell是一个与MongoDB交互的JavaScript接口。你可以使用 :"
35
+ "program:`mongo` shell查询和更新数据以及执行管理操作。"
32
36
33
37
#: ../source/mongo.txt:20
34
38
msgid ""
35
39
"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."
39
43
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实例。"
40
47
41
48
#: ../source/mongo.txt:25
42
49
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."
46
53
msgstr ""
54
+ " :doc:`MongoDB Manual </index>` 中大多数示例使用 :program:`mongo` shell ;不"
55
+ "过,很多 :doc:`drivers </applications/drivers>` 也为MongoDB提供类似的接口。"
47
56
48
57
#: ../source/mongo.txt:30
49
58
msgid "Start the ``mongo`` Shell"
50
- msgstr ""
59
+ msgstr "开始 ``mongo`` Shell "
51
60
52
61
#: ../source/mongo.txt:33
53
62
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实例正在运行。 "
57
66
58
67
#: ../source/mongo.txt:36
59
68
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**:"
63
72
msgstr ""
73
+ "开始使用 :program:`mongo` shell连接到你运行在**localhost默认端口号**的"
74
+ "MongoDB实例。"
64
75
65
76
#: ../source/mongo.txt:40
66
77
msgid ""
67
78
"At a prompt in a terminal window (or a command prompt for Windows), go to "
68
79
"your ``<mongodb installation dir>``:"
69
80
msgstr ""
81
+ "在终端命窗口提示符(或Windows命令提示符)中,进入到你的Mongodb安装目录 "
82
+ "``<mongodb installation dir>``:"
70
83
71
84
#: ../source/mongo.txt:47
72
85
msgid "Type ``./bin/mongo`` to start :program:`mongo`:"
73
- msgstr ""
86
+ msgstr "输入``./bin/mongo``运行 :program:`mongo` 。 "
74
87
75
88
#: ../source/mongo.txt:53
76
89
msgid ""
77
90
"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``."
80
93
msgstr ""
94
+ "如果你已经添加``<mongodb 安装目录>/bin``到环境变量``PATH``中,则你只需直接输"
95
+ "入``mongo``。"
81
96
82
97
#: ../source/mongo.txt:58
83
98
msgid "Options"
84
- msgstr ""
99
+ msgstr "选项 "
85
100
86
101
#: ../source/mongo.txt:60
87
102
msgid ""
88
103
"When you run :program:`mongo` without any arguments, the :program:`mongo` "
89
104
"shell will attempt to connect to the MongoDB instance running on the "
90
105
"``localhost`` interface on port ``27017``. To specify a different host or "
91
106
"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."
94
109
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
+ "项的详细内容。"
95
115
96
116
#: ../source/mongo.txt:69
97
117
msgid "``.mongorc.js`` File"
98
- msgstr ""
118
+ msgstr "``.mongorc.js`` 文件 "
99
119
100
120
#: ../source/mongo.txt:71
101
121
msgid ""
102
122
"When starting, :program:`mongo` checks the user's :envvar:`HOME` directory "
103
123
"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``。"
112
141
113
142
#: ../source/mongo.txt:86
114
143
msgid "Working with the ``mongo`` Shell"
115
- msgstr ""
144
+ msgstr "使用``mongo`` Shell "
116
145
117
146
#: ../source/mongo.txt:88
118
147
msgid "To display the database you are using, type ``db``:"
119
- msgstr ""
148
+ msgstr "输入``db``,显示你当前正在使用的数据库: "
120
149
121
150
#: ../source/mongo.txt:94
122
151
msgid ""
123
152
"The operation should return ``test``, which is the default database. To "
124
153
"switch databases, issue the ``use <db>`` helper, as in the following "
125
154
"example:"
126
155
msgstr ""
156
+ "此操作将返回默认数据库``test``, 要切换数据库,使用``use <db>``,如下例所"
157
+ "示:"
127
158
128
159
#: ../source/mongo.txt:102
129
160
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 "
132
163
"current database without switching your current database context (i.e. "
133
164
"``db``)."
134
165
msgstr ""
166
+ "使用``show dbs``列出所有可用的数据库。要在不切换当前数据库上下文(即 db)情"
167
+ "况下,从当前数据库访问不同数据库,请参见 :method:`db.getSiblingDB()` 方法。"
135
168
136
169
#: ../source/mongo.txt:107
137
170
msgid ""
138
171
"You can switch to non-existing databases. When you first store data in the "
139
172
"database, such as by creating a collection, MongoDB creates the database. "
140
173
"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:"
143
176
msgstr ""
177
+ "你可以切换到一个不存在的数据库。当你第一次向数据库存储数据,如通过创建一个集"
178
+ "合,MongoDB将自动创建数据库。例如,当执行 :method:`~db.collection.insert()` "
179
+ "操作期间,数据库``myNewDatabase`` 和 :term:`collection` ``myCollection``都将"
180
+ "被创建。"
144
181
145
182
#: ../source/mongo.txt:118
146
183
msgid ""
147
184
"The :method:`db.myCollection.insert() <db.collection.insert()>` is one of "
148
185
"the :doc:`methods available in the mongo shell </reference/method>`"
149
186
msgstr ""
187
+ " :method:`db.myCollection.insert() <db.collection.insert()>` 方法是 :doc:"
188
+ "`methods available in the mongo shell </reference/method>` 之一"
150
189
151
190
#: ../source/mongo.txt:121
152
191
msgid "``db`` refers to the current database."
153
- msgstr ""
192
+ msgstr "``db``指当前数据库。 "
154
193
155
194
#: ../source/mongo.txt:123
156
195
msgid "``myCollection`` is the name of the collection."
157
- msgstr ""
196
+ msgstr "``myCollection``是集合的名称。 "
158
197
159
198
#: ../source/mongo.txt:125
160
199
msgid ""
@@ -163,12 +202,14 @@ msgid ""
163
202
"you can use an alternate syntax to refer to the collection, as in the "
164
203
"following:"
165
204
msgstr ""
205
+ "如果 :program:`mongo` shell不接受集合的名称,例如如果名称中包含空格,连字符"
206
+ "\" -\" ,或者以数字开始,你可以使用代替语法来指代集合,如下所示:"
166
207
167
208
#: ../source/mongo.txt:136
168
209
msgid ""
169
210
"For more documentation of basic MongoDB operations in the :program:`mongo` "
170
211
"shell, see:"
171
- msgstr ""
212
+ msgstr "更多 :program:`mongo` shell中的MongoDB基本操作请参看如下文档: "
172
213
173
214
#: ../source/mongo.txt:139 ../source/mongo.txt:240
174
215
msgid ":gettingstarted:`Getting Started Guide </shell>`"
@@ -196,7 +237,7 @@ msgstr ""
196
237
197
238
#: ../source/mongo.txt:147
198
239
msgid "Format Printed Results"
199
- msgstr ""
240
+ msgstr "格式化打印结果 "
200
241
201
242
#: ../source/mongo.txt:149
202
243
msgid ""
@@ -207,45 +248,54 @@ msgid ""
207
248
"that match the query. The :program:`mongo` shell will prompt ``Type it`` to "
208
249
"iterate another 20 times."
209
250
msgstr ""
251
+ " :method:`db.collection.find()` 方法返回一个 :term:`cursor` 到结果中;然而,"
252
+ "在 :program:`mongo` shell中,如果返回游标没有赋值给一个使用``var``关键字的变"
253
+ "量,那么游标将自动迭代20次打印前面20条符合查询条件的文档。 :program:`mongo` "
254
+ "shell 将提示``Type it``进行一下一个20条迭代输出。"
210
255
211
256
#: ../source/mongo.txt:156
212
257
msgid ""
213
258
"To format the printed result, you can add the ``.pretty()`` to the "
214
259
"operation, as in the following:"
215
- msgstr ""
260
+ msgstr "你可以在操作中添加``.pretty()``,以格式化打印结果,如下例所示: "
216
261
217
262
#: ../source/mongo.txt:163
218
263
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中使用下面的显式打印方法: "
222
267
223
268
#: ../source/mongo.txt:166
224
269
msgid "``print()`` to print without formatting"
225
- msgstr ""
270
+ msgstr "``print()`` 无格式打印 "
226
271
227
272
#: ../source/mongo.txt:168
228
273
msgid ""
229
274
"``print(tojson(<obj>))`` to print with :term:`JSON` formatting and "
230
275
"equivalent to ``printjson()``"
231
276
msgstr ""
277
+ "``print(tojson(<obj>))`` 用 :term:`JSON` 格式打印,等效于 ``printjson()``"
232
278
233
279
#: ../source/mongo.txt:171
234
280
msgid ""
235
281
"``printjson()`` to print with :term:`JSON` formatting and equivalent to "
236
282
"``print(tojson(<obj>))``"
237
283
msgstr ""
284
+ "``printjson()`` 用 :term:`JSON` 格式打印,等效于 ``print(tojson(<obj>))``"
238
285
239
286
#: ../source/mongo.txt:174
240
287
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."
244
291
msgstr ""
292
+ " :program:`mongo` shell中游标处理的更多详情和示例,请参看 :doc:`/tutorial/"
293
+ "iterate-a-cursor`。 :program:`mongo` shell中游标列表帮助文档参看 :ref:"
294
+ "`mongo-shell-help-cursor` 。"
245
295
246
296
#: ../source/mongo.txt:180
247
297
msgid "Multi-line Operations in the ``mongo`` Shell"
248
- msgstr ""
298
+ msgstr "``mongo`` Shell中的多行操作 "
249
299
250
300
#: ../source/mongo.txt:182
251
301
msgid ""
@@ -257,54 +307,66 @@ msgid ""
257
307
"closing brace, or the closing bracket before evaluating the code, as in the "
258
308
"following example:"
259
309
msgstr ""
310
+ "如果你的代码行以左括号 (``'('``),左大括号 (``'{'``)或左中括号 (``'['``) 结"
311
+ "束,那么随后的一行将以省略号 (``\" ...\" ``) 开始,直到你输入对应的右括号 "
312
+ "(``')'``),右大括号 (``'}'``)或右中括号 (``']'``) 。 :program:`mongo` shell"
313
+ "在执行代码以前将一直等待右括号,右大括号或右中括号,如下例所示:"
260
314
261
315
#: ../source/mongo.txt:197
262
316
msgid ""
263
317
"You can exit the line continuation mode if you enter two blank lines, as in "
264
318
"the following example:"
265
- msgstr ""
319
+ msgstr "你可以通过输入两行空白行以结束连续行模式,如下所示: "
266
320
267
321
#: ../source/mongo.txt:208
268
322
msgid "Tab Completion and Other Keyboard Shortcuts"
269
- msgstr ""
323
+ msgstr "Tab命令补全和其他键盘快捷键 "
270
324
271
325
#: ../source/mongo.txt:210
272
326
msgid "The :program:`mongo` shell supports keyboard shortcuts. For example,"
273
- msgstr ""
327
+ msgstr " :program:`mongo` shell支持键盘快捷键。例如, "
274
328
275
329
#: ../source/mongo.txt:212
276
330
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."
280
334
msgstr ""
335
+ "使用上/下箭头键在历史命令中进行切换。更多信息参见 :ref:`.dbshell <mongo-"
336
+ "dbshell-file>` 文档的``.dbshell``文件节。"
281
337
282
338
#: ../source/mongo.txt:216
283
339
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 "
286
342
"starting with the letter ``'c'``:"
287
343
msgstr ""
344
+ "使用 ``<Tab>`` 键自动补全或列出可能的补全命令,在下面的示例中,即是使用 "
345
+ "``<Tab>`` 键补全以字母 ``'c'`` 开始的方法名:"
288
346
289
347
#: ../source/mongo.txt:224
290
348
msgid ""
291
349
"Because there are many collection methods starting with the letter ``'c'``, "
292
350
"the ``<Tab>`` will list the various methods that start with ``'c'``."
293
351
msgstr ""
352
+ "由于Shell中有很多以字母``'c'``开始的集合方法,所以使用``<Tab>`` 补全后将列出"
353
+ "各种以``'c'``开头的方法。"
294
354
295
355
#: ../source/mongo.txt:228
296
356
msgid ""
297
357
"For a full list of the shortcuts, see :ref:`Shell Keyboard Shortcuts <mongo-"
298
358
"keyboard-shortcuts>`"
299
359
msgstr ""
360
+ "完整快捷键列表,请参看 :ref:`Shell Keyboard Shortcuts <mongo-keyboard-"
361
+ "shortcuts>`"
300
362
301
363
#: ../source/mongo.txt:234
302
364
msgid "Exit the Shell"
303
- msgstr ""
365
+ msgstr "退出Shell "
304
366
305
367
#: ../source/mongo.txt:236
306
368
msgid "To exit the shell, type ``quit()`` or use the ``<Ctrl-c>`` shortcut."
307
- msgstr ""
369
+ msgstr "输入``quit()``或使用``<Ctrl-c>``快捷方式退出Shell。 "
308
370
309
371
#: ../source/mongo.txt:241
310
372
msgid ":program:`mongo Reference Page <mongo>`"
0 commit comments