GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Function binding by vplentinax · Pull Request #206 · javascript-tutorial/es.javascript.info

Conversation

@vplentinax

@vplentinax vplentinax commented May 25, 2020

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@javascript-translate-bot javascript-translate-bot added the review needed label May 25, 2020
@javascript-translate-bot
javascript-translate-bot requested a review from a team May 25, 2020 01:25
@iliakan iliakan mentioned this pull request May 25, 2020
Spanish Translation Progress #17
Open
joaquinelio
joaquinelio requested changes May 25, 2020
View reviewed changes

@joaquinelio joaquinelio left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

Muy fluido y las palabras adecuadas, es bueno.

Para discusión. De varios comentarios que puse, cambié de opinión en el caso de conjugaciones, dejarlas en inglés sería delirante. Pero me mantengo en las definiciones js: bind, wrapper, en dejarlas en inglés o aclarar inmediatamente entre paréntesis. Que el lenguaje no distraiga. Por ej.: ver "contenedor" o "vincular" pasa desapercibido cuando en realidad se está refiriendo a algo muy específico.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/06-advanced-functions/10-bind/5-question-use-bind/solution.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread 1-js/06-advanced-functions/10-bind/6-ask-partial/solution.md Outdated
@@ -0,0 +1,16 @@


1. Utilice una función de contenedor, una flecha para ser conciso:

@joaquinelio joaquinelio May 25, 2020

Copy link
Copy Markdown
Member

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.

Para glosario y discusión. Solo opino, me pliego a lo que decidan:

El original está feo. Y en español el sentido encima se desdibuja. Prefiérolo más específico:
"Use una función wrapper, de tipo arrow para ser conciso..."

Me pongo en lugar del que está aprendiendo, si usamos español es más difícil hacer la conexión a que es un tema ya estudiado, y el concepto es importante
wrapper, una función nueva que envuelve a otra existente para darle más... funcionalidad
arrow la forma abreviada: ( ) =>
no traducirlos hiere mi sentido del castellano PERO impactante más al que está aprendiendo
pues no tiene que aprender el doble, la def en inglés y en castellano, la literatura está llena de wrapper objects y tiene que fijarla.

En otro lado usé "envoltura" solamente para definirlo, contenedor creo que también está bien, pero si lo traducimos como definición (uf) deberíamos usar siempre lo mismo.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/06-advanced-functions/10-bind/article.md Outdated
---

# Function binding
# Función vinculadora

@joaquinelio joaquinelio May 25, 2020

Copy link
Copy Markdown
Member

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.

sugiero siempre aclarar, para que se fije el tema.
Si buscara el tema, querría que bind (el nombre de la funcipn) o binding estuvieran en el título.

"Función bind (vincular)" o "Función vinculadora (bind)"

Glosario, discusión:
BINDING es otro concepto importante, no lo traduciría, pero es algo personal.
MDN aparece a veces como enlace y otras como vínculo, tanto sinónimo hace más arduo asimilarlo.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@EzequielCaste EzequielCaste Jun 2, 2020

Copy link
Copy Markdown
Contributor

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.

puede ser "Vinculación de Funciones" ??

Enlazar Funciones ??

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/06-advanced-functions/10-bind/article.md Outdated
La tarea es bastante típica --queremos pasar un método de objeto a otro lugar (aquí --al planificador) donde se llamará. ¿Cómo asegurarse de que se llamará en el contexto correcto?

## Solution 1: a wrapper
## Solución 1: un contenedor o envoltura

@joaquinelio joaquinelio May 25, 2020

Copy link
Copy Markdown
Member

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.

prefiero aclarar
un contenedor o envoltura (wrapper)
o
un wrapper (envoltura)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/06-advanced-functions/10-bind/article.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread 1-js/06-advanced-functions/10-bind/article.md Outdated
```

The result of `func.bind(context)` is a special function-like "exotic object", that is callable as function and transparently passes the call to `func` setting `this=context`.
El resultado de `func.bind(context)` es una función especial "objeto exótico" similar a una función regular, que se puede llamar como función y pasa la llamada de forma transparente a `func` estableciendo `this = context`.

@joaquinelio joaquinelio May 25, 2020

Copy link
Copy Markdown
Member

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.

fluidez
es un "objeto exótico", una función especial similar a una función regular que

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/06-advanced-functions/10-bind/article.md Outdated
```

In the line `(*)` we take the method `user.sayHi` and bind it to `user`. The `sayHi` is a "bound" function, that can be called alone or passed to `setTimeout` -- doesn't matter, the context will be right.
En la línea `(*)` tomamos el método `user.sayHi` y lo vinculamos a `user`. `sayHi` es una función "enlazada", que se puede llamar sola o pasarse en `setTimeout` -- no importa, el contexto será el correcto.

@joaquinelio joaquinelio May 25, 2020

Copy link
Copy Markdown
Member

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.

( ) sayHi es una función "enlazada", que pueda llamarse sola o pasarse en setTimeout -- no importa, ( )

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/06-advanced-functions/10-bind/article.md Outdated

## Parcial sin contexto

¿Qué pasa si nos gustaría arreglar algunos argumentos, pero no el contexto `this`? Por ejemplo, para un método de objeto.

@joaquinelio joaquinelio May 25, 2020

Copy link
Copy Markdown
Member

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.

incómodo
Y si quisiéramos arreglar algunos ( ) ?

arreglar ¿o fijar? Bien lo usaste así en otros lados. bind "fija" this ligando, pero también "arregla" la pérdida de this
no sé

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/06-advanced-functions/10-bind/article.md Outdated

Afortunadamente, se puede implementar fácilmente una función `parcial` para vincular solo argumentos.

Cómo esto:

@joaquinelio joaquinelio May 25, 2020

Copy link
Copy Markdown
Member

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.

Epa, se te coló un acento
Como esto:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@javascript-translate-bot javascript-translate-bot added changes requested and removed review needed labels May 25, 2020
@javascript-translate-bot

javascript-translate-bot commented May 25, 2020

Copy link
Copy Markdown

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vplentinax
vplentinax requested a review from EzequielCaste June 1, 2020 23:47
vplentinax added 2 commits June 1, 2020 21:08
@vplentinax
bind
70d8d94
@vplentinax
corrections
d8070d3
EzequielCaste
EzequielCaste approved these changes Jun 2, 2020
View reviewed changes
Comment thread 1-js/06-advanced-functions/10-bind/article.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@javascript-translate-bot javascript-translate-bot added needs +1 and removed changes requested labels Jun 2, 2020
joaquinelio
joaquinelio approved these changes Jun 2, 2020
View reviewed changes

@joaquinelio joaquinelio left a comment

Copy link
Copy Markdown
Member

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.

Bind =está a vecs enlace, a veces vínculo.
subjuntivo en algun lado

Pero como antes, es mínimo y no me importa, hacé de cuenta que no te dije nada.
Approve

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vplentinax
Merge branch 'master' into binding
e2b552a
@vplentinax
vplentinax merged commit 29507b0 into javascript-tutorial:master Jun 3, 2020
@javascript-translate-bot

javascript-translate-bot commented Jun 3, 2020

Copy link
Copy Markdown

Thank you 💖 I updated the Progress Issue #17 🎉 🎉 🎉

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@joaquinelio joaquinelio joaquinelio approved these changes
@EzequielCaste EzequielCaste EzequielCaste approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs +1

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@vplentinax @javascript-translate-bot @joaquinelio @EzequielCaste
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.