-
Notifications
You must be signed in to change notification settings - Fork 231
Translated Comments, Polyfills and index #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
770ffb8
Translated "Comments" to Spanish
Niroa95 a4eac2e
Translated Polyfills and index.md to Spanish
Niroa95 4d59710
Translated index.md
Niroa95 d0256b9
Merge branch 'master' into master
joaquinelio 1423018
Update article.md
joaquinelio 3f24e45
Update article.md
joaquinelio 600defa
Update 1-js/03-code-quality/06-polyfills/article.md
vplentinax ecf907a
Update 1-js/03-code-quality/06-polyfills/article.md
vplentinax a8338d6
Update 1-js/03-code-quality/03-comments/article.md
vplentinax 82a7ad9
Update 1-js/03-code-quality/03-comments/article.md
vplentinax 4e61df3
Update 1-js/03-code-quality/03-comments/article.md
vplentinax 5748803
Update 1-js/03-code-quality/03-comments/article.md
vplentinax 94502aa
Update 1-js/03-code-quality/03-comments/article.md
vplentinax 121ea66
Update 1-js/03-code-quality/03-comments/article.md
vplentinax e0991ff
Update 1-js/03-code-quality/03-comments/article.md
vplentinax b8cb7ad
Update 1-js/03-code-quality/03-comments/article.md
vplentinax a177987
Update 1-js/03-code-quality/03-comments/article.md
vplentinax 3596a2d
Update 1-js/03-code-quality/03-comments/article.md
vplentinax b60d1da
Update 1-js/03-code-quality/03-comments/article.md
vplentinax 4705c46
Update 1-js/03-code-quality/03-comments/article.md
vplentinax 3b79f5b
Update 1-js/03-code-quality/03-comments/article.md
vplentinax a4f4473
Update 1-js/03-code-quality/03-comments/article.md
vplentinax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,54 +1,52 @@ | ||
|
|
||
| # Polyfills | ||
|
|
||
| The JavaScript language steadily evolves. New proposals to the language appear regularly, they are analyzed and, if considered worthy, are appended to the list at <https://tc39.github.io/ecma262/> and then progress to the [specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm). | ||
| El lenguaje JavaScript evoluciona constantemente. Nuevas propuestas al lenguaje aparecen regularmente, son analizadas y, si se consideran valiosas, se agregan a la lista en <https://tc39.github.io/ecma262/> y luego avanzan hasta [specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm). | ||
|
|
||
| Teams behind JavaScript engines have their own ideas about what to implement first. They may decide to implement proposals that are in draft and postpone things that are already in the spec, because they are less interesting or just harder to do. | ||
| Equipos detrás de intérpretes (engines) de JavaScript tienen sus propias ideas sobre que implementar primero. Pueden decidir implementar propuestas que están en borrador y posponer cosas que ya están en la especificación, por qué son menos interesantes o simplemente más difíciles de hacer. | ||
vplentinax marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| So it's quite common for an engine to implement only the part of the standard. | ||
| Por lo tanto, es bastante común para un intérprete implementar solo la parte del estándar. | ||
|
|
||
| A good page to see the current state of support for language features is <https://kangax.github.io/compat-table/es6/> (it's big, we have a lot to study yet). | ||
| Una buena página para ver el estado actual de soporte para características del lenguaje es <https://kangax.github.io/compat-table/es6/> (es grande, todavía tenemos mucho que aprender). | ||
|
|
||
| ## Babel | ||
|
|
||
| When we use modern features of the language, some engines may fail to support such code. Just as said, not all features are implemented everywhere. | ||
| Cuando usamos características modernas del lenguaje, puede que algunos intérpretes no soporten dicho código. Como hemos dicho, no todas las características están implementadas en todas partes. | ||
|
|
||
| Here Babel comes to the rescue. | ||
| Aquí Babel viene al rescate. | ||
|
|
||
| [Babel](https://babeljs.io) is a [transpiler](https://en.wikipedia.org/wiki/Source-to-source_compiler). It rewrites modern JavaScript code into the previous standard. | ||
| [Babel](https://babeljs.io) es un [transpiler](https://en.wikipedia.org/wiki/Source-to-source_compiler). Reescribe código JavaScript moderno en el estándar anterior. | ||
|
|
||
| Actually, there are two parts in Babel: | ||
| En realidad, hay dos partes en Babel: | ||
|
|
||
| 1. First, the transpiler program, which rewrites the code. The developer runs it on their own computer. It rewrites the code into the older standard. And then the code is delivered to the website for users. Modern project build systems like [webpack](http://webpack.github.io/) provide means to run transpiler automatically on every code change, so that it's very easy to integrate into development process. | ||
| 1. Primero, el programa transpiler, que reescribe código. El desarrollador lo ejecuta en su propio ordenador. Reescribe el código al viejo estándar. Y entonces el código es entregado al navegador para los usuarios. Proyectos modernos para construcción de sistemas como [webpack](http://webpack.github.io/) o [brunch](http://brunch.io/), proporcionan medios para ejecutar el transpiler automáticamente en cada cambio al código, de modo que no implique ninguna perdida de tiempo de nuestra parte. | ||
|
|
||
| 2. Second, the polyfill. | ||
| 2. Segundo, el polyfill. | ||
|
|
||
| New language features may include new built-in functions and syntax constructs. | ||
| The transpiler rewrites the code, transforming syntax constructs into older ones. But as for new built-in functions, we need to implement them. JavaScript is a highly dynamic language, scripts may add/modify any functions, so that they behave according to the modern standard. | ||
| El transpiler reescribe el código, por lo que se cubren las características de la sintaxis. Pero para funciones nuevas tenemos que escribir un script especial que las implemente. JavaScript es un lenguaje muy dinámico, puede que los scripts no solo agreguen nuevas funciones, pero que también modifiquen las funciones incorporadas, para que actúen de forma correspondiente al estándar moderno. | ||
vplentinax marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| A script that updates/adds new functions is called "polyfill". It "fills in" the gap and adds missing implementations. | ||
| Existe el término "polyfill" para scripts que "llenan"(fill in) el vacío y agregan las implementaciones que faltan. | ||
|
|
||
| Two interesting polyfills are: | ||
| - [core js](https://github.com/zloirock/core-js) that supports a lot, allows to include only needed features. | ||
| - [polyfill.io](http://polyfill.io) service that provides a script with polyfills, depending on the features and user's browser. | ||
| Dos polyfills interesantes son: | ||
| - [babel polyfill](https://babeljs.io/docs/usage/polyfill/) que soporta mucho, pero es muy grande. | ||
| - [polyfill.io](http://polyfill.io) servicio que nos permite cargar/construir polyfills bajo demanda, dependiendo de las características que necesitemos. | ||
|
|
||
| So, if we're going to use modern language features, a transpiler and a polyfill are necessary. | ||
| Así que, si queremos usar características modernas del lenguaje, el transpiler y polyfill son necesarios. | ||
|
|
||
| ## Examples in the tutorial | ||
| ## Ejemplos en el tutorial | ||
|
|
||
|
|
||
| ````online | ||
| Most examples are runnable at-place, like this: | ||
| La mayoría de ejemplos se pueden ejecutar en el sitio, así: | ||
| ```js run | ||
| alert('Press the "Play" button in the upper-right corner to run'); | ||
| alert('Presione el botón "Play" en la esquina superior derecha para ejecutar'); | ||
| ``` | ||
| Examples that use modern JS will work only if your browser supports it. | ||
| Ejemplos que usan JS moderno solo funcionarán si tu navegador lo soporta. | ||
| ```` | ||
|
|
||
| ```offline | ||
| As you're reading the offline version, in PDF examples are not runnable. In EPUB some of them can run. | ||
| Como estás leyendo la verión offline, en PDF los ejemplos no se pueden ejecutar. En EPUB algunos pueden ejecutarse. | ||
| ``` | ||
|
|
||
| Google Chrome is usually the most up-to-date with language features, good to run bleeding-edge demos without any transpilers, but other modern browsers also work fine. | ||
| Generalmente, Google Chrome está actualizado con las últimas características del lenguaje, funciona bien para ejecutar demos con tecnología puntera sin ningún transpiler, pero otros navegadores modernos también funcionan bien. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # Code quality | ||
| # Calidad del c�digo | ||
|
|
||
| This chapter explains coding practices that we'll use further in the development. | ||
| Este capitulo explica practicas en programaci�n que usaremos durante el desarrollo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # The JavaScript language | ||
| # El lenguaje JavaScript | ||
|
|
||
| Here we learn JavaScript, starting from scratch and go on to advanced concepts like OOP. | ||
| Aqu� aprendemos JavaScript, empezando desde zero y pasando a conceptos avanzados como OOP (programaci�n orientada a objetos). | ||
|
|
||
| We concentrate on the language itself here, with the minimum of environment-specific notes. | ||
| Aqu� nos concentramos en el lenguaje en si mismo, con el m�nimo de notas espec�ficas del entorno. | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.