Skip to content

Commit 240502f

Browse files
committed
翻译对照表
300行到350行
1 parent 7e58cfa commit 240502f

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

README

+9
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ README 你正在看的文件
2626
4. 编辑 jQueryAPI.zh_CN.xml 进行翻译
2727
5. 运行 build.bat 在 dist 中生成打散的文件
2828
6. 发布 dist 目录下的所有文件即可
29+
30+
31+
翻译词汇对照表
32+
33+
The JSON string to parse. 将要解析的 JSON 字符串
34+
The message to send out. 将要发送的消息
35+
36+
This method is most useful for ... 这个方法通常在 ... 的情况下使用
37+
Additionally 另外

jQueryAPI.zh_CN.xml

+18-18
Original file line numberDiff line numberDiff line change
@@ -296,64 +296,64 @@
296296
</example>
297297
</entry>
298298
<entry type="method" name="jQuery.error">
299-
<desc>Takes a string and throws an exception containing it.</desc>
299+
<desc>接受一个字符串,并抛出包含这个字符串的异常。</desc>
300300
<signature>
301301
<argument name="message">
302-
<desc>The message to send out.</desc>
302+
<desc>将要发出的消息.</desc>
303303
</argument>
304304
</signature>
305305
<longdesc>
306-
<p>This method exists primarily for plugin developers who wish to override it and provide a better display (or more information) for the error messages.</p>
306+
<p>这个方法主要是为了让插件开发人员可以重载此方法,并以更好的方式显示错误消息,或者提供更多相关信息。</p>
307307
</longdesc>
308308
<example>
309-
<desc>Override jQuery.error for display in Firebug.</desc>
309+
<desc>重载 jQuery.error 以便可以在 Firebug 中显示。</desc>
310310
</example>
311311
</entry>
312312
<entry type="method" name="jQuery.parseJSON">
313-
<desc>Takes a well-formed JSON string and returns the resulting JavaScript object.</desc>
313+
<desc>接受一个标准格式的 JSON 字符串,并返回解析后的 JavaScript 对象。</desc>
314314
<signature>
315315
<argument name="json">
316-
<desc>The JSON string to parse.</desc>
316+
<desc>将要解析的 JSON 字符串。</desc>
317317
</argument>
318318
</signature>
319319
<longdesc>
320-
<p>Passing in a malformed JSON string may result in an exception being thrown. For example, the following are all malformed JSON strings:</p>
320+
<p>传入格式有误的 JSON 字符串可能导致抛出异常。例如,下面这些 JSON 字符串格式都不对:</p>
321321
<ul>
322322
<li>
323-
<code>{test: 1}</code> (test does not have double quotes around it).</li>
323+
<code>{test: 1}</code> (test 没有使用双引号包裹).</li>
324324
<li>
325-
<code>{'test': 1}</code> ('test' is using single quotes instead of double quotes).</li>
325+
<code>{'test': 1}</code> ('test' 用了单引号而不是双引号包裹).</li>
326326
</ul>
327-
<p>Additionally if you pass in nothing, an empty string, null, or undefined, 'null' will be returned from parseJSON. Where the browser provides a native implementation of <code>JSON.parse</code>, jQuery uses it to parse the string. For details on the JSON format, see <a href="http://json.org/">http://json.org/</a>.
327+
<p>另外,如果你什么都不传入,或者传入空字符串、nullundefined 等,parseJSON 都会返回 null 。如果浏览器原生实现了 <code>JSON.parse</code> jQuery 则会使用它来解析字符串。更多关于JSON格式的细节请参考 <a href="http://json.org/">http://json.org/</a>
328328
</p>
329329
</longdesc>
330330
<example>
331-
<desc>Parse a JSON string.</desc>
331+
<desc>解析一个 JSON 字符串。</desc>
332332
</example>
333333
</entry>
334334
<entry type="method" name="jQuery.proxy">
335-
<desc>Takes a function and returns a new one that will always have a particular context.</desc>
335+
<desc>接受一个函数,然后返回一个新函数,并且这个新函数始终保持了特定的上下文语境。</desc>
336336
<signature>
337337
<argument name="function">
338-
<desc>The function whose context will be changed.</desc>
338+
<desc>将要改变上下文语境的函数。</desc>
339339
</argument>
340340
<argument name="context">
341-
<desc>The object to which the context (`this`) of the function should be set.</desc>
341+
<desc>函数的上下文语境(`this`)会被设置成这个 object 对象。</desc>
342342
</argument>
343343
</signature>
344344
<signature>
345345
<argument name="context">
346-
<desc>The object to which the context of the function should be set.</desc>
346+
<desc>函数的上下文语境会被设置成这个 object 对象。</desc>
347347
</argument>
348348
<argument name="name">
349-
<desc>The name of the function whose context will be changed (should be a property of the 'context' object.</desc>
349+
<desc>将要改变上下文语境的函数名(这个函数必须是前一个参数 'context' 对象的属性)</desc>
350350
</argument>
351351
</signature>
352352
<longdesc>
353-
<p>This method is most useful for attaching event handlers to an element where the context is pointing back to a different object. Additionally, jQuery makes sure that even if you bind the function returned from jQuery.proxy() it will still unbind the correct function, if passed the original.</p>
353+
<p>这个方法通常在向一个元素上附加事件处理函数时,上下文语境实际是指向另一个对象的情况下使用。另外,jQuery 能够确保即使你绑定的函数是经过 jQuery.proxy() 处理过的函数,你依然可以用原先的函数来正确地取消绑定。</p>
354354
</longdesc>
355355
<example>
356-
<desc>Enforce the context of the function.</desc>
356+
<desc>强制修改函数的上下文语境</desc>
357357
</example>
358358
</entry>
359359
<entry type="method" name="focusout">

0 commit comments

Comments
 (0)