-
Notifications
You must be signed in to change notification settings - Fork 29
Class and Style section translated #10
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
Class and Style section translated #10
Conversation
src/v2/guide/class-and-style.md
Outdated
type: guide | ||
order: 6 | ||
--- | ||
|
||
A common need for data binding is manipulating an element's class list and its inline styles. Since they are both attributes, we can use `v-bind` to handle them: we just need to calculate a final string with our expressions. However, meddling with string concatenation is annoying and error-prone. For this reason, Vue provides special enhancements when `v-bind` is used with `class` and `style`. In addition to strings, the expressions can also evaluate to objects or arrays. | ||
Una necesidad común para unir datos es manipular la lista de clases de un elemento, así como sus estilos en línea. Como ambos son atributos, podemos usar `v-bind` para controlarlos: sólo debemos calcular un string final con nuestras expresiones. Sin embargo, trabajar con concatenaciones de strings es molesto y propenso a errores. Por esta razón, Vue ofrece mejoras especiales cuando `v-bind` es usado junto con `class` and `style`. En adición a strings, las expresiones pueden también ser evaluadas a objetos o arreglos. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De nuevo aparece arreglos
. Deberíamos establecer en pautas si este termino es valido o no y ejemplos de uso.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Siempre he conocido los arrays como arreglos. No uso el término colección ya que en el lenguaje java se refieren a una jerarquía de objetos diferentes.
La documentación de MSDN en javascript los llama matrices
https://msdn.microsoft.com/es-es/library/89t1khd2(v=vs.94).aspx
La documentación de Mozilla los llama array (La hicieron fácil jaja).
https://developer.mozilla.org/es/docs/Learn/Getting_started_with_the_web/JavaScript_basics
Yo me inclino por el lado de mozilla. Un desarrollador con conocimientos básicos ya reconoce el término array. Podemos incluirlo en la lista de no traducibles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me parece bien usar array, lo añado a las pautas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hecho
src/v2/guide/class-and-style.md
Outdated
|
||
``` html | ||
<div v-bind:class="{ active: isActive }"></div> | ||
``` | ||
|
||
The above syntax means the presence of the `active` class will be determined by the [truthiness](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) of the data property `isActive`. | ||
La anterior sintaxis ilustra que la presencia de la clase `active` será determinada por el [valor de verdad](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) de la propiedad `isActive`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valor de verdad
es confuso. Mejor dejarlo sin traducir, ej: por el valor [truthiness](htt...)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
src/v2/guide/class-and-style.md
Outdated
@@ -57,7 +57,7 @@ data: { | |||
} | |||
``` | |||
|
|||
This will render the same result. We can also bind to a [computed property](computed.html) that returns an object. This is a common and powerful pattern: | |||
Esto mostrará el mismo resultado. También podemos Unir a una [propiedad calculada](computed.html) que retorne un objeto. Esto es un patrón muy común y poderoso: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sugerencia: También podemos usar una [propiedad...]
en vez de Unir
.
src/v2/guide/class-and-style.md
Outdated
|
||
``` html | ||
<p class="foo bar baz boo">Hi</p> | ||
``` | ||
|
||
The same is true for class bindings: | ||
Lo mismo aplica para Union en clases: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No me convence la expressión Union
para traducir binding
. Alternativas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Estuve buscando varias (Atar, Enlazar...) pero cuando se usa conjugado sonaban peor. Quedo atento a mejores alternativas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En este contexto podríamos usar un lenguaje mas natura? Ejemplo, Lo mismo ocurre para la unión de clases
.
src/v2/guide/class-and-style.md
Outdated
@@ -165,7 +165,7 @@ data: { | |||
} | |||
``` | |||
|
|||
It is often a good idea to bind to a style object directly so that the template is cleaner: | |||
Es a menudo una buena idea Unir un objeto de estilos directamente para que la plantilla sea más limpia: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usar
en vez de Unir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No creo que usar sea la palabra que trasmita la accion de usar v-bind. Al igual que el comentario anterior. Quedo a la espera de una mejor alternativa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quizás Asignar
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me gusta Asignar. Aplicaría para todos los demás comentarios donde se usa v-bind.
Podríamos agregar una nota pequeña definiendo el término en algún lado.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No estoy seguro si fui muy rapido haciendo el merge?
Mejor evitemos notas y añadir nuevo contenido al texto.
He reemplazado completamente la palabra Unión, por un manejo correcto de la directiva v-bind. Espero comentarios. |
No description provided.