Skip to content

Commit b32bd54

Browse files
committed
Issue mongodb#51: Completed test translation
1 parent a0aac6d commit b32bd54

File tree

1 file changed

+44
-14
lines changed

1 file changed

+44
-14
lines changed

locale/zh/LC_MESSAGES/tutorial/insert-documents.po

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,54 +13,61 @@ msgstr ""
1313

1414
#: ../source/tutorial/insert-documents.txt:3
1515
msgid "Insert Documents"
16-
msgstr ""
16+
msgstr "插入文档"
1717

1818
#: ../source/tutorial/insert-documents.txt:7
1919
msgid ""
2020
"In MongoDB, the :method:`db.collection.insert()` method adds new documents "
2121
"into a collection."
2222
msgstr ""
23+
"在MongoDB中,我们使用 :method:`db.collection.insert()` 方法向集合里面添加新文档。"
2324

2425
#: ../source/tutorial/insert-documents.txt:11
2526
msgid "Insert a Document"
26-
msgstr ""
27+
msgstr "插入一个文档"
2728

2829
#: ../source/includes/steps/getting-started-insert.rst:8
2930
msgid "Insert a document into a collection."
30-
msgstr ""
31+
msgstr "插入一个文档到集合中。"
3132

3233
#: ../source/includes/steps/getting-started-insert.rst:11
3334
msgid ""
3435
"Insert a document into a collection named ``inventory``. The operation will "
3536
"create the collection if the collection does not currently exist."
3637
msgstr ""
38+
"以下示例向名为``inventory``的集合中插入一个文档。若该集合不存在,此方法将创建该集合。"
3739

3840
#: ../source/includes/steps/getting-started-insert.rst:31
3941
msgid ""
4042
"The operation returns a :method:`WriteResult` object with the status of the "
4143
"operation. A successful insert of the document returns the following object:"
4244
msgstr ""
45+
"此操作返回一个带有操作状态的 :method:`WriteResult` 对象。"
46+
"文档插入成功将返回如下对象:"
4347

4448
#: ../source/includes/steps/getting-started-insert.rst:41
4549
msgid ""
4650
"The :data:`~WriteResult.nInserted` field specifies the number of documents "
4751
"inserted. If the operation encounters an error, the :method:`WriteResult` "
4852
"object will contain the error information."
4953
msgstr ""
54+
":data:`~WriteResult.nInserted` 字段指定了插入文档的个数。如果操作过程中遭遇错误,"
55+
":method:`WriteResult` 对象将包含错误信息。"
5056

5157
#: ../source/includes/steps/getting-started-insert.rst:57
5258
msgid "Review the inserted document."
53-
msgstr ""
59+
msgstr "查看插入的文档。"
5460

5561
#: ../source/includes/steps/getting-started-insert.rst:60
5662
msgid ""
5763
"If the insert operation is successful, verify the insertion by querying the "
5864
"collection."
5965
msgstr ""
66+
"如果插入操作成功,通过查询该集合验证插入结果。"
6067

6168
#: ../source/includes/steps/getting-started-insert.rst:69
6269
msgid "The document you inserted should return."
63-
msgstr ""
70+
msgstr "将返回你插入的文档。"
6471

6572
#: ../source/includes/steps/getting-started-insert.rst:77
6673
msgid ""
@@ -70,36 +77,42 @@ msgid ""
7077
":manual:`ObjectId </reference/object-id>`. The :manual:`ObjectId </reference"
7178
"/object-id>` values in your documents will differ from the ones shown."
7279
msgstr ""
80+
"在返回文档中可以看到,MongoDB 向文档中添加了一个 ``_id`` 字段。"
81+
"如果客户端插入文档不包含 ``_id`` 字段,MongoDB服务器将自动添加该字段并设置其值为 :manual:`ObjectId </reference/object-id>`。"
82+
"你的文档中的 :manual:`ObjectId </reference/object-id>` 值会和以上显示的不同。"
7383

7484
#: ../source/tutorial/insert-documents.txt:16
7585
msgid "Insert an Array of Documents"
76-
msgstr ""
86+
msgstr "插入文档数组"
7787

7888
#: ../source/tutorial/insert-documents.txt:18
7989
msgid ""
8090
"You can pass an array of documents to the :method:`db.collection.insert()` "
8191
"method to insert multiple documents."
8292
msgstr ""
93+
"你可以通过传递文档数组到方法 :method:`db.collection.insert()` 的方式插入多个文档。"
8394

8495
#: ../source/includes/steps/getting-started-insert-an-array.rst:8
8596
msgid "Create an array of documents."
86-
msgstr ""
97+
msgstr "创建文档数组。"
8798

8899
#: ../source/includes/steps/getting-started-insert-an-array.rst:11
89100
msgid ""
90101
"Define a variable ``mydocuments`` that holds an array of documents to "
91102
"insert."
92103
msgstr ""
104+
"定义变量 ``mydocuments`` 用于保存待插入的文档数组。"
93105

94106
#: ../source/includes/steps/getting-started-insert-an-array.rst:51
95107
msgid "Insert the documents."
96-
msgstr ""
108+
msgstr "插入所有文档。"
97109

98110
#: ../source/includes/steps/getting-started-insert-an-array.rst:54
99111
msgid ""
100112
"Pass the ``mydocuments`` array to the :method:`db.collection.insert()` to "
101113
"perform a bulk insert."
102114
msgstr ""
115+
"传递数组 ``mydocuments`` 到方法 :method:`db.collection.insert()` 执行批量插入。"
103116

