Skip to content
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

Object references and copying #182

Merged
merged 10 commits into from
Jan 24, 2021

Conversation

pasor1
Copy link
Member

@pasor1 pasor1 commented Jan 22, 2021

No description provided.

@javascript-translate-bot javascript-translate-bot requested a review from a team January 22, 2021 15:32
@pasor1 pasor1 changed the title 02-object-copy Object references and copying Jan 22, 2021
@pasor1 pasor1 mentioned this pull request Jan 22, 2021
48 tasks
1-js/04-object-basics/02-object-copy/article.md Outdated Show resolved Hide resolved
1-js/04-object-basics/02-object-copy/article.md Outdated Show resolved Hide resolved
1-js/04-object-basics/02-object-copy/article.md Outdated Show resolved Hide resolved
1-js/04-object-basics/02-object-copy/article.md Outdated Show resolved Hide resolved
@javascript-translate-bot

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

pasor1 and others added 4 commits January 23, 2021 15:00
Co-authored-by: Andrea  <45577511+longo-andrea@users.noreply.github.com>
Co-authored-by: Andrea  <45577511+longo-andrea@users.noreply.github.com>
Co-authored-by: Andrea  <45577511+longo-andrea@users.noreply.github.com>
@pasor1
Copy link
Member Author

pasor1 commented Jan 23, 2021

/done

@longo-andrea
Copy link
Contributor

Per me l'articolo va bene cosi, essendo che è alla sua prima traduzione non sarebbe male ricevere una seconda revisiona da un terza persona


![](variable-contains-reference.svg)

The object is stored somewhere in memory (at the right of the picture), while the `user` variable (at the left) has a "reference" to it.
L'oggetto è archiviato da qualche parte nella memoria (sulla destra dell'immagine), mentre la variabile `user` (sulla sinistra) contiene il "riferimento" ad esso.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sulla [destra/sinistra] o a. "Sulla" non mi suona tanto bene...

Copy link
Member Author

@pasor1 pasor1 Jan 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ci ho pensato, ma qui ci si riferisce alla parte destra e sinistra dell'immagine e non a posizioni destra/sinistra rispetto all'immagine. Forse meglio usare "parte sinistra dell'immagine", oppure "a sinistra nell'immagine"


**When an object variable is copied, the reference is copied, but the object itself is not duplicated.**
**Quando una variabile oggetto viene copiata, in realtà viene copiato il riferimento, ma l'oggetto in sé non viene duplicato.**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sono un po' dubbioso su variabile oggetto. Penso sia piu' intuitivo nella versione inglese. In italiano, credo, potrebbe confondere (siccome abbiamo frasi come 'la legge oggetto di revisione', 'l'oggetto dei miei studi' ecc). Che ne dici di aggiungere delle virgolette? "variabile oggetto". Toglierei altresì il ma alla fine. Infine sono anche un po' dubbioso su in sé. E' corretto e suona bene, ma penso possa essere piu' intuitivo l'oggetto riferito (così utilizziamo anche la terminologia tecnica)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'accordo sulle virgolette, vedo di correggere tutte le istanze. Mentre per oggetto riferito mi sembra un po' troppo difficile, ricordiamoci che il tutorial nasce con l'intento di essere facile da leggere.

alert( a === b ); // true
```

And here two independent objects are not equal, even though they look alike (both are empty):
Qui, invece, due oggetti identici (entrambi vuoti) ma indipendenti, non soddisfano l'uguaglianza:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(opionione personalissima: aggiungerei una virgola dopo la parentesi). Non mi convince a pieno 'non soddisfano l'uguaglianza'... Non è molto chiaro. Funzionerebbe bene insieme a una traduzione di equality query; ad esempio (so che non suona bene, e' solo un esempio) interrogazione d'uguaglianza o non soddisfa i criteri d'uguaglianza del comparison operator ['==']. Che ne pensi?

Co-authored-by: Andrea  <45577511+longo-andrea@users.noreply.github.com>
- Further arguments `src1, ..., srcN` (can be as many as needed) are source objects.
- It copies the properties of all source objects `src1, ..., srcN` into the target `dest`. In other words, properties of all arguments starting from the second are copied into the first object.
- The call returns `dest`.
- Il primo argomento `dest` è l'oggetto di destinazione.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non mi convince moltissimo di destinazione. Sarebbe piu' chiaro, magari, se aggiungessimo 'delle proprieta' da copiare'. (Nemmeno i sinonimi mi convincono molto; dalla treccani: finalità, fine, meta, mira, obiettivo, scopo, target, traguardo; forse "l'oggetto di mira"?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

piu' letteralmente "target" sarebbe "obiettivo", ma in questo caso "destinazione" mi sembra renda meglio l'idea

```

If the copied property name already exists, it gets overwritten:
Se una delle proprietà copiate è già presente nell'oggetto di destinazione, verrà sovrascritta.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vedi sopra (anche se, ti diro', qui e' intuitivo)

Copy link
Contributor

@Dorin-David Dorin-David left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ho suggerito un paio di modifiche. Tutte piccolezze, ottima traduzione e' stato un piacere leggerla!

@javascript-translate-bot

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

@pasor1
Copy link
Member Author

pasor1 commented Jan 24, 2021

/done

@pasor1
Copy link
Member Author

pasor1 commented Jan 24, 2021

/done

Copy link
Contributor

@Dorin-David Dorin-David left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test

@pasor1 pasor1 merged commit fba575b into javascript-tutorial:master Jan 24, 2021
@javascript-translate-bot

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

@pasor1 pasor1 deleted the article/02-object-copy branch January 24, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants