Skip to content

Commit 5c0d971

Browse files
committed
translate: translations for learn Angular tutorial
Fixes #161
1 parent e213692 commit 5c0d971

50 files changed

Lines changed: 1960 additions & 384 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Welcome to the Angular tutorial
2+
3+
This interactive tutorial will teach you the basic building blocks to start building great apps with Angular.
4+
5+
## How to use this tutorial
6+
7+
You'll need to have basic familiarity with HTML, CSS and JavaScript to understand Angular.
8+
9+
Each step represents a concept in Angular. You can do one, or all of them.
10+
11+
If you get stuck, click "Reveal answer" at the top.
12+
13+
Alright, let's [get started](/tutorials/learn-angular/1-components-in-angular).
14+
15+
## Using AI for Development
16+
17+
In case you're following this tutorial in your preferred AI powered IDE, [check out Angular prompt rules and best practices](/ai/develop-with-ai).
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Welcome to the Angular tutorial
1+
# Bienvenido al tutorial de Angular
22

3-
This interactive tutorial will teach you the basic building blocks to start building great apps with Angular.
3+
Este tutorial interactivo te enseñará los componentes básicos para comenzar a crear aplicaciones increíbles con Angular.
44

5-
## How to use this tutorial
5+
## Cómo usar este tutorial
66

7-
You'll need to have basic familiarity with HTML, CSS and JavaScript to understand Angular.
7+
Necesitarás tener familiaridad básica con HTML, CSS y JavaScript para entender Angular.
88

9-
Each step represents a concept in Angular. You can do one, or all of them.
9+
Cada paso representa un concepto en Angular. Puedes hacer uno, o todos ellos.
1010

11-
If you get stuck, click "Reveal answer" at the top.
11+
Si te quedas atascado, haz clic en "Reveal answer" (Mostrar respuesta) en la parte superior.
1212

13-
Alright, let's [get started](/tutorials/learn-angular/1-components-in-angular).
13+
Muy bien, [comencemos](/tutorials/learn-angular/1-components-in-angular).
1414

15-
## Using AI for Development
15+
## Usando IA para desarrollo
1616

17-
In case you're following this tutorial in your preferred AI powered IDE, [check out Angular prompt rules and best practices](/ai/develop-with-ai).
17+
En caso de que estés siguiendo este tutorial en tu IDE con IA preferido, [consulta las reglas de prompt y mejores prácticas de Angular](/ai/develop-with-ai).
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Components in Angular
2+
3+
Components are the foundational building blocks for any Angular application. Each component has three parts:
4+
5+
- TypeScript class
6+
- HTML template
7+
- CSS styles
8+
9+
Note: Learn more about [components in the essentials guide](/essentials/components).
10+
11+
In this activity, you'll learn how to update the template and styles of a component.
12+
13+
<hr />
14+
15+
This is a great opportunity for you to get started with Angular.
16+
17+
<docs-workflow>
18+
19+
<docs-step title="Update the component template">
20+
Update the `template` property to read `Hello Universe`
21+
22+
```ts
23+
template: `
24+
Hello Universe
25+
`,
26+
```
27+
28+
When you changed the HTML template, the preview updated with your message. Let's go one step further: change the color of the text.
29+
</docs-step>
30+
31+
<docs-step title="Update the component styles">
32+
Update the styles value and change the `color` property from `blue` to `#a144eb`.
33+
34+
```ts
35+
styles: `
36+
:host {
37+
color: #a144eb;
38+
}
39+
`,
40+
```
41+
42+
When you check the preview, you'll find that the text color will be changed.
43+
</docs-step>
44+
45+
</docs-workflow>
46+
47+
In Angular, you can use all the browser supported CSS and HTML that's available. If you'd like, you can store your template and styles in separate files.
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
# Components in Angular
1+
# Componentes en Angular
22

