Skip to content

Commit 147f6a7

Browse files
ricardochlSplaktar
authored andcommitted
translate: translations for Component guides
Fixes #23, #24, #25, #107
1 parent 84148e5 commit 147f6a7

28 files changed

Lines changed: 3409 additions & 770 deletions

adev-es/src/app/routing/sub-navigation-data.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,57 +131,57 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
131131
contentPath: 'guide/components/styling',
132132
},
133133
{
134-
label: 'Accepting data with input properties',
134+
label: 'Aceptando datos con propiedades de input',
135135
path: 'guide/components/inputs',
136136
contentPath: 'guide/components/inputs',
137137
},
138138
{
139-
label: 'Custom events with outputs',
139+
label: 'Eventos personalizados con outputs',
140140
path: 'guide/components/outputs',
141141
contentPath: 'guide/components/outputs',
142142
},
143143
{
144-
label: 'Content projection with ng-content',
144+
label: 'Proyección de contenido con ng-content',
145145
path: 'guide/components/content-projection',
146146
contentPath: 'guide/components/content-projection',
147147
},
148148
{
149-
label: 'Host elements',
149+
label: 'Elementos host de componentes',
150150
path: 'guide/components/host-elements',
151151
contentPath: 'guide/components/host-elements',
152152
},
153153
{
154-
label: 'Lifecycle',
154+
label: 'Ciclo de vida del componente',
155155
path: 'guide/components/lifecycle',
156156
contentPath: 'guide/components/lifecycle',
157157
},
158158
{
159-
label: 'Referencing component children with queries',
159+
label: 'Referenciando hijos de componentes con consultas',
160160
path: 'guide/components/queries',
161161
contentPath: 'guide/components/queries',
162162
},
163163
{
164-
label: 'Using DOM APIs',
164+
label: 'Usando APIs del DOM',
165165
path: 'guide/components/dom-apis',
166166
contentPath: 'guide/components/dom-apis',
167167
},
168168
{
169-
label: 'Inheritance',
169+
label: 'Herencia',
170170
path: 'guide/components/inheritance',
171171
contentPath: 'guide/components/inheritance',
172172
},
173173
{
174-
label: 'Programmatically rendering components',
174+
label: 'Renderizado programático de componentes',
175175
path: 'guide/components/programmatic-rendering',
176176
contentPath: 'guide/components/programmatic-rendering',
177177
},
178178
{
179-
label: 'Advanced configuration',
179+
label: 'Configuración avanzada',
180180
path: 'guide/components/advanced-configuration',
181181
contentPath: 'guide/components/advanced-configuration',
182182
},
183183
{
184-
label: 'Custom Elements',
184+
label: 'Elementos personalizados',
185185
path: 'guide/elements',
186186
contentPath: 'guide/elements',
187187
},
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Advanced component configuration
2+
3+
TIP: This guide assumes you've already read the [Essentials Guide](essentials). Read that first if you're new to Angular.
4+
5+
## ChangeDetectionStrategy
6+
7+
The `@Component` decorator accepts a `changeDetection` option that controls the component's **change
8+
detection mode**. There are two change detection mode options.
9+
10+
**`ChangeDetectionStrategy.Default`** is, unsurprisingly, the default strategy. In this mode,
11+
Angular checks whether the component's DOM needs an update whenever any activity may have occurred
12+
application-wide. Activities that trigger this checking include user interaction, network response,
13+
timers, and more.
14+
15+
**`ChangeDetectionStrategy.OnPush`** is an optional mode that reduces the amount of checking Angular
16+
needs to perform. In this mode, the framework only checks if a component's DOM needs an update when:
17+
18+
- A component input has changes as a result of a binding in a template, or
19+
- An event listener in this component runs
20+
- The component is explicitly marked for check, via `ChangeDetectorRef.markForCheck` or something which wraps it, like `AsyncPipe`.
21+
22+
Additionally, when an OnPush component is checked, Angular _also_ checks all of its ancestor
23+
components, traversing upwards through the application tree.
24+
25+
## PreserveWhitespaces
26+
27+
By default, Angular removes and collapses superfluous whitespace in templates, most commonly from
28+
newlines and indentation. You can change this setting by explicitly setting `preserveWhitespaces` to
29+
`true` in a component's metadata.
30+
31+
## Custom element schemas
32+
33+
By default, Angular throws an error when it encounters an unknown HTML element. You can
34+
disable this behavior for a component by including `CUSTOM_ELEMENTS_SCHEMA` in the `schemas`
35+
property in your component metadata.
36+
37+
```angular-ts
38+
import {Component, CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
39+
40+
@Component({
41+
...,
42+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
43+
template: '<some-unknown-component></some-unknown-component>'
44+
})
45+
export class ComponentWithCustomElements { }
46+
```
47+
48+
Angular does not support any other schemas at this time.
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
# Advanced component configuration
1+
# Configuración avanzada de componentes
22

