|
| 1 | +# Guía de estilo |
| 2 | + |
| 3 | +## Texto en bloques de código |
| 4 | + |
| 5 | +Deja el texto en los bloques de código sin traducir, excepto para los comentarios. Opcionalmente puedes traducir el texto en cadenas, ¡pero cuida de no traducir cadenas que hagan referencia a código! |
| 6 | + |
| 7 | +Ejemplo: |
| 8 | +```js |
| 9 | +// Example |
| 10 | +const element = <h1>Hello, world</h1>; |
| 11 | +ReactDOM.render(element, document.getElementById('root')); |
| 12 | +``` |
| 13 | + |
| 14 | +✅ CORRECTO: |
| 15 | + |
| 16 | +```js |
| 17 | +// Ejemplo |
| 18 | +const element = <h1>Hello, world</h1>; |
| 19 | +ReactDOM.render(element, document.getElementById('root')); |
| 20 | +``` |
| 21 | + |
| 22 | +✅ TAMBIÉN CORRECTO: |
| 23 | + |
| 24 | +```js |
| 25 | +// Ejemplo |
| 26 | +const element = <h1>Hola mundo</h1>; |
| 27 | +ReactDOM.render(element, document.getElementById('root')); |
| 28 | +``` |
| 29 | + |
| 30 | +❌ INCORRECTO: |
| 31 | + |
| 32 | +```js |
| 33 | +// Ejemplo |
| 34 | +const element = <h1>Hola mundo</h1>; |
| 35 | +// "root" hace referencia a un indentificador de un elemento. |
| 36 | +// NO LO TRADUZCAS |
| 37 | +ReactDOM.render(element, document.getElementById('raíz')); |
| 38 | +``` |
| 39 | + |
| 40 | +❌ DEFINITIVAMENTE INCORRECTO: |
| 41 | + |
| 42 | +```js |
| 43 | +// Ejemplo |
| 44 | +const elemento = <h1>Hola mundo</h1>; |
| 45 | +ReactDOM.hacer(elemento, documento.obtenerElementoPorId('raíz')); |
| 46 | +``` |
| 47 | + |
| 48 | +## Enlaces externos |
| 49 | + |
| 50 | +Si un enlace externo es a un artículo en un sitio de referencias como [MDN] o [Wikipedia] y existe una versión de este artículo en español con una calidad aceptable, considera sustituir el enlace por el de esa versión. |
| 51 | + |
| 52 | +[MDN]: https://developer.mozilla.org/en-US/ |
| 53 | +[Wikipedia]: https://en.wikipedia.org/wiki/Main_Page |
| 54 | + |
| 55 | +Ejemplo: |
| 56 | + |
| 57 | +```md |
| 58 | +React elements are [immutable](https://en.wikipedia.org/wiki/Immutable_object). |
| 59 | +``` |
| 60 | + |
| 61 | +✅ BIEN: |
| 62 | + |
| 63 | +```md |
| 64 | +Los elementos de React son [inmutables](https://es.wikipedia.org/wiki/Objeto_inmutable). |
| 65 | +``` |
| 66 | + |
| 67 | +Para enlaces que no tienen un equivalente en español (Stack Overflow, videos de YouTube, etcétera) mantén el enlace en inglés. |
| 68 | + |
| 69 | +## Usted, tú y vos |
| 70 | + |
| 71 | +Para mantener la consistencia y evitar regionalismos decidimos utilizar tú para la segunda persona del singular. |
| 72 | + |
| 73 | +## Traducciones comunes |
| 74 | + |
| 75 | +Aquí hay algunas sugerencias para la traducción de términos de uso común en este tipo de documentación técnica. |
| 76 | + |
| 77 | +| Original word/term | Suggestion | |
| 78 | +| ------------------ | ---------- | |
| 79 | +| array | *array* | |
| 80 | +| arrow function | función flecha | |
| 81 | +| assert | comprobar | |
| 82 | +| bug | error | |
| 83 | +| bundler | *bundler* | |
| 84 | +| callback | *callback* | |
| 85 | +| camelCase | *camelCase* | |
| 86 | +| controlled component | componente controlado | |
| 87 | +| Cheatsheet | *Cheatsheet* | |
| 88 | +| debugging | depuración | |
| 89 | +| DOM | DOM | |
| 90 | +| framework | *framework* | |
| 91 | +| function component | componente de función | |
| 92 | +| hook | *hook* | |
| 93 | +| key | *key* | |
| 94 | +| lazy initialization | inicialización diferida | |
| 95 | +| library | biblioteca | |
| 96 | +| lowercase | minúscula(s) | |
| 97 | +| props | *props* | |
| 98 | +| React element | Elemento de React | |
| 99 | +| Type | *tipo* | |
| 100 | +| Types | *tipos* | |
| 101 | +| render | renderizar (verb), renderizado (noun) |
| 102 | +| shallow rendering | renderizado superficial | |
| 103 | +| state | estado | |
| 104 | +| string | *string* | |
| 105 | +| template literals | *template literals* | |
| 106 | +| uncontrolled component | componente no controlado | |
| 107 | + |
| 108 | +Si desea agregar algo que falta, abra un [Issue](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet-es/issues/new). |
0 commit comments