3-
Components are the foundational building blocks for any Angular application. Each component has three parts:
3+
Los componentes son los bloques de construcción fundamentales para cualquier aplicación Angular. Cada componente tiene tres partes:
44

5-
- TypeScript class
6-
- HTML template
7-
- CSS styles
5+
- Clase TypeScript
6+
- Plantilla HTML
7+
- Estilos CSS
88

9-
Note: Learn more about [components in the essentials guide](/essentials/components).
9+
NOTA: Aprende más sobre [componentes en la guía esencial](/essentials/components).
1010

11-
In this activity, you'll learn how to update the template and styles of a component.
11+
En esta actividad, aprenderás cómo actualizar la plantilla y los estilos de un componente.
1212

1313
<hr />
1414

15-
This is a great opportunity for you to get started with Angular.
15+
Esta es una gran oportunidad para que comiences con Angular.
1616

1717
<docs-workflow>
1818

19-
<docs-step title="Update the component template">
20-
Update the `template` property to read `Hello Universe`
19+
<docs-step title="Actualiza la plantilla del componente">
20+
Actualiza la propiedad `template` para que tenga el valor `Hello Universe`
2121

2222
```ts
2323
template: `
2424
Hello Universe
2525
`,
2626
```
2727

28-
When you changed the HTML template, the preview updated with your message. Let's go one step further: change the color of the text.
28+
Cuando cambiaste la plantilla HTML, la vista previa se actualizó con tu mensaje. Vayamos un paso más allá: cambia el color del texto.
2929
</docs-step>
3030

31-
<docs-step title="Update the component styles">
32-
Update the styles value and change the `color` property from `blue` to `#a144eb`.
31+
<docs-step title="Actualiza los estilos del componente">
32+
Actualiza el valor de `styles` y cambia la propiedad `color` de `blue` a `#a144eb`.
3333

3434
```ts
3535
styles: `
@@ -39,9 +39,9 @@ styles: `
3939
`,
4040
```
4141

42-
When you check the preview, you'll find that the text color will be changed.
42+
Cuando revises la vista previa, verás que el color del texto ha cambiado.
4343
</docs-step>
4444

4545
</docs-workflow>
4646

47-
In Angular, you can use all the browser supported CSS and HTML that's available. If you'd like, you can store your template and styles in separate files.
47+
En Angular, puedes usar todo el CSS y HTML compatible con navegadores que esté disponible. Si lo deseas, puedes almacenar tus plantillas y estilos en archivos separados.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Deferrable Views
2+
3+
Sometimes in app development, you end up with a lot of components that you need to reference in your app, but some of those don't need to be loaded right away for various reasons.
4+
5+
Maybe they are below the visible fold or are heavy components that aren't interacted with until later. In that case, we can load some of those resources later with deferrable views.
6+
7+
Note: Learn more about [deferred loading with @defer in the in-depth guide](/guide/templates/defer).
8+
9+
In this activity, you'll learn how to use deferrable views to defer load a section of your component template.
10+
11+
<hr>
12+
13+
<docs-workflow>
14+
15+
<docs-step title="Add a `@defer` block around the comments component">
16+
17+
In your app, the blog post page has a comment component after the post details.
18+
19+
Wrap the comment component with a `@defer` block to defer load it.
20+
21+
```angular-html
22+
@defer {
23+
<comments />
24+
}
25+
```
26+
27+
The code above is an example of how to use a basic `@defer` block. By default `@defer` will load the `comments` component when the browser is idle.
28+
29+
</docs-step>
30+
31+
<docs-step title="Add a placeholder">
32+
33+
Add a `@placeholder` block to the `@defer` block. The `@placeholder` block is where you put html that will show before the deferred loading starts. The content in `@placeholder` blocks is eagerly loaded.
34+
35+
<docs-code language="angular-html" highlight="[3,4,5]">
36+
@defer {
37+
<comments />
38+
} @placeholder {
39+
<p>Future comments</p>
40+
}
41+
</docs-code>
42+
43+
</docs-step>
44+
45+
<docs-step title="Add a loading block">
46+
47+
Add a `@loading` block to the `@defer` block. The `@loading` block is where you put html that will show _while_ the deferred content is actively being fetched, but hasn't finished yet. The content in `@loading` blocks is eagerly loaded.
48+
49+
<docs-code language="angular-html" highlight="[5,6,7]">
50+
@defer {
51+
<comments />
52+
} @placeholder {
53+
<p>Future comments</p>
54+
} @loading {
55+
<p>Loading comments...</p>
56+
}
57+
</docs-code>
58+
59+
</docs-step>
60+
61+
<docs-step title="Add a minimum duration">
62+
63+
Both `@placeholder` and `@loading` sections have optional parameters to prevent flickering from occurring when loading happens quickly. `@placeholder` has `minimum` and `@loading` has `minimum` and `after`. Add a `minimum` duration to the `@loading` block so it will be rendered for at least 2 seconds.
64+
65+
<docs-code language="angular-html" highlight="[5]">
66+
@defer {
67+
<comments />
68+
} @placeholder {
69+
<p>Future comments</p>
70+
} @loading (minimum 2s) {
71+
<p>Loading comments...</p>
72+
}
73+
</docs-code>
74+
75+
</docs-step>
76+
77+
<docs-step title="Add a viewport trigger">
78+
79+
Deferrable views have a number of trigger options. Add a viewport trigger so the content will defer load once it enters the viewport.
80+
81+
<docs-code language="angular-html" highlight="[1]">
82+
@defer (on viewport) {
83+
<comments />
84+
}
85+
</docs-code>
86+
87+
</docs-step>
88+
89+
<docs-step title="Add content">
90+
91+
A viewport trigger is best used when you're deferring content that's far enough down the page that it needs to be scrolled to see. So let's add some content to our blog post. You can either write your own, or you can copy the content below and put it inside the `<article>` element.
92+
93+
<docs-code language="html" highlight="[1]">
94+
<article>
95+
<p>Angular is my favorite framework, and this is why. Angular has the coolest deferrable view feature that makes defer loading content the easiest and most ergonomic it could possibly be. The Angular community is also filled with amazing contributors and experts that create excellent content. The community is welcoming and friendly, and it really is the best community out there.</p>
96+
<p>I can't express enough how much I enjoy working with Angular. It offers the best developer experience I've ever had. I love that the Angular team puts their developers first and takes care to make us very happy. They genuinely want Angular to be the best framework it can be, and they're doing such an amazing job at it, too. This statement comes from my heart and is not at all copied and pasted. In fact, I think I'll say these exact same things again a few times.</p>
97+
<p>Angular is my favorite framework, and this is why. Angular has the coolest deferrable view feature that makes defer loading content the easiest and most ergonomic it could possibly be. The Angular community is also filled with amazing contributors and experts that create excellent content. The community is welcoming and friendly, and it really is the best community out there.</p>
98+
<p>I can't express enough how much I enjoy working with Angular. It offers the best developer experience I've ever had. I love that the Angular team puts their developers first and takes care to make us very happy. They genuinely want Angular to be the best framework it can be, and they're doing such an amazing job at it, too. This statement comes from my heart and is not at all copied and pasted. In fact, I think I'll say these exact same things again a few times.</p>
99+
<p>Angular is my favorite framework, and this is why. Angular has the coolest deferrable view feature that makes defer loading content the easiest and most ergonomic it could possibly be. The Angular community is also filled with amazing contributors and experts that create excellent content. The community is welcoming and friendly, and it really is the best community out there.</p>
100+
<p>I can't express enough how much I enjoy working with Angular. It offers the best developer experience I've ever had. I love that the Angular team puts their developers first and takes care to make us very happy. They genuinely want Angular to be the best framework it can be, and they're doing such an amazing job at it, too. This statement comes from my heart and is not at all copied and pasted.</p>
101+
</article>
102+
</docs-code>
103+
104+
Once you've added this code, now scroll down to see the deferred content load once you scroll it into the viewport.
105+
106+
</docs-step>
107+
108+
</docs-workflow>
109+
110+
In the activity, you've learned how to use deferrable views in your applications. Great work. 🙌
111+
112+
There's even more you can do with them, like different triggers, prefetching, and `@error` blocks.
113+
114+
If you would like to learn more, check out the [documentation for Deferrable views](guide/defer).
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
# Deferrable Views
1+
# Vistas diferibles (deferrable views)
22

3-
Sometimes in app development, you end up with a lot of components that you need to reference in your app, but some of those don't need to be loaded right away for various reasons.
3+
A veces en el desarrollo de aplicaciones, terminas con muchos componentes que necesitas referenciar en tu app, pero algunos de ellos no necesitan cargarse de inmediato por varias razones.
44

5-
Maybe they are below the visible fold or are heavy components that aren't interacted with until later. In that case, we can load some of those resources later with deferrable views.
5+
Quizás están debajo del pliegue visible o son componentes pesados con los que no se interactúa hasta más tarde. En ese caso, podemos cargar algunos de esos recursos más tarde con vistas diferibles (deferrable views).
66

7-
Note: Learn more about [deferred loading with @defer in the in-depth guide](/guide/templates/defer).
7+
NOTA: Aprende más sobre [carga diferida con @defer en la guía detallada](/guide/templates/defer).
88

9-
In this activity, you'll learn how to use deferrable views to defer load a section of your component template.
9+
En esta actividad, aprenderás cómo usar vistas diferibles para cargar de forma diferida una sección de la plantilla de tu componente.
1010

1111
<hr>
1212

1313
<docs-workflow>
1414

15-
<docs-step title="Add a `@defer` block around the comments component">
15+
<docs-step title="Agrega un bloque `@defer` alrededor del componente de comentarios">
1616

17-
In your app, the blog post page has a comment component after the post details.
17+
En tu app, la página de publicación del blog tiene un componente de comentarios después de los detalles de la publicación.
1818

19-
Wrap the comment component with a `@defer` block to defer load it.
19+
Envuelve el componente de comentarios con un bloque `@defer` para cargarlo de forma diferida.
2020

2121
```angular-html
2222
@defer {
2323
<comments />
2424
}
2525
```
2626

27-
The code above is an example of how to use a basic `@defer` block. By default `@defer` will load the `comments` component when the browser is idle.
27+
El código anterior es un ejemplo de cómo usar un bloque `@defer` básico. Por defecto, `@defer` cargará el componente `comments` cuando el navegador esté inactivo.
2828

2929
</docs-step>
3030

31-
<docs-step title="Add a placeholder">
31+
<docs-step title="Agrega un placeholder">
3232

33-
Add a `@placeholder` block to the `@defer` block. The `@placeholder` block is where you put html that will show before the deferred loading starts. The content in `@placeholder` blocks is eagerly loaded.
33+
Agrega un bloque `@placeholder` al bloque `@defer`. El bloque `@placeholder` es donde pones HTML que se mostrará antes de que comience la carga diferida. El contenido en los bloques `@placeholder` se carga de forma inmediata.
3434

3535
<docs-code language="angular-html" highlight="[3,4,5]">
3636
@defer {
@@ -42,9 +42,9 @@ Add a `@placeholder` block to the `@defer` block. The `@placeholder` block is wh
4242

4343
</docs-step>
4444

45-
<docs-step title="Add a loading block">
45+
<docs-step title="Agrega un bloque de carga (loading)">
4646

47-
Add a `@loading` block to the `@defer` block. The `@loading` block is where you put html that will show _while_ the deferred content is actively being fetched, but hasn't finished yet. The content in `@loading` blocks is eagerly loaded.
47+
Agrega un bloque `@loading` al bloque `@defer`. El bloque `@loading` es donde pones HTML que se mostrará _mientras_ el contenido diferido se está obteniendo activamente, pero aún no ha terminado. El contenido en los bloques `@loading` se carga de forma inmediata.
4848

4949
<docs-code language="angular-html" highlight="[5,6,7]">
5050
@defer {
@@ -58,9 +58,9 @@ Add a `@loading` block to the `@defer` block. The `@loading` block is where you
5858

5959
</docs-step>
6060

61-
<docs-step title="Add a minimum duration">
61+
<docs-step title="Agrega una duración mínima">
6262

63-
Both `@placeholder` and `@loading` sections have optional parameters to prevent flickering from occurring when loading happens quickly. `@placeholder` has `minimum` and `@loading` has `minimum` and `after`. Add a `minimum` duration to the `@loading` block so it will be rendered for at least 2 seconds.
63+
Tanto las secciones `@placeholder` como `@loading` tienen parámetros opcionales para evitar parpadeos cuando la carga ocurre rápidamente. `@placeholder` tiene `minimum` y `@loading` tiene `minimum` y `after`. Agrega una duración `minimum` al bloque `@loading` para que se renderice durante al menos 2 segundos.
6464

6565
<docs-code language="angular-html" highlight="[5]">
6666
@defer {
@@ -74,9 +74,9 @@ Both `@placeholder` and `@loading` sections have optional parameters to prevent
7474

7575
</docs-step>
7676

77-
<docs-step title="Add a viewport trigger">
77+
<docs-step title="Agrega un disparador de viewport">
7878

79-
Deferrable views have a number of trigger options. Add a viewport trigger so the content will defer load once it enters the viewport.
79+
Las vistas diferibles tienen varias opciones de disparadores (triggers). Agrega un disparador de viewport para que el contenido se cargue de forma diferida una vez que entre en el viewport.
8080

8181
<docs-code language="angular-html" highlight="[1]">
8282
@defer (on viewport) {
@@ -86,9 +86,9 @@ Deferrable views have a number of trigger options. Add a viewport trigger so the
8686

8787
</docs-step>
8888

89-
<docs-step title="Add content">
89+
<docs-step title="Agrega contenido">
9090

91-
A viewport trigger is best used when you're deferring content that's far enough down the page that it needs to be scrolled to see. So let's add some content to our blog post. You can either write your own, or you can copy the content below and put it inside the `<article>` element.
91+
Un disparador de viewport se usa mejor cuando estás difiriendo contenido que está lo suficientemente abajo en la página como para que necesite ser desplazado para verse. Así que agreguemos algo de contenido a nuestra publicación del blog. Puedes escribir el tuyo propio, o puedes copiar el contenido de abajo y ponerlo dentro del elemento `<article>`.
9292

9393
<docs-code language="html" highlight="[1]">
9494
<article>
@@ -101,14 +101,14 @@ A viewport trigger is best used when you're deferring content that's far enough
101101
</article>
102102
</docs-code>
103103

104-
Once you've added this code, now scroll down to see the deferred content load once you scroll it into the viewport.
104+
Una vez que hayas agregado este código, desplázate hacia abajo para ver el contenido diferido cargarse cuando lo despliegues dentro del viewport.
105105

106106
</docs-step>
107107

108108
</docs-workflow>
109109

110-
In the activity, you've learned how to use deferrable views in your applications. Great work. 🙌
110+
En esta actividad, has aprendido cómo usar vistas diferibles en tus aplicaciones. Excelente trabajo. 🙌
111111

112-
There's even more you can do with them, like different triggers, prefetching, and `@error` blocks.
112+
Hay aún más que puedes hacer con ellas, como diferentes disparadores, precarga (prefetching) y bloques `@error`.
113113

114-
If you would like to learn more, check out the [documentation for Deferrable views](guide/defer).
114+
Si deseas aprender más, consulta la [documentación sobre vistas diferibles (Deferrable views)](guide/defer).

0 commit comments

Comments
 (0)