3-
TIP: This guide assumes you've already read the [Essentials Guide](essentials). Read that first if you're new to Angular.
3+
CONSEJO: Esta guía asume que ya has leído la [Guía de Esenciales](essentials). Lee eso primero si eres nuevo en Angular.
44

55
## ChangeDetectionStrategy
66

7-
The `@Component` decorator accepts a `changeDetection` option that controls the component's **change
8-
detection mode**. There are two change detection mode options.
7+
El decorador `@Component` acepta una opción `changeDetection` que controla el **modo de
8+
detección de cambios** del componente. Hay dos opciones de modo de detección de cambios.
99

10-
**`ChangeDetectionStrategy.Default`** is, unsurprisingly, the default strategy. In this mode,
11-
Angular checks whether the component's DOM needs an update whenever any activity may have occurred
12-
application-wide. Activities that trigger this checking include user interaction, network response,
13-
timers, and more.
10+
**`ChangeDetectionStrategy.Default`** es, como era de esperar, la estrategia por defecto. En este modo,
11+
Angular verifica si el DOM del componente necesita una actualización cada vez que cualquier actividad puede haber ocurrido
12+
en toda la aplicación. Las actividades que desencadenan esta verificación incluyen interacción del usuario, respuesta de red,
13+
temporizadores, y más.
1414

15-
**`ChangeDetectionStrategy.OnPush`** is an optional mode that reduces the amount of checking Angular
16-
needs to perform. In this mode, the framework only checks if a component's DOM needs an update when:
15+
**`ChangeDetectionStrategy.OnPush`** es un modo opcional que reduce la cantidad de verificación que Angular
16+
necesita realizar. En este modo, el framework solo verifica si el DOM de un componente necesita una actualización cuando:
1717

18-
- A component input has changes as a result of a binding in a template, or
19-
- An event listener in this component runs
20-
- The component is explicitly marked for check, via `ChangeDetectorRef.markForCheck` or something which wraps it, like `AsyncPipe`.
18+
- Un input del componente ha cambiado como resultado de un enlace en una plantilla, o
19+
- Un event listener en este componente se ejecuta
20+
- El componente es explícitamente marcado para verificación, a través de `ChangeDetectorRef.markForCheck` o algo que lo envuelve, como `AsyncPipe`.
2121

22-
Additionally, when an OnPush component is checked, Angular _also_ checks all of its ancestor
23-
components, traversing upwards through the application tree.
22+
Además, cuando un componente OnPush es verificado, Angular _también_ verifica todos sus componentes
23+
ancestros, atravesando hacia arriba a través del árbol de la aplicación.
2424

2525
## PreserveWhitespaces
2626

27-
By default, Angular removes and collapses superfluous whitespace in templates, most commonly from
28-
newlines and indentation. You can change this setting by explicitly setting `preserveWhitespaces` to
29-
`true` in a component's metadata.
27+
Por defecto, Angular elimina y colapsa los espacios en blanco superfluos en las plantillas, más comúnmente de
28+
saltos de línea e indentación. Puedes cambiar esta configuración estableciendo explícitamente `preserveWhitespaces` a
29+
`true` en los metadatos del componente.
3030

31-
## Custom element schemas
31+
## Esquemas de elementos personalizados
3232

33-
By default, Angular throws an error when it encounters an unknown HTML element. You can
34-
disable this behavior for a component by including `CUSTOM_ELEMENTS_SCHEMA` in the `schemas`
35-
property in your component metadata.
33+
Por defecto, Angular lanza un error cuando encuentra un elemento HTML desconocido. Puedes
34+
deshabilitar este comportamiento para un componente incluyendo `CUSTOM_ELEMENTS_SCHEMA` en la propiedad `schemas`
35+
en los metadatos de tu componente.
3636

3737
```angular-ts
3838
import {Component, CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
@@ -45,4 +45,4 @@ import {Component, CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
4545
export class ComponentWithCustomElements { }
4646
```
4747

48-
Angular does not support any other schemas at this time.
48+
Angular no soporta ningún otro esquema en este momento.

0 commit comments

Comments
 (0)