fix: 修复一些翻译错误

This commit is contained in:
Zhicheng WANG 2019-01-26 23:44:04 +08:00
parent c63a778e26
commit d79fb401e7
15 changed files with 24 additions and 22 deletions

View File

@ -3977,7 +3977,6 @@ Generate a new component to compose the message.
It displays a simple form with a header, an input box for the message, It displays a simple form with a header, an input box for the message,
and two buttons, "Send" and "Cancel". and two buttons, "Send" and "Cancel".
`src/app/compose-message.component.ts` 中创建一个名叫 `ComposeMessageComponent` 的新组件。
它显示一个简单的表单包括一个头、一个消息输入框和两个按钮“Send”和“Cancel”。 它显示一个简单的表单包括一个头、一个消息输入框和两个按钮“Send”和“Cancel”。
<figure> <figure>
@ -4265,7 +4264,7 @@ A guard's return value controls the router's behavior:
**Note:**The guard can also tell the router to navigate elsewhere, effectively canceling the current navigation. When **Note:**The guard can also tell the router to navigate elsewhere, effectively canceling the current navigation. When
doing so inside a guard, the guard should return `false`; doing so inside a guard, the guard should return `false`;
**注意**:守卫还可以告诉路由器导航到别处,这样也取消当前的导航。 **注意**:守卫还可以告诉路由器导航到别处,这样也取消当前的导航。要想在守卫中这么做,就要返回 `false`
</div> </div>

View File