104117
#: ../source/includes/steps/getting-started-insert-an-array.rst:63
105118
#: ../source/includes/steps/getting-started-insert-bulk.rst:92
@@ -108,6 +121,8 @@ msgid ""
108121
" operation. A successful insert of the documents returns the following "
109122
"object:"
110123
msgstr ""
124+
"该方法返回包含操作状态的 :method:`BulkWriteResult` 对象。"
125+
"若插入成功将返回如下对象:"
111126

112127
#: ../source/includes/steps/getting-started-insert-an-array.rst:82
113128
#: ../source/includes/steps/getting-started-insert-bulk.rst:111
@@ -117,15 +132,18 @@ msgid ""
117132
":method:`BulkWriteResult` object will contain information regarding the "
118133
"error."
119134
msgstr ""
135+
":data:`~BulkWriteResult.nInserted` 字段表示已插入文档数。如果操作中遇到错误,:method:`BulkWriteResult` "
136+
"对象将包含错误的有关信息。"
120137

121138
#: ../source/includes/steps/getting-started-insert-an-array.rst:87
122139
msgid ""
123140
"The inserted documents will each have an ``_id`` field added by MongoDB."
124141
msgstr ""
142+
"每个插入的文档都将包含MongoDB自动添加的``_id``字段。"
125143

126144
#: ../source/tutorial/insert-documents.txt:24
127145
msgid "Insert Multiple Documents with ``Bulk``"
128-
msgstr ""
146+
msgstr "用``Bulk``插入多个文档"
129147

130148
#: ../source/tutorial/insert-documents.txt:28
131149
msgid ""
@@ -134,16 +152,19 @@ msgid ""
134152
"how you would use the :method:`Bulk()` API to insert a group of documents "
135153
"into a MongoDB collection."
136154
msgstr ""
155+
"MongoDB提供一个用于执行批量写入的 :method:`Bulk()` API。"
156+
"以下操作步骤描述了如何使用 :method:`Bulk()` API向MongoDB集合中插入一组文档。"
137157

138158
#: ../source/includes/steps/getting-started-insert-bulk.rst:8
139159
msgid "Initialize a ``Bulk`` operations builder."
140-
msgstr ""
160+
msgstr "初始化一个操作构建器``Bulk``。"
141161

142162
#: ../source/includes/steps/getting-started-insert-bulk.rst:11
143163
msgid ""
144164
"Initialize a :method:`Bulk` operations builder for the collection "
145165
"``inventory``."
146166
msgstr ""
167+
"给集合``inventory``初始化一个操作构建器 :method:`Bulk` 。"
147168

148169
#: ../source/includes/steps/getting-started-insert-bulk.rst:20
149170
msgid ""
@@ -153,40 +174,46 @@ msgid ""
153174
" during the processing of one of the write operations, MongoDB will continue"
154175
" to process remaining write operations in the list."
155176
msgstr ""
177+
"该操作返回一个无序的操作构建器,维护了所有待执行的操作列表。"
178+
"无序操作意味着MongoDB能够以平行方式执行,也可以用非确定性顺序的方式执行列表中的操作。"
179+
"如果当执行其中一个写操作时出现错误,MongoDB将继续执行列表中其他剩余的写操作。"
156180

157181
#: ../source/includes/steps/getting-started-insert-bulk.rst:27
158182
msgid ""
159183
"You can also initialize an ordered operations builder; see "
160184
":method:`db.collection.initializeOrderedBulkOp()` for details."
161185
msgstr ""
186+
"你也可初始化一个有序的操作构建器; 详见 :method:`db.collection.initializeOrderedBulkOp()` 。"
162187

163188
#: ../source/includes/steps/getting-started-insert-bulk.rst:42
164189
msgid "Add insert operations to the ``bulk`` object."
165-
msgstr ""
190+
msgstr "向``bulk``对象中添加插入操作。"
166191

167192
#: ../source/includes/steps/getting-started-insert-bulk.rst:45
168193
msgid ""
169194
"Add two insert operations to the ``bulk`` object using the "
170195
":method:`Bulk.insert()` method."
171196
msgstr ""
197+
"使用 :method:`Bulk.insert()` 方法向``bulk``对象中添加两个插入操作。"
172198

173199
#: ../source/includes/steps/getting-started-insert-bulk.rst:80
174200
msgid "Execute the bulk operation."
175-
msgstr ""
201+
msgstr "执行批量操作。"
176202

177203
#: ../source/includes/steps/getting-started-insert-bulk.rst:83
178204
msgid ""
179205
"Call the :method:`~Bulk.execute()` method on the ``bulk`` object to execute "
180206
"the operations in its list."
181207
msgstr ""
208+
"调用``bulk``对象的:method:`~Bulk.execute()`方法以执行``bulk``对象列表中的所有操作。"
182209

183210
#: ../source/tutorial/insert-documents.txt:36
184211
msgid "Additional Examples and Methods"
185-
msgstr ""
212+
msgstr "更多的示例和方法"
186213

187214
#: ../source/tutorial/insert-documents.txt:38
188215
msgid "For more examples, see :method:`db.collection.insert()`."
189-
msgstr ""
216+
msgstr "更多的示例请见 :method:`db.collection.insert()`。"
190217

191218
#: ../source/tutorial/insert-documents.txt:40
192219
msgid ""
@@ -196,3 +223,6 @@ msgid ""
196223
"individual reference pages for the methods for more information and "
197224
"examples."
198225
msgstr ""
226+
"使用:method:`db.collection.update()`方法、:method:`db.collection.findAndModify()`,以及"
227+
"method:`db.collection.save()`方法也能新增文档。"
228+
"可分别查看他们的页面获取更多的信息和示例。"

0 commit comments

Comments
 (0)