some levels translated

This commit is contained in:
Luca Canali 2021-09-13 17:54:39 +02:00
parent 331f08b899
commit 68577813c2
11 changed files with 156 additions and 159 deletions
levels/it_IT/branches

View file

@ -1,43 +1,43 @@
title = Moving through time
title = Muoversi attraverso il tempo
cards = checkout commit-auto
[description]
The yellow boxes are frozen points in time, we call them "commits"! You can travel between them using the "checkout" card! (Try it!)
La scatole gialle sono un punto fisso nel tempo, possiamo chiamarli "commits"! Puoi viaggiare tra loro usando la carta "checkout"! (Provala!)
Can you find out what happened here? Then, while on the last commit, edit the files to fix the problem, and make a new commit!
Puoi scoprire cosa è successo qui? Quindi, durante ultimo commit, modifica i files per risolvere il problema ed invia un nuovo commit!
[cli]
To checkout a specific commit, type `git checkout`, then a space, and then right click on the commit you want!
Guarda uno specifico commit, digita `git checkout` uno spazio e premi il tasto destro sopra il commit che vuoi!
This will insert the commit's unique identifier!
Questo inserirà l'identificatore unico del commit!
[setup]
echo "This piggy bank belongs to the big sister.
It contains 10 coins." > piggy_bank
echo "Questo salvadanaio appartiene alla sorella maggiore.
Contiene 10 monete." > piggy_bank
git add .
git commit -m "The beginning"
git commit -m "L'inizio"
echo "A young girl with brown, curly hair." > little_sister
echo "Una giovane donna con capelli, ricci, marroni." > little_sister
git add .
git commit -m "Little sister comes in"
git commit -m "La sorella piccola è arrivata"
echo "Has 10 coins." >> little_sister
echo "This piggy bank belongs to the big sister.
It is empty." > piggy_bank
echo "Ha 10 monete." >> little_sister
echo "Questo salvadanaio appartiene alla sorella maggiore.
E' vuoto." > piggy_bank
git add .
git commit -m "Little sister does something"
git commit -m "La sorella piccola ha fatto qualcosa"
git checkout HEAD^^
git branch -df main
[win]
# Restore sisterly peace.
{ git show HEAD:piggy_bank | grep "10 coins"; } && { git show HEAD:little_sister | grep -v "10 coins"; } && { git rev-parse HEAD^^^; }
# Ripristina il salvadanaio della sorella.
{ git show HEAD:piggy_bank | grep "10 monete"; } && { git show HEAD:little_sister | grep -v "10 monete"; } && { git rev-parse HEAD^^^; }
[congrats]
Wonderful! Now that you're getting familiar with the time machine, let's look at some more complicated situations...
Stupendo! Adesso hai preso famiglirità con la macchina del tempo, vediamo situazioni più complicate...

View file

@ -1,65 +1,65 @@
title = Make parallel commits
title = Crea universi paralleli
cards = checkout commit-auto
[description]
Did you know that creating parallel timelines is perfectly legal and safe? It's true!
Sai che creare line temporali parallele è perfettamente legale e sicuro? Vero!
Can you find out when things went wrong in this zoo? Then, go back to the last good commit and create a parallel universe where everyone is happy!
Puoi scoprire qundo le cose sono andate male in questo zoo? Poi torna all'ultimo momento buono e crea un universo parallelo dove sono tutti felicy!
[cli]
The blue animal represents a concept known as the "HEAD pointer" in Git: It shows you which commit is the current one.
L'animale blue rappresenta un concetto conosciuto come "HEAD pointer" in Git: Ti mostra qual'è il commit attuale.
Here's a cool trick to go to the previous commit:
Ecco un simpatico trucchetto andare al commit precedente:
git checkout HEAD^
You can also go back two commits by typing, for example:
Puoi anche andare indietro di 2 commit digitando, pre esempio:
git checkout HEAD~2
[setup]
mkdir cage
echo "Looks very hungry." > cage/lion
echo "Sembra molto affamato." > cage/lion
echo "A small child.
It really loves cats!" > child
echo "Un ragazzino..
Ama veramente i gatti!" > child
git add .
git commit -m "The beginning"
git commit -m "L'inizio"
echo "It's holding a lollipop." >> child
git commit -am "The child buys something"
echo "Tiene in mano un leccalecca." >> child
git commit -am "Il ragazzo compra qualcosa"
mv child cage
git add .
git commit -m "The child climbs somewhere"
git commit -m "Il bambino si arrampica da qualche parte"
git rm cage/child
echo "Looks happy. :)" > cage/lion
echo "E' felice. :)" > cage/lion
git add .
git commit -m "Oh no"
echo "It's sleeping." > cage/lion
echo "Sta dormendo." > cage/lion
git add .
git commit -m "Nap time!"
git commit -m "Ora del pisolino!"
git checkout --detach
git branch -d main
[win]
# Make sure that the child is happy.
# Assicurati che il ragazzino sia felice.
git ls-tree --name-only -r HEAD | grep child
# Make sure that the lion gets something to eat.
git show HEAD:cage/lion | grep -v "very hungry"
# Assicurati che il leone abbia qualcosa da mangiare.
git show HEAD:cage/lion | grep -v "molto affamato"
[congrats]
Whew, good job! This seems like a *much* better outcome.
Whew, ottimo lavoro! Questo sembra un risultato molto migliore.
Feel free to add more parallel timelines, or make them longer.
Sentiti libero di aggiungere altre line temporali parallele o allungarle.
If you're ready, our next mission is already waiting...
Se sei pronto, la prossima missione ci sta aspettando...

View file

@ -1,34 +1,33 @@
title = Branches grow with you!
title = I rami crescono con tè!
cards = checkout commit-auto branch branch-delete reset-hard
[description]
Note that there are two options to "travel to the end of a timeline":
Nota che ci sono due opzioni per "viaggire fino alla fine della linea temporale":
First, you can directly travel to the commit, like we've done it before.
Primo, puoi direttamente viaggiare al commit, come abbiamo fatto prima.
And second, you can travel to the branch label. In this case, when you make a new commit, the branch will grow with you, and still point at the end of the timeline!
e secondo, puoi viaggiare fino all'etichetta del ramo. In questo caso, quando crei un nuovo commit, il ramo cresce con te e punta ancora alla fine della linea temporale!
[cli]
Per viaggire in un ramo, digita `git checkout name_of_the_branch`.
To travel to a branch, type `git checkout name_of_the_branch`.
And to travel to the last commit, type `git checkout --detach name_of_the_branch`.
e per viaggiare all'ultimo commit, digita `git checkout --detach name_of_the_branch`.
[setup]
echo "You wrap the birthday present, and grab your concert ticket." > you
echo "In carti il regalo di complanno e prendi il biglietto del concerto." > you
git add .
git commit -m "Evening preparations"
echo "You go to the birthday party!" >> you
git commit -m "Preparazioni della sera"
echo "Vai alla festa di compleanno!" >> you
git add .
git commit -m "Go to the birthday"
git commit -m "Vai alla festa di compleanno"
git branch birthday
git checkout HEAD~1
echo "You go to the concert!" > you
echo "Vai al concerto!" > you
git add .
git commit -m "Go to the concert"
git commit -m "Vai al concerto"
git branch concert
git checkout HEAD~1
@ -37,7 +36,7 @@ git branch -D main
[win]
# Travel directly to the last yellow commit of the birthday timeline, make a change to 'you', and make a commit
# Viaggi direttamente all'ultimo commit giallo della line temporale del compleanno, fai un cambiamento per te e crea un commit
for commit in $(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep 'commit$' | cut -f1 -d' '); do
if test $(git rev-parse $commit^) = $(git rev-parse birthday); then
return 0
@ -45,5 +44,5 @@ for commit in $(git cat-file --batch-check='%(objectname) %(objecttype)' --batch
done
return 1
# Travel to the blue 'concert' branch, make a change to 'you', and a commit.
git show concert^ | grep "Go to the concert"
# Viaggi fino al ramo, blue, del concerto, fai un cambiamento ed un commit.
git show concert^ | grep "Vai al concerto"