@ -392,9 +392,9 @@ For information about CSRF at the Open Web Application Security Project (OWASP),
The Stanford University paper The Stanford University paper
<a href="https://seclab.stanford.edu/websec/csrf/csrf.pdf">Robust Defenses for Cross-Site Request Forgery</a> is a rich source of detail. <a href="https://seclab.stanford.edu/websec/csrf/csrf.pdf">Robust Defenses for Cross-Site Request Forgery</a> is a rich source of detail.
到开放式 Web 应用程序安全项目(OWASP)的[这里](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29) 可到 "开放式 Web 应用程序安全项目 (OWASP) " 深入了解 CSRF参见[Cross-Site Request Forgery (CSRF)](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29)
和[这里](https://www.owasp.org/index.php/CSRF_Prevention_Cheat_Sheet)学习更多关于跨站请求伪造XSRF的知识 和[Cross-Site Request Forgery (CSRF) Prevention Cheat Sheet](https://www.owasp.org/index.php/CSRF_Prevention_Cheat_Sheet)。
这个[斯坦福大学论文](https://seclab.stanford.edu/websec/csrf/csrf.pdf)有详尽的细节。 这个斯坦福大学论文 [Robust Defenses for Cross-Site Request Forgery](https://seclab.stanford.edu/websec/csrf/csrf.pdf) 有详尽的细节。
See also Dave Smith's easy-to-understand See also Dave Smith's easy-to-understand
<a href="https://www.youtube.com/watch?v=9inczw6qtpY" title="Cross Site Request Funkery Securing Your Angular Apps From Evil Doers">talk on XSRF at AngularConnect 2016</a>. <a href="https://www.youtube.com/watch?v=9inczw6qtpY" title="Cross Site Request Funkery Securing Your Angular Apps From Evil Doers">talk on XSRF at AngularConnect 2016</a>.

View File

@ -195,8 +195,7 @@ This section describes the resources to cache, broken up into three groups.
* `versionedFiles` has been deprecated. As of v6 `versionedFiles` and `files` options have the same behavior. Use `files` instead. * `versionedFiles` has been deprecated. As of v6 `versionedFiles` and `files` options have the same behavior. Use `files` instead.
`versionedFiles``files` 相似,但是它用来对工件进行构建,这些工件已经在文件名中包含了一个散列,用于让其缓存失效。 `versionedFiles` 已经废弃,因为 v6 版本的 `versionedFiles``files` 选项具有相同的行为。请改用 `files`
如果 Angular Service Worker 能假定这些文件在文件名不变时其内容也不会变,那它就可以从某些方面优化这种操作。
* `urls` includes both URLs and URL patterns that will be matched at runtime. These resources are not fetched directly and do not have content hashes, but they will be cached according to their HTTP headers. This is most useful for CDNs such as the Google Fonts service.<br> * `urls` includes both URLs and URL patterns that will be matched at runtime. These resources are not fetched directly and do not have content hashes, but they will be cached according to their HTTP headers. This is most useful for CDNs such as the Google Fonts service.<br>
_(Negative glob patterns are not supported and `?` will be matched literally; i.e. it will not match any character other than `?`.)_ _(Negative glob patterns are not supported and `?` will be matched literally; i.e. it will not match any character other than `?`.)_
@ -204,7 +203,7 @@ This section describes the resources to cache, broken up into three groups.
`urls` 包括要在运行时进行匹配的 URL 和 URL 模式。 `urls` 包括要在运行时进行匹配的 URL 和 URL 模式。
这些资源不是直接获取的,也没有内容散列,但它们会根据 HTTP 标头进行缓存。 这些资源不是直接获取的,也没有内容散列,但它们会根据 HTTP 标头进行缓存。
这对于像 Google Fonts 服务这样的 CDN 非常有用。<br> 这对于像 Google Fonts 服务这样的 CDN 非常有用。<br>
**(不支持 glob 的逆模式)** **(不支持 glob 的逆模式`?` 将会按字面匹配;也就是说它不会匹配除了 `?` 之外的任何字符。**
## `dataGroups` ## `dataGroups`

View File

@ -1,6 +1,6 @@
# Singleton services # Singleton services
# 单例应用 # 单例服务
#### Prerequisites: #### Prerequisites:

View File

@ -298,7 +298,7 @@ Change detection cycles are triggered by many asynchronous activities such as
promise resolutions, http results, timer events, keypresses and mouse moves. promise resolutions, http results, timer events, keypresses and mouse moves.
Angular 会在每个变更检测周期后执行模板表达式。 Angular 会在每个变更检测周期后执行模板表达式。
它们可能在每一次按键或鼠标移动后被调用 变更检测周期会被多种异步活动触发,比如 Promise 解析、HTTP 结果、定时器时间、按键或鼠标移动
Expressions should finish quickly or the user experience may drag, especially on slower devices. Expressions should finish quickly or the user experience may drag, especially on slower devices.
Consider caching values when their computation is expensive. Consider caching values when their computation is expensive.

View File

@ -5448,6 +5448,7 @@ Here are the most useful `DebugElement` members for testers, in approximate orde
See [above](#trigger-event-handler). See [above](#trigger-event-handler).
如果在该元素的 `listeners` 集合中有相应的监听器,就根据名字触发这个事件。 如果在该元素的 `listeners` 集合中有相应的监听器,就根据名字触发这个事件。
第二个参数是该处理器函数所需的*事件对象*。参见[前面](#trigger-event-handler)。
If the event lacks a listener or there's some other problem, If the event lacks a listener or there's some other problem,
consider calling `nativeElement.dispatchEvent(eventObject)`. consider calling `nativeElement.dispatchEvent(eventObject)`.

View File

@ -641,6 +641,7 @@ Now let's create a few handy scripts to help us do all of this in the future.
You can add these in the `"server"` section of the Angular configuration file, `angular.json`. You can add these in the `"server"` section of the Angular configuration file, `angular.json`.
现在,来创建一些便利脚本,在以后帮助我们完成这些琐事。 现在,来创建一些便利脚本,在以后帮助我们完成这些琐事。
你可以在 Angular 配置文件 `angular.json``"server"` 区添加这些脚本。
<code-example format="." language="none" linenums="false"> <code-example format="." language="none" linenums="false">
"architect": { "architect": {

View File

@ -1679,6 +1679,7 @@ export function useAnimation(
* An array is treated as an animation sequence. * An array is treated as an animation sequence.
* *
* *
*
* *
* @param options An options object. Use the 'limit' field to limit the total number of * @param options An options object. Use the 'limit' field to limit the total number of
* items to collect. * items to collect.

View File

@ -54,7 +54,7 @@ export class SwitchView {
* *
* Adds / removes DOM sub-trees when the nest match expressions matches the switch expression. * Adds / removes DOM sub-trees when the nest match expressions matches the switch expression.
* *
* match`match_express_*` switch`switch_expression` / DOM * switch
* *
* `NgSwitch` stamps out nested views when their match expression value matches the value of the * `NgSwitch` stamps out nested views when their match expression value matches the value of the
* switch expression. * switch expression.

View File

@ -286,7 +286,9 @@ export class CurrencyPipe implements PipeTransform {
* depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies. * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.
* For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none. * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.
* *
* `maxFractionDigits` `3` * `maxFractionDigits` `3`
* [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 规范进行适当的格式化。
* 2
* *
* @param locale A locale code for the locale format rules to use. * @param locale A locale code for the locale format rules to use.
* When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default. * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.

View File

@ -107,7 +107,7 @@ export interface Directive {
* The CSS selector that identifies this directive in a template * The CSS selector that identifies this directive in a template
* and triggers instantiation of the directive. * and triggers instantiation of the directive.
* *
* CSS * CSS
* *
* Declare as one of the following: * Declare as one of the following:
* *
@ -434,6 +434,7 @@ export interface ComponentDecorator {
* Unlike other directives, only one component can be instantiated per an element in a template. * Unlike other directives, only one component can be instantiated per an element in a template.
* *
* Angular * Angular
*
* *
* A component must belong to an NgModule in order for it to be available * A component must belong to an NgModule in order for it to be available
* to another component or application. To make it a member of an NgModule, * to another component or application. To make it a member of an NgModule,

View File

@ -354,6 +354,7 @@ export interface NgModule {
* ModuleA can use UserComponent. * ModuleA can use UserComponent.
* *
* *
* ModuleA UserComponent ModuleA 使 UserComponent
* *
* ModuleA can import ModuleB and also export it, making exports from ModuleB * ModuleA can import ModuleB and also export it, making exports from ModuleB
* available to an NgModule that imports ModuleA. * available to an NgModule that imports ModuleA.

View File

@ -322,7 +322,7 @@ export abstract class Renderer2 {
* *
* @param refChild The existing child node that should precede the new node. * @param refChild The existing child node that should precede the new node.
* *
* *
*/ */
abstract insertBefore(parent: any, newChild: any, refChild: any): void; abstract insertBefore(parent: any, newChild: any, refChild: any): void;
/** /**

View File

@ -38,9 +38,6 @@ export const controlNameBinding: any = {
* @see `FormControl` * @see `FormControl`
* @see `AbstractControl` * @see `AbstractControl`
* *
* `FormControl` DOM ->
* DOM `FormControl` ->
*
* @usageNotes * @usageNotes
* *
* ### Register `FormControl` within a group * ### Register `FormControl` within a group

View File

@ -331,13 +331,13 @@ export class Validators {
* Validator that requires the control's value to match a regex pattern. This validator is also * Validator that requires the control's value to match a regex pattern. This validator is also
* provided by default if you use the HTML5 `pattern` attribute. * provided by default if you use the HTML5 `pattern` attribute.
* *
* Note that if a Regexp is provided, the Regexp is used as is to test the values. On the other
* hand, if a string is passed, the `^` character is prepended and the `$` character is
* appended to the provided string (if not already present), and the resulting regular
* expression is used to test the values.
*
* 使 HTML5 `pattern` * 使 HTML5 `pattern`
* *
* Note that if a Regexp is provided, the Regexp is used as is to test the values. On the other hand, if a string is passed, the `^` character is prepended and the `$` character is appended to the provided string (if not already present), and the resulting regular expression is used to test the values.
*
* Regexp使 Regexp `^` `$`
* 使
*
* @usageNotes * @usageNotes
* *
* ### Validate that the field only contains letters or spaces * ### Validate that the field only contains letters or spaces