From 42c8a442cb08784ed89e08e6753a821a4102a128 Mon Sep 17 00:00:00 2001 From: Sunny Ripert Date: Fri, 25 May 2018 07:57:20 -0400 Subject: [PATCH] Translate the poem into French --- translations/fr/try_ruby_180.md | 2 +- translations/fr/try_ruby_190.md | 6 +++--- translations/fr/try_ruby_200.md | 12 ++++++------ translations/fr/try_ruby_210.md | 19 ++++++++++--------- translations/fr/try_ruby_220.md | 26 +++++++++++++++----------- 5 files changed, 35 insertions(+), 30 deletions(-) diff --git a/translations/fr/try_ruby_180.md b/translations/fr/try_ruby_180.md index 7818e7da..47507454 100644 --- a/translations/fr/try_ruby_180.md +++ b/translations/fr/try_ruby_180.md @@ -3,7 +3,7 @@ lang: FR title: Le résumé #2 est arrivé answer: \w+ class: stretcher chapmark -load: poem = "My toast has flown from my hand\nAnd my toast has gone to the moon.\nBut when I saw it on television,\nPlanting our flag on Halley's comet,\nMore still did I want to eat it.\n" +load: poem = "Ma biscotte s'est envolée de ma main\nEt ma biscotte est allée sur la lune.\nMais quand je l'ai vue à la télé,\nPlanter son drapeau sur une comète,\nJ'avais encore plus envie de la manger.\n" ok: Est-ce que ça rime? error: --- diff --git a/translations/fr/try_ruby_190.md b/translations/fr/try_ruby_190.md index 346ae874..67a529e0 100644 --- a/translations/fr/try_ruby_190.md +++ b/translations/fr/try_ruby_190.md @@ -1,17 +1,17 @@ --- lang: FR title: Malheuresement, la poésie de biscotte c'est pas ton truc -answer: (toast){0} +answer: (biscotte){0} load: prev ok: Excellent error: Ça sent toujours la biscotte pour moi --- Eh, c'est pas grave. T'es pas obligé d'aimer ça. Laisses toi aller et -améliore mon poème. Au lieu d'une biscotte, tu peux essayer un melon +améliore mon poème. Au lieu d'une biscotte, tu peux essayer une citrouille pourquoi pas. Essaie de voir ce nouveau poème: - poem.gsub("toast", "honeydew") + poem.gsub("biscotte", "citrouille") La méthode __gsub__ est un raccourci pour *sub*stitution *g*lobale. Elle remplace toutes les instances du mot "toast" avec "honeydew". diff --git a/translations/fr/try_ruby_200.md b/translations/fr/try_ruby_200.md index 9033f3d0..cda17479 100644 --- a/translations/fr/try_ruby_200.md +++ b/translations/fr/try_ruby_200.md @@ -1,12 +1,12 @@ --- -lang: EN -title: Ready, Aim -answer: ^\n.ti tae ot (.+) +lang: FR +title: Prêt, feu, partez +answer: ^\n\.regnam al (.+) load: prev -ok: Okay, sure. So the whole poem has been turned backwards. -error: +ok: Ok, d'accord. Le poème entier a été inversé. +error: --- -Here's a question: what happens when we reverse this whole poem? +Question : qu'est ce qui arrive si on inverse le poème en entier ? poem.reverse diff --git a/translations/fr/try_ruby_210.md b/translations/fr/try_ruby_210.md index c819ace1..b4fe935a 100644 --- a/translations/fr/try_ruby_210.md +++ b/translations/fr/try_ruby_210.md @@ -1,17 +1,18 @@ --- -lang: EN -title: Too Much Reversal -answer: ^\["More still did (.+) +lang: FR +title: Trop d'inversion tue l'inversion +answer: ^\["J'avais encore plus (.+) load: prev -ok: Yes, almost what we want -error: +ok: Oui, presque ce qu'il nous faut +error: --- -So the whole poem's been turned backwards, letter-by-letter. I really wanted to just reverse the lines though. -Move the last line up to first and the first line down to last. +Le poème entier a été inversé, lettre par lettre. Mais ce que je voulais c'était +juste inverser les lignes. +Déplacer la dernière ligne en premier et la première ligne en dernier. -Backwards, but not __that__ backwards. +Inversé mais pas __ce__ inversé-là. -Here's how: +Voilà comment on peut faire ça : poem.lines.reverse diff --git a/translations/fr/try_ruby_220.md b/translations/fr/try_ruby_220.md index e831019c..360edc20 100644 --- a/translations/fr/try_ruby_220.md +++ b/translations/fr/try_ruby_220.md @@ -1,21 +1,25 @@ --- -lang: EN -title: Ringlets of Chained Methods -answer: ^More still did (.+) +lang: FR +title: Méthodes à la chaîne +answer: ^J'avais encore plus (.+) load: prev -ok: Good show, my friend! The join method took that array of lines and put them together into a string. -error: +ok: Bravo, l'ami ! La méthode join a pris l'array de lignes et les as assemblé en un string. +error: --- -So what do you see? What happened there? You typed __poem.lines.reverse__ and what happened? +Alors qu'est-ce que tu vois ? Qu'est-ce qu'il s'est passé ? +Tu as tappé __poem.lines.reverse__ et que ce que ça a donné ? -Two things happened. You turned the poem into a list using lines. -Lines decides the way the string is split up and converts it into an Array. +Il s'est passé deux choses. Tu as transformé le poème en une liste +en utilisant lines. +La méthode lines decide la façon dont le string est découpé et le convertit en +un Array. -Then, you reversed that list. You had each line. You reversed them. That's it. +Ensuite, tu as inversé cette liste. Tu avais chaque ligne. Tu les as inversées. +C'est tout. -Let's tack one more method on the end there: +Ajoutons une dernière méthode au bout ici : puts poem.lines.reverse.join -Combining methods like this is called _method chaining_. \ No newline at end of file +Combiner plusieurs méthodes comme ça est appellé un _chaînage de méthodes_.