From 36dd0e64f32f1739362a0b81fb495aa13e8e1659 Mon Sep 17 00:00:00 2001 From: deadprogrammer Date: Tue, 26 Jun 2012 07:24:06 -0700 Subject: [PATCH 01/31] Starting out French translation branch --- app/models/languages.rb | 2 +- .../fr/hacketyhack/basic_programming.html | 204 +++++++++++ public/help/fr/hacketyhack/basic_ruby.html | 210 ++++++++++++ public/help/fr/hacketyhack/colors.html | 53 +++ public/help/fr/hacketyhack/index.html | 29 ++ public/help/fr/index.html | 27 ++ public/help/fr/keyboard-shortcuts.html | 317 ++++++++++++++++++ public/help/fr/kidsruby/glossary.html | 46 +++ public/help/fr/kidsruby/how_to_use.html | 65 ++++ public/help/fr/ruby4kids/index.html | 36 ++ public/help/fr/ruby4kids/lesson_1.html | 107 ++++++ public/help/fr/ruby4kids/lesson_2.html | 88 +++++ public/help/fr/ruby4kids/lesson_3.html | 100 ++++++ public/help/fr/ruby4kids/lesson_4.html | 73 ++++ public/help/fr/ruby4kids/lesson_5.html | 129 +++++++ public/help/fr/ruby4kids/lesson_6.html | 148 ++++++++ public/help/fr/ruby4kids/lesson_7.html | 117 +++++++ public/help/fr/ruby4kids/lesson_8.html | 125 +++++++ public/help/fr/ruby4kids/lesson_9.html | 114 +++++++ public/help/fr/rubywarrior/index.html | 44 +++ public/js/i18n/fr.js | 13 + 21 files changed, 2046 insertions(+), 1 deletion(-) create mode 100644 public/help/fr/hacketyhack/basic_programming.html create mode 100644 public/help/fr/hacketyhack/basic_ruby.html create mode 100644 public/help/fr/hacketyhack/colors.html create mode 100644 public/help/fr/hacketyhack/index.html create mode 100644 public/help/fr/index.html create mode 100644 public/help/fr/keyboard-shortcuts.html create mode 100644 public/help/fr/kidsruby/glossary.html create mode 100644 public/help/fr/kidsruby/how_to_use.html create mode 100644 public/help/fr/ruby4kids/index.html create mode 100644 public/help/fr/ruby4kids/lesson_1.html create mode 100644 public/help/fr/ruby4kids/lesson_2.html create mode 100644 public/help/fr/ruby4kids/lesson_3.html create mode 100644 public/help/fr/ruby4kids/lesson_4.html create mode 100644 public/help/fr/ruby4kids/lesson_5.html create mode 100644 public/help/fr/ruby4kids/lesson_6.html create mode 100644 public/help/fr/ruby4kids/lesson_7.html create mode 100644 public/help/fr/ruby4kids/lesson_8.html create mode 100644 public/help/fr/ruby4kids/lesson_9.html create mode 100644 public/help/fr/rubywarrior/index.html create mode 100644 public/js/i18n/fr.js diff --git a/app/models/languages.rb b/app/models/languages.rb index 86ca80f..12fc4bf 100644 --- a/app/models/languages.rb +++ b/app/models/languages.rb @@ -1,6 +1,6 @@ module KidsRuby class Language - LANGUAGES_SUPPORTED = %w{en es} + LANGUAGES_SUPPORTED = %w{en es fr} class << self def system diff --git a/public/help/fr/hacketyhack/basic_programming.html b/public/help/fr/hacketyhack/basic_programming.html new file mode 100644 index 0000000..e77dbf3 --- /dev/null +++ b/public/help/fr/hacketyhack/basic_programming.html @@ -0,0 +1,204 @@ + + + + Basic Programming + + + + + + + + + + + + + + + + +

Basic Programming

+ + + + +

Hello there!

+

Round One

+

So, you'd like to learn how to hack code with the best of 'em, eh? Well, you've come to the right place. This is the very first lesson I have to share with you. It all starts here.

+

I want to get you started off on the best possible foot with making programs, so we'll start off by talking a little bit about what programming is, and then we'll write some basic programs to draw fun things on the screen. Sound good? Off we go!

+
+
+ + + +

Let's talk about programming

+

It's all about instructions

+

When you get down to it, programming is all about algorithms. That's a big fancy word for 'a list of instructions.' Every program is simply a big to-do list of instructions for the computer to follow.

+

You can turn almost anything into a list of instructions if you really think about it. Most of the time, you've got so much practice at doing things that you don't even think about these individual steps. You just do them. It's very natural.

+
+ +

The computer is simple

+

Unfortunately, computers are actually quite simple. This may be contrary to everything you've ever heard, but it's the truth. Even though we compare computers to things like our brains, it's a really poor analogy. What computers are actually really good at is performing simple, boring things over and over again very accurately. They can't think for themselves!

+

This is why computers appear to be complex. They blindly follow whatever orders they're given, without any thought about how those instructions are good or bad. It's hard to think in such simple terms!

+
+ +

Explain yourself well

+

It's important to remember that you have to fully explain yourself to the computer when you're programming. It can't figure out what you're trying to say, so you have to say what you mean!

+

This takes some practice, so we're going to start off with some exercises in explaining ourselves in very basic terms. It's almost like trying to explain math to a young child: you have to go slowly, triple check your work, and have some patience when it just doesn't quite get it.

+
+
+ + + +

Lists of Instructions

+

A to-do list, not a shopping list

+

When I say that computers follow lists of instructions, I mean a to-do list, not a shopping list. What I'm trying to say is that these lists have an order to them that the computer follows. It does each step in turn as quickly as it possibly can.

+

A shopping list is a different kind of list entirely. You can go to whichever aisle you choose, and as long as you get everything before you leave, you're A-OK. This isn't what the computer does at all.

+
+ +

How would you tell a person to do it?

+

Let's try an example: if you had to tell someone in words how to draw a square on a piece of paper, how would you do it?

+

You're not allowed to say "like this" or "this way," that's cheating! You have to spell out every detail.

+
+ +

Once again: computers are simple

+

How'd you do? I can't see what you said, but here's an example of how simple computers are compared to people. Did you forget to mention how long each side of the square is? If you didn't good job!

+

Here's how I'd do it, by the way. This isn't the only right answer, it's just an example:

+

1. Put your pen down on the paper.

+

2. Draw right one inch.

+

3. Draw down one inch.

+

4. Draw left one inch.

+

5. Draw up one inch.

+

6. Take your pen off of the paper.

+

7. You're done!

+
+
+ + + +

Turtles, all the way down.

+

Drawing... with turtles?

+

Okay! Enough of these thinking experiments. Let's actually make something. I bet you've been wondering when that was going to start, right? It's really important to get the basics down first.

+

We're going to tell the computer how to draw shapes... with turtles. Yes, you heard me right. You're going to have to give these instructions to a turtle.

+

This particular turtle is carrying a pen. You have a piece of paper. The turtle will follow your every word. But the turtle is a bit slow, and needs careful instruction. Are you up to it?

+
+ +

The Turtle and its commands

+

We have to tell Ruby that we want to tell the Turtle what to do. To do that, we have a Turtle command. We can tell the Turtle two things:

+

draw: the turtle will follow our instructions at lightning speed, drawing our entire image in the blink of an eye. +

start: an interactive window will appear, which lets you see the turtle move at each step in the program. You can move at your own pace. This is useful if the turtle isn't doing what you expect! +

+ +

Type it in!

+

Cool. Now type this:

+

Turtle.draw

+

The period in between the Turtle and the draw connects them together. Programming languages have rules, just like English has rules! You can think of Turtle like a subject, and draw as a verb. Together, they make a sentence: hey turtle, draw me something!

+

Once you've typed that in, go ahead and click the 'Run' button. The turtle moves so quickly in draw mode that you won't even see him, but I assure you, he's there!

+
+ +

Do... what I tell you to

+

Awesome! We've got the turtle going, at least. Now we need to tell it what we want to draw!

+

Remember when we said that all programs are lists of instructions? In this case, our program only has one instruction: Turtledraw something! But we need to be able to give the Turtle its own list of instructions.

+

To do this, we'll use two words: do and end. These two words together make up a sublist of things, just for the Turtle!

+
+ +

Changing the background

+

Let's try this: we can tell the Turtle that we want to use a different background color by using the background command. Check it out:

+
Code automatically inserted here...
+

Type this in and click 'Run'!

+
+ +

The Turtle gets its orders

+

Cool stuff! The background is now maroon. Click here to see a full list of colors that are supported. +

This is also how you make lists of instructions for the Turtle to follow. To make it a little easier to see, programmers will often put two spaces before sublists. Get in the habit now, you'll thank me later!

+
+ +

The pen

+

Now that we've got a snazzy background color, how do we draw some lines? Well, the first thing you need to know about is the pen. The Turtle carries a pen along, and drags it along the ground behind itself. You can change the color of line the pen draws with the pencolor command.

+
+
+ + + +

Drawing lines

+

Sally forth!

+

Okay, enough dilly-dallying. Let's tell the turtle to draw a line! Here's my line. Give this one a shot, then try your own colors and numbers!

+
Code automatically inserted here...
+

50 is the number of pixels to move forward, by the way.

+
+ +

You spin me right round, baby

+

Great! So you've got a line. But what if you don't want the Turtle to move forward? Well, you can tell it to turn by using a turnleft or turnright command, like this:

+
Code automatically inserted here...
+

Give that a shot, then play with it a bit!

+

If you're wondering what 90 means, it's the number of degrees that it'll turn.

+
+ +

I like to move it, move it

+

Okay, now we're cooking! Let's break this down again:

+

Turtle.draw tells the Turtle we want it to draw some things. The period connects the two.

+

do ... end is a sublist of things. This is what we want the Turtle to be drawing. Not for the rest of our program. +

pencolor sets the color of the pen the Turtle is dragging along behind him, and background sets the color of the background.

+

turnright (or its buddy turnleft) tells the Turtle " to turn to the right or left.

+

forward (or its friend backward) tells the Turtle to move.

+
+ +

Let's try drawing that square

+

Go ahead. Give it a shot. Try to get the Turtle to draw a square.

+

I'll wait. :)

+
+ +

Here's my version

+

Here's how I did it:

+
Code automatically inserted here...
+
+
+ + +

Repeating ourselves

+

Pete and Repeat...

+

Man, that was a ton of repetition! My fingers almost fell off typing forward and turnright there!

+

I have good news, though: I mentioned something earlier about computers. It turns out that doing boring, repetitive things is something they're really good at! They'll do the same thing over and over again, forever even as long as you ask nicely.

+
+ +

Repeating repeating ourselves ourselves

+

Check it out: our Turtle actually knows numbers. For example:

+
Code automatically inserted here...
+

Try running this example. It also draws a square! Wow!

+
+ +

4.times

+

It's pretty easy: 4 can take instructions too, just like our Turtle. This command repeats a list of instructions that many times. Fun! Four times. And the do and end show which list of instructions go with the 4 rather than with the Turtle.

+
+ +

Try it out!

+

Have a blast: make some fun shapes of your own!

+
+
+ + + +

Summary

+

Congratulations!

+

Wow, you're awesome. Pat yourself on the back. High five someone. You've got these basics down!

+

Check out the Basic Ruby lesson to pick up some totally different and exciting things!

+
+
+ + Back to top + + + diff --git a/public/help/fr/hacketyhack/basic_ruby.html b/public/help/fr/hacketyhack/basic_ruby.html new file mode 100644 index 0000000..839dc37 --- /dev/null +++ b/public/help/fr/hacketyhack/basic_ruby.html @@ -0,0 +1,210 @@ + + + + Basic Ruby + + + + + + + + + + + + + + +

Basic Ruby

+ + + +

Hello there!

+

Let's get started

+

Welcome to your first lesson in Ruby! You're going to have a blast.

+

Ruby is a great programming language that you can use to make all kinds of things with. Let's get going!

+
+
+ + +

A bit more about Ruby

+

Konnichiwa, Ruby!

+

Ruby was created by

+

まつもと ゆきひろ

+

(you can just call him Matz) in 1995. If you couldn't guess, Matz is from Japan. Here he is:

+
+

Ruby is enjoyable

+

Matz has this to say about Ruby:

+

I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language.

+

One more thing about Ruby: Rubyists (that's what people who like Ruby call themselves) have a saying: MINSWAN. This stands for Matz Is Nice So We Are Nice. Which is a pretty nice saying, itself. Be nice to everyone, and give them a hand when they need it!"

+
+
+ + +

Displaying Things

+

Let's do this!

+

Okay! The very first thing that you need to know is how to show something on the screen. Otherwise, you won't know what's going on!

+
+

Hello, World!

+

There are two ways of doing this. Here's the first: alert

+
Code automatically inserted here...
+

Type this in and press the 'Run' button.

+
+

alert

+

Okay, let's break this down: There's two main parts to this little program: you have an alert and a "Hello, world!". These two parts work just like an English sentence: The alert is a verb and the stuff in the ""s is an object. In Ruby, we call verbs methods. The alert verb says 'Put an alert box on the screen, and the content of the box is whatever thing you give me.'

+

We'll talk about the "Hello, world!" in just a second. Here's the other way of making this happen:

+
Code automatically inserted here...
+

If you try that here, it will work! The puts method doesn't display a dialog box, it puts text out to the output instead. We'll be using alerts throughout these tutorials, but if you look at other Ruby tutorials, you may see puts.

+
+
+ + +

Letters, words, and sentences

+

Strings

+

Okay! Now that you've got that verb bit down, it's time to learn about Strings. Strings are what we call a bunch of words between a pair of " characters. The "s are used to tell the computer what words you actually want to say. Let's think about our example:

+
Code automatically inserted here...
+

If you didn't have the "s, the computer wouldn't know which words were methods and which ones were part of the string! And consider this:

+
Code automatically inserted here...
+

Without making all of those words a string, how would Ruby know that the second alert was some text you wanted to say, rather than another alert box?

+
+

Adding Strings

+

Now, if you want to put two bits of strings together, you can use the + character to do it. Try typing this:

+
Code automatically inserted here...
+

Same thing! The + sticks the two strings together. This will end up being super useful later!

+
+
+ + +

Numbers and Math

+

Numbers

+

You can just use numbers, and Ruby understands them:

+
Code automatically inserted here...
+

You can even use numbers that have a decimal point in them:

+
Code automatically inserted here...
+
+

Basic Math

+

You can also do math with numbers, and it'll work out pretty well:

+
Code automatically inserted here...
+

But if you try this, nothing happens:

+
Code automatically inserted here...
+

This is kind of fun and silly, though:

+
Code automatically inserted here...
+
+

Errors

+

You know how nothing happened when you hit the Run button earlier? That was because there was an error. You can see any errors in the 'Output' tab.

+

The error that results from alert "hey" + 2 is:

+ can't convert Fixnum into String +

What is that?

+
+
+ + +

A few words about types

+

Why's it do that?

+

Each part of a Ruby program is an Object. Right now, all you need to know about Objects is that it's sort of like saying a thing. Your program is made up of a bunch of Objects working together.

+

We'll learn more about Objects in a future lesson, but there is one thing I'll tell you: Objects have a 'type.' This lets Ruby know what kind of Object it is.

+
+

Adding numbers to words

+

That's why

+
Code automatically inserted here...
+

doesn't really work: "hey" is a String object, and 2 is a Fixnum object. And adding Strings and Fixnums doesn't make any sense. We can make this code work, though!

+

All we need to do is turn the Fixnum into a String. We can do this by using the to_s method.

+
Code automatically inserted here...
+
+

Let's look at that again

+
Code automatically inserted here...
+

Okay, this isn't bad. We have our alert method. We're giving it "hey" + 2.to_s. The 2.to_s turns a Fixnum 2, which is like the mathematical idea of a 2, into the String 2, which is like when you write a 2 down on a piece of paper.

+
+
+ + +

Variables

+

They're like boxes

+

What happens if we want to keep something around? Most programs are not one line, I assure you. You can use a variable to hold a value and use it later. It's like a box that you put things in.

+

Let's try one out:

+
Code automatically inserted here...
+

Give that a run.

+
+

Assignment

+

Cool stuff! We used an = to assign the String "Hello, world!" into the variable message. We then passed that message to the alert method.

+

As you can see, we can use variables in place of another value. Try this:

+
Code automatically inserted here...
+

Make a guess before you run this program.

+
+
+ + +

User Input

+

ask-ing for it.

+

We can ask the user of our program for some input, and then put their answer into a variable. It's easy! Check this program out:

+
Code automatically inserted here...
+

The ask method brings up a box and lets our users type something in. Fun! We put their answer into the name variable and then showed it with alert Sweet!

+
+
+ + +

Basic flow control

+

if...

+

Remember back to that Beginning Programming lesson... we talked about how programs are one big list, that the computer follows in order.

+

Well, guess what? We can actually change this order by using certain bits of code. Compare these two programs:

+
Code automatically inserted here...
+
Code automatically inserted here...
+

There are a few new things here.

+
+

"=="

+

Here it is again:

+
Code automatically inserted here...
+

The == command is just a bit different than the = command. == tests the Object on its right against the Object on its left. If the two are equal, then the code after the if will run. If they're not equal, you get the code after the else. The ("end") lets us know we're done with our if.

+
+
+ + +

Example: a guessing game

+

Guess!

+

Let's put this all together:

+
Code automatically inserted here...
+
+
+ +

Example: a guessing game

+

Guess!

+

Congrats! You've picked up all of the basics of Ruby. There's a lot more you still have to learn, though!

+

Here's what you've learned so far:

+

* alert and ask

+

* = variables, and ==

+

* if and else

+

Awesome! You'll want to go back to "Lessons" and then check out Ruby Warrior next!

+
+
+ + Back to Lessons + + diff --git a/public/help/fr/hacketyhack/colors.html b/public/help/fr/hacketyhack/colors.html new file mode 100644 index 0000000..7ed5f2d --- /dev/null +++ b/public/help/fr/hacketyhack/colors.html @@ -0,0 +1,53 @@ + + + + Color List + + + + + + + + + + + +

Color List

+ +

The following list of colors can be used in the KidsRuby Turtle. + As background colors or border colors. As stroke and fill colors. + Most of these colors come from the X11 and HTML palettes.

+

All of these colors can be used by name. (So calling the tomato method from inside any slot will get you a nice reddish color.) Below each color, also find the exact numbers which can be used with the rgb method.

+

aliceblue

rgb(240, 248, 255)

+

antiquewhite

rgb(250, 235, 215)

+

aqua

rgb(0, 255, 255)

+

aquamarine

rgb(127, 255, 212)

+

azure

rgb(240, 255, 255)

+

beige

rgb(245, 245, 220)

+

bisque

rgb(255, 228, 196)

+

black

rgb(0, 0, 0)

+

blanchedalmond

rgb(255, 235, 205)

+

blue

rgb(0, 0, 255)

+

blueviolet

rgb(138, 43, 226)

+

brown

rgb(165, 42, 42)

+

burlywood

rgb(222, 184, 135)

+

cadetblue

rgb(95, 158, 160)

+

chartreuse

rgb(127, 255, 0)

+

chocolate

rgb(210, 105, 30)

+

coral

rgb(255, 127, 80)

+

cornflowerblue

rgb(100, 149, 237)

+

cornsilk

rgb(255, 248, 220)

crimson

rgb(220, 20, 60)

cyan

rgb(0, 255, 255)

+

darkblue

rgb(0, 0, 139)

+

darkcyan

rgb(0, 139, 139)

darkgoldenrod

rgb(184, 134, 11)

darkgray

rgb(169, 169, 169)

darkgreen

rgb(0, 100, 0)

darkkhaki

rgb(189, 183, 107)

darkmagenta

rgb(139, 0, 139)

darkolivegreen

rgb(85, 107, 47)

darkorange

rgb(255, 140, 0)

darkorchid

rgb(153, 50, 204)

darkred

rgb(139, 0, 0)

darksalmon

rgb(233, 150, 122)

darkseagreen

rgb(143, 188, 143)

darkslateblue

rgb(72, 61, 139)

darkslategray

rgb(47, 79, 79)

darkturquoise

rgb(0, 206, 209)

darkviolet

rgb(148, 0, 211)

deeppink

rgb(255, 20, 147)

deepskyblue

rgb(0, 191, 255)

dimgray

rgb(105, 105, 105)

dodgerblue

rgb(30, 144, 255)

firebrick

rgb(178, 34, 34)

floralwhite

rgb(255, 250, 240)

forestgreen

rgb(34, 139, 34)

fuchsia

rgb(255, 0, 255)

gainsboro

rgb(220, 220, 220)

+

ghostwhite

rgb(248, 248, 255)

gold

rgb(255, 215, 0)

goldenrod

rgb(218, 165, 32)

gray

rgb(128, 128, 128)

green

rgb(0, 128, 0)

greenyellow

rgb(173, 255, 47)

honeydew

rgb(240, 255, 240)

hotpink

rgb(255, 105, 180)

indianred

rgb(205, 92, 92)

indigo

rgb(75, 0, 130)

ivory

rgb(255, 255, 240)

khaki

rgb(240, 230, 140)

lavender

rgb(230, 230, 250)

lavenderblush

rgb(255, 240, 245)

lawngreen

rgb(124, 252, 0)

lemonchiffon

rgb(255, 250, 205)

lightblue

rgb(173, 216, 230)

lightcoral

rgb(240, 128, 128)

lightcyan

rgb(224, 255, 255)

lightgoldenrodyellow

rgb(250, 250, 210)

lightgreen

rgb(144, 238, 144)

lightgrey

rgb(211, 211, 211)

lightpink

rgb(255, 182, 193)

lightsalmon

rgb(255, 160, 122)

lightseagreen

rgb(32, 178, 170)

+

lightskyblue

rgb(135, 206, 250)

lightslategray

rgb(119, 136, 153)

lightsteelblue

rgb(176, 196, 222)

lightyellow

rgb(255, 255, 224)

lime

rgb(0, 255, 0)

limegreen

rgb(50, 205, 50)

linen

rgb(250, 240, 230)

magenta

rgb(255, 0, 255)

maroon

rgb(128, 0, 0)

mediumaquamarine

rgb(102, 205, 170)

mediumblue

rgb(0, 0, 205)

mediumorchid

rgb(186, 85, 211)

mediumpurple

rgb(147, 112, 219)

mediumseagreen

rgb(60, 179, 113)

mediumslateblue

rgb(123, 104, 238)

mediumspringgreen

rgb(0, 250, 154)

mediumturquoise

rgb(72, 209, 204)

mediumvioletred

rgb(199, 21, 133)

midnightblue

rgb(25, 25, 112)

mintcream

rgb(245, 255, 250)

mistyrose

rgb(255, 228, 225)

moccasin

rgb(255, 228, 181)

navajowhite

rgb(255, 222, 173)

navy

rgb(0, 0, 128)

+

oldlace

rgb(253, 245, 230)

olive

rgb(128, 128, 0)

olivedrab

rgb(107, 142, 35)

orange

rgb(255, 165, 0)

orangered

rgb(255, 69, 0)

orchid

rgb(218, 112, 214)

palegoldenrod

rgb(238, 232, 170)

palegreen

rgb(152, 251, 152)

paleturquoise

rgb(175, 238, 238)

palevioletred

rgb(219, 112, 147)

papayawhip

rgb(255, 239, 213)

peachpuff

rgb(255, 218, 185)

peru

rgb(205, 133, 63)

pink

rgb(255, 192, 203)

plum

rgb(221, 160, 221)

powderblue

rgb(176, 224, 230)

purple

rgb(128, 0, 128)

red

rgb(255, 0, 0)

rosybrown

rgb(188, 143, 143)

royalblue

rgb(65, 105, 225)

saddlebrown

rgb(139, 69, 19)

salmon

rgb(250, 128, 114)

sandybrown

rgb(244, 164, 96)

seagreen

rgb(46, 139, 87)

seashell

rgb(255, 245, 238)

+

sienna

rgb(160, 82, 45)

silver

rgb(192, 192, 192)

skyblue

rgb(135, 206, 235)

slateblue

rgb(106, 90, 205)

slategray

rgb(112, 128, 144)

snow

rgb(255, 250, 250)

springgreen

rgb(0, 255, 127)

steelblue

rgb(70, 130, 180)

tan

rgb(210, 180, 140)

teal

rgb(0, 128, 128)

thistle

rgb(216, 191, 216)

tomato

rgb(255, 99, 71)

turquoise

rgb(64, 224, 208)

violet

rgb(238, 130, 238)

wheat

rgb(245, 222, 179)

white

rgb(255, 255, 255)

whitesmoke

rgb(245, 245, 245)

yellow

rgb(255, 255, 0)

yellowgreen

rgb(154, 205, 50)

+ Back to Lessons + + diff --git a/public/help/fr/hacketyhack/index.html b/public/help/fr/hacketyhack/index.html new file mode 100644 index 0000000..54f6f24 --- /dev/null +++ b/public/help/fr/hacketyhack/index.html @@ -0,0 +1,29 @@ + + + + Hackety-Hack + + + + + + + + + + +

Hackety-Hack

+ +
+

The inspiration for us to create KidsRuby was Hackety Hack. This is an edited version of the lessons from Hackety Hack by _why the lucky stiff, updated to match KidsRuby.

+
    +
  1. Basic Programming
  2. +
  3. Basic Ruby
  4. +
  5. Turtle Colors
  6. +
+
+ + + diff --git a/public/help/fr/index.html b/public/help/fr/index.html new file mode 100644 index 0000000..995eca1 --- /dev/null +++ b/public/help/fr/index.html @@ -0,0 +1,27 @@ + + + + Help + + + + + + + + + + + +
+
    +
  1. Start Here
  2. +
  3. Keyboard Shortcuts
  4. +
  5. Hackety-Hack
  6. +
  7. Ruby Warrior
  8. +
  9. Make Games With Gosu
  10. +
  11. Glossary
  12. +
+
+ + diff --git a/public/help/fr/keyboard-shortcuts.html b/public/help/fr/keyboard-shortcuts.html new file mode 100644 index 0000000..61f06ed --- /dev/null +++ b/public/help/fr/keyboard-shortcuts.html @@ -0,0 +1,317 @@ + + + + Help + + + + + + + + + + + +
+ +

Default Keyboard Shortcuts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PC (Windows/Linux)Macaction
Ctrl-Lcenter selection
Ctrl-UCtrl-Uchange to upper case
Ctrl-Shift-UCtrl-Shift-Uchange to lower case
Ctrl-Alt-DownCommand-Option-Downcopy lines down
Ctrl-Alt-UpCommand-Option-Upcopy lines up
Ctrl-FCommand-Ffind
Ctrl-KCommand-Gfind next
Ctrl-Shift-KCommand-Shift-Gfind previous
Alt-0Option-0fold all
Alt-Shift-0Option-Shift-0unfold all
DownDown,Ctrl-Ngo line down
UpUp,Ctrl-Pgo line up
Ctrl-End,Ctrl-DownCommand-End,Command-Downgo to end
LeftLeft,Ctrl-Bgo to left
Ctrl-LCommand-Lgo to line
Alt-Right,EndCommand-Right,End,Ctrl-Ego to line end
Alt-Left,HomeCommand-Left,Home,Ctrl-Ago to line start
PageDownOption-PageDown,Ctrl-Vgo to page down
PageUpOption-PageUpgo to page up
RightRight,Ctrl-Fgo to right
Ctrl-Home,Ctrl-UpCommand-Home,Command-Upgo to start
Ctrl-LeftOption-Leftgo to word left
Ctrl-RightOption-Rightgo to word right
TabTabindent
Alt-DownOption-Downmove lines down
Alt-UpOption-Upmove lines up
Shift-TabShift-Taboutdent
InsertInsertoverwrite
PageDownpagedown
PageUppageup
Ctrl-Shift-Z,Ctrl-YCommand-Shift-Z,Command-Yredo
Ctrl-DCommand-Dremove line
Ctrl-Kremove to line end
Option-Backspaceremove to linestart
Alt-Backspace,Ctrl-Alt-Backspaceremove word left
Alt-Deleteremove word right
Ctrl-RCommand-Option-Freplace
Ctrl-Shift-RCommand-Shift-Option-Freplace all
Ctrl-ACommand-Aselect all
Shift-DownShift-Downselect down
Shift-LeftShift-Leftselect left
Shift-EndShift-Endselect line end
Shift-HomeShift-Homeselect line start
Shift-PageDownShift-PageDownselect page down
Shift-PageUpShift-PageUpselect page up
Shift-RightShift-Rightselect right
Ctrl-Shift-End,Alt-Shift-DownCommand-Shift-Downselect to end
Alt-Shift-RightCommand-Shift-Rightselect to line end
Alt-Shift-LeftCommand-Shift-Leftselect to line start
Ctrl-Shift-Home,Alt-Shift-UpCommand-Shift-Upselect to start
Shift-UpShift-Upselect up
Ctrl-Shift-LeftOption-Shift-Leftselect word left
Ctrl-Shift-RightOption-Shift-Rightselect word right
Ctrl-Osplit line
Ctrl-7Command-7toggle comment
Ctrl-TCtrl-Ttranspose letters
Ctrl-ZCommand-Zundo
+ +
+ + diff --git a/public/help/fr/kidsruby/glossary.html b/public/help/fr/kidsruby/glossary.html new file mode 100644 index 0000000..2fa5b1f --- /dev/null +++ b/public/help/fr/kidsruby/glossary.html @@ -0,0 +1,46 @@ + + + + How To Use KidsRuby + + + + + + + + + + + + + +

Glossary

+ +

Welcome!

+

What is a glossary?

+

A glossary is a collection of definitions to words that are specific to a particular subject. It's like a themed dictionary.

+
+

Glossary

+

character: A single, letter, number or symbol

+

class: A class is a blueprint to create objects. An object of a given class is called an 'instance' of that class. A class can contain attributes, methods and even other classes!

+

method: Methods allow classes to do things. They are a set of instructions and can return a value

+

parameter: A type of variable within parentheses, which puts a limit or limits on the method it is acting on.

+

string: A string is any amount of characters (letters, digits, punctuation) surrounded by quotes. Both single and double quotes are used to create strings (Source: Why's Poignant Guide)

+

icon: A picture on a screen that represents a specific file, directory, window, option, or program. (Source: The Free Dictionary)

+

pixel:any of a number of very small picture elements that make up a picture, as on a visual display unit (Source: The Free Dictionary)

+

attribute: A property or characteristic of an Entity. For example, the attributes of a person would be the name, age, height etc... (Source: Computing Students)

+

variable: A symbol used to stand for the data assigned to the variable. For example, in x =50, "x" is the variable and "50" is the data.

+

object: An item that can be selected and maneuvered, such as an onscreen graphic. These objects can include data and the procedures necessary to operate on that data.(Source: The Free Dictionary)

+

.png: Stands for "Portable Network Graphics and is a file format for image compression, which is just a fancy term for making the size of the picture file smaller wihout decreasing the quality of the image too much.

+

instantiate:Creating an instance of a class. For example, instantiating an instance of the class "Cat" could be "My Cat".

+
+
+ Back to top + + + diff --git a/public/help/fr/kidsruby/how_to_use.html b/public/help/fr/kidsruby/how_to_use.html new file mode 100644 index 0000000..2b0ff89 --- /dev/null +++ b/public/help/fr/kidsruby/how_to_use.html @@ -0,0 +1,65 @@ + + + + How To Use KidsRuby + + + + + + + + + + + + +

How To Use KidsRuby

+ + +

Welcome!

+

This is KidsRuby

+

Hi, and welcome to KidsRuby. We hope you are ready to have fun learning how to make computers do whatever you want them to.

+

To use this 'Help' system, you can click on any lesson title, just like you clicked on this one. You can use the links above here to go to the 'Previous' or to the 'Next' lesson. You can also click on the 'Back to Lessons' link to get back to the main list of lessons at any time.

+
+
+

What is Ruby?

+

Ruby is a programming language

+

The way you tell a computer what to do, is by learning a special language that the computer can understand. This kind of special language is called a 'programming language'. KidsRuby lets you program in the most awesome computer language ever, Ruby.

+

Ruby was invented in Japan by a very cool guy named Matz. His real name is Yukihiro Matsumoto, but everyone calls him Matz. He has given away his Ruby programming language to the world to use for free. That is pretty cool.

+
+
+

How To Make It Work

+

Type in some Ruby to the left, then click 'Run'

+

You make KidsRuby work by doing this:

+

1. Type in some Ruby 'code' to the left, just below where it says "Type in your code just below here:".

+

2. Click on the "Run" button. This will cause the computer to look at the Ruby you typed in, and do whatever it says to do.

+

3. Watch the computer do whatever you have told it to!

+

Don't worry if you do not know how to write Ruby yet. That is what this Help system is designed to do.

+
+
+

Saving and Opening Your Code

+

You can save your code, and reopen it later

+

You can save your program with KidsRuby by doing this:

+

1. Type in some Ruby 'code' to the left, just below where it says "Type in your code just below here:".

+

2. Click on the "Save" button down at the bottom of where you typed your code. This will pop up something that will ask you where you want to save the file.

+

3. Enter in the name for your new file. Make sure you name it somthing that ends with ".rb" like "mywork.rb"

+

4. Click on the "Save" button. Now you have saved your program, and can reopen it later, by clicking on the "Open" button!

+
+
+ +

What To Do Next

+

Go 'Back to Lessons', and check out "Hackety Hack"

+

Once upon a time there was an amazing guy named "_why the lucky stiff". He made a lot of programs using Ruby, and one of them was named Hackety Hack. It was designed to help kids learn how to program in Ruby.

+

One day, _why disappeared. He probably vanished and went back to whatever magic programming world he had originally came from. He left behind some great ideas, and we have tried to make KidsRuby with his spirit of fun and discovery. That is "_why" we have included some of his writings here for you to learn from. Have fun!

+
+
+ + Back to top + + + diff --git a/public/help/fr/ruby4kids/index.html b/public/help/fr/ruby4kids/index.html new file mode 100644 index 0000000..fd40b36 --- /dev/null +++ b/public/help/fr/ruby4kids/index.html @@ -0,0 +1,36 @@ + + + + Make Games With Gosu + + + + + + + + + + + +

Make Games With Gosu

+ +
+

Writing games is really fun, and is the reason why a lot of people want to learn to program. Alberto Morales and Bill Davenport have been working on a series of tutorials on their website at Ruby4kids.com to show kids how to create games using Ruby and a game package called Gosu.

+
    +
  1. Lesson 1 - Create The Game Window
  2. +
  3. Lesson 2 - Add A Player
  4. +
  5. Lesson 3 - Move the Player Left
  6. +
  7. Lesson 4 - Limiting Movement
  8. +
  9. Lesson 5 - Moving Right, Up, and Down
  10. +
  11. Lesson 6 - Adding a Dodgeball
  12. +
  13. Lesson 7 - Getting Hit
  14. +
  15. Lesson 8 - Escape Key Pauses the Game
  16. +
  17. Lesson 9 - Creating Multiple Balls
  18. +
+
+ + + diff --git a/public/help/fr/ruby4kids/lesson_1.html b/public/help/fr/ruby4kids/lesson_1.html new file mode 100644 index 0000000..e660e6a --- /dev/null +++ b/public/help/fr/ruby4kids/lesson_1.html @@ -0,0 +1,107 @@ + + + + Ruby4Kids - Programming For The Fun Of It + + + + + + + + + + + + + + + +

Ruby4Kids - Game Programming

+ + + +

Lesson 1 - Getting Started

+
+

Since you are using KidsRuby, you are ready to get started making your first game using Gosu.

+

This is the file that will contain our first program.

+

We will use the gosu library. We will do this by typing:

+
Code automatically inserted here...
+ +

We will then start our game by inheriting from the Gosu class.

+

We will call our game MyGame like this:

+
Code automatically inserted here...
+ +

Now, inside of this class, Gosu needs us to define three methods:

+

We define our methods like so:

+
Code automatically inserted here...
+ +

What happens here is that when the game starts, the initialize method is called. Then the game stays running and it goes in a loop, calling the methods: update and draw.

+

Update, then draw. Update, then draw. Update, then draw. This cycle repeats several times a second.

+ + « Back + Back to Lessons + Next » + +
+
+ + +

Lesson 1 - Create A Window

+

Create A Window

+

OK, so we are almost ready to run this code. The next step that we need to do now is tell Gosu how big a window we want for the game.

+

We do this in the initialize method, by passing it three parameters like this:

+
Code automatically inserted here...
+ +

What this does, is make the window 300 pixels wide by 400 pixels high. A pixel is a single dot in your screen. If you put your face right next to the display, you can almost see the dots. Those are called pixels.

+

The third parameter you pass to the initialize method is false. This tells gosu not to take over the whole sreen. So we will say false for this.

+

OK, we are almost ready to see if this works.

+

To show what we have so far, we have to use the class we just defined in our program.

+

We do this by adding the following after the class definition:

+
Code automatically inserted here...
+ +

The first line creates an instance of the new game. Then, calling the show method, tells the game to show the game window.

+ + « Back + Back to Lessons + Next » + +
+
+ + +

Lesson 1 - Run It!

+

Run Your Program

+

We are now ready to run the program.

+

Now, just click on the "Run" button

+

If everything worked correctly, you will have seen your screen show up. You have written your first game program!

+

Here is the entire program you should have written so far:

+
Code automatically inserted here...
+ +

Granted, this does not do anything exciting, but at least you now know how to open a window in a computer game.

+

Now you are ready to go on to Lesson 2.

+ + « Back + Back to Lessons + Next » + +
+
+ + Back to top + + + diff --git a/public/help/fr/ruby4kids/lesson_2.html b/public/help/fr/ruby4kids/lesson_2.html new file mode 100644 index 0000000..22e5368 --- /dev/null +++ b/public/help/fr/ruby4kids/lesson_2.html @@ -0,0 +1,88 @@ + + + + Ruby4Kids - Programming For The Fun Of It + + + + + + + + + + + + + + + +

Ruby4Kids - Game Programming - Lesson 2

+ + +

Lesson 2 - Add A Player

+

Create A Player

+

It will be good to have a player in the game, so let's create one.

+

We do this by adding a new class. I will call it Player. +

Now, we will define what our player will do. Do this by typing:

+
Code automatically inserted here...
+ +

Next, we will add an icon to this player so that we can see it on the screen.

+

We do this by finding a .png picture. KidsRuby happens to have a picture already that you can use.

+

Go to your player class and add an icon to it, by typing the following:

+
Code automatically inserted here...
+ +

Then, we add a draw method to the player. We do this by typing:

+
Code automatically inserted here...
+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 2 - Add A Player

+

Add Player To Game

+

Now, we're almost ready to try this again. I need to go back to the MyGame class first, and I need to instantiate this player.

+

Do this by adding this code to the initialize method of the MyGame class:

+
Code automatically inserted here...
+ +

This tells the player which window to draw itself on.

+

Last, we need to add the following in the draw method of the game window:

+
Code automatically inserted here...
+

This will draw the player when the game is running.

+

One last thing! We need to type require 'player' right under require 'gosu', so that the program knows that we're using the Player class. +

Now, let's try it! Click on the "Run" button. Did it work?

+

Here is the entire program you should have written so far:

+
Code automatically inserted here...
+

Now that you've learned how to add a player, why don't we move on to making the player move left in lesson 3?!

+ + « Back + Back to Lessons + Next » + +
+
+ + + + Back to top + + + diff --git a/public/help/fr/ruby4kids/lesson_3.html b/public/help/fr/ruby4kids/lesson_3.html new file mode 100644 index 0000000..0ed6275 --- /dev/null +++ b/public/help/fr/ruby4kids/lesson_3.html @@ -0,0 +1,100 @@ + + + + Ruby4Kids - Programming For The Fun Of It + + + + + + + + + + + + + + + +

Ruby4Kids - Game Programming - Lesson 3

+ + +

Lesson 3 - Move the Player Left

+

This is Ruby4Kids

+

OK, now let's try to make the player move. In the last lesson, we had the image of the player, and now we're going to figure out how to make that player move.

+

In Gosu, we can use the arrow keys as a way to move our player up, down, left, and right. The game window has an update method, which is where we need to check to see if any key was pressed. In programming, we do this via conditional statements, such as if statements.

+

So, under def update we write:

+
Code automatically inserted here...
+ +

So, what the segment above is saying, is that if the left key is pressed, the player will move to the left. However, before we can define what the left move is, we need to move the player away from a fixed variable of 50,50.

+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 3 - Move the Player Left

+

Adding Variables

+

If we want the position to move, we have to give it some variables. the way to initialize these variables is in the initialize method. So, under the def initialize method, we already have: +

Code automatically inserted here...
+ +

Now, we just need to add:

+
Code automatically inserted here...
+ +

Next, we are going to replace the 50,50 in the code @icon.draw(50,50,1) with @x, @y. So, your end result is going to look like this: + +

Code automatically inserted here...
+

Now, what we did was make the icon moveable by shifting the icon from a fixed position to a variable position, using variables! These variables were initialized in the initialize method of the player. So, the starting positions for x and y were each at 50.

+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 3 - Move the Player Left

+

Define "Moving Left"

+

Now we need to make the x position move left every time the player moves left. So, in order to do that, we have to first define "moving left" and then add a simple equation under that definition. So, we type:

+ +
Code automatically inserted here...
+

The equation that we typed moves the icon left by 10 pixels every time we press the arrow key. Go ahead, try it! Cool, huh?

+ +

Here is the entire program you should have written so far:

+
Code automatically inserted here...
+ +

OK, smartie pants, now that you know how to move left, let's try limiting the movement of our player in lesson 4!

+ + « Back + Back to Lessons + Next » + +
+
+ +Back to top + + + + diff --git a/public/help/fr/ruby4kids/lesson_4.html b/public/help/fr/ruby4kids/lesson_4.html new file mode 100644 index 0000000..89cfefa --- /dev/null +++ b/public/help/fr/ruby4kids/lesson_4.html @@ -0,0 +1,73 @@ + + + + Ruby4Kids - Programming For The Fun Of It + + + + + + + + + + + + + + + +

Ruby4Kids - Game Programming - Lesson 4

+ + +

Lesson 4 - Limiting Movement

+

The Disappearing Icon

+

When running your program, did you notice that your icon disappears after a while? The guy keeps moving left until he left the screen, never to be seen again :(.

+ +

So, the first thing we're going to do is limit where the icon can go. One of the ways of limiting movement is by adding another conditional under def move_left

+ +
Code automatically inserted here...
+ +

Now, what we did above was limit the movement of the icon to stay within a positive x area. That is, if x starts going less than 0, we reset the icon to be at zero. This reset acts as a limit for the icon on the screen.

+ + « Back + Back to Lessons + Next » + +
+
+ + +

Lesson 4 - Limiting Movement

+

What "Else"?

+

Now, we are going to add another conditional statement called else, which just means "otherwise". So, again, we type enter this code under the def move_left:

+ +
Code automatically inserted here...
+ +

The else, in this case, refers to regular movement. So, if x is 0 or greater, then the movement to the left is going to be using the code that we developed in the last lesson:@x = @x - 10.

+ +

Here is the entire program you should have written so far:

+
Code automatically inserted here...
+ +

So, now that we know how to move left and limit that movement, let's add and limit some other movements in lesson 5!

+ + « Back + Back to Lessons + Next » + +
+
+ +Back to top + + diff --git a/public/help/fr/ruby4kids/lesson_5.html b/public/help/fr/ruby4kids/lesson_5.html new file mode 100644 index 0000000..d4e48a7 --- /dev/null +++ b/public/help/fr/ruby4kids/lesson_5.html @@ -0,0 +1,129 @@ + + + + Ruby4Kids - Programming For The Fun Of It + + + + + + + + + + + + + + + +

Ruby4Kids - Game Programming - Lesson 5

+ + +

Lesson 5 - Moving Right, Up, and Down

+

This is Ruby4Kids

+ +

Now, we're going to learn how to move right, up, and down. To move right, we need to add another if statement to the def update under the class MyGame. So, let's add an if statement for the right key:

+
Code automatically inserted here...
+ +

The part above is the same as the code for turning left, except that now we type KbRight instead of KbLeft.

+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 5 - Moving Right, Up, and Down

+

Plus 10

+ +

Now, we're going to be going to the Player class and adding:

+ +
Code automatically inserted here...
+ +

So, this time the code is a bit less similar to what we did in the last lesson. You'll notice that we added + 10 instead of - 10, because we're going right instead of left.

+ +

Another difference is that we limit the icon by the game window's width and then subtract a certain amount of pixels from that width. Now, we subtract those pixels, because the position x is actually on the left side of the icon. That means that we have to make up for that amount by subtracting from the pixel count. You can try putting in different numbers within:

+
Code automatically inserted here...
+

to see what I mean, as long as both the numbers match up.

+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 5 - Moving Right, Up, and Down

+

Moving Up

+ +

OK, now that we've accomplished going left and right, we're going to try out how to go up. So, we'll first type the following code under the def update in the MyGame class +

Code automatically inserted here...
+ +

So, that part was familiar. Now, we're going to go to the Player class and add:

+
Code automatically inserted here...
+ +

Now, you'll notice that both the if and else statements are both different than what we did before. The first difference is that we're now using a y coordinate. The y coordinate is used, because we are going up and down (in this case, up), rather than left and right, just like on a grid!

+ +

So, you might also be wondering, why is the formula y < 0? Isn't y < 0 supposed to be for going down? That would have been the case, had the pixel count increased as you went up. Instead, it's the other way around.

+ +

Basically, it means that the very top of the screen is at 0.00 and increases as you go down the y-axis. So, as the icon moves up, it's actually decreasing the pixel count. This decrease in count is also the reason why we have a - 10 instead of a + 10.

. + + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 5 - Moving Right, Up, and Down

+

Moving Down

+

Now, let's finish up by adding the move_down code. These steps should look really familiar to the steps where we learned how to move right. First, let's write the following under the class MyGame, right below def update: + +

Code automatically inserted here...
+ +

Finally, we'll type the following under the player class

+ +
Code automatically inserted here...
+ +

So, the only difference that you'll see here is that the - 10 is changed to + 10, because the numbers increase as you go down :). That's it for moving around!

+ +

Here is the entire program you should have written so far:

+
Code automatically inserted here...
+ +

You've accomplished so much already, so why stop?! How about we turn up the heat and add some dodgeballs in lesson 6!

+ + « Back + Back to Lessons + Next » + +
+
+ + +Back to top + + + diff --git a/public/help/fr/ruby4kids/lesson_6.html b/public/help/fr/ruby4kids/lesson_6.html new file mode 100644 index 0000000..b6afbc5 --- /dev/null +++ b/public/help/fr/ruby4kids/lesson_6.html @@ -0,0 +1,148 @@ + + + + Ruby4Kids - Programming For The Fun Of It + + + + + + + + + + + + + + + +

Ruby4Kids - Game Programming - Lesson 6

+ + +

Lesson 6 - Adding a Dodgeball

+

Creating a New Class and Randomizing

+

OK, in the first lesson, we learned how to open a window in Gosu. + Then, we learned to draw a player inside the game window. + Next, learned to move this player around the game window. + We also limited its movement to just the bounds of the game window.

+

Now, we are ready to add more excitement to the game.

+

How about if we play dodge ball with our player? We can have a ball that appears as if thrown into the game window, and our player dodges the ball by moving with the arrow keys.

+

So let's try that. We already have a picture that you can use included with KidsRuby.

+

Start by creating a new class for our dodge ball:

+ +
Code automatically inserted here...
+ +

Now, we will make this ball come from the top of the screen and drop down from random places.

+

We accomplish this by setting the initial position @x to a random number between 0 and the width of the game window, in pixels.The @y position for this ball will be 0, since it is at the top during initialize. So, your code should look like this:

+ +
Code automatically inserted here...
+ +

This means that when the game starts, the random method will give us a position somewhere between 0 and the width of the game window.

+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 6 - Adding a Dodgeball

+

Changing Positions, Defining, and Updating

+

Now, with each update, we need to make the ball move down. So, let's say the ball moves 1 pixel with every update. We will see how fast that is.

+

We do this in the update, where we change the @y position by 1 pixel like this:

+
Code automatically inserted here...
+ +

Next, we need to just define our ball within the MyGame class, under the def initialize. So, it should look like this:

+ +
Code automatically inserted here...
+ +

Then, we go to def update and tell the ball to update itself. So, we type:

+ +
Code automatically inserted here...
+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 6 - Adding a Dodgeball

+

Adding the Icon and Drawing

+

Now, just like we did with the player, we're going to need an icon for the ball, as well. So we'll just copy the @icon code from the Playerclass and paste it right under @game_window = game_window in the Ball class. Then, we're going to change the player1.png to asteroid.png. So, your code should look like this:

+ +
Code automatically inserted here...
+ +

Next, when we want to draw the ball, we just add the following under the Ballclass:

+ +
Code automatically inserted here...
+ +

Now, the last number within the parentheses in the code above, refers to whether the ball will be dropped behind the player or in front of the player. For right now, we're going to make ball goin front of the player, which is why the number is set to 2 instead of 1.

+ +

OK, now we're just going to go to the MyGame class and add @ball.draw to the def draw method. So, it should look like this:

+ +
Code automatically inserted here...
+ + « Back + Back to Lessons + Next » + +
+
+ +

Lesson 6 - Adding a Dodgeball

+

Things are Getting Pretty Random

+ +

As we have learned, we need to trap for when the ball goes off of the screen. If the ball goes beyond the screen, we want to start again, find a random position from the top of the screen, and drop the ball again.

+

So we can do this by adding our familiar if statement like this:

+ +
Code automatically inserted here...
+ + +

Now, we will do something else. We want the ball to start dropping from another position, not the same x position as before. So, in the line where we reset @y to 0, we also change the @x position to be another random position. So, the code should look like this:

+ +
Code automatically inserted here...
+ +

Now, the ball should go down as expected.

+

Here is the entire program you should have written so far:

+
Code automatically inserted here...
+ +

You've made it to the end of the 6th lesson! Now, let's see if you can handle being hit by dodgeballs in lesson 7!

+ + « Back + Back to Lessons + Next » + +
+
+ + + + Back to top + + + + diff --git a/public/help/fr/ruby4kids/lesson_7.html b/public/help/fr/ruby4kids/lesson_7.html new file mode 100644 index 0000000..fbe0929 --- /dev/null +++ b/public/help/fr/ruby4kids/lesson_7.html @@ -0,0 +1,117 @@ + + + + Ruby4Kids - Programming For The Fun Of It + + + + + + + + + + + + + + + +

Ruby4Kids - Game Programming - Lesson 7

+ + +

Lesson 7 - Getting Hit

+

Defining a Hit

+

OK, so now it's time to make sure that when the ball hits the player, the game stops.

+

So, the first thing we need to do is go to the Game class and under @ball.update, we will define a hit:

+ +
Code automatically inserted here...
+ +

Now, let's go over to our player and define this hit_by? method. So, we'll go to the Player class and define what it means to be hit by the ball:

+
Code automatically inserted here...
+ +

Now, what we did above is add a method that Gosu gives us, called distance, where we pass the x coordinate and y coordinate of one object and the x coordinate and y coordinate of another object.

+ +

We also wrote that if the distance between these two coordinates is less than 50, we're going to make that a hit.

+ + « Back + Back to Lessons + Next » + +
+
+ +

Lesson 7 - Getting Hit

+

More Defining

+ +

Let's go back to the Game class. We've said that if a player is hit by a ball, we should stop the game. So, we need to define what stopping the game means.

+ +

Now, we'll introduce a new variable here to make the definition work, called running. So, under the Gameclass, we'll type: + +

Code automatically inserted here...
+

So, if we stop the game, the running will be false. However, we need to first add this running variable and make it equal to true. So, when the game starts, the game is running. When the player hets hit by the ball, the method stop_game! is going to set the variable, running, to false, which stops the game.

+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 7 - Getting Hit

+

Stop! Hammer Time

+

Now, we want the player and ball to stop moving when the game stops. So, if you look at the update method, you'll see that we have all this that makes either the player move or makes the ball move. Now, that will work as long as the game is running. But, once it stops, we don't want any of that to happen. So, directly under def update, we'll type: + +

Code automatically inserted here...
+ +

Now, let's go back to the Player class. We are now going to define two methods on the ball: x and y. To do this, we type: + +

Code automatically inserted here...
+ +

So, if you recall, the ball has x and y coordinate variables, which we cannot get to from the player. However, we can call the methods on the player. So, what we did above was call the x method, which will return the x variable and called the y method, which will return the y variable to us. + + « Back + Back to Lessons + Next » + +

+
+ + + +

Lesson 7 - Getting Hit

+

Getting too Close

+ +

Finally, we want the player to start on a different y position. The 50 is fine for the x position, but the y position is getting too close to the top of the window. So, under def intitialize(game_window), we'll change te y to 150. It should end up looking like this:

+ +
Code automatically inserted here...
+ +

I want to make the y at 150, so it's further at the bottom. This makes it easier for me to dodge the ball.

+ +

Once again, here is the entire program you should have written so far:

+
Code automatically inserted here...
+ +

Alright, hot shot, it looks like you do got what it takes. Let's take it to the next level in lesson 8!

+
+
+ + Back to top + + + diff --git a/public/help/fr/ruby4kids/lesson_8.html b/public/help/fr/ruby4kids/lesson_8.html new file mode 100644 index 0000000..ad3ae1a --- /dev/null +++ b/public/help/fr/ruby4kids/lesson_8.html @@ -0,0 +1,125 @@ + + + + Ruby4Kids - Programming For The Fun Of It + + + + + + + + + + + + + + + +

Ruby4Kids - Game Programming - Lesson 8

+ + +

Lesson 8 - Escape Key Pauses the Game

+

Commenting and Else

+ +

In this lesson, we want to make the game reset by pressing the escape key. So, let’s go to the MyGame class and find where we typed the following:

+ +
Code automatically inserted here...
+ +

Now, right under the code above, we’re going to type:

+ +
Code automatically inserted here...
+ +

What we did above was add an else statement, which occurs after the game is stopped.

+ +

So, we wrote a comment under the elsestatement, which tells us that the game is currently stopped. After that, we wrote a command that should look familiar. This code just says that if the escape key is pressed, the game restarts.

+ + « Back + Back to Lessons + Next » + +
+
+ + +

Lesson 8 - Escape Key Pauses the Game

+

Fine, let's Define

+ +

Now, we just go further down where we have:

+ +
Code automatically inserted here...
+ +

Right underneath the code above, we are going to write:

+ +
Code automatically inserted here...
+ +

So, what we did above was just define how to restart the game. We set @running to be true and then reset the ball, so that the ball will go back to its original position.

+ + « Back + Back to Lessons + Next » + +
+
+ +

Lesson 8 - Escape Key Pauses the Game

+

Read, Set, Reset!

+ +

We now have to go to the bottom of our Ball class and define our reset method. So, let’s go ahead and type:

+ +
Code automatically inserted here...
+ +

All we did in the code above, was the same thing that we’ve done when we defined update and when we defined initialize. That is, we set the y to zero, which places the ball at the top position and set the x to random, so we don’t know where it’s going to come from on the x axis.

+ + « Back + Back to Lessons + Next » + +
+
+ + +

Lesson 8 - Escape Key Pauses the Game

+

Read, Set, Reset!

+ +

Finally, we’re going to replace those two areas where we’ve repeated:

+ +
Code automatically inserted here...
+ +

and replace it with reset!. Again, those two repetitions are under def initialize and def update. Your end result should look like this:

+ +
Code automatically inserted here...
+ +

Yet again, here is the entire program you should have written so far:

+
Code automatically inserted here...
+ +

That’s it for this lesson! You're starting to like this stuff, aren't you?! Now, let’s make the game more challenging by adding multiple balls in lesson 9!

+ + « Back + Back to Lessons + Next » + +
+
+ + Back to top + + + + diff --git a/public/help/fr/ruby4kids/lesson_9.html b/public/help/fr/ruby4kids/lesson_9.html new file mode 100644 index 0000000..a1e15fe --- /dev/null +++ b/public/help/fr/ruby4kids/lesson_9.html @@ -0,0 +1,114 @@ + + + + Ruby4Kids - Programming For The Fun Of It + + + + + + + + + + + + + + + +

Ruby4Kids - Game Programming - Lesson 9

+ + +

Lesson 9 - Creating Multiple Balls

+

I Can Barely Fit in this Window

+ +

Now that we are going to add more balls to dodge, we should create a larger window to work in.

+ +

So, in order to do that, let's go to the MyGame class and under def initialize, let's change the numbers to (600, 400, false). The result should look like this:

+ +
Code automatically inserted here...
+ +

Then, we'll just adjust the player to start off at the bottom of the screen. First, we need to go to the player class. Now, let's change the x coordinate of the player to 150 and the y coordinate to 330. Your result should look like this:

+ +
Code automatically inserted here...
+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 9 - Creating Multiple Balls

+

Pluralize!

+ +

Now, let's try adding 3 more balls! So, we'll go to the MyGame class and change some things under def initialize:

+ +
Code automatically inserted here...
+ +

All we did above was pluralize ball and then changed the code to create 3 balls, instead of one.

+

Next, let's update each ball, instead of just updating one of them. We'll also pluralize the @ball. So,under the class, MyGame, we'll go ahead and change the code to:

+ +
Code automatically inserted here...
+ +

Next, we're going to do some more of the same stuff. So, we'll go to def draw to pluralize @ball and to change the code so that it draws each ball, instead of just one. You should end up with the following:

+ +
Code automatically inserted here...
+ +

Since we're already pluralizing, why don't we go ahead and do some more! So, we'll go to the class, Player, and change it to the following:

+ +
Code automatically inserted here...
+ +

Again, we're just adjusting the methods, so that they will work with multiple balls. For the code above, we have added the method, any?, which just means that being hit by any one of the balls will cause a hit.

+ + « Back + Back to Lessons + Next » + +
+
+ + + +

Lesson 9 - Creating Multiple Balls

+

No More Pluralizing...Maybe

+ +

Now, you must hate pluralizing by now, so we'll stop....right after this next pluralization! So, we'll go to the class, MyGame, and change the restart game definition to the following:

+ +
Code automatically inserted here...
+

You're done capitalizing (promise)! Now, let's just look over what all of your code should look like:

+ +
Code automatically inserted here...
+ +

Can it be? Is this the end? Have you really gone through the entire tutorial? The answer is, YES! CONGRATULATIONS, YOU MADE IT! You developed a program that you can play on and show off! We hope you'll continue your interest into programming, because if you've made it this far, you've got what it takes :).

+ + « Back + Back to Lessons + Next » + +
+
+ + Back to top + + + + diff --git a/public/help/fr/rubywarrior/index.html b/public/help/fr/rubywarrior/index.html new file mode 100644 index 0000000..8e2297f --- /dev/null +++ b/public/help/fr/rubywarrior/index.html @@ -0,0 +1,44 @@ + + + + RubyWarrior + + + + + + + + + + + + + + +

Ruby Warrior

+ +
+

Ruby Warrior is a game designed to teach Ruby in a fun, interactive way. It was created by Ryan Bates.

+

You play as a warrior climbing a tall tower to reach the precious Ruby at the top level. On each floor you need to write a Ruby script to instruct the warrior to battle enemies, rescue captives, and reach the stairs. You have some idea of what each floor contains, but you never know for certain what will happen. You must give the Warrior up-front to find their own way.

+

You will need to program your Player, to tell him or her how to figure out what to do. You can start by entering this little bit of Ruby code into the editor to the left:

+
Code automatically inserted here...
+ +

+ To start the game, you also need to enter this other little bit of Ruby code into the editor to the left:

+
Code automatically inserted here...
+ +

You will need to make sure the Ruby code for the Player comes before the RubyWarrior.play command.

+

To start playing the game just click on the "Run" button, and follow the instructions that will start to appear in the "Output" tab. Have fun!

+
+ + + + diff --git a/public/js/i18n/fr.js b/public/js/i18n/fr.js new file mode 100644 index 0000000..1dc0140 --- /dev/null +++ b/public/js/i18n/fr.js @@ -0,0 +1,13 @@ +{ + "buttons": { + "run": "Run", + "clear": "Clear", + "open": "Open", + "save": "Save" + }, + "tabs": { + "help-link": "Help", + "output-link": "Output", + "turtle-link": "Turtle" + } +} From d496c37dee5b8c4459f5eefe66dbe5d2d24186eb Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Tue, 26 Jun 2012 17:30:16 +0200 Subject: [PATCH 02/31] translation first test --- public/help/fr/kidsruby/glossary.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/help/fr/kidsruby/glossary.html b/public/help/fr/kidsruby/glossary.html index 2fa5b1f..308b7a5 100644 --- a/public/help/fr/kidsruby/glossary.html +++ b/public/help/fr/kidsruby/glossary.html @@ -1,7 +1,7 @@ - How To Use KidsRuby + Comment utiliser KidsRuby @@ -15,15 +15,15 @@

Glossary

-

Welcome!

-

What is a glossary?

-

A glossary is a collection of definitions to words that are specific to a particular subject. It's like a themed dictionary.

+

Bienvenue !

+

Qu'est-ce qu'un glossaire ?

+

Un glossaire est une collection de définitions pour des mots qui sont spécifiques à un sujet particulier. C'est comme un dictionnaire à thème.

Glossary

character: A single, letter, number or symbol

From d9e1906491158a421f899b2b08f08624908b3f0f Mon Sep 17 00:00:00 2001 From: dmorellet Date: Wed, 27 Jun 2012 15:25:28 +0200 Subject: [PATCH 03/31] traduction en -> fr --- public/help/fr/index.html | 54 +-- public/help/fr/keyboard-shortcuts.html | 634 ++++++++++++------------- 2 files changed, 344 insertions(+), 344 deletions(-) diff --git a/public/help/fr/index.html b/public/help/fr/index.html index 995eca1..f20a21e 100644 --- a/public/help/fr/index.html +++ b/public/help/fr/index.html @@ -1,27 +1,27 @@ - - - - Help - - - - - - - - - - - - - - + + + + Aide + + + + + + + + + + + + + + diff --git a/public/help/fr/keyboard-shortcuts.html b/public/help/fr/keyboard-shortcuts.html index 61f06ed..1556dc5 100644 --- a/public/help/fr/keyboard-shortcuts.html +++ b/public/help/fr/keyboard-shortcuts.html @@ -1,317 +1,317 @@ - - - - Help - - - - - - - - - - - -
- -

Default Keyboard Shortcuts

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PC (Windows/Linux)Macaction
Ctrl-Lcenter selection
Ctrl-UCtrl-Uchange to upper case
Ctrl-Shift-UCtrl-Shift-Uchange to lower case
Ctrl-Alt-DownCommand-Option-Downcopy lines down
Ctrl-Alt-UpCommand-Option-Upcopy lines up
Ctrl-FCommand-Ffind
Ctrl-KCommand-Gfind next
Ctrl-Shift-KCommand-Shift-Gfind previous
Alt-0Option-0fold all
Alt-Shift-0Option-Shift-0unfold all
DownDown,Ctrl-Ngo line down
UpUp,Ctrl-Pgo line up
Ctrl-End,Ctrl-DownCommand-End,Command-Downgo to end
LeftLeft,Ctrl-Bgo to left
Ctrl-LCommand-Lgo to line
Alt-Right,EndCommand-Right,End,Ctrl-Ego to line end
Alt-Left,HomeCommand-Left,Home,Ctrl-Ago to line start
PageDownOption-PageDown,Ctrl-Vgo to page down
PageUpOption-PageUpgo to page up
RightRight,Ctrl-Fgo to right
Ctrl-Home,Ctrl-UpCommand-Home,Command-Upgo to start
Ctrl-LeftOption-Leftgo to word left
Ctrl-RightOption-Rightgo to word right
TabTabindent
Alt-DownOption-Downmove lines down
Alt-UpOption-Upmove lines up
Shift-TabShift-Taboutdent
InsertInsertoverwrite
PageDownpagedown
PageUppageup
Ctrl-Shift-Z,Ctrl-YCommand-Shift-Z,Command-Yredo
Ctrl-DCommand-Dremove line
Ctrl-Kremove to line end
Option-Backspaceremove to linestart
Alt-Backspace,Ctrl-Alt-Backspaceremove word left
Alt-Deleteremove word right
Ctrl-RCommand-Option-Freplace
Ctrl-Shift-RCommand-Shift-Option-Freplace all
Ctrl-ACommand-Aselect all
Shift-DownShift-Downselect down
Shift-LeftShift-Leftselect left
Shift-EndShift-Endselect line end
Shift-HomeShift-Homeselect line start
Shift-PageDownShift-PageDownselect page down
Shift-PageUpShift-PageUpselect page up
Shift-RightShift-Rightselect right
Ctrl-Shift-End,Alt-Shift-DownCommand-Shift-Downselect to end
Alt-Shift-RightCommand-Shift-Rightselect to line end
Alt-Shift-LeftCommand-Shift-Leftselect to line start
Ctrl-Shift-Home,Alt-Shift-UpCommand-Shift-Upselect to start
Shift-UpShift-Upselect up
Ctrl-Shift-LeftOption-Shift-Leftselect word left
Ctrl-Shift-RightOption-Shift-Rightselect word right
Ctrl-Osplit line
Ctrl-7Command-7toggle comment
Ctrl-TCtrl-Ttranspose letters
Ctrl-ZCommand-Zundo
- -
- - + + + + Aide + + + + + + + + + + + +
+ +

Raccourcis Clavier par Défaut

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PC (Windows/Linux)Macaction
Ctrl-Lcentrer la sélection
Ctrl-UCtrl-Utransformer en majuscule(s)
Ctrl-Shift-UCtrl-Shift-Utransformer en minuscule(s)
Ctrl-Alt-BasPomme-Option-Bascopier la ligne vers le bas
Ctrl-Alt-HautPomme-Option-Hautcopier la ligne vers le haut
Ctrl-FPomme-Fchercher
Ctrl-KPomme-Gchercher le suivant
Ctrl-Shift-KPomme-Shift-Gchercher le précédent
Alt-0Option-0tout replier
Alt-Shift-0Option-Shift-0tout déplier
BasBas,Ctrl-Naller à la ligne du dessous
HautHaut,Ctrl-Paller à la ligne du dessus
Ctrl-Fin,Ctrl-BasPomme-Fin,Pomme-Basaller à la fin
GaucheGauche,Ctrl-Baller à gauche
Ctrl-LPomme-Laller à la ligne numéro...
Alt-Droite,FinPomme-Droite,Fin,Ctrl-Ealler à la fin de la ligne
Alt-Gauche,DébutPomme-Gauche,Début,Ctrl-Aaller au début de la ligne
PageSuivOption-PageSuiv,Ctrl-Valler en bas de la page
PagePrécOption-PagePrécaller en haut de la page
DroiteDroite,Ctrl-Faller vers la droite
Ctrl-Début,Ctrl-HautPomme-Début,Pomme-Hautaller au début du document
Ctrl-GaucheOption-Gauchealler au début du mot de gauche
Ctrl-DroiteOption-Droitealler au début du mot de droite
TabTabajouter une indentation de la ligne
Alt-BasOption-Basdéplacer les lignes vers le bas
Alt-HautOption-Hautdéplacer les lignes vers le haut
Shift-TabShift-Tabsupprimer une indentation de la ligne
InserInseractiver/désactiver le mode insertion
PageSuivPageSuivdescendre dans la page
PagePrécPagePrécmonter dans la page
Ctrl-Shift-Z,Ctrl-YPomme-Shift-Z,Pomme-Yrefaire
Ctrl-DPomme-Dsupprimer la ligne
Ctrl-Ksupprimer la fin de la ligne
Option-Retour_Arrièresupprimer le début de la ligne
Alt-Retour_Arrière,Ctrl-Alt-Retour_Arrièresupprimer le mot de gauche
Alt-Deletesupprimer le mot de droite
Ctrl-RPomme-Option-Fremplacer
Ctrl-Shift-RPomme-Shift-Option-Ftout remplacer
Ctrl-APomme-Asélectionner tout
Shift-BasShift-Bassélectionner vers le bas
Shift-GaucheShift-Gauchesélectionner vers la gauche
Shift-FinShift-Finsélectionner la fin de la ligne
Shift-DébutShift-Débutsélectionner le début de la ligne
Shift-PageSuivShift-PageSuivsélectionner le bas de la page
Shift-PagePrécShift-PagePrécsélectionner le haut de la page
Shift-DroiteShift-Droitesélectionner vers la droite
Ctrl-Shift-Fin,Alt-Shift-BasPomme-Shift-Bassélectionner tout jusqu'à la fin du document
Alt-Shift-DroitePomme-Shift-Droitesélectionner jusqu'à la fin de la ligne
Alt-Shift-GauchePomme-Shift-Gauchesélectionner jusqu'au début de la ligne
Ctrl-Shift-Début,Alt-Shift-HautPomme-Shift-Hautsélectionner tout jusqu'au début du document
Shift-HautShift-Hautsélectionner vers le haut
Ctrl-Shift-GaucheOption-Shift-Gauchesélectionner le mot de gauche
Ctrl-Shift-DroiteOption-Shift-Droitesélectionner le mot de droite
Ctrl-Odiviser la ligne en 2
Ctrl-7Pomme-7activer/désactiver la mise en commentaire
Ctrl-TCtrl-Tinverser les lettres de la sélection
Ctrl-ZPomme-Zdéfaire
+ +
+ + From b92806a80fbb2dbf78fab31940bcc06752fff8cd Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Thu, 28 Jun 2012 09:29:50 +0200 Subject: [PATCH 04/31] Glossary.html --- public/help/fr/kidsruby/glossary.html | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/public/help/fr/kidsruby/glossary.html b/public/help/fr/kidsruby/glossary.html index 308b7a5..f80a269 100644 --- a/public/help/fr/kidsruby/glossary.html +++ b/public/help/fr/kidsruby/glossary.html @@ -1,7 +1,7 @@ - Comment utiliser KidsRuby + Comment Utiliser KidsRuby @@ -19,28 +19,28 @@ Retour à l'accueil Suivant » -

Glossary

+

Glossaire

Bienvenue !

Qu'est-ce qu'un glossaire ?

Un glossaire est une collection de définitions pour des mots qui sont spécifiques à un sujet particulier. C'est comme un dictionnaire à thème.

-

Glossary

-

character: A single, letter, number or symbol

-

class: A class is a blueprint to create objects. An object of a given class is called an 'instance' of that class. A class can contain attributes, methods and even other classes!

-

method: Methods allow classes to do things. They are a set of instructions and can return a value

-

parameter: A type of variable within parentheses, which puts a limit or limits on the method it is acting on.

-

string: A string is any amount of characters (letters, digits, punctuation) surrounded by quotes. Both single and double quotes are used to create strings (Source: Why's Poignant Guide)

-

icon: A picture on a screen that represents a specific file, directory, window, option, or program. (Source: The Free Dictionary)

-

pixel:any of a number of very small picture elements that make up a picture, as on a visual display unit (Source: The Free Dictionary)

-

attribute: A property or characteristic of an Entity. For example, the attributes of a person would be the name, age, height etc... (Source: Computing Students)

-

variable: A symbol used to stand for the data assigned to the variable. For example, in x =50, "x" is the variable and "50" is the data.

-

object: An item that can be selected and maneuvered, such as an onscreen graphic. These objects can include data and the procedures necessary to operate on that data.(Source: The Free Dictionary)

-

.png: Stands for "Portable Network Graphics and is a file format for image compression, which is just a fancy term for making the size of the picture file smaller wihout decreasing the quality of the image too much.

-

instantiate:Creating an instance of a class. For example, instantiating an instance of the class "Cat" could be "My Cat".

+

Glossaire

+

caractère : Une unique lettre, nombre ou symbole

+

classe : Une classe est un modèle pour créer des objets. Un objet d'une classe donnée est appelée une "instance" de cette classe. Une classe peut contenir des attributs, méthodes, et même d'autres classes !

+

méthode : Les méthodes permettent aux classes de faire des choses. Elles sont un ensemble d'instructions, et peuvent retourner une valeur.

+

paramètre : Le type de variable entre parenthèses, qui met une ou des limites à la méthode sur laquelle il agit.

+

chaîne : Une chaîne est un ensemble de n'importe quels caractères (lettres, chiffres, ponctuation) entouré par des guillemets. Les guillemets simples (') et doubles (") sont utilisés pour créer des chaînes. (Source: Why's Poignant Guide)

+

icône : Une image sur un écran qui représente un fichier, un répertoire, une fenêtre, une option, ou un programme spécifique. (Source: The Free Dictionary)

+

pixel : Un des nombreux tous petits éléments qui font une image, comme sur un dispositif d'affichage. (Source: The Free Dictionary)

+

attribut : Une propriété ou caractéristique d'une Entité. Par exemple, les attributs d'une personnes seraient le nom, l'âge, la taille etc... (Source: Computing Students)

+

variable : Un symbole utilisé pour représenter les données assignées à la variable. Par exemple, dans x = 50, "x" est la variable et "50" est la donnée.

+

objet : Un élément qui peut être sélectionné et manoeuvré, comme par exemple un élément graphique à l'écran. Les objets peuvent inclure des données et les procédures nécessaires pour faire des opérations sur ces données. (Source: The Free Dictionary)

+

.png : Signifie "Portable Network Graphics", c'est un format de fichier pour la compression d'images, qui consiste à réduire la taille de l'image sans trop en diminuer la qualité.

+

instancier : Créer une instance d'une classe. Par exemple, instancier une instance de la classe "Chat" pourrait être "Mon Chat".

- Back to top + Retour en haut From 43a6b019dfa0ecd0b557a4a617b7ffa07054cd4f Mon Sep 17 00:00:00 2001 From: dmorellet Date: Thu, 28 Jun 2012 14:29:51 +0200 Subject: [PATCH 05/31] [fr] translation --- public/help/fr/index.html | 2 +- public/help/fr/ruby4kids/index.html | 72 +++++++++++----------- public/help/fr/rubywarrior/index.html | 87 +++++++++++++-------------- 3 files changed, 80 insertions(+), 81 deletions(-) diff --git a/public/help/fr/index.html b/public/help/fr/index.html index f20a21e..1946e5e 100644 --- a/public/help/fr/index.html +++ b/public/help/fr/index.html @@ -18,7 +18,7 @@
  • Suivez le Guide !
  • Raccourcis Clavier
  • Hackety-Hack
  • -
  • Ruby Warrior
  • +
  • Le Guerrier de Ruby
  • Programmer des jeux avec Gosu
  • Glossaire
  • diff --git a/public/help/fr/ruby4kids/index.html b/public/help/fr/ruby4kids/index.html index fd40b36..d6c5c66 100644 --- a/public/help/fr/ruby4kids/index.html +++ b/public/help/fr/ruby4kids/index.html @@ -1,36 +1,36 @@ - - - - Make Games With Gosu - - - - - - - - - - - -

    Make Games With Gosu

    - -
    -

    Writing games is really fun, and is the reason why a lot of people want to learn to program. Alberto Morales and Bill Davenport have been working on a series of tutorials on their website at Ruby4kids.com to show kids how to create games using Ruby and a game package called Gosu.

    -
      -
    1. Lesson 1 - Create The Game Window
    2. -
    3. Lesson 2 - Add A Player
    4. -
    5. Lesson 3 - Move the Player Left
    6. -
    7. Lesson 4 - Limiting Movement
    8. -
    9. Lesson 5 - Moving Right, Up, and Down
    10. -
    11. Lesson 6 - Adding a Dodgeball
    12. -
    13. Lesson 7 - Getting Hit
    14. -
    15. Lesson 8 - Escape Key Pauses the Game
    16. -
    17. Lesson 9 - Creating Multiple Balls
    18. -
    -
    - - - + + + + Programmer des jeux avec Gosu + + + + + + + + + + + +

    Programmer des jeux avec Gosu

    + +
    +

    Programmer des jeux est vraiment amusant, et c'est pourquoi beaucoup de personnes veulent s'y mettre. Alberto Morales and Bill Davenport ont travaillés sur une série de tutoriaux sur leur site internet Ruby4kids.com pour montrer aux enfants comment créer des jeux en utilisant Ruby et un kit de développement appelé Gosu.

    +
      +
    1. Leçon 1 - Création de la Fenêtre de Jeu
    2. +
    3. Leçon 2 - Ajout d'un Joueur
    4. +
    5. Leçon 3 - Déplacement du Joueur vers la Gauche
    6. +
    7. Leçon 4 - Limites de Déplacement
    8. +
    9. Leçon 5 - Déplacement vers la Droite, Haut et Bas
    10. +
    11. Leçon 6 - Ajout d'un Ballon à Eviter
    12. +
    13. Leçon 7 - Se Faire Toucher par le Ballon
    14. +
    15. Leçon 8 - La Touche Echap Met le Jeu en Pause
    16. +
    17. Leçon 9 - Création de Plusieurs Ballons
    18. +
    +
    + + + diff --git a/public/help/fr/rubywarrior/index.html b/public/help/fr/rubywarrior/index.html index 8e2297f..e877af9 100644 --- a/public/help/fr/rubywarrior/index.html +++ b/public/help/fr/rubywarrior/index.html @@ -1,44 +1,43 @@ - - - - RubyWarrior - - - - - - - - - - - - - - -

    Ruby Warrior

    - -
    -

    Ruby Warrior is a game designed to teach Ruby in a fun, interactive way. It was created by Ryan Bates.

    -

    You play as a warrior climbing a tall tower to reach the precious Ruby at the top level. On each floor you need to write a Ruby script to instruct the warrior to battle enemies, rescue captives, and reach the stairs. You have some idea of what each floor contains, but you never know for certain what will happen. You must give the Warrior up-front to find their own way.

    -

    You will need to program your Player, to tell him or her how to figure out what to do. You can start by entering this little bit of Ruby code into the editor to the left:

    -
    Code automatically inserted here...
    - -

    - To start the game, you also need to enter this other little bit of Ruby code into the editor to the left:

    -
    Code automatically inserted here...
    - -

    You will need to make sure the Ruby code for the Player comes before the RubyWarrior.play command.

    -

    To start playing the game just click on the "Run" button, and follow the instructions that will start to appear in the "Output" tab. Have fun!

    -
    - - - - + + + + Le Guerrier de Ruby + + + + + + + + + + + + + + +

    Le Guerrier de Ruby

    + +
    +

    Le Guerrier de Ruby (Ruby Warrior en anglais) est un jeu qui a été développé pour enseigner le langage Ruby de manière amusante et interactive. Il a été créé par Ryan Bates.

    +

    Tu joues le rôle d'un guerrier qui part à l'assaut d'une grande tour pour atteindre le précieux Rubis qui se trouve au dernier niveau. A chaque étage tu dois écrire un script en Ruby pour décrire ce que doit faire le guerrier : combattre les ennemis, sauver des prisoniers ou atteindre les escaliers. Tu as des indices sur ce que contient chaque étage, mais tu n'es jamais sûr de ce qui peut se passer. Tu dois donner au guerrier suffisamment d'indications pour qu'il puisse trouver son chemin tout seul.

    +

    Tu devra programmer les actions de ton joueur, lui dire comment il doit se débrouiller. Tu peux commencer par entrer ce petit bout de code Ruby dans l'éditeur à gauche:

    +
    Code automatiquement inséré ici...
    + +

    Pour lancer la partie, tu dois également ajouter cet autre morceau de code Ruby dans l'éditeur:

    +
    Code automatiquement inséré ici...
    + +

    Fait bien attention à ce que le code du joueur Player soit avant la commande RubyWarrior.play.

    +

    Pour commencer à jouer, il te suffit de cliquer sur le bouton "Run", et de suivre les instructions qui apparaitront dans l'onglet "Output". Amuses toi bien !

    +
    + + + + From cba7261db4dd10cbeab932fc59eabce00e424d4b Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Thu, 28 Jun 2012 15:37:24 +0200 Subject: [PATCH 06/31] Fin de traduction KidsRuby folder --- public/help/fr/kidsruby/how_to_use.html | 64 ++++++++++++------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/public/help/fr/kidsruby/how_to_use.html b/public/help/fr/kidsruby/how_to_use.html index 2b0ff89..381581d 100644 --- a/public/help/fr/kidsruby/how_to_use.html +++ b/public/help/fr/kidsruby/how_to_use.html @@ -1,7 +1,7 @@ - How To Use KidsRuby + Comment Utiliser KidsRuby @@ -14,52 +14,52 @@ -

    How To Use KidsRuby

    +

    Comment Utiliser KidsRuby

    -

    Welcome!

    -

    This is KidsRuby

    -

    Hi, and welcome to KidsRuby. We hope you are ready to have fun learning how to make computers do whatever you want them to.

    -

    To use this 'Help' system, you can click on any lesson title, just like you clicked on this one. You can use the links above here to go to the 'Previous' or to the 'Next' lesson. You can also click on the 'Back to Lessons' link to get back to the main list of lessons at any time.

    +

    Bienvenue !

    +

    Voici KidsRuby

    +

    Bonjour et bienvenue dans KidsRuby. Nous espérons que tu es prêt à t'amuser à apprendre comment faire faire aux ordinateurs tout ce que tu veux qu'ils fassent.

    +

    Pour utiliser ce système d'"Aide", tu peux cliquer sur un titre de leçon, tout comme tu viens de cliquer sur celui-ci. Tu peux utiliser les liens ci-dessus pour revenir aux leçons "Précédentes" et passer aux "Suivantes". Tu peux aussi cliquer sur le lien "Retour aux Leçons" pour revenir à la liste principale de leçons à tout moment.

    -

    What is Ruby?

    -

    Ruby is a programming language

    -

    The way you tell a computer what to do, is by learning a special language that the computer can understand. This kind of special language is called a 'programming language'. KidsRuby lets you program in the most awesome computer language ever, Ruby.

    -

    Ruby was invented in Japan by a very cool guy named Matz. His real name is Yukihiro Matsumoto, but everyone calls him Matz. He has given away his Ruby programming language to the world to use for free. That is pretty cool.

    +

    Qu'est-ce que Ruby?

    +

    Ruby est un langage de programmation

    +

    La manière dont on dit à un ordinateur ce qu'il a à faire est d'apprendre un langage spécial que l'ordinateur peut comprendre. Ce type de langage spécial est appelé "langage de programmation". KidsRuby te propose de programmer dans le meilleur langage, Ruby.

    +

    Ruby a été inventé au Japon par un gars très cool appelé Matz. Son véritable nom est Yukihiro Matsumoto, mais tout le monde l'appelle Matz. Il a donné le langage Ruby pour que tout le monde puisse l'utiliser gratuitement. C'est vraiment cool de sa part.

    -

    How To Make It Work

    -

    Type in some Ruby to the left, then click 'Run'

    -

    You make KidsRuby work by doing this:

    -

    1. Type in some Ruby 'code' to the left, just below where it says "Type in your code just below here:".

    -

    2. Click on the "Run" button. This will cause the computer to look at the Ruby you typed in, and do whatever it says to do.

    -

    3. Watch the computer do whatever you have told it to!

    -

    Don't worry if you do not know how to write Ruby yet. That is what this Help system is designed to do.

    +

    Comment Le Faire Fonctionner

    +

    Tape un peu de Ruby sur la gauche, ensuite clique sur "Exécuter"

    +

    On fait fonctionner KidsRuby en faisant cela :

    +

    1. Tape un peu de "code" Ruby à gauche, juste en-dessous de là où il dit "Tape ton code ci-dessous :".

    +

    2. Clique sur le bouton "Exécuter". Cela va faire en sorte que l'ordinateur va regarder le Ruby que tu as tapé, et faire ce qu'il dit de faire.

    +

    3. Regarde l'ordinateur faire ce que tu lui as dit !

    +

    Ne t'inquiète pas si tu ne sais pas encore comment écrire du Ruby. C'est ce pourquoi ce système d'Aide est fait.

    -

    Saving and Opening Your Code

    -

    You can save your code, and reopen it later

    -

    You can save your program with KidsRuby by doing this:

    -

    1. Type in some Ruby 'code' to the left, just below where it says "Type in your code just below here:".

    -

    2. Click on the "Save" button down at the bottom of where you typed your code. This will pop up something that will ask you where you want to save the file.

    -

    3. Enter in the name for your new file. Make sure you name it somthing that ends with ".rb" like "mywork.rb"

    -

    4. Click on the "Save" button. Now you have saved your program, and can reopen it later, by clicking on the "Open" button!

    +

    Sauvegarder Et Ouvrir Ton Code

    +

    Tu peux sauvegarder ton code, et le rouvrir ensuite

    +

    Tu peux sauvegarder ton programme avec KidsRuby en faisant cela :

    +

    1. Tape un peu de "code" Ruby à gauche, juste en-dessous de là où il dit "Tape ton code ci-dessous :".

    +

    2. Clique sur le bouton "Enregistrer" en bas de là où tu as tapé ton code. Cela va ouvrir une fenêtre te demandant où tu veux sauver le fichier.

    +

    3. Entre un nom pour ton nouveau fichier. Vérifie que le nom finit bien par ".rb", comme "monprogramme.rb".

    +

    4. Clique sur le bouton "Enregistrer". Maintenant tu as sauvegardé ton programme, et tu peux le rouvrir plus tard, en cliquant sur le bouton "Ouvrir" !< /p>

    -

    What To Do Next

    -

    Go 'Back to Lessons', and check out "Hackety Hack"

    -

    Once upon a time there was an amazing guy named "_why the lucky stiff". He made a lot of programs using Ruby, and one of them was named Hackety Hack. It was designed to help kids learn how to program in Ruby.

    -

    One day, _why disappeared. He probably vanished and went back to whatever magic programming world he had originally came from. He left behind some great ideas, and we have tried to make KidsRuby with his spirit of fun and discovery. That is "_why" we have included some of his writings here for you to learn from. Have fun!

    +

    Que Faire Ensuite

    +

    Clique sur "Retour aux Leçons", et essaye "Hackety Hack"

    +

    Il était une fois, il y avait quelqu'un d'incroyable nommé "_why the lucky stiff". Il faisait plein de programmes qui utilisaient Ruby, et l'un d'entre eux s'appelait Hackety Hack. Il était conçu pour aider les enfants à apprendre à programmer en Ruby.

    +

    Un jour, _why disparut. Il s'évapora et retourna sûrement vers le monde magique de la programmation dont il venait. Il laissa quelques superbes idées, et nous avons essayé de faire KidsRuby avec son esprit de fun et de découvertes. C'est pourquoi nous avons inclus quelques uns de ses écrits ici pour que tu puisses apprendre. Amuse-toi bien !

    - Back to top + Retour à l'accueil From 02c9c710651d80ca7adeb91d492d966c6040e955 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Thu, 28 Jun 2012 15:54:49 +0200 Subject: [PATCH 07/31] [fr] translation --- public/js/i18n/fr.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/js/i18n/fr.js b/public/js/i18n/fr.js index 1dc0140..7dc4128 100644 --- a/public/js/i18n/fr.js +++ b/public/js/i18n/fr.js @@ -1,13 +1,13 @@ { "buttons": { - "run": "Run", - "clear": "Clear", - "open": "Open", - "save": "Save" + "run": "Executer", + "clear": "Effacer", + "open": "Ouvrir", + "save": "Enregistrer" }, "tabs": { - "help-link": "Help", - "output-link": "Output", - "turtle-link": "Turtle" + "help-link": "Aide", + "output-link": "Sortie", + "turtle-link": "Tortue" } } From afa216484a5049c864c6da772d8b9461bc60f0a6 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Fri, 29 Jun 2012 10:36:05 +0200 Subject: [PATCH 08/31] [fr] translation --- public/help/fr/ruby4kids/lesson_3.html | 78 +++++++++++++------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_3.html b/public/help/fr/ruby4kids/lesson_3.html index 0ed6275..4aedf4e 100644 --- a/public/help/fr/ruby4kids/lesson_3.html +++ b/public/help/fr/ruby4kids/lesson_3.html @@ -1,7 +1,7 @@ - Ruby4Kids - Programming For The Fun Of It + Ruby4Kids - Programmer en s'Amusant ! @@ -27,73 +27,73 @@ -

    Ruby4Kids - Game Programming - Lesson 3

    +

    Ruby4Kids - Programmation de Jeux - Leçon 3

    -

    Lesson 3 - Move the Player Left

    -

    This is Ruby4Kids

    -

    OK, now let's try to make the player move. In the last lesson, we had the image of the player, and now we're going to figure out how to make that player move.

    -

    In Gosu, we can use the arrow keys as a way to move our player up, down, left, and right. The game window has an update method, which is where we need to check to see if any key was pressed. In programming, we do this via conditional statements, such as if statements.

    -

    So, under def update we write:

    -
    Code automatically inserted here...
    +

    Leçon 3 - Bouge le Joueur Vers la Gauche

    +

    Voici Ruby4Kids

    +

    Maintenant, essayons de faire bouger le joueur. Dans la dernière leçon, nous avions l'image du joueur, et maintenant nous allons trouver comment faire bouger ce joueur.

    +

    Dans Gosu, on peut utiliser les flèches pour faire bouger notre joueur en haut, en bas, à gauche et à droite. La fenêtre de jeu a une méthode de mise à jour ("update"), et c'est là que l'on doit aller voir si une touche a été pressée. En programmation, on fait cela avec des conditions, comme l'instruction if.

    +

    Donc en dessous de def update on écrit:

    +
    Code inséré automatiquement ici...
    -

    So, what the segment above is saying, is that if the left key is pressed, the player will move to the left. However, before we can define what the left move is, we need to move the player away from a fixed variable of 50,50.

    +

    Donc, ce que le code ci-dessus dit, c'est que quand la touche "gauche" est pressée, le joueur bougera vers la gauche. Mais avant de pouvoir définir ce que le mouvement vers la gauche est, nous devons éloigner le joueur d'une variable fixe de 50,50.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 3 - Move the Player Left

    -

    Adding Variables

    -

    If we want the position to move, we have to give it some variables. the way to initialize these variables is in the initialize method. So, under the def initialize method, we already have: -

    Code automatically inserted here...
    +

    Leçon 3 - Bouge le Joueur Vers la Gauche

    +

    Ajouter des Variables

    +

    Si on veut que la position bouge, on doit lui donner des variables. On initialise ces variables dans une méthode appelée "initialize". Donc, en dessous de cette méthode "def initialize", on a déjà :

    +
    Code inséré automatiquement ici...
    -

    Now, we just need to add:

    -
    Code automatically inserted here...
    +

    Maintenant, on a juste besoin d'ajouter :

    +
    Code inséré automatiquement ici...
    -

    Next, we are going to replace the 50,50 in the code @icon.draw(50,50,1) with @x, @y. So, your end result is going to look like this: +

    Ensuite, nous allons remplacer le 50,50 dans le code @icon.draw(50,50,1) avec @x, @y. A la fin, le résultat va ressembler à cela : -

    Code automatically inserted here...
    -

    Now, what we did was make the icon moveable by shifting the icon from a fixed position to a variable position, using variables! These variables were initialized in the initialize method of the player. So, the starting positions for x and y were each at 50.

    +
    Code inséré automatiquement ici...
    +

    Maintenant, ce que l'on a fait c'est rendre l'icône mobile en la décalant d'une position fixe à une position variable, en utilisant des variables ! Ces variables ont été initialisées dans la méthode d'initialisation du joueur. Donc les positions de départ de x et de y étaient chacune à 50.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 3 - Move the Player Left

    -

    Define "Moving Left"

    -

    Now we need to make the x position move left every time the player moves left. So, in order to do that, we have to first define "moving left" and then add a simple equation under that definition. So, we type:

    +

    Leçon 3 - Bouge le Joueur Vers la Gauche

    +

    Définir "Bouge vers la Gauche"

    +

    A présent nous devons faire bouger la position x vers la gauche à chaque fois que le joueur bouge à gauche. Pour faire cela, nous devons d'abord définir "bouger vers la gauche" et ajouter une simple équation sous cette définition. Donc on tape :

    -
    Code automatically inserted here...
    -

    The equation that we typed moves the icon left by 10 pixels every time we press the arrow key. Go ahead, try it! Cool, huh?

    +
    Code inséré automatiquement ici...
    +

    L'équation que l'on a écrite décale l'icône de 10 pixels vers la gauche chaque fois qu'on presse la touche Flèche. Vas y, essaye ! C'est cool, non ?

    -

    Here is the entire program you should have written so far:

    -
    Code automatically inserted here...
    +

    Voici l'intégralité du programme que tu devrais avoir écrit jusque là :

    +
    Code inséré automatiquement ici...
    -

    OK, smartie pants, now that you know how to move left, let's try limiting the movement of our player in lesson 4!

    +

    OK champion, maintenant que tu sais comment bouger vers la gauche, essayons de limiter le movuement de notre joueur dans la leçon 4 !

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -Back to top +Retour en haut From 3fb3d735911ee82b768c815184a597e2150f3ea9 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Fri, 29 Jun 2012 10:39:07 +0200 Subject: [PATCH 09/31] [fr] translation correction titre --- public/help/fr/ruby4kids/lesson_3.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_3.html b/public/help/fr/ruby4kids/lesson_3.html index 4aedf4e..645ba49 100644 --- a/public/help/fr/ruby4kids/lesson_3.html +++ b/public/help/fr/ruby4kids/lesson_3.html @@ -34,10 +34,10 @@

    Ruby4Kids - Programmation de Jeux - Leçon 3

    Suivant » -

    Leçon 3 - Bouge le Joueur Vers la Gauche

    +

    Leçon 3 - Déplacement du Joueur vers la Gauche

    Voici Ruby4Kids

    -

    Maintenant, essayons de faire bouger le joueur. Dans la dernière leçon, nous avions l'image du joueur, et maintenant nous allons trouver comment faire bouger ce joueur.

    -

    Dans Gosu, on peut utiliser les flèches pour faire bouger notre joueur en haut, en bas, à gauche et à droite. La fenêtre de jeu a une méthode de mise à jour ("update"), et c'est là que l'on doit aller voir si une touche a été pressée. En programmation, on fait cela avec des conditions, comme l'instruction if.

    +

    Maintenant, essayons de faire se déplacer le joueur. Dans la dernière leçon, nous avions l'image du joueur, et maintenant nous allons trouver comment déplacer ce joueur.

    +

    Dans Gosu, on peut utiliser les flèches pour faire bouger notre joueur vers le haut, en bas, à gauche et à droite. La fenêtre de jeu a une méthode de mise à jour ("update"), et c'est là que l'on doit aller voir si une touche a été pressée. En programmation, on fait cela avec des conditions, comme l'instruction if.

    Donc en dessous de def update on écrit:

    Code inséré automatiquement ici...
    @@ -52,7 +52,7 @@

    Ruby4Kids - Programmation de Jeux - Leçon 3

    -

    Leçon 3 - Bouge le Joueur Vers la Gauche

    +

    Leçon 3 - Déplacement du Joueur vers la Gauche

    Ajouter des Variables

    Si on veut que la position bouge, on doit lui donner des variables. On initialise ces variables dans une méthode appelée "initialize". Donc, en dessous de cette méthode "def initialize", on a déjà :

    Code inséré automatiquement ici...
    @@ -74,9 +74,9 @@

    Ruby4Kids - Programmation de Jeux - Leçon 3

    -

    Leçon 3 - Bouge le Joueur Vers la Gauche

    -

    Définir "Bouge vers la Gauche"

    -

    A présent nous devons faire bouger la position x vers la gauche à chaque fois que le joueur bouge à gauche. Pour faire cela, nous devons d'abord définir "bouger vers la gauche" et ajouter une simple équation sous cette définition. Donc on tape :

    +

    Leçon 3 - Déplacement du Joueur vers la Gauche

    +

    Définir "Déplace toi vers la Gauche"

    +

    A présent nous devons faire bouger la position x vers la gauche à chaque fois que le joueur se déplace à gauche. Pour faire cela, nous devons d'abord définir "se déplacer vers la gauche" et ajouter une simple équation sous cette définition. Donc on tape :

    Code inséré automatiquement ici...

    L'équation que l'on a écrite décale l'icône de 10 pixels vers la gauche chaque fois qu'on presse la touche Flèche. Vas y, essaye ! C'est cool, non ?

    @@ -84,7 +84,7 @@

    Ruby4Kids - Programmation de Jeux - Leçon 3

    Voici l'intégralité du programme que tu devrais avoir écrit jusque là :

    Code inséré automatiquement ici...
    -

    OK champion, maintenant que tu sais comment bouger vers la gauche, essayons de limiter le movuement de notre joueur dans la leçon 4 !

    +

    OK champion, maintenant que tu sais comment te déplacer vers la gauche, essayons de limiter le mouvement de notre joueur dans la leçon 4 !

    « Précédent Retour aux Leçons From 2b40408362e79ff1e60ea0596525852cf70fb3a6 Mon Sep 17 00:00:00 2001 From: bootis Date: Fri, 29 Jun 2012 20:50:01 +0200 Subject: [PATCH 10/31] translation fr test aline --- public/help/fr/ruby4kids/lesson_6.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/help/fr/ruby4kids/lesson_6.html b/public/help/fr/ruby4kids/lesson_6.html index b6afbc5..0541c01 100644 --- a/public/help/fr/ruby4kids/lesson_6.html +++ b/public/help/fr/ruby4kids/lesson_6.html @@ -33,7 +33,7 @@

    Ruby4Kids - Game Programming - Lesson 6

    From bae0bad2fd019cf3794d920fa32f9a708b95a543 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Fri, 29 Jun 2012 13:51:25 +0200 Subject: [PATCH 11/31] [fr] translation done by Ludo notre presta ;-) --- public/help/fr/ruby4kids/lesson_4.html | 52 +++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_4.html b/public/help/fr/ruby4kids/lesson_4.html index 89cfefa..5aa4bac 100644 --- a/public/help/fr/ruby4kids/lesson_4.html +++ b/public/help/fr/ruby4kids/lesson_4.html @@ -1,7 +1,7 @@ - Ruby4Kids - Programming For The Fun Of It + Ruby4Kids - Programmer en s'Amusant ! @@ -23,51 +23,51 @@ -

    Ruby4Kids - Game Programming - Lesson 4

    +

    Ruby4Kids - Programmation de Jeux - Leçon 4

    -

    Lesson 4 - Limiting Movement

    -

    The Disappearing Icon

    -

    When running your program, did you notice that your icon disappears after a while? The guy keeps moving left until he left the screen, never to be seen again :(.

    +

    Leçon 4 - Limites de Déplacement

    +

    L'icône qui disparaît

    +

    Lorsque vous lancez votre programme, avez-vous remarqué que votre icône disparait après un moment ? Elle n'arrête pas d'aller sur la gauche jusqu'à sortir de l'écran pour ne jamais revenir. :(

    -

    So, the first thing we're going to do is limit where the icon can go. One of the ways of limiting movement is by adding another conditional under def move_left

    +

    Donc, la première chose que nous allons faire est de limiter la zone où l'icône peut aller. Une des façons de limiter le mouvement est de rajouter une condition dans def move_left.

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    -

    Now, what we did above was limit the movement of the icon to stay within a positive x area. That is, if x starts going less than 0, we reset the icon to be at zero. This reset acts as a limit for the icon on the screen.

    +

    Ce que nous venons de faire est de limiter le mouvement de l'icône pour qu'elle garde une valeur x positive. Ce qui veut dire que si x commence à avoir une valeur négative, on lui redonne la valeur zéro. Cet action limite l'icône à la zone de l'écran.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 4 - Limiting Movement

    -

    What "Else"?

    -

    Now, we are going to add another conditional statement called else, which just means "otherwise". So, again, we type enter this code under the def move_left:

    +

    Leçon 4 - Limites de Déplacement

    +

    Quoi d'autre ?

    +

    Nous allons à présent ajouter une autre condition appelée else, qui veut juste dire "sinon". Encore une fois nous écrivons ce code dans def move_left :

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    -

    The else, in this case, refers to regular movement. So, if x is 0 or greater, then the movement to the left is going to be using the code that we developed in the last lesson:@x = @x - 10.

    +

    Le else, dans ce cas, se réfère à un mouvement régulier. Donc, si x est égal ou supérieur à 0, le mouvement vers la gauche va utiliser le code que nous avons développé lors de la leçon précédente :@x = @x - 10.

    -

    Here is the entire program you should have written so far:

    -
    Code automatically inserted here...
    +

    Voici le programme que tu devrais avoir écrit jusqu'à présent :

    +
    Code inséré automatiquement ici...
    -

    So, now that we know how to move left and limit that movement, let's add and limit some other movements in lesson 5!

    +

    Maintenant que nous savons comment déplacer sur la gauche et limiter le mouvement, ajoutons et limitons d'autres mouvements dans la leçon 5 !

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -Back to top +Retour en haut From 6723512f2d251374a2c7b0aaa9fcf648542ba740 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Mon, 2 Jul 2012 09:27:31 +0200 Subject: [PATCH 12/31] [fr] translation lesson 5 --- public/help/fr/ruby4kids/lesson_5.html | 98 +++++++++++++------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_5.html b/public/help/fr/ruby4kids/lesson_5.html index d4e48a7..c1c1395 100644 --- a/public/help/fr/ruby4kids/lesson_5.html +++ b/public/help/fr/ruby4kids/lesson_5.html @@ -1,7 +1,7 @@ - Ruby4Kids - Programming For The Fun Of It + Ruby4Kids - Programmer en s'Amusant ! @@ -28,102 +28,102 @@ -

    Ruby4Kids - Game Programming - Lesson 5

    +

    Ruby4Kids - Programmation de Jeux - Leçon 5

    -

    Lesson 5 - Moving Right, Up, and Down

    -

    This is Ruby4Kids

    +

    Leçon 5 - Déplacement vers la Droite, Haut et Bas

    +

    Voici Ruby4Kids

    -

    Now, we're going to learn how to move right, up, and down. To move right, we need to add another if statement to the def update under the class MyGame. So, let's add an if statement for the right key:

    -
    Code automatically inserted here...
    +

    A présent, nous allons apprendre comment se déplacer vers la droite, le haut et le bas. Pour se déplacer vers la droite, nous avons besoin d'ajouter une autre instruction if au def update dans la classe MyGame. Alors ajoutons une instruction if pour la touche "Droite" :

    +
    Code inséré automatiquement ici...
    -

    The part above is the same as the code for turning left, except that now we type KbRight instead of KbLeft.

    +

    La partie ci-dessus est la même que le code pour tourner à gauche, sauf que maintenant on écrit KbRight au lieu de KbLeft.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 5 - Moving Right, Up, and Down

    +

    Leçon 5 - Déplacement vers la Droite, Haut et Bas

    Plus 10

    -

    Now, we're going to be going to the Player class and adding:

    +

    Maintenant, nous allons aller vers la classe Player et ajouter :

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    -

    So, this time the code is a bit less similar to what we did in the last lesson. You'll notice that we added + 10 instead of - 10, because we're going right instead of left.

    +

    Donc, cette fois le code ressemble un peu moins à ce que l'on faisait dans la leçon précédente. Tu remarqueras que nous avons ajouté + 10 au lieu de - 10, parce que nous allons à droite au lieu d'aller à gauche.

    -

    Another difference is that we limit the icon by the game window's width and then subtract a certain amount of pixels from that width. Now, we subtract those pixels, because the position x is actually on the left side of the icon. That means that we have to make up for that amount by subtracting from the pixel count. You can try putting in different numbers within:

    -
    Code automatically inserted here...
    -

    to see what I mean, as long as both the numbers match up.

    +

    Une autre différence est que l'on limite l'icône à la largeur de la fenêtre, et ensuite on soustrait une certaine quantité de pixels à cette largeur. On soustrait ces pixels, car la position x est en fait sur le côté gauche de l'icône. Cela signifie que nous devons prendre en compte cette quantité de pixels en la soustrayant au reste quand on est du côté droit. Tu peux essayer de mettre différents nombres dedans :

    +
    Code inséré automatiquement ici...
    +

    pour voir ce que je veux dire, tant que les nombres sont cohérents.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 5 - Moving Right, Up, and Down

    -

    Moving Up

    +

    Leçon 5 - Déplacement vers la Droite, Haut et Bas

    +

    Déplacement vers le haut

    -

    OK, now that we've accomplished going left and right, we're going to try out how to go up. So, we'll first type the following code under the def update in the MyGame class -

    Code automatically inserted here...
    +

    OK, maintenant que nous avons réussi à aller à droite et à gauche, nous allons chercher comment aller vers le haut. D'abord nous allons taper le code suivant dans le def update de la classe MyGame.

    +
    Code inséré automatiquement ici...
    -

    So, that part was familiar. Now, we're going to go to the Player class and add:

    -
    Code automatically inserted here...
    +

    Cette partie nous était familière. Maintenant, nous allons aller dans la classe Player et ajouter :

    +
    Code inséré automatiquement ici...
    -

    Now, you'll notice that both the if and else statements are both different than what we did before. The first difference is that we're now using a y coordinate. The y coordinate is used, because we are going up and down (in this case, up), rather than left and right, just like on a grid!

    +

    Tu remarqueras que les deux instructions if et else sont différents que ce que nous avions auparavant. La première différence est que nous utilisons maintenant une coordonnée "y". La coordonnée "y" est utilisée parce que nous allons en haut et en bas (dans ce cas, en haut), plutôt qu'à gauche et à droite, comme dans un tableau !

    -

    So, you might also be wondering, why is the formula y < 0? Isn't y < 0 supposed to be for going down? That would have been the case, had the pixel count increased as you went up. Instead, it's the other way around.

    +

    Tu te demandes peut être pourquoi on a la formule y < 0 ? y < 0 n'est-il pas supposé pour aller vers le bas ? Cela aurait été le cas si le nombre de pixels avait augmenté pendant que tu allais vers le haut. Mais c'est le contraire.

    -

    Basically, it means that the very top of the screen is at 0.00 and increases as you go down the y-axis. So, as the icon moves up, it's actually decreasing the pixel count. This decrease in count is also the reason why we have a - 10 instead of a + 10.

    . +

    En gros, cela signifique que le haut de l'écran est à 0.00 et augmente quand tu descends l'axe y. Donc quand l'icône se déplace vers le haut, le nombre de pixels diminue. Cette diminution est aussi la raison pour laquelle on a un - 10 au lieu d'un + 10.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 5 - Moving Right, Up, and Down

    -

    Moving Down

    -

    Now, let's finish up by adding the move_down code. These steps should look really familiar to the steps where we learned how to move right. First, let's write the following under the class MyGame, right below def update: +

    Leçon 5 - Déplacement vers la Droite, Haut et Bas

    +

    Déplacement vers le bas

    +

    Maintenant, finissons en ajoutant le code move_down. Ces étapes doivent te sembler très similaires à celles où on cherchait à se déplacer vers la droite. Tout d'abord, écrivons le code suivant dans la classe MyGame, juste en dessous de def update : -

    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    -

    Finally, we'll type the following under the player class

    +

    Finalement, nous écrirons le code suivant dans la classe player :

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    -

    So, the only difference that you'll see here is that the - 10 is changed to + 10, because the numbers increase as you go down :). That's it for moving around!

    +

    Et donc l'unique différence que tu verras ici est que le code - 10 est changé à + 10, car les nombres augmentent quand tu vas vers le bas :). Et voilà pour se déplacer partout !

    -

    Here is the entire program you should have written so far:

    -
    Code automatically inserted here...
    +

    Voici l'intégralité du progrmme que tu devrais avoir écrit jusqu'ici :

    +
    Code inséré automatiquement ici...
    -

    You've accomplished so much already, so why stop?! How about we turn up the heat and add some dodgeballs in lesson 6!

    +

    Tu as tellement accompli déjà, alors pourquoi t'arrêter ?! Et si on augmentait la température en ajoutant quelques ballons dans la leçon 6 !

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -Back to top +Retour en haut From 3b1718c89bf473178d42fcd428e69d5315ba000a Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Mon, 2 Jul 2012 10:25:07 +0200 Subject: [PATCH 13/31] [fr] translation translating titles and common navigation for the next lessons --- public/help/fr/ruby4kids/lesson_6.html | 62 +++++++++++++------------- public/help/fr/ruby4kids/lesson_7.html | 52 ++++++++++----------- public/help/fr/ruby4kids/lesson_8.html | 60 ++++++++++++------------- public/help/fr/ruby4kids/lesson_9.html | 54 +++++++++++----------- 4 files changed, 114 insertions(+), 114 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_6.html b/public/help/fr/ruby4kids/lesson_6.html index 0541c01..3153381 100644 --- a/public/help/fr/ruby4kids/lesson_6.html +++ b/public/help/fr/ruby4kids/lesson_6.html @@ -1,7 +1,7 @@ - Ruby4Kids - Programming For The Fun Of It + Ruby4Kids - Programmer en s'Amusant ! @@ -31,14 +31,14 @@ -

    Ruby4Kids - Game Programming - Lesson 6

    +

    Ruby4Kids - Programmation de Jeux - Leçon 6

    -

    Lesson 6 - Adding a Dodgeball

    +

    Leçon 6 - Ajout d'un Ballon à Eviter

    Creating a New Class and Randomizing

    OK, in the first lesson, we learned how to open a window in Gosu. Then, we learned to draw a player inside the game window. @@ -49,25 +49,25 @@

    Ruby4Kids - Game Programming - Lesson 6

    So let's try that. We already have a picture that you can use included with KidsRuby.

    Start by creating a new class for our dodge ball:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Now, we will make this ball come from the top of the screen and drop down from random places.

    We accomplish this by setting the initial position @x to a random number between 0 and the width of the game window, in pixels.The @y position for this ball will be 0, since it is at the top during initialize. So, your code should look like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    This means that when the game starts, the random method will give us a position somewhere between 0 and the width of the game window.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 6 - Adding a Dodgeball

    +

    Leçon 6 - Ajout d'un Ballon à Eviter

    Changing Positions, Defining, and Updating

    Now, with each update, we need to make the ball move down. So, let's say the ball moves 1 pixel with every update. We will see how fast that is.

    We do this in the update, where we change the @y position by 1 pixel like this:

    @@ -75,73 +75,73 @@

    Ruby4Kids - Game Programming - Lesson 6

    Next, we need to just define our ball within the MyGame class, under the def initialize. So, it should look like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Then, we go to def update and tell the ball to update itself. So, we type:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 6 - Adding a Dodgeball

    +

    Leçon 6 - Ajout d'un Ballon à Eviter

    Adding the Icon and Drawing

    Now, just like we did with the player, we're going to need an icon for the ball, as well. So we'll just copy the @icon code from the Playerclass and paste it right under @game_window = game_window in the Ball class. Then, we're going to change the player1.png to asteroid.png. So, your code should look like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Next, when we want to draw the ball, we just add the following under the Ballclass:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Now, the last number within the parentheses in the code above, refers to whether the ball will be dropped behind the player or in front of the player. For right now, we're going to make ball goin front of the player, which is why the number is set to 2 instead of 1.

    OK, now we're just going to go to the MyGame class and add @ball.draw to the def draw method. So, it should look like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 6 - Adding a Dodgeball

    +

    Leçon 6 - Ajout d'un Ballon à Eviter

    Things are Getting Pretty Random

    As we have learned, we need to trap for when the ball goes off of the screen. If the ball goes beyond the screen, we want to start again, find a random position from the top of the screen, and drop the ball again.

    So we can do this by adding our familiar if statement like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Now, we will do something else. We want the ball to start dropping from another position, not the same x position as before. So, in the line where we reset @y to 0, we also change the @x position to be another random position. So, the code should look like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Now, the ball should go down as expected.

    Here is the entire program you should have written so far:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    You've made it to the end of the 6th lesson! Now, let's see if you can handle being hit by dodgeballs in lesson 7!

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    - Back to top + Retour en haut diff --git a/public/help/fr/ruby4kids/lesson_7.html b/public/help/fr/ruby4kids/lesson_7.html index fbe0929..41e5a7a 100644 --- a/public/help/fr/ruby4kids/lesson_7.html +++ b/public/help/fr/ruby4kids/lesson_7.html @@ -1,7 +1,7 @@ - Ruby4Kids - Programming For The Fun Of It + Ruby4Kids - Programmer en s'Amusant ! @@ -27,91 +27,91 @@ -

    Ruby4Kids - Game Programming - Lesson 7

    +

    Ruby4Kids - Programmation de Jeux - Leçon 7

    -

    Lesson 7 - Getting Hit

    +

    Leçon 7 - Se Faire Toucher par le Ballon

    Defining a Hit

    OK, so now it's time to make sure that when the ball hits the player, the game stops.

    So, the first thing we need to do is go to the Game class and under @ball.update, we will define a hit:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Now, let's go over to our player and define this hit_by? method. So, we'll go to the Player class and define what it means to be hit by the ball:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Now, what we did above is add a method that Gosu gives us, called distance, where we pass the x coordinate and y coordinate of one object and the x coordinate and y coordinate of another object.

    We also wrote that if the distance between these two coordinates is less than 50, we're going to make that a hit.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 7 - Getting Hit

    +

    Leçon 7 - Se Faire Toucher par le Ballon

    More Defining

    Let's go back to the Game class. We've said that if a player is hit by a ball, we should stop the game. So, we need to define what stopping the game means.

    Now, we'll introduce a new variable here to make the definition work, called running. So, under the Gameclass, we'll type: -

    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    So, if we stop the game, the running will be false. However, we need to first add this running variable and make it equal to true. So, when the game starts, the game is running. When the player hets hit by the ball, the method stop_game! is going to set the variable, running, to false, which stops the game.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 7 - Getting Hit

    +

    Leçon 7 - Se Faire Toucher par le Ballon

    Stop! Hammer Time

    Now, we want the player and ball to stop moving when the game stops. So, if you look at the update method, you'll see that we have all this that makes either the player move or makes the ball move. Now, that will work as long as the game is running. But, once it stops, we don't want any of that to happen. So, directly under def update, we'll type: -

    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Now, let's go back to the Player class. We are now going to define two methods on the ball: x and y. To do this, we type: -

    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    So, if you recall, the ball has x and y coordinate variables, which we cannot get to from the player. However, we can call the methods on the player. So, what we did above was call the x method, which will return the x variable and called the y method, which will return the y variable to us. - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »

    -

    Lesson 7 - Getting Hit

    +

    Leçon 7 - Se Faire Toucher par le Ballon

    Getting too Close

    Finally, we want the player to start on a different y position. The 50 is fine for the x position, but the y position is getting too close to the top of the window. So, under def intitialize(game_window), we'll change te y to 150. It should end up looking like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    I want to make the y at 150, so it's further at the bottom. This makes it easier for me to dodge the ball.

    Once again, here is the entire program you should have written so far:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Alright, hot shot, it looks like you do got what it takes. Let's take it to the next level in lesson 8!

    - Back to top + Retour en haut diff --git a/public/help/fr/ruby4kids/lesson_8.html b/public/help/fr/ruby4kids/lesson_8.html index ad3ae1a..7e19bf5 100644 --- a/public/help/fr/ruby4kids/lesson_8.html +++ b/public/help/fr/ruby4kids/lesson_8.html @@ -1,7 +1,7 @@ - Ruby4Kids - Programming For The Fun Of It + Ruby4Kids - Programmer en s'Amusant ! @@ -28,97 +28,97 @@ -

    Ruby4Kids - Game Programming - Lesson 8

    +

    Ruby4Kids - Programmation de Jeux - Leçon 8

    -

    Lesson 8 - Escape Key Pauses the Game

    +

    Leçon 8 - La Touche Echap Met le Jeu en Pause

    Commenting and Else

    In this lesson, we want to make the game reset by pressing the escape key. So, let’s go to the MyGame class and find where we typed the following:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Now, right under the code above, we’re going to type:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    What we did above was add an else statement, which occurs after the game is stopped.

    So, we wrote a comment under the elsestatement, which tells us that the game is currently stopped. After that, we wrote a command that should look familiar. This code just says that if the escape key is pressed, the game restarts.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 8 - Escape Key Pauses the Game

    +

    Leçon 8 - La Touche Echap Met le Jeu en Pause

    Fine, let's Define

    Now, we just go further down where we have:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Right underneath the code above, we are going to write:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    So, what we did above was just define how to restart the game. We set @running to be true and then reset the ball, so that the ball will go back to its original position.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 8 - Escape Key Pauses the Game

    +

    Leçon 8 - La Touche Echap Met le Jeu en Pause

    Read, Set, Reset!

    We now have to go to the bottom of our Ball class and define our reset method. So, let’s go ahead and type:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    All we did in the code above, was the same thing that we’ve done when we defined update and when we defined initialize. That is, we set the y to zero, which places the ball at the top position and set the x to random, so we don’t know where it’s going to come from on the x axis.

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 8 - Escape Key Pauses the Game

    +

    Leçon 8 - La Touche Echap Met le Jeu en Pause

    Read, Set, Reset!

    Finally, we’re going to replace those two areas where we’ve repeated:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    and replace it with reset!. Again, those two repetitions are under def initialize and def update. Your end result should look like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Yet again, here is the entire program you should have written so far:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    That’s it for this lesson! You're starting to like this stuff, aren't you?! Now, let’s make the game more challenging by adding multiple balls in lesson 9!

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    - Back to top + Retour en haut diff --git a/public/help/fr/ruby4kids/lesson_9.html b/public/help/fr/ruby4kids/lesson_9.html index a1e15fe..16d6130 100644 --- a/public/help/fr/ruby4kids/lesson_9.html +++ b/public/help/fr/ruby4kids/lesson_9.html @@ -1,7 +1,7 @@ - Ruby4Kids - Programming For The Fun Of It + Ruby4Kids - Programmer en s'Amusant ! @@ -28,86 +28,86 @@ -

    Ruby4Kids - Game Programming - Lesson 9

    +

    Ruby4Kids - Programmation de Jeux - Leçon 9

    -

    Lesson 9 - Creating Multiple Balls

    +

    Leçon 9 - Création de Plusieurs Ballons

    I Can Barely Fit in this Window

    Now that we are going to add more balls to dodge, we should create a larger window to work in.

    So, in order to do that, let's go to the MyGame class and under def initialize, let's change the numbers to (600, 400, false). The result should look like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Then, we'll just adjust the player to start off at the bottom of the screen. First, we need to go to the player class. Now, let's change the x coordinate of the player to 150 and the y coordinate to 330. Your result should look like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 9 - Creating Multiple Balls

    +

    Leçon 9 - Création de Plusieurs Ballons

    Pluralize!

    Now, let's try adding 3 more balls! So, we'll go to the MyGame class and change some things under def initialize:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    All we did above was pluralize ball and then changed the code to create 3 balls, instead of one.

    Next, let's update each ball, instead of just updating one of them. We'll also pluralize the @ball. So,under the class, MyGame, we'll go ahead and change the code to:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Next, we're going to do some more of the same stuff. So, we'll go to def draw to pluralize @ball and to change the code so that it draws each ball, instead of just one. You should end up with the following:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Since we're already pluralizing, why don't we go ahead and do some more! So, we'll go to the class, Player, and change it to the following:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Again, we're just adjusting the methods, so that they will work with multiple balls. For the code above, we have added the method, any?, which just means that being hit by any one of the balls will cause a hit.

    - - « Back - Back to Lessons - Next » + + « Précédent + Retour aux Leçons + Suivant »
    -

    Lesson 9 - Creating Multiple Balls

    +

    Leçon 9 - Création de Plusieurs Ballons

    No More Pluralizing...Maybe

    Now, you must hate pluralizing by now, so we'll stop....right after this next pluralization! So, we'll go to the class, MyGame, and change the restart game definition to the following:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    You're done capitalizing (promise)! Now, let's just look over what all of your code should look like:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Can it be? Is this the end? Have you really gone through the entire tutorial? The answer is, YES! CONGRATULATIONS, YOU MADE IT! You developed a program that you can play on and show off! We hope you'll continue your interest into programming, because if you've made it this far, you've got what it takes :).

    - « Back - Back to Lessons - Next » + « Précédent + Retour aux Leçons + Suivant »
    - Back to top + Retour en haut From 11c23aeee4ccdbe2c784526edd77dd8065bb54be Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Tue, 3 Jul 2012 09:47:30 +0200 Subject: [PATCH 14/31] [fr] translation lesson 6 --- public/help/fr/ruby4kids/lesson_6.html | 63 +++++++++++++------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_6.html b/public/help/fr/ruby4kids/lesson_6.html index 3153381..d1d4d90 100644 --- a/public/help/fr/ruby4kids/lesson_6.html +++ b/public/help/fr/ruby4kids/lesson_6.html @@ -39,24 +39,24 @@

    Ruby4Kids - Programmation de Jeux - Leçon 6

    Leçon 6 - Ajout d'un Ballon à Eviter

    -

    Creating a New Class and Randomizing

    -

    OK, in the first lesson, we learned how to open a window in Gosu. - Then, we learned to draw a player inside the game window. - Next, learned to move this player around the game window. - We also limited its movement to just the bounds of the game window.

    -

    Now, we are ready to add more excitement to the game.

    -

    How about if we play dodge ball with our player? We can have a ball that appears as if thrown into the game window, and our player dodges the ball by moving with the arrow keys.

    -

    So let's try that. We already have a picture that you can use included with KidsRuby.

    -

    Start by creating a new class for our dodge ball:

    +

    Créer une Nouvelle Classe et des Phénomènes Aléatoires

    +

    OK, dans la première leçon, nous avons appris comment ouvrir une fenêtre dans Gosu. + Ensuite, nous avons appris à dessiner un joueur dans la fenêtre de jeu. + Puis à faire se déplacer ce joueur autour de la fenêtre de jeu. + On a aussi limité ses mouvements aux bords de la fenêtre de jeu.

    +

    Alors nous sommes prêts à ajouter encore plus de piment au jeu.

    +

    Et si on jouait au ballon avec notre joueur ? On pourrait avoir une balle qui apparaît comme si elle était lancée dans la fenêtre de jeu, et notre joueur taperait la balle en bougeant avec les touches fléchées.

    +

    Essayons ça. On a déjà une image qui peut être utilisée, incluse dans KidsRuby.

    +

    Commençons par créer une nouvelle classe pour notre ballon :

    Code inséré automatiquement ici...
    -

    Now, we will make this ball come from the top of the screen and drop down from random places.

    -

    We accomplish this by setting the initial position @x to a random number between 0 and the width of the game window, in pixels.The @y position for this ball will be 0, since it is at the top during initialize. So, your code should look like this:

    +

    Maintenant, nous allons faire en sorte que ce ballon vienne du haut de l'écran et tombe depuis des endroits aléatoires.

    +

    On peut faire cela en mettant le @x de la position initiale à un nombre aléatoire entre 0 et la largeur de la fenêtre de jeu, en pixels. La position @y sera 0, étant donné qu'elle est en haut quand on initialise. Le code devrait ressembler à ça :

    Code inséré automatiquement ici...
    -

    This means that when the game starts, the random method will give us a position somewhere between 0 and the width of the game window.

    +

    Cela signifique que lorsque le jeu commence, la méthode aléatoire va nous donner une position entre 0 et la largeur de la fenêtre de jeu.

    « Précédent Retour aux Leçons @@ -68,16 +68,16 @@

    Ruby4Kids - Programmation de Jeux - Leçon 6

    Leçon 6 - Ajout d'un Ballon à Eviter

    -

    Changing Positions, Defining, and Updating

    -

    Now, with each update, we need to make the ball move down. So, let's say the ball moves 1 pixel with every update. We will see how fast that is.

    -

    We do this in the update, where we change the @y position by 1 pixel like this:

    -
    Code automatically inserted here...
    +

    Changer les positions, Définir, et Mettre à Jour

    +

    Maintenant, avec chaque mise à jour, nous avons besoin de faire se déplacer la balle vers le bas. Disons alors que la balle va se déplacer de 1 pixel à chaque mise à jour. Nous verrons à quelle vitesse ça va aller.

    +

    On fait ça dans la mise à jour, où l'on change la position @y de 1 pixel comme cela :

    +
    Code inséré automatiquement ici...
    -

    Next, we need to just define our ball within the MyGame class, under the def initialize. So, it should look like this:

    +

    Ensuite on a juste besoin de définir notre balle dans la classe MyGame sous le def initialize. Donc cela devrait donner :

    Code inséré automatiquement ici...
    -

    Then, we go to def update and tell the ball to update itself. So, we type:

    +

    Ensuite, on va dans def update et on dit à la balle de se mettre à jour. On tape :

    Code inséré automatiquement ici...
    @@ -91,18 +91,18 @@

    Ruby4Kids - Programmation de Jeux - Leçon 6

    Leçon 6 - Ajout d'un Ballon à Eviter

    -

    Adding the Icon and Drawing

    -

    Now, just like we did with the player, we're going to need an icon for the ball, as well. So we'll just copy the @icon code from the Playerclass and paste it right under @game_window = game_window in the Ball class. Then, we're going to change the player1.png to asteroid.png. So, your code should look like this:

    +

    Ajouter l'Icône et Dessiner

    +

    Et maintenant, de la même manière que ce qu'on a fait avec le joueur, nous allons aussi avoir besoin d'une icône pour le ballon. Donc on va simplement copier le code de @icon de la classe Player et le coller juste sous @game_window = game_window dans la classe Ball. Ensuite, nous allons changer le nom player1.png en asteroid.png. Ton code devrait donner ceci :

    Code inséré automatiquement ici...
    -

    Next, when we want to draw the ball, we just add the following under the Ballclass:

    +

    Ensuite, pour dessiner la balle, nous ajoutons le code suivant dans la classe Ball :

    Code inséré automatiquement ici...
    -

    Now, the last number within the parentheses in the code above, refers to whether the ball will be dropped behind the player or in front of the player. For right now, we're going to make ball goin front of the player, which is why the number is set to 2 instead of 1.

    +

    A présent, le dernier nombre entre parenthèse dans le code ci-dessus se réfère a si la balle va tomber devant ou derrière le joueur. Pour l'instant, on va faire passer la balle devant le joueur, ce qui explique pourquoi le nombre est fixé à 2 plutôt que 1.

    -

    OK, now we're just going to go to the MyGame class and add @ball.draw to the def draw method. So, it should look like this:

    +

    Maintenant nous allons dans la classe MyGame et ajouter @ball.draw à la méthode def draw. Cela devrait donner cela :

    Code inséré automatiquement ici...
    @@ -114,23 +114,22 @@

    Ruby4Kids - Programmation de Jeux - Leçon 6

    Leçon 6 - Ajout d'un Ballon à Eviter

    -

    Things are Getting Pretty Random

    +

    Les Choses Deviennent Vraiment Aléatoires

    -

    As we have learned, we need to trap for when the ball goes off of the screen. If the ball goes beyond the screen, we want to start again, find a random position from the top of the screen, and drop the ball again.

    -

    So we can do this by adding our familiar if statement like this:

    +

    Comme nous l'avons appris, nous devons rattrapper la balle quand elle sort de l'écran. Si la balle va derrière l'écran, nous voulons recommencer, trouver une position aléatoire depuis le haut de l'écran, et encore laisser tomber la balle.

    +

    On peut faire ça en ajoutant notre instruction if que l'on connaît bien, comme ceci :

    Code inséré automatiquement ici...
    - -

    Now, we will do something else. We want the ball to start dropping from another position, not the same x position as before. So, in the line where we reset @y to 0, we also change the @x position to be another random position. So, the code should look like this:

    - +

    Et là, nous allons faire autre chose. On veut que le ballon recommence à tomber depuis une autre position, pas la même qu'avant. Donc dans la ligne où on remet @y à 0, on va aussi mettre la position @x à une autre position aléatoire. Alors le code devrait ressembler à cela :

    +
    Code inséré automatiquement ici...
    -

    Now, the ball should go down as expected.

    -

    Here is the entire program you should have written so far:

    +

    Maintenant, le ballon devrait aller vers le bas comme prévu.

    +

    Voici l'intégralité du programme que tu devrais avoir écrit jusqu'ici :

    Code inséré automatiquement ici...
    -

    You've made it to the end of the 6th lesson! Now, let's see if you can handle being hit by dodgeballs in lesson 7!

    +

    Tu as réussi jusqu'à la fin de la 6ème leçon ! Alors voyons voir si tu vas supporter de te faire percuter par des ballons dans la leçon 7 !

    « Précédent Retour aux Leçons From 0a6328e595605ad92d7450fe66cece213643f13f Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Thu, 5 Jul 2012 08:54:39 +0200 Subject: [PATCH 15/31] [fr] translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit leçon 7 --- public/help/fr/ruby4kids/lesson_7.html | 41 +++++++++++++------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_7.html b/public/help/fr/ruby4kids/lesson_7.html index 41e5a7a..bd67715 100644 --- a/public/help/fr/ruby4kids/lesson_7.html +++ b/public/help/fr/ruby4kids/lesson_7.html @@ -35,18 +35,18 @@

    Ruby4Kids - Programmation de Jeux - Leçon 7

    Leçon 7 - Se Faire Toucher par le Ballon

    -

    Defining a Hit

    -

    OK, so now it's time to make sure that when the ball hits the player, the game stops.

    -

    So, the first thing we need to do is go to the Game class and under @ball.update, we will define a hit:

    +

    Définir un Contact

    +

    Il est temps de s'assurer que lorsque la balle touche le joueur, le jeu s'arrête.

    +

    La première chose que l'on doit faire est d'aller dans la classe Game, et dans @ball.updatenous allons définir un contact (un "hit" en anglais) :

    Code inséré automatiquement ici...
    -

    Now, let's go over to our player and define this hit_by? method. So, we'll go to the Player class and define what it means to be hit by the ball:

    +

    Et maintenant, allons voir notre joueur et définissons cette méthode hit_by?. On va dans la classe Player et on définit ce que cela signifie d'être touché par la balle :

    Code inséré automatiquement ici...
    -

    Now, what we did above is add a method that Gosu gives us, called distance, where we pass the x coordinate and y coordinate of one object and the x coordinate and y coordinate of another object.

    +

    Ce qu'on vient de faire c'est ajouter une méthode que Gosu nous donne, appelée distance, où l'on passe les coordonnées x et y de l'objet et les coordonnées x et y d'un autre objet.

    -

    We also wrote that if the distance between these two coordinates is less than 50, we're going to make that a hit.

    +

    Nous avons aussi écrit que si la distance entre ces deux coordonnées est inférieure à 50, on va percuter la balle.

    « Précédent Retour aux Leçons @@ -56,14 +56,14 @@

    Ruby4Kids - Programmation de Jeux - Leçon 7

    Leçon 7 - Se Faire Toucher par le Ballon

    -

    More Defining

    +

    Définir Encore Plus

    -

    Let's go back to the Game class. We've said that if a player is hit by a ball, we should stop the game. So, we need to define what stopping the game means.

    +

    Revenons à la classe Game. On a dit que si un joueur est touché par la balle, on arrête le jeu. Donc on a besoin de définir ce que stopper le jeu signifie.

    -

    Now, we'll introduce a new variable here to make the definition work, called running. So, under the Gameclass, we'll type: +

    A présent, nous allons introduire une nouvelle variable ici pour appliquer ce que l'on a défini, appelée running ("en train de s'exécuter"). En dessous de la classe Game, on va taper :

    Code inséré automatiquement ici...
    -

    So, if we stop the game, the running will be false. However, we need to first add this running variable and make it equal to true. So, when the game starts, the game is running. When the player hets hit by the ball, the method stop_game! is going to set the variable, running, to false, which stops the game.

    +

    Si on arrête le jeu, il ne sera plus en train de s'exécuter (logique). Alors on doit d'abord ajouter cette variable running et la mettre à true. Quand le jeu commence, le jeu est "running". Quand le joueur est touché, la méthode stop_game! va mettre la variable running à false, ce qui va arrêter le jeu.

    « Précédent Retour aux Leçons @@ -75,16 +75,16 @@

    Ruby4Kids - Programmation de Jeux - Leçon 7

    Leçon 7 - Se Faire Toucher par le Ballon

    -

    Stop! Hammer Time

    -

    Now, we want the player and ball to stop moving when the game stops. So, if you look at the update method, you'll see that we have all this that makes either the player move or makes the ball move. Now, that will work as long as the game is running. But, once it stops, we don't want any of that to happen. So, directly under def update, we'll type: +

    Stop ! On Frappe

    +

    Maintenant, on veut que le joueur et le ballon arrêtent de bouger quand le jeu s'arrête. Si tu regarde la méthode "update", tu verras que nous avons tout ce qui fait bouger le joueur ou la balle. Maintenant, cela va fonctionner tant que le jeu est "running". Mais une fois qu'il s'arrêtera, on veut qu'il n'y ait rien de tout cela qui se passe. Alors, directement dans def update, on tape :

    Code inséré automatiquement ici...
    -

    Now, let's go back to the Player class. We are now going to define two methods on the ball: x and y. To do this, we type: - +

    A présent, revenons à la classe Player. On va maintenant définir deux méthodes sur la balle : x et y. Pour faire ça, on tape : +

    Code inséré automatiquement ici...
    -

    So, if you recall, the ball has x and y coordinate variables, which we cannot get to from the player. However, we can call the methods on the player. So, what we did above was call the x method, which will return the x variable and called the y method, which will return the y variable to us. +

    Si tu t'en souviens, la balle a des coordonnées variables x et y, qu'on ne peut pas connaître du point de vue du joueur. Par contre, on peut appeler les méthodes. Ce que l'on a fait ci-dessus est appeler la méthode x, qui retournera la variable x, et appelé la méthode y qui nous donnera la variable y.

    « Précédent Retour aux Leçons @@ -96,18 +96,17 @@

    Ruby4Kids - Programmation de Jeux - Leçon 7

    Leçon 7 - Se Faire Toucher par le Ballon

    -

    Getting too Close

    - -

    Finally, we want the player to start on a different y position. The 50 is fine for the x position, but the y position is getting too close to the top of the window. So, under def intitialize(game_window), we'll change te y to 150. It should end up looking like this:

    +

    Et Si On Est Trop Près...

    +

    Finalement, on veut que le joueur démarre depuis une position y différente. Le 50 va bien pour x, mais y est trop près du haut de la fenêtre. Alors, sous def intitialize(game_window), on va mettre y à 150. A la fin cela devrait donner :

    Code inséré automatiquement ici...
    -

    I want to make the y at 150, so it's further at the bottom. This makes it easier for me to dodge the ball.

    +

    Je veux que y soit à 150, c'est donc plus loin vers le bas. Cela me permettra d'esquiver le ballon plus rapidement.

    -

    Once again, here is the entire program you should have written so far:

    +

    Une fois de plus, voici le programme que tu devrais avoir écrit, en entier :

    Code inséré automatiquement ici...
    -

    Alright, hot shot, it looks like you do got what it takes. Let's take it to the next level in lesson 8!

    +

    Et voilà, on dirait que tu as ce qu'il faut. Continuons vers le prochain niveau, la leçon 8 !

    From feb3590be66f64ec6d93295595358f2a7b37656c Mon Sep 17 00:00:00 2001 From: Ludovic Borie Date: Thu, 5 Jul 2012 23:55:47 +0200 Subject: [PATCH 16/31] lesson_9 first traduction --- public/help/fr/ruby4kids/lesson_9.html | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_9.html b/public/help/fr/ruby4kids/lesson_9.html index 16d6130..308f758 100644 --- a/public/help/fr/ruby4kids/lesson_9.html +++ b/public/help/fr/ruby4kids/lesson_9.html @@ -36,15 +36,15 @@

    Ruby4Kids - Programmation de Jeux - Leçon 9

    Leçon 9 - Création de Plusieurs Ballons

    -

    I Can Barely Fit in this Window

    +

    Je peux à peine tenir dans cette fenêtre

    -

    Now that we are going to add more balls to dodge, we should create a larger window to work in.

    +

    Puisque que nous allons ajouter plus de ballons à éviter, nous devrions créer une fenêtre de jeux plus grande.

    -

    So, in order to do that, let's go to the MyGame class and under def initialize, let's change the numbers to (600, 400, false). The result should look like this:

    +

    Pour faire cela, allons voir la classe MyGame and sous def initialize, remplaçons les nombres par (600, 400, false). Le résultat devrait ressembler à ça:

    Code inséré automatiquement ici...
    -

    Then, we'll just adjust the player to start off at the bottom of the screen. First, we need to go to the player class. Now, let's change the x coordinate of the player to 150 and the y coordinate to 330. Your result should look like this:

    +

    Nous allons alors ajuster la position du joueur pour le faire démarrer en bas de l'écran. D'abord, nous avons besoin d'aller voir la classe player. Mettons l'abscisse (x) du joueur à 150, et son ordonnée (y) à 330. Ton résultat devrait ressembler à ça:

    Code inséré automatiquement ici...
    @@ -58,28 +58,29 @@

    Ruby4Kids - Programmation de Jeux - Leçon 9

    Leçon 9 - Création de Plusieurs Ballons

    -

    Pluralize!

    +

    Multiplions!

    -

    Now, let's try adding 3 more balls! So, we'll go to the MyGame class and change some things under def initialize:

    +

    Maintenant, essayons d'ajouter 3 ballons de plus! Alors nous allons à la class MyGame et changeons quelques trucs sous def initialize:

    Code inséré automatiquement ici...
    -

    All we did above was pluralize ball and then changed the code to create 3 balls, instead of one.

    -

    Next, let's update each ball, instead of just updating one of them. We'll also pluralize the @ball. So,under the class, MyGame, we'll go ahead and change the code to:

    +

    Tout ce que nous avons fait précédemment a été de multiplier ball et donc de changer le code pour créer 3 ballons au lieu d'un.

    + +

    Maintenant, mettons à jour chaque ballon, plutôt d'un seul. Nous allons aussi multiplier le @ball. Pour ça, dans la classe MyGame, nous allons changer le code en:

    Code inséré automatiquement ici...
    -

    Next, we're going to do some more of the same stuff. So, we'll go to def draw to pluralize @ball and to change the code so that it draws each ball, instead of just one. You should end up with the following:

    +

    Ensuite, nous allons devoir répéter un peu ce principe. Nous allons à def draw pour pluraliser @ball et pour changer le code pour que ça dessine chaque balle au lieu d'une seule. Tu devrais avoir au final:

    Code inséré automatiquement ici...
    -

    Since we're already pluralizing, why don't we go ahead and do some more! So, we'll go to the class, Player, and change it to the following:

    +

    Maintenant que nous avons pluraliser, pourquoi ne pas aller de l'avant et faire encore plus! Allons donc dans la classe Player, et la changer de cette façon:

    Code inséré automatiquement ici...
    -

    Again, we're just adjusting the methods, so that they will work with multiple balls. For the code above, we have added the method, any?, which just means that being hit by any one of the balls will cause a hit.

    +

    Encore une fois, nous avons juste ajusté les méthodes pour faire en sorte qu'elles fonctionnent avec plusieurs ballons. Pour le code ci-dessus, nous avons ajouté la méthode any?, ce qui signifie juste qu'être touché par une des balles provoquera un coup.

    - « Précédent + « Précédent Retour aux Leçons Suivant » @@ -89,16 +90,16 @@

    Ruby4Kids - Programmation de Jeux - Leçon 9

    Leçon 9 - Création de Plusieurs Ballons

    -

    No More Pluralizing...Maybe

    +

    Rien de plus... Peut-être

    -

    Now, you must hate pluralizing by now, so we'll stop....right after this next pluralization! So, we'll go to the class, MyGame, and change the restart game definition to the following:

    +

    Maintenant que tu dois haïr la multiplication des ballons, on va arréter... juste après un dernier ajout! Alors va à la classe MyGame, et change la définition du redémarrage du jeux tel que ceci:

    Code inséré automatiquement ici...
    -

    You're done capitalizing (promise)! Now, let's just look over what all of your code should look like:

    +

    Tu as fini (promis)! Maintenant, regardons juste ce à quoi l'intégralité de ton code devrait ressembler:

    Code inséré automatiquement ici...
    -

    Can it be? Is this the end? Have you really gone through the entire tutorial? The answer is, YES! CONGRATULATIONS, YOU MADE IT! You developed a program that you can play on and show off! We hope you'll continue your interest into programming, because if you've made it this far, you've got what it takes :).

    +

    C'est vrai? C'est la fin? Tu as vraiment parcouru l'intégralité du tutoriel? Eh bien la réponse est OUI! FELICITATIONS, TU L'AS FAIT! Tu as développé un programme auquel tu peux jouer et que tu peux montrer! On espère que tu vas continuer à t'intéresser à la programmation, parce que si tu es allé aussi loin, c'est que tu as tout ce qu'il faut :).

    « Précédent Retour aux Leçons From cf9ea43bebc78bede11b4a01e9ae2eee197c4cf2 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Fri, 6 Jul 2012 14:50:48 +0200 Subject: [PATCH 17/31] [fr] translation lesson 8! --- public/help/fr/ruby4kids/lesson_8.html | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_8.html b/public/help/fr/ruby4kids/lesson_8.html index 7e19bf5..b288000 100644 --- a/public/help/fr/ruby4kids/lesson_8.html +++ b/public/help/fr/ruby4kids/lesson_8.html @@ -36,19 +36,19 @@

    Ruby4Kids - Programmation de Jeux - Leçon 8

    Leçon 8 - La Touche Echap Met le Jeu en Pause

    -

    Commenting and Else

    +

    Les Commentaires et le Reste

    -

    In this lesson, we want to make the game reset by pressing the escape key. So, let’s go to the MyGame class and find where we typed the following:

    +

    Dans cette leçon, nous souhaitons que le jeu se remette à zéro en pressant la touche Echap. Donc, allons dans la classe MyGame et trouvons où nous avions tapé ceci :

    Code inséré automatiquement ici...
    -

    Now, right under the code above, we’re going to type:

    +

    Maintenant, juste en dessous du code ci-dessus, nous allons écrire :

    Code inséré automatiquement ici...
    -

    What we did above was add an else statement, which occurs after the game is stopped.

    +

    Ce que l'on a fait ci-dessus est d'ajouter une instruction else, qui aura lieu après que le jeu soit stoppé.

    -

    So, we wrote a comment under the elsestatement, which tells us that the game is currently stopped. After that, we wrote a command that should look familiar. This code just says that if the escape key is pressed, the game restarts.

    +

    On a écrit un commentaire sous l'instruction else, qui nous dit que le jeu est actuellement arrêté. Ensuite, nous avons écrit une commande qui devrait t'être familière. Ce code dit juste que si la touche Echap est pressée, le jeu recommence.

    « Précédent Retour aux Leçons @@ -59,17 +59,17 @@

    Ruby4Kids - Programmation de Jeux - Leçon 8

    Leçon 8 - La Touche Echap Met le Jeu en Pause

    -

    Fine, let's Define

    +

    Bien, Alors Définissons

    -

    Now, we just go further down where we have:

    +

    Maintenant, nous allons donc plus loin où l'on a :

    Code inséré automatiquement ici...
    -

    Right underneath the code above, we are going to write:

    +

    Juste en dessous du code ci-dessus, on va écrire :

    Code inséré automatiquement ici...
    -

    So, what we did above was just define how to restart the game. We set @running to be true and then reset the ball, so that the ball will go back to its original position.

    +

    Ce que l'on a fait a été de définir comment redémarrer le jeu. On met @running à "true" et on remet à zéro la balle, pour qu'elle reparte à sa position d'origine.

    « Précédent Retour aux Leçons @@ -79,13 +79,13 @@

    Ruby4Kids - Programmation de Jeux - Leçon 8

    Leçon 8 - La Touche Echap Met le Jeu en Pause

    -

    Read, Set, Reset!

    +

    Lis, Set, Reset !

    -

    We now have to go to the bottom of our Ball class and define our reset method. So, let’s go ahead and type:

    +

    On doit maintenant aller en base de notre classe Ball et définir notre méthode Reset. Allons-y, et tapons :

    Code inséré automatiquement ici...
    -

    All we did in the code above, was the same thing that we’ve done when we defined update and when we defined initialize. That is, we set the y to zero, which places the ball at the top position and set the x to random, so we don’t know where it’s going to come from on the x axis.

    +

    Tout ce que l'on a fait dans le code ci-dessus était la même chose que ce que l'on a fait quand on a défini update et initialize. C'est à dire qu'on met y à zéro, ce qui va placer la balle tout en haut, et on met x à random et on ne sait pas où elle va se trouver sur l'axe horizontal x.

    « Précédent Retour aux Leçons @@ -98,18 +98,18 @@

    Ruby4Kids - Programmation de Jeux - Leçon 8

    Leçon 8 - La Touche Echap Met le Jeu en Pause

    Read, Set, Reset!

    -

    Finally, we’re going to replace those two areas where we’ve repeated:

    +

    Finalement, on va remplacer ces deux zones où on a répété :

    Code inséré automatiquement ici...
    -

    and replace it with reset!. Again, those two repetitions are under def initialize and def update. Your end result should look like this:

    +

    et le remplacer par reset!. Encore une fois, ces deux répétitions sont dans def initialize et def update. Le résultat final ressemble à cela :

    Code inséré automatiquement ici...
    -

    Yet again, here is the entire program you should have written so far:

    +

    Et voici le programme en entier :

    Code inséré automatiquement ici...
    -

    That’s it for this lesson! You're starting to like this stuff, aren't you?! Now, let’s make the game more challenging by adding multiple balls in lesson 9!

    +

    Et voilà pour cette leçon ! Tu commences à aimer ça non ?! Allez, rendons le jeu encore plus intéressant en ajoutant plusieurs balles dans la leçon 9 !

    « Précédent Retour aux Leçons From 8b53e37ef29673b89ea8652abac7522411496cdd Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Fri, 6 Jul 2012 15:03:09 +0200 Subject: [PATCH 18/31] [fr] translation HacketyHack --- public/help/fr/hacketyhack/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/help/fr/hacketyhack/index.html b/public/help/fr/hacketyhack/index.html index 54f6f24..32fa4f0 100644 --- a/public/help/fr/hacketyhack/index.html +++ b/public/help/fr/hacketyhack/index.html @@ -14,14 +14,14 @@

    Hackety-Hack

    From 6f0013f26c959562d3491ee0674556e90eae88dc Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Fri, 6 Jul 2012 16:48:27 +0200 Subject: [PATCH 19/31] [fr] translation Colors + Basic Programming et Basic Ruby common. --- .../fr/hacketyhack/basic_programming.html | 22 ++++---- public/help/fr/hacketyhack/basic_ruby.html | 52 +++++++++---------- public/help/fr/hacketyhack/colors.html | 15 +++--- 3 files changed, 44 insertions(+), 45 deletions(-) diff --git a/public/help/fr/hacketyhack/basic_programming.html b/public/help/fr/hacketyhack/basic_programming.html index e77dbf3..a553edc 100644 --- a/public/help/fr/hacketyhack/basic_programming.html +++ b/public/help/fr/hacketyhack/basic_programming.html @@ -1,7 +1,7 @@ - Basic Programming + Bases de la Programmation @@ -26,11 +26,11 @@ -

    Basic Programming

    +

    Bases de la Programmation

    @@ -117,7 +117,7 @@

    Basic Programming

    Changing the background

    Let's try this: we can tell the Turtle that we want to use a different background color by using the background command. Check it out:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Type this in and click 'Run'!

    @@ -136,13 +136,13 @@

    Basic Programming

    Drawing lines

    Sally forth!

    Okay, enough dilly-dallying. Let's tell the turtle to draw a line! Here's my line. Give this one a shot, then try your own colors and numbers!

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    50 is the number of pixels to move forward, by the way.

    You spin me right round, baby

    Great! So you've got a line. But what if you don't want the Turtle to move forward? Well, you can tell it to turn by using a turnleft or turnright command, like this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Give that a shot, then play with it a bit!

    If you're wondering what 90 means, it's the number of degrees that it'll turn.

    @@ -163,7 +163,7 @@

    Basic Programming

    Here's my version

    Here's how I did it:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    @@ -176,7 +176,7 @@

    Basic Programming

    Repeating repeating ourselves ourselves

    Check it out: our Turtle actually knows numbers. For example:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Try running this example. It also draws a square! Wow!

    @@ -198,7 +198,7 @@

    Basic Programming

    - Back to top + Retour en haut diff --git a/public/help/fr/hacketyhack/basic_ruby.html b/public/help/fr/hacketyhack/basic_ruby.html index 839dc37..5ca0f38 100644 --- a/public/help/fr/hacketyhack/basic_ruby.html +++ b/public/help/fr/hacketyhack/basic_ruby.html @@ -1,7 +1,7 @@ - Basic Ruby + Bases de Ruby @@ -39,11 +39,11 @@ -

    Basic Ruby

    +

    Bases de Ruby

    @@ -75,13 +75,13 @@

    Basic Ruby

    Hello, World!

    There are two ways of doing this. Here's the first: alert

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Type this in and press the 'Run' button.

    alert

    Okay, let's break this down: There's two main parts to this little program: you have an alert and a "Hello, world!". These two parts work just like an English sentence: The alert is a verb and the stuff in the ""s is an object. In Ruby, we call verbs methods. The alert verb says 'Put an alert box on the screen, and the content of the box is whatever thing you give me.'

    We'll talk about the "Hello, world!" in just a second. Here's the other way of making this happen:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    If you try that here, it will work! The puts method doesn't display a dialog box, it puts text out to the output instead. We'll be using alerts throughout these tutorials, but if you look at other Ruby tutorials, you may see puts.

    @@ -90,14 +90,14 @@

    Basic Ruby

    Letters, words, and sentences

    Strings

    Okay! Now that you've got that verb bit down, it's time to learn about Strings. Strings are what we call a bunch of words between a pair of " characters. The "s are used to tell the computer what words you actually want to say. Let's think about our example:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    If you didn't have the "s, the computer wouldn't know which words were methods and which ones were part of the string! And consider this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Without making all of those words a string, how would Ruby know that the second alert was some text you wanted to say, rather than another alert box?

    Adding Strings

    Now, if you want to put two bits of strings together, you can use the + character to do it. Try typing this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Same thing! The + sticks the two strings together. This will end up being super useful later!

    @@ -106,17 +106,17 @@

    Basic Ruby

    Numbers and Math

    Numbers

    You can just use numbers, and Ruby understands them:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    You can even use numbers that have a decimal point in them:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Basic Math

    You can also do math with numbers, and it'll work out pretty well:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    But if you try this, nothing happens:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    This is kind of fun and silly, though:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Errors

    You know how nothing happened when you hit the Run button earlier? That was because there was an error. You can see any errors in the 'Output' tab.

    @@ -134,13 +134,13 @@

    Basic Ruby

    Adding numbers to words

    That's why

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    doesn't really work: "hey" is a String object, and 2 is a Fixnum object. And adding Strings and Fixnums doesn't make any sense. We can make this code work, though!

    All we need to do is turn the Fixnum into a String. We can do this by using the to_s method.

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Let's look at that again

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Okay, this isn't bad. We have our alert method. We're giving it "hey" + 2.to_s. The 2.to_s turns a Fixnum 2, which is like the mathematical idea of a 2, into the String 2, which is like when you write a 2 down on a piece of paper.

    @@ -150,13 +150,13 @@

    Basic Ruby

    They're like boxes

    What happens if we want to keep something around? Most programs are not one line, I assure you. You can use a variable to hold a value and use it later. It's like a box that you put things in.

    Let's try one out:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Give that a run.

    Assignment

    Cool stuff! We used an = to assign the String "Hello, world!" into the variable message. We then passed that message to the alert method.

    As you can see, we can use variables in place of another value. Try this:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    Make a guess before you run this program.

    @@ -165,7 +165,7 @@

    Basic Ruby

    User Input

    ask-ing for it.

    We can ask the user of our program for some input, and then put their answer into a variable. It's easy! Check this program out:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    The ask method brings up a box and lets our users type something in. Fun! We put their answer into the name variable and then showed it with alert Sweet!

    @@ -175,13 +175,13 @@

    Basic Ruby

    if...

    Remember back to that Beginning Programming lesson... we talked about how programs are one big list, that the computer follows in order.

    Well, guess what? We can actually change this order by using certain bits of code. Compare these two programs:

    -
    Code automatically inserted here...
    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    +
    Code inséré automatiquement ici...

    There are a few new things here.

    "=="

    Here it is again:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...

    The == command is just a bit different than the = command. == tests the Object on its right against the Object on its left. If the two are equal, then the code after the if will run. If they're not equal, you get the code after the else. The ("end") lets us know we're done with our if.

    @@ -190,7 +190,7 @@

    Basic Ruby

    Example: a guessing game

    Guess!

    Let's put this all together:

    -
    Code automatically inserted here...
    +
    Code inséré automatiquement ici...
    @@ -205,6 +205,6 @@

    Basic Ruby

    - Back to Lessons + Retour aux Leçons diff --git a/public/help/fr/hacketyhack/colors.html b/public/help/fr/hacketyhack/colors.html index 7ed5f2d..fc4861d 100644 --- a/public/help/fr/hacketyhack/colors.html +++ b/public/help/fr/hacketyhack/colors.html @@ -1,7 +1,7 @@ - Color List + Les Couleurs de la Tortue @@ -13,14 +13,13 @@ -

    Color List

    +

    Les Couleurs de la Tortue

    -

    The following list of colors can be used in the KidsRuby Turtle. - As background colors or border colors. As stroke and fill colors. - Most of these colors come from the X11 and HTML palettes.

    -

    All of these colors can be used by name. (So calling the tomato method from inside any slot will get you a nice reddish color.) Below each color, also find the exact numbers which can be used with the rgb method.

    +

    La liste de couleurs suivante peut être utilisée dans la Tortue de KidsRuby. En tant que couleurs de fond, de bordures, de trait, de remplissage. + La plupart de ces couleurs viennent des palettes HTML et X11.

    +

    Toutes ces couleurs peuvent être utilisées avec leur nom. (C'est pourquoi appeler la méthode tomato depuis n'importe où te donnera une jolie couleur rouge.) Sous chaque couleur, on te donne les nombres exacts qui peuvent être utilisés avec la méthode rgb.

    aliceblue

    rgb(240, 248, 255)

    antiquewhite

    rgb(250, 235, 215)

    aqua

    rgb(0, 255, 255)

    @@ -48,6 +47,6 @@

    Color List

    lightskyblue

    rgb(135, 206, 250)

    lightslategray

    rgb(119, 136, 153)

    lightsteelblue

    rgb(176, 196, 222)

    lightyellow

    rgb(255, 255, 224)

    lime

    rgb(0, 255, 0)

    limegreen

    rgb(50, 205, 50)

    linen

    rgb(250, 240, 230)

    magenta

    rgb(255, 0, 255)

    maroon

    rgb(128, 0, 0)

    mediumaquamarine

    rgb(102, 205, 170)

    mediumblue

    rgb(0, 0, 205)

    mediumorchid

    rgb(186, 85, 211)

    mediumpurple

    rgb(147, 112, 219)

    mediumseagreen

    rgb(60, 179, 113)

    mediumslateblue

    rgb(123, 104, 238)

    mediumspringgreen

    rgb(0, 250, 154)

    mediumturquoise

    rgb(72, 209, 204)

    mediumvioletred

    rgb(199, 21, 133)

    midnightblue

    rgb(25, 25, 112)

    mintcream

    rgb(245, 255, 250)

    mistyrose

    rgb(255, 228, 225)

    moccasin

    rgb(255, 228, 181)

    navajowhite

    rgb(255, 222, 173)

    navy

    rgb(0, 0, 128)

    oldlace

    rgb(253, 245, 230)

    olive

    rgb(128, 128, 0)

    olivedrab

    rgb(107, 142, 35)

    orange

    rgb(255, 165, 0)

    orangered

    rgb(255, 69, 0)

    orchid

    rgb(218, 112, 214)

    palegoldenrod

    rgb(238, 232, 170)

    palegreen

    rgb(152, 251, 152)

    paleturquoise

    rgb(175, 238, 238)

    palevioletred

    rgb(219, 112, 147)

    papayawhip

    rgb(255, 239, 213)

    peachpuff

    rgb(255, 218, 185)

    peru

    rgb(205, 133, 63)

    pink

    rgb(255, 192, 203)

    plum

    rgb(221, 160, 221)

    powderblue

    rgb(176, 224, 230)

    purple

    rgb(128, 0, 128)

    red

    rgb(255, 0, 0)

    rosybrown

    rgb(188, 143, 143)

    royalblue

    rgb(65, 105, 225)

    saddlebrown

    rgb(139, 69, 19)

    salmon

    rgb(250, 128, 114)

    sandybrown

    rgb(244, 164, 96)

    seagreen

    rgb(46, 139, 87)

    seashell

    rgb(255, 245, 238)

    sienna

    rgb(160, 82, 45)

    silver

    rgb(192, 192, 192)

    skyblue

    rgb(135, 206, 235)

    slateblue

    rgb(106, 90, 205)

    slategray

    rgb(112, 128, 144)

    snow

    rgb(255, 250, 250)

    springgreen

    rgb(0, 255, 127)

    steelblue

    rgb(70, 130, 180)

    tan

    rgb(210, 180, 140)

    teal

    rgb(0, 128, 128)

    thistle

    rgb(216, 191, 216)

    tomato

    rgb(255, 99, 71)

    turquoise

    rgb(64, 224, 208)

    violet

    rgb(238, 130, 238)

    wheat

    rgb(245, 222, 179)

    white

    rgb(255, 255, 255)

    whitesmoke

    rgb(245, 245, 245)

    yellow

    rgb(255, 255, 0)

    yellowgreen

    rgb(154, 205, 50)

    - Back to Lessons + Retour aux Leçons From 5741789144d590d143b25365c815b6f50860196b Mon Sep 17 00:00:00 2001 From: Damien MORELLET Date: Fri, 29 Jun 2012 16:48:42 +0200 Subject: [PATCH 20/31] [fr] translation --- public/help/fr/ruby4kids/lesson_1.html | 214 ++++++++++++------------- public/help/fr/rubywarrior/index.html | 2 +- 2 files changed, 108 insertions(+), 108 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_1.html b/public/help/fr/ruby4kids/lesson_1.html index e660e6a..7393662 100644 --- a/public/help/fr/ruby4kids/lesson_1.html +++ b/public/help/fr/ruby4kids/lesson_1.html @@ -1,107 +1,107 @@ - - - - Ruby4Kids - Programming For The Fun Of It - - - - - - - - - - - - - - - -

    Ruby4Kids - Game Programming

    - - - -

    Lesson 1 - Getting Started

    -
    -

    Since you are using KidsRuby, you are ready to get started making your first game using Gosu.

    -

    This is the file that will contain our first program.

    -

    We will use the gosu library. We will do this by typing:

    -
    Code automatically inserted here...
    - -

    We will then start our game by inheriting from the Gosu class.

    -

    We will call our game MyGame like this:

    -
    Code automatically inserted here...
    - -

    Now, inside of this class, Gosu needs us to define three methods:

    -

    We define our methods like so:

    -
    Code automatically inserted here...
    - -

    What happens here is that when the game starts, the initialize method is called. Then the game stays running and it goes in a loop, calling the methods: update and draw.

    -

    Update, then draw. Update, then draw. Update, then draw. This cycle repeats several times a second.

    - - « Back - Back to Lessons - Next » - -
    -
    - - -

    Lesson 1 - Create A Window

    -

    Create A Window

    -

    OK, so we are almost ready to run this code. The next step that we need to do now is tell Gosu how big a window we want for the game.

    -

    We do this in the initialize method, by passing it three parameters like this:

    -
    Code automatically inserted here...
    - -

    What this does, is make the window 300 pixels wide by 400 pixels high. A pixel is a single dot in your screen. If you put your face right next to the display, you can almost see the dots. Those are called pixels.

    -

    The third parameter you pass to the initialize method is false. This tells gosu not to take over the whole sreen. So we will say false for this.

    -

    OK, we are almost ready to see if this works.

    -

    To show what we have so far, we have to use the class we just defined in our program.

    -

    We do this by adding the following after the class definition:

    -
    Code automatically inserted here...
    - -

    The first line creates an instance of the new game. Then, calling the show method, tells the game to show the game window.

    - - « Back - Back to Lessons - Next » - -
    -
    - - -

    Lesson 1 - Run It!

    -

    Run Your Program

    -

    We are now ready to run the program.

    -

    Now, just click on the "Run" button

    -

    If everything worked correctly, you will have seen your screen show up. You have written your first game program!

    -

    Here is the entire program you should have written so far:

    -
    Code automatically inserted here...
    - -

    Granted, this does not do anything exciting, but at least you now know how to open a window in a computer game.

    -

    Now you are ready to go on to Lesson 2.

    - - « Back - Back to Lessons - Next » - -
    -
    - - Back to top - - - + + + + Ruby4Kids - Programmer en s'Amusant ! + + + + + + + + + + + + + + + +

    Ruby4Kids - Programmation de Jeu - Leçon 1

    + + + +

    Leçon 1 - Préparation

    +
    +

    Comme tu es déjà en train d'utiliser KidsRuby, tu es donc prêt à commencer à programmer ton premier jeu en utilisant Gosu.

    +

    Voici le fichier qui va contenir notre premier programme.

    +

    Nous allons utiliser la librairie gosu en écrivant:

    +
    Code automatiquement inséré ici...
    + +

    Nous allons ensuite commencer notre jeu en héritant de la classe Gosu.

    +

    Nous appelerons notre jeu MyGame comme ça:

    +
    Code automatiquement inséré ici...
    + +

    Maintenant, à l'intérieur de cette classe, Gosu a besoin de nous pour définir trois méthodes:

    +

    Nous définissons nos méthodes comme ça:

    +
    Code automatiquement inséré ici...
    + +

    Que se passe t-il donc ici ? Quand le jeu démarre, la méthode initialize est appelée. Ensuite le jeu continue de s'exécuter en boucle en appelant successivement les méthodes: update et draw.

    +

    Met à jour, puis dessine. Met à jour puis dessine. Met à jour puis dessine. Ce cycle se répète à l'infini plusieurs fois par secondes !

    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + +

    Leçon 1 - Création d'une Fenêtre

    +

    Création d'une Fenêtre

    +

    Cool, on est donc quasiment prêts à lancer ce code. La prochaine étape va être de dire à Gosu la taille de la fenêtre que nous voulons afficher à l'écran pour notre jeu.

    +

    Nous allons faire ça dans la méthode initialize en lui passant trois paramètres comme ceci:

    +
    Code automatiquement inséré ici...
    + +

    Les deux premiers paramètres signifient que la fenêtre fera 300 pixels de largeur et 400 pixels de hauteur. Un pixel est un point unique sur ton écran. Si tu regarde de très très près le moniteur, tu pourra les apercevoir !

    +

    Le troisième paramètre false, qui signifie "faux" en français, permet de dire à gosu de ne pas prendre l'écran entier.

    +

    Très bien, nous sommes presque prêts pour voir si ça marche.

    +

    Pour afficher le résultat de ce que nous avons codé, il va falloir utiliser la classe que nous avons définie dans notre programme.

    +

    Nous allons faire ça en ajoutant ce qui suit après la définition de la classe:

    +
    Code automatiquement inséré ici...
    + +

    La première ligne crée une instance du nouveau jeu. Ensuite, en appelant la méthode show, nous demandons au jeu de nous montrer la fenêtre.

    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + +

    Leçon 1 - Exécute le !

    +

    Exécute Ton Programme

    +

    Nous sommes maintenant prêt à exécuter le programme.

    +

    C'est parti ! Clique sur le bouton "Exécuter"

    +

    Si tout s'est bien passé, tu as vu la fenêtre s'afficher. Bravo, tu viens d'écrire ton premier programme de jeu !

    +

    Voici le programme en entier comme tu as du l'écrire:

    +
    Code automatiquement inséré ici...
    + +

    Bon c'est vrai que ça ne fait rien d'extraordinaire, mais au moins tu sais maintenant comment faire pour afficher une fenêtre dans un jeu !

    +

    Tu es maintenant prêt pour la Leçon 2.

    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + Retour en Haut + + + diff --git a/public/help/fr/rubywarrior/index.html b/public/help/fr/rubywarrior/index.html index e877af9..d49d146 100644 --- a/public/help/fr/rubywarrior/index.html +++ b/public/help/fr/rubywarrior/index.html @@ -35,7 +35,7 @@

    Le Guerrier de Ruby

    Code automatiquement inséré ici...

    Fait bien attention à ce que le code du joueur Player soit avant la commande RubyWarrior.play.

    -

    Pour commencer à jouer, il te suffit de cliquer sur le bouton "Run", et de suivre les instructions qui apparaitront dans l'onglet "Output". Amuses toi bien !

    +

    Pour commencer à jouer, il te suffit de cliquer sur le bouton "Exécuter", et de suivre les instructions qui apparaitront dans l'onglet "Sortie". Amuses toi bien !

    From ea1412facac776e05d0a8e409ee0ca441354f47f Mon Sep 17 00:00:00 2001 From: Damien MORELLET Date: Sat, 7 Jul 2012 20:21:17 +0200 Subject: [PATCH 21/31] [fr] translation --- public/help/fr/ruby4kids/lesson_2.html | 174 ++++++++++++------------- 1 file changed, 86 insertions(+), 88 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_2.html b/public/help/fr/ruby4kids/lesson_2.html index 22e5368..86f122e 100644 --- a/public/help/fr/ruby4kids/lesson_2.html +++ b/public/help/fr/ruby4kids/lesson_2.html @@ -1,88 +1,86 @@ - - - - Ruby4Kids - Programming For The Fun Of It - - - - - - - - - - - - - - - -

    Ruby4Kids - Game Programming - Lesson 2

    - - -

    Lesson 2 - Add A Player

    -

    Create A Player

    -

    It will be good to have a player in the game, so let's create one.

    -

    We do this by adding a new class. I will call it Player. -

    Now, we will define what our player will do. Do this by typing:

    -
    Code automatically inserted here...
    - -

    Next, we will add an icon to this player so that we can see it on the screen.

    -

    We do this by finding a .png picture. KidsRuby happens to have a picture already that you can use.

    -

    Go to your player class and add an icon to it, by typing the following:

    -
    Code automatically inserted here...
    - -

    Then, we add a draw method to the player. We do this by typing:

    -
    Code automatically inserted here...
    - - « Back - Back to Lessons - Next » - -
    -
    - - - -

    Lesson 2 - Add A Player

    -

    Add Player To Game

    -

    Now, we're almost ready to try this again. I need to go back to the MyGame class first, and I need to instantiate this player.

    -

    Do this by adding this code to the initialize method of the MyGame class:

    -
    Code automatically inserted here...
    - -

    This tells the player which window to draw itself on.

    -

    Last, we need to add the following in the draw method of the game window:

    -
    Code automatically inserted here...
    -

    This will draw the player when the game is running.

    -

    One last thing! We need to type require 'player' right under require 'gosu', so that the program knows that we're using the Player class. -

    Now, let's try it! Click on the "Run" button. Did it work?

    -

    Here is the entire program you should have written so far:

    -
    Code automatically inserted here...
    -

    Now that you've learned how to add a player, why don't we move on to making the player move left in lesson 3?!

    - - « Back - Back to Lessons - Next » - -
    -
    - - - - Back to top - - - + + + + Ruby4Kids - Programmer en s'Amusant ! + + + + + + + + + + + + + + + +

    Ruby4Kids - Programmation de Jeu - Leçon 2

    + + +

    Leçon 2 - Ajout d'un Joueur

    +

    Créer un Joueur

    +

    Ca serait sympa d'avoir un joueur dans le jeu, donc créons en un !

    +

    Nous allons faire ca en ajoutant une nouvelle classe. Nous allons l'appeler Player. +

    Maintenant, nous allons définir ce que va pouvoir faire notre joueur. Il suffit pour cela de taper ce qui suit:

    +
    Code automatiquement inséré ici...
    + +

    Ensuite, nous allons ajouter une image à ce joueur pour pouvoir le voir à l'écran.

    +

    Nous allons faire ça en trouvant un fichier .png. KidsRuby contient déjà une image que tu vas pouvoir utiliser.

    +

    Vas dans la classe de ton joueur et ajoute lui cette image avec le code suivant:

    +
    Code automatiquement inséré ici...
    + +

    Il nous reste juste à ajouter une méthode draw qui va dessiner le joueur avec cette image. Tape ce qui suit:

    +
    Code automatiquement inséré ici...
    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + + +

    Leçon 2 - Ajout d'un Joueur

    +

    Ajouter le Joueur dans le Jeu

    +

    Maintenant, nous sommes pratiquement prêts à relancer le jeu. Il nous faut d'abord retourner dans la classe MyGame, et instancier le joueur que nous avons défini.

    +

    Pour faire ça il suffit d'ajouter le code suivant à la méthode d'initialisation de la classe MyGame:

    +
    Code automatiquement inséré ici...
    + +

    Ca va dire au joueur dans quelle fenêtre il doit se dessiner.

    +

    Pour finir, nous devons ajouter ceci dans la méthode draw de la fenêtre du jeu:

    +
    Code automatiquement inséré ici...
    +

    Ca va permettre de dessiner le joueur quand le jeu sera executé.

    +

    Encore une dernière chose ! Nous avons besoin de mettre require 'player' juste en dessous de require 'gosu', ainsi le programme va savoir que nous utilisons la classe Player.

    +

    Maintenant testons tout ça ! Clicke sur le bouton "Exécuter". Est ce que ça a marché ?

    +

    Voici le programme en entier comme tu as du l'écrire:

    +
    Code automatiquement inséré ici...
    +

    Ca y est tu as appris comment on fait pour ajouter un joueur. Pourquoi n'allons nous pas voir comment faire pour que le joueur bouge vers la gauche dans la leçon 3?!

    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + Retour en Haut + + + From 4b178999fd06733daf65fcce6acc8104c64bd9ba Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Mon, 9 Jul 2012 14:33:28 +0200 Subject: [PATCH 22/31] [fr] translation basics of Ruby --- public/help/fr/hacketyhack/basic_ruby.html | 162 ++++++++++----------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/public/help/fr/hacketyhack/basic_ruby.html b/public/help/fr/hacketyhack/basic_ruby.html index 5ca0f38..759dfc7 100644 --- a/public/help/fr/hacketyhack/basic_ruby.html +++ b/public/help/fr/hacketyhack/basic_ruby.html @@ -47,161 +47,161 @@

    Bases de Ruby

    -

    Hello there!

    -

    Let's get started

    -

    Welcome to your first lesson in Ruby! You're going to have a blast.

    -

    Ruby is a great programming language that you can use to make all kinds of things with. Let's get going!

    +

    Salut !

    +

    C'est parti

    +

    Bienvenue à ta première leçon de Ruby ! Tu vas voir, c'est génial.

    +

    Ruby est un super langage de programmation que tu peux utiliser pour faire des tas de choses. Allons y !

    -

    A bit more about Ruby

    -

    Konnichiwa, Ruby!

    -

    Ruby was created by

    +

    Un peu plus d'infos à propos de Ruby

    +

    Konnichiwa, Ruby !

    +

    Ruby a été créé par

    まつもと ゆきひろ

    -

    (you can just call him Matz) in 1995. If you couldn't guess, Matz is from Japan. Here he is:

    +

    (tu peux simplement l'appeler Matz) en 1995. Si tu ne l'as pas deviné, il est Japonais. Le voici :

    -

    Ruby is enjoyable

    -

    Matz has this to say about Ruby:

    -

    I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language.

    -

    One more thing about Ruby: Rubyists (that's what people who like Ruby call themselves) have a saying: MINSWAN. This stands for Matz Is Nice So We Are Nice. Which is a pretty nice saying, itself. Be nice to everyone, and give them a hand when they need it!"

    +

    Ruby est sympa

    +

    Matz dit cela à propos de Ruby :

    +

    J'espère voir Ruby aider tous les programmeurs du monde à être productif, à aimer programmer, et à être heureux. C'est le premier objectif du langage Ruby.

    +

    Autre chose à propos de Ruby : les Rubyistes (c'est comme cela que ceux qui aiment Ruby aiment à s'appeler) ont une devise :MINSWAN. Cela veut dire (en anglais) Matz Is Nice So We Are Nice. ("Matz est gentil donc on l'est aussi"). Ce qui est une assez belle parole. Sois bien avec tout le monde, et aide-les quand ils en ont besoin !

    -

    Displaying Things

    -

    Let's do this!

    -

    Okay! The very first thing that you need to know is how to show something on the screen. Otherwise, you won't know what's going on!

    +

    Afficher des Trucs

    +

    C'est parti !

    +

    Allez ! La toute première chose que tu dois savoir faire est d'afficher quelque chose sur l'écran. Sinon, tu ne sauras pas ce qui se passe !

    -

    Hello, World!

    -

    There are two ways of doing this. Here's the first: alert

    +

    Hello, World ! Bonjour le monde !

    +

    Il y a deux moyens de le faire. Voici le premier : l'alerte :

    Code inséré automatiquement ici...
    -

    Type this in and press the 'Run' button.

    +

    Tape ça et appuie sur le bouton "Run".

    alert

    -

    Okay, let's break this down: There's two main parts to this little program: you have an alert and a "Hello, world!". These two parts work just like an English sentence: The alert is a verb and the stuff in the ""s is an object. In Ruby, we call verbs methods. The alert verb says 'Put an alert box on the screen, and the content of the box is whatever thing you give me.'

    -

    We'll talk about the "Hello, world!" in just a second. Here's the other way of making this happen:

    +

    Voyons voir ça de plus près : il y a deux parties principales dans ce petit programme : tu as un alert et un "Hello, world!". Cela fonctionne comme une phrase en anglais : Le mot alert ("alerte") est un verbe et ce qui est entre guillemets est un objet. En Ruby, on appelle les verbes les methods. Le verbe alert veut dire "Mets une boîte d'alerte sur l'écran, et le contenu de la boîte sera n'importe quelle chose que tu me donnes"

    +

    On va parler de "Hello, world!" dans une seconde. Voici l'autre moyen de le faire :

    Code inséré automatiquement ici...
    -

    If you try that here, it will work! The puts method doesn't display a dialog box, it puts text out to the output instead. We'll be using alerts throughout these tutorials, but if you look at other Ruby tutorials, you may see puts.

    +

    Si tu essayes cela ici, ça va marcher ! La méthode puts n'affiche pas une boîte de dialogue, elle sort plutôt le texte sur la sortie. On va utiliser des alertes dans ces tutoriels, mais si tu en regardes d'autres tu verras peut être puts.

    -

    Letters, words, and sentences

    -

    Strings

    -

    Okay! Now that you've got that verb bit down, it's time to learn about Strings. Strings are what we call a bunch of words between a pair of " characters. The "s are used to tell the computer what words you actually want to say. Let's think about our example:

    +

    Lettres, mots et phrases

    +

    Chaînes de Caractères

    +

    OK ! Maintenant que tu as un verbe, il est temps d'apprendre les Strings (chaînes de caractères). Les chaînes de caractères sont ce que nous appelons des mots entre une paire de guillemets (""). Les guillemets sont utilisés pour dire à l'ordinateur quels mots tu veux effectivement dire. Pensons à notre exemple :

    Code inséré automatiquement ici...
    -

    If you didn't have the "s, the computer wouldn't know which words were methods and which ones were part of the string! And consider this:

    +

    Si tu n'avais pas de guillemets, l'ordinateur ne saurait pas quels mots sont les méthodes et lequels font partie de la chaîne de caractères ! Et regarde :

    Code inséré automatiquement ici...
    -

    Without making all of those words a string, how would Ruby know that the second alert was some text you wanted to say, rather than another alert box?

    +

    Sans faire de tous ces mots une chaîne de caractères, comment Ruby saurait-il que la deuxième alerte soit du texte que tu voulais dire, plutôt qu'une autre boîte d'alerte ?

    -

    Adding Strings

    -

    Now, if you want to put two bits of strings together, you can use the + character to do it. Try typing this:

    +

    Additionner des Chaînes

    +

    Maintenant, si tu veux mettre deux morceaux de chaînes ensemble, tu peux utiliser le caractère +. Essaye de taper ça :

    Code inséré automatiquement ici...
    -

    Same thing! The + sticks the two strings together. This will end up being super useful later!

    +

    Même chose ! Le + colle les 2 chaînes ensemble. Cela va être très utile pour la suite !

    -

    Numbers and Math

    -

    Numbers

    -

    You can just use numbers, and Ruby understands them:

    +

    Nombre et Maths

    +

    Nombres

    +

    Tu peux utiliser les nombres simplement, Ruby les comprend :

    Code inséré automatiquement ici...
    -

    You can even use numbers that have a decimal point in them:

    +

    Tu peux même en utiliser qui ont un point pour la décimale (en anglais, c'est un point plutôt qu'une virgule) :

    Code inséré automatiquement ici...
    -

    Basic Math

    -

    You can also do math with numbers, and it'll work out pretty well:

    +

    Maths Simples

    +

    Tu peux aussi faire des maths avec les nombres, ça va marcher :

    Code inséré automatiquement ici...
    -

    But if you try this, nothing happens:

    +

    Mais si tu essayes ça, rien ne se passe :

    Code inséré automatiquement ici...
    -

    This is kind of fun and silly, though:

    +

    C'est assez simple et idiot :

    Code inséré automatiquement ici...
    -

    Errors

    -

    You know how nothing happened when you hit the Run button earlier? That was because there was an error. You can see any errors in the 'Output' tab.

    -

    The error that results from alert "hey" + 2 is:

    +

    Erreurs

    +

    Sais-tu pourquoi rien ne s'est passé quand tu as appuyé sur Run avant ? C'était parce qu'il y a eu une erreur. Tu peux voir les erreurs dans l'onglet "Sortie".

    +

    L'erreur qui vient de alert "hey" + 2 est :

    can't convert Fixnum into String -

    What is that?

    +

    Qu'est-ce que c'est que ça ?

    -

    A few words about types

    -

    Why's it do that?

    -

    Each part of a Ruby program is an Object. Right now, all you need to know about Objects is that it's sort of like saying a thing. Your program is made up of a bunch of Objects working together.

    -

    We'll learn more about Objects in a future lesson, but there is one thing I'll tell you: Objects have a 'type.' This lets Ruby know what kind of Object it is.

    +

    Un mot sur les Types

    +

    Pourquoi ça a fait ça ?

    +

    Chaque partie d'un programme Ruby est un Object. Maintenant, tout ce que tu dois savoir sur les Objects est que c'est un peu comme dire quelque chose. Ton programme est fait d'un ensemble d'objets qui travaillent ensemble.

    +

    On en apprendra plus sur les objets dans une future leçon, mais je te dirai une chose : les Objects ont un "type". Cela permet à Ruby de savoir quel genre d'Object c'est.

    -

    Adding numbers to words

    -

    That's why

    +

    Additionner des Nombres et des Mots

    +

    C'est pour cela que

    Code inséré automatiquement ici...
    -

    doesn't really work: "hey" is a String object, and 2 is a Fixnum object. And adding Strings and Fixnums doesn't make any sense. We can make this code work, though!

    -

    All we need to do is turn the Fixnum into a String. We can do this by using the to_s method.

    +

    ne fonctionne pas vraiment : "hey" est un objet de type String, et 2 est un objet Fixnum. Et ajouter des Strings et des Fixnums n'a pas de sens. Mais on peut quand même faire fonctionner ce code !

    +

    On a juste besoin de transformer le Fixnum en String. On peut le faire en utilisant la méthode to_s.

    Code inséré automatiquement ici...
    -

    Let's look at that again

    +

    Regardons Encore ça

    Code inséré automatiquement ici...
    -

    Okay, this isn't bad. We have our alert method. We're giving it "hey" + 2.to_s. The 2.to_s turns a Fixnum 2, which is like the mathematical idea of a 2, into the String 2, which is like when you write a 2 down on a piece of paper.

    +

    Pas mal. On a notre méthode alert. On lui donne "hey" + 2.to_s. Le 2.to_s transforme un Fixnum 2, qui est comme la valeur mathématique du 2, en la chaîne de caractère String 2, qui est comme quand tu écris un 2 sur une feuille de papier.

    Variables

    -

    They're like boxes

    -

    What happens if we want to keep something around? Most programs are not one line, I assure you. You can use a variable to hold a value and use it later. It's like a box that you put things in.

    -

    Let's try one out:

    +

    Ce sont comme des boîtes

    +

    Que se passe-t-il si on veut garder quelque chose ? La plupart des programmes ne sont pas en ligne, je t'assure. On peut utiliser une variable pour garder une valeur et l'utiliser plus tard. C'est comme une boîte où tu ranges des affaires.

    +

    Essayons-en une :

    Code inséré automatiquement ici...
    -

    Give that a run.

    +

    Fais tourner ça.

    -

    Assignment

    -

    Cool stuff! We used an = to assign the String "Hello, world!" into the variable message. We then passed that message to the alert method.

    -

    As you can see, we can use variables in place of another value. Try this:

    +

    Assignation

    +

    Trop cool ! On a utilisé un = pour assigner la String "Hello, world!" dans la variable message. Ensuite on a passé ce message à la méthode alert.

    +

    Comme tu peux voir, on peut utiliser les variable à la place d'une autre valeur. Essaye :

    Code inséré automatiquement ici...
    -

    Make a guess before you run this program.

    +

    Devine ce qui va se passer avant de faire tourner ce programme.

    -

    User Input

    -

    ask-ing for it.

    -

    We can ask the user of our program for some input, and then put their answer into a variable. It's easy! Check this program out:

    +

    Les Entrées Utilisateur

    +

    "ask" : Demande ce que tu veux !

    +

    Il est possible de demander à l'utilisateur de notre programme d'entrer quelque chose, et d'ensuite mettre la réponse dans une variable. C'est facile ! Regarde ce programme :

    Code inséré automatiquement ici...
    -

    The ask method brings up a box and lets our users type something in. Fun! We put their answer into the name variable and then showed it with alert Sweet!

    +

    La méthode ask apporte une boîte et laisse nos utilisateurs écrire quelque chose dedans. Marrant ! On met leur réponse dans la variable name et ensuite on le montre avec l'alert Sympa !

    -

    Basic flow control

    -

    if...

    -

    Remember back to that Beginning Programming lesson... we talked about how programs are one big list, that the computer follows in order.

    -

    Well, guess what? We can actually change this order by using certain bits of code. Compare these two programs:

    +

    Contrôle de Flux Basique

    +

    "if"... Si...

    +

    Souviens-toi la leçon sur les Bases de la Programmation... On a parlé du fait que les programmes sont une grande liste que l'ordinateur suit dans l'ordre.

    +

    Eh bien tu sais quoi ? on peut changer cet ordre en utilisant un peu de code. Compare ces deux programmes :

    Code inséré automatiquement ici...
    Code inséré automatiquement ici...
    -

    There are a few new things here.

    +

    Il y a quelques nouvelles choses là.

    "=="

    -

    Here it is again:

    +

    Le revoilà :

    Code inséré automatiquement ici...
    -

    The == command is just a bit different than the = command. == tests the Object on its right against the Object on its left. If the two are equal, then the code after the if will run. If they're not equal, you get the code after the else. The ("end") lets us know we're done with our if.

    +

    La commande == est un peu différente de la commande =. == teste l'Object à droite et l'Object à gauche. Si les deux sont égaux, alors le code après le if s'exécutera. Si ils sont différents, ce sera le code après le else. Le ("end") nous dit que le if est fini.

    -

    Example: a guessing game

    -

    Guess!

    -

    Let's put this all together:

    +

    Exemple : un Jeu de Devinettes

    +

    Devine !

    +

    Mettons tout ça ensemble :

    Code inséré automatiquement ici...
    -

    Example: a guessing game

    -

    Guess!

    -

    Congrats! You've picked up all of the basics of Ruby. There's a lot more you still have to learn, though!

    -

    Here's what you've learned so far:

    -

    * alert and ask

    -

    * = variables, and ==

    -

    * if and else

    -

    Awesome! You'll want to go back to "Lessons" and then check out Ruby Warrior next!

    +

    Exemple : un Jeu de Devinettes

    +

    Devine !

    +

    Bravo ! Tu as maintenant toutes les bases de Ruby. Mais tu as beaucoup plus à apprendre !

    +

    Voici tout ce que tu viens de voir :

    +

    * alert et ask

    +

    * =, les variables, et ==

    +

    * if et else

    +

    Génial ! Tu peux maintenant revenir aux "Leçons" et ensuite jeter un coup d'oeil à Ruby Warrior !

    From 1504b5c7a8da377d274385d54288f307b498f474 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Mon, 9 Jul 2012 16:47:48 +0200 Subject: [PATCH 23/31] relecture lesson 9 --- public/help/fr/ruby4kids/lesson_9.html | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_9.html b/public/help/fr/ruby4kids/lesson_9.html index 308f758..bd779c8 100644 --- a/public/help/fr/ruby4kids/lesson_9.html +++ b/public/help/fr/ruby4kids/lesson_9.html @@ -40,11 +40,11 @@

    Ruby4Kids - Programmation de Jeux - Leçon 9

    Puisque que nous allons ajouter plus de ballons à éviter, nous devrions créer une fenêtre de jeux plus grande.

    -

    Pour faire cela, allons voir la classe MyGame and sous def initialize, remplaçons les nombres par (600, 400, false). Le résultat devrait ressembler à ça:

    +

    Pour faire cela, allons voir la classe MyGame et sous def initialize, remplaçons les nombres par (600, 400, false). Le résultat devrait ressembler à ça :

    Code inséré automatiquement ici...
    -

    Nous allons alors ajuster la position du joueur pour le faire démarrer en bas de l'écran. D'abord, nous avons besoin d'aller voir la classe player. Mettons l'abscisse (x) du joueur à 150, et son ordonnée (y) à 330. Ton résultat devrait ressembler à ça:

    +

    Nous allons alors ajuster la position du joueur pour le faire démarrer en bas de l'écran. D'abord, nous avons besoin d'aller voir la classe player. Mettons l'abscisse (x) du joueur à 150, et son ordonnée (y) à 330. Ton résultat devrait ressembler à ça :

    Code inséré automatiquement ici...
    @@ -58,27 +58,27 @@

    Ruby4Kids - Programmation de Jeux - Leçon 9

    Leçon 9 - Création de Plusieurs Ballons

    -

    Multiplions!

    +

    Multiplions !

    -

    Maintenant, essayons d'ajouter 3 ballons de plus! Alors nous allons à la class MyGame et changeons quelques trucs sous def initialize:

    +

    Maintenant, essayons d'ajouter 3 ballons de plus ! Alors allons à la classe MyGame et changeons quelques trucs sous def initialize :

    Code inséré automatiquement ici...

    Tout ce que nous avons fait précédemment a été de multiplier ball et donc de changer le code pour créer 3 ballons au lieu d'un.

    -

    Maintenant, mettons à jour chaque ballon, plutôt d'un seul. Nous allons aussi multiplier le @ball. Pour ça, dans la classe MyGame, nous allons changer le code en:

    +

    Maintenant, mettons à jour chaque ballon, plutôt qu'un seul. Nous allons aussi multiplier le @ball. Pour ça, dans la classe MyGame, nous allons changer le code en :

    Code inséré automatiquement ici...
    -

    Ensuite, nous allons devoir répéter un peu ce principe. Nous allons à def draw pour pluraliser @ball et pour changer le code pour que ça dessine chaque balle au lieu d'une seule. Tu devrais avoir au final:

    +

    Ensuite, nous allons devoir répéter un peu ce principe. Nous allons à def draw pour multiplier @ball et changer le code pour que ça dessine chaque balle au lieu d'une seule. Tu devrais avoir au final :

    Code inséré automatiquement ici...
    -

    Maintenant que nous avons pluraliser, pourquoi ne pas aller de l'avant et faire encore plus! Allons donc dans la classe Player, et la changer de cette façon:

    +

    Maintenant que nous avons pluralisé, pourquoi ne pas aller de l'avant et faire encore plus ! Allons donc dans la classe Player, et changeons-la de cette façon :

    Code inséré automatiquement ici...
    -

    Encore une fois, nous avons juste ajusté les méthodes pour faire en sorte qu'elles fonctionnent avec plusieurs ballons. Pour le code ci-dessus, nous avons ajouté la méthode any?, ce qui signifie juste qu'être touché par une des balles provoquera un coup.

    +

    Encore une fois, nous avons juste ajusté les méthodes pour faire en sorte qu'elles fonctionnent avec plusieurs ballons. Pour le code ci-dessus, nous avons ajouté la méthode any?, ce qui signifie juste qu'être touché par une des balles provoquera un coup.

    « Précédent Retour aux Leçons @@ -92,14 +92,15 @@

    Ruby4Kids - Programmation de Jeux - Leçon 9

    Leçon 9 - Création de Plusieurs Ballons

    Rien de plus... Peut-être

    -

    Maintenant que tu dois haïr la multiplication des ballons, on va arréter... juste après un dernier ajout! Alors va à la classe MyGame, et change la définition du redémarrage du jeux tel que ceci:

    +

    Maintenant que tu dois haïr la multiplication des ballons, on va arrêter... juste après un dernier ajout ! Alors va à la classe MyGame, et change la définition du redémarrage du jeux tel que ceci :

    Code inséré automatiquement ici...
    -

    Tu as fini (promis)! Maintenant, regardons juste ce à quoi l'intégralité de ton code devrait ressembler:

    + +

    Tu as fini (promis) ! Maintenant, regardons juste ce à quoi l'intégralité de ton code devrait ressembler :

    Code inséré automatiquement ici...
    -

    C'est vrai? C'est la fin? Tu as vraiment parcouru l'intégralité du tutoriel? Eh bien la réponse est OUI! FELICITATIONS, TU L'AS FAIT! Tu as développé un programme auquel tu peux jouer et que tu peux montrer! On espère que tu vas continuer à t'intéresser à la programmation, parce que si tu es allé aussi loin, c'est que tu as tout ce qu'il faut :).

    +

    C'est vrai ? C'est la fin ? Tu as vraiment parcouru l'intégralité du tutoriel ? Eh bien la réponse est OUI ! FELICITATIONS, TU L'AS FAIT ! Tu as développé un programme auquel tu peux jouer et que tu peux montrer ! On espère que tu vas continuer à t'intéresser à la programmation, parce que si tu es allé aussi loin, c'est que tu as tout ce qu'il faut :).

    « Précédent Retour aux Leçons From fabee281272ba3ee2df6ec1de5a9047db364c805 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Mon, 9 Jul 2012 17:08:11 +0200 Subject: [PATCH 24/31] relecture --- public/help/fr/ruby4kids/index.html | 72 ++++++++++++++--------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/public/help/fr/ruby4kids/index.html b/public/help/fr/ruby4kids/index.html index d6c5c66..df10576 100644 --- a/public/help/fr/ruby4kids/index.html +++ b/public/help/fr/ruby4kids/index.html @@ -1,36 +1,36 @@ - - - - Programmer des jeux avec Gosu - - - - - - - - - - - -

    Programmer des jeux avec Gosu

    - -
    -

    Programmer des jeux est vraiment amusant, et c'est pourquoi beaucoup de personnes veulent s'y mettre. Alberto Morales and Bill Davenport ont travaillés sur une série de tutoriaux sur leur site internet Ruby4kids.com pour montrer aux enfants comment créer des jeux en utilisant Ruby et un kit de développement appelé Gosu.

    -
      -
    1. Leçon 1 - Création de la Fenêtre de Jeu
    2. -
    3. Leçon 2 - Ajout d'un Joueur
    4. -
    5. Leçon 3 - Déplacement du Joueur vers la Gauche
    6. -
    7. Leçon 4 - Limites de Déplacement
    8. -
    9. Leçon 5 - Déplacement vers la Droite, Haut et Bas
    10. -
    11. Leçon 6 - Ajout d'un Ballon à Eviter
    12. -
    13. Leçon 7 - Se Faire Toucher par le Ballon
    14. -
    15. Leçon 8 - La Touche Echap Met le Jeu en Pause
    16. -
    17. Leçon 9 - Création de Plusieurs Ballons
    18. -
    -
    - - - + + + + Programmer des jeux avec Gosu + + + + + + + + + + + +

    Programmer des jeux avec Gosu

    + +
    +

    Programmer des jeux est vraiment amusant, et c'est pourquoi beaucoup de personnes veulent s'y mettre. Alberto Morales and Bill Davenport ont travaillé sur une série de tutoriaux sur leur site internet Ruby4kids.com pour montrer aux enfants comment créer des jeux en utilisant Ruby, et un kit de développement appelé Gosu.

    +
      +
    1. Leçon 1 - Création de la Fenêtre de Jeu
    2. +
    3. Leçon 2 - Ajout d'un Joueur
    4. +
    5. Leçon 3 - Déplacement du Joueur vers la Gauche
    6. +
    7. Leçon 4 - Limites de Déplacement
    8. +
    9. Leçon 5 - Déplacement vers la Droite, Haut et Bas
    10. +
    11. Leçon 6 - Ajout d'un Ballon à Eviter
    12. +
    13. Leçon 7 - Se Faire Toucher par le Ballon
    14. +
    15. Leçon 8 - La Touche Echap Met le Jeu en Pause
    16. +
    17. Leçon 9 - Création de Plusieurs Ballons
    18. +
    +
    + + + From 43395e1dce25682dd92d8f9a3fe10534c716851e Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Mon, 9 Jul 2012 17:50:56 +0200 Subject: [PATCH 25/31] relecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit leçons 1 et 2 --- public/help/fr/ruby4kids/lesson_1.html | 214 ++++++++++++------------- public/help/fr/ruby4kids/lesson_2.html | 172 ++++++++++---------- 2 files changed, 193 insertions(+), 193 deletions(-) diff --git a/public/help/fr/ruby4kids/lesson_1.html b/public/help/fr/ruby4kids/lesson_1.html index 7393662..b9dd4d2 100644 --- a/public/help/fr/ruby4kids/lesson_1.html +++ b/public/help/fr/ruby4kids/lesson_1.html @@ -1,107 +1,107 @@ - - - - Ruby4Kids - Programmer en s'Amusant ! - - - - - - - - - - - - - - - -

    Ruby4Kids - Programmation de Jeu - Leçon 1

    - - - -

    Leçon 1 - Préparation

    -
    -

    Comme tu es déjà en train d'utiliser KidsRuby, tu es donc prêt à commencer à programmer ton premier jeu en utilisant Gosu.

    -

    Voici le fichier qui va contenir notre premier programme.

    -

    Nous allons utiliser la librairie gosu en écrivant:

    -
    Code automatiquement inséré ici...
    - -

    Nous allons ensuite commencer notre jeu en héritant de la classe Gosu.

    -

    Nous appelerons notre jeu MyGame comme ça:

    -
    Code automatiquement inséré ici...
    - -

    Maintenant, à l'intérieur de cette classe, Gosu a besoin de nous pour définir trois méthodes:

    -

    Nous définissons nos méthodes comme ça:

    -
    Code automatiquement inséré ici...
    - -

    Que se passe t-il donc ici ? Quand le jeu démarre, la méthode initialize est appelée. Ensuite le jeu continue de s'exécuter en boucle en appelant successivement les méthodes: update et draw.

    -

    Met à jour, puis dessine. Met à jour puis dessine. Met à jour puis dessine. Ce cycle se répète à l'infini plusieurs fois par secondes !

    - - « Retour - Retour aux Leçons - Suivant » - -
    -
    - - -

    Leçon 1 - Création d'une Fenêtre

    -

    Création d'une Fenêtre

    -

    Cool, on est donc quasiment prêts à lancer ce code. La prochaine étape va être de dire à Gosu la taille de la fenêtre que nous voulons afficher à l'écran pour notre jeu.

    -

    Nous allons faire ça dans la méthode initialize en lui passant trois paramètres comme ceci:

    -
    Code automatiquement inséré ici...
    - -

    Les deux premiers paramètres signifient que la fenêtre fera 300 pixels de largeur et 400 pixels de hauteur. Un pixel est un point unique sur ton écran. Si tu regarde de très très près le moniteur, tu pourra les apercevoir !

    -

    Le troisième paramètre false, qui signifie "faux" en français, permet de dire à gosu de ne pas prendre l'écran entier.

    -

    Très bien, nous sommes presque prêts pour voir si ça marche.

    -

    Pour afficher le résultat de ce que nous avons codé, il va falloir utiliser la classe que nous avons définie dans notre programme.

    -

    Nous allons faire ça en ajoutant ce qui suit après la définition de la classe:

    -
    Code automatiquement inséré ici...
    - -

    La première ligne crée une instance du nouveau jeu. Ensuite, en appelant la méthode show, nous demandons au jeu de nous montrer la fenêtre.

    - - « Retour - Retour aux Leçons - Suivant » - -
    -
    - - -

    Leçon 1 - Exécute le !

    -

    Exécute Ton Programme

    -

    Nous sommes maintenant prêt à exécuter le programme.

    -

    C'est parti ! Clique sur le bouton "Exécuter"

    -

    Si tout s'est bien passé, tu as vu la fenêtre s'afficher. Bravo, tu viens d'écrire ton premier programme de jeu !

    -

    Voici le programme en entier comme tu as du l'écrire:

    -
    Code automatiquement inséré ici...
    - -

    Bon c'est vrai que ça ne fait rien d'extraordinaire, mais au moins tu sais maintenant comment faire pour afficher une fenêtre dans un jeu !

    -

    Tu es maintenant prêt pour la Leçon 2.

    - - « Retour - Retour aux Leçons - Suivant » - -
    -
    - - Retour en Haut - - - + + + + Ruby4Kids - Programmer en s'Amusant ! + + + + + + + + + + + + + + + +

    Ruby4Kids - Programmation de Jeux - Leçon 1

    + + + +

    Leçon 1 - Préparation

    +
    +

    Comme tu es déjà en train d'utiliser KidsRuby, tu es donc prêt à commencer à programmer ton premier jeu en utilisant Gosu.

    +

    Voici le fichier qui va contenir notre premier programme.

    +

    Nous allons utiliser la librairie gosu en écrivant :

    +
    Code inséré automatiquement ici...
    + +

    Nous allons ensuite commencer notre jeu en héritant de la classe Gosu.

    +

    Nous appelerons notre jeu MyGame comme ça :

    +
    Code inséré automatiquement ici...
    + +

    Maintenant, à l'intérieur de cette classe, Gosu a besoin de nous pour définir trois méthodes :

    +

    Nous définissons nos méthodes comme ça :

    +
    Code inséré automatiquement ici...
    + +

    Que se passe t-il donc ici ? Quand le jeu démarre, la méthode initialize est appelée. Ensuite le jeu continue de s'exécuter en boucle en appelant successivement les méthodes :update et draw.

    +

    Met à jour, puis dessine. Met à jour puis dessine. Met à jour puis dessine. Ce cycle se répète à l'infini plusieurs fois par seconde !

    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + +

    Leçon 1 - Création d'une Fenêtre

    +

    Création d'une Fenêtre

    +

    Cool, on est donc quasiment prêts à lancer ce code. La prochaine étape va être de dire à Gosu la taille de la fenêtre que nous voulons afficher à l'écran pour notre jeu.

    +

    Nous allons faire ça dans la méthode initialize en lui passant trois paramètres comme ceci :

    +
    Code inséré automatiquement ici...
    + +

    Les deux premiers paramètres signifient que la fenêtre fera 300 pixels de largeur et 400 pixels de hauteur. Un pixel est un point unique sur ton écran. Si tu regarde de très très près le moniteur, tu pourra les apercevoir !

    +

    Le troisième paramètre false, qui signifie "faux" en français, permet de dire à gosu de ne pas prendre l'écran entier.

    +

    Très bien, nous sommes presque prêts pour voir si ça marche.

    +

    Pour afficher le résultat de ce que nous avons codé, il va falloir utiliser la classe que nous avons définie dans notre programme.

    +

    Nous allons faire ça en ajoutant ce qui suit après la définition de la classe :

    +
    Code inséré automatiquement ici...
    + +

    La première ligne crée une instance du nouveau jeu. Ensuite, en appelant la méthode show, nous demandons au jeu de nous montrer la fenêtre.

    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + +

    Leçon 1 - Exécute-le !

    +

    Exécute Ton Programme

    +

    Nous sommes maintenant prêt à exécuter le programme.

    +

    C'est parti ! Clique sur le bouton "Exécuter".

    +

    Si tout s'est bien passé, tu as vu la fenêtre s'afficher. Bravo, tu viens d'écrire ton premier programme de jeu !

    +

    Voici le programme en entier comme tu as dû l'écrire :

    +
    Code inséré automatiquement ici...
    + +

    Bon c'est vrai que ça ne fait rien d'extraordinaire, mais au moins tu sais maintenant comment faire pour afficher une fenêtre dans un jeu !

    +

    Tu es maintenant prêt pour la Leçon 2.

    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + Retour en Haut + + + diff --git a/public/help/fr/ruby4kids/lesson_2.html b/public/help/fr/ruby4kids/lesson_2.html index 86f122e..4953126 100644 --- a/public/help/fr/ruby4kids/lesson_2.html +++ b/public/help/fr/ruby4kids/lesson_2.html @@ -1,86 +1,86 @@ - - - - Ruby4Kids - Programmer en s'Amusant ! - - - - - - - - - - - - - - - -

    Ruby4Kids - Programmation de Jeu - Leçon 2

    - - -

    Leçon 2 - Ajout d'un Joueur

    -

    Créer un Joueur

    -

    Ca serait sympa d'avoir un joueur dans le jeu, donc créons en un !

    -

    Nous allons faire ca en ajoutant une nouvelle classe. Nous allons l'appeler Player. -

    Maintenant, nous allons définir ce que va pouvoir faire notre joueur. Il suffit pour cela de taper ce qui suit:

    -
    Code automatiquement inséré ici...
    - -

    Ensuite, nous allons ajouter une image à ce joueur pour pouvoir le voir à l'écran.

    -

    Nous allons faire ça en trouvant un fichier .png. KidsRuby contient déjà une image que tu vas pouvoir utiliser.

    -

    Vas dans la classe de ton joueur et ajoute lui cette image avec le code suivant:

    -
    Code automatiquement inséré ici...
    - -

    Il nous reste juste à ajouter une méthode draw qui va dessiner le joueur avec cette image. Tape ce qui suit:

    -
    Code automatiquement inséré ici...
    - - « Retour - Retour aux Leçons - Suivant » - -
    -
    - - - -

    Leçon 2 - Ajout d'un Joueur

    -

    Ajouter le Joueur dans le Jeu

    -

    Maintenant, nous sommes pratiquement prêts à relancer le jeu. Il nous faut d'abord retourner dans la classe MyGame, et instancier le joueur que nous avons défini.

    -

    Pour faire ça il suffit d'ajouter le code suivant à la méthode d'initialisation de la classe MyGame:

    -
    Code automatiquement inséré ici...
    - -

    Ca va dire au joueur dans quelle fenêtre il doit se dessiner.

    -

    Pour finir, nous devons ajouter ceci dans la méthode draw de la fenêtre du jeu:

    -
    Code automatiquement inséré ici...
    -

    Ca va permettre de dessiner le joueur quand le jeu sera executé.

    -

    Encore une dernière chose ! Nous avons besoin de mettre require 'player' juste en dessous de require 'gosu', ainsi le programme va savoir que nous utilisons la classe Player.

    -

    Maintenant testons tout ça ! Clicke sur le bouton "Exécuter". Est ce que ça a marché ?

    -

    Voici le programme en entier comme tu as du l'écrire:

    -
    Code automatiquement inséré ici...
    -

    Ca y est tu as appris comment on fait pour ajouter un joueur. Pourquoi n'allons nous pas voir comment faire pour que le joueur bouge vers la gauche dans la leçon 3?!

    - - « Retour - Retour aux Leçons - Suivant » - -
    -
    - - Retour en Haut - - - + + + + Ruby4Kids - Programmer en s'Amusant ! + + + + + + + + + + + + + + + +

    Ruby4Kids - Programmation de Jeux - Leçon 2

    + + +

    Leçon 2 - Ajout d'un Joueur

    +

    Créer un Joueur

    +

    Ca serait sympa d'avoir un joueur dans le jeu, donc créons en un !

    +

    Nous allons faire ca en ajoutant une nouvelle classe. Nous allons l'appeler Player. +

    Maintenant, nous allons définir ce que va pouvoir faire notre joueur. Il suffit pour cela de taper ce qui suit :

    +
    Code inséré automatiquement ici...
    + +

    Ensuite, nous allons ajouter une image à ce joueur pour pouvoir le voir à l'écran.

    +

    Nous allons faire ça en trouvant un fichier .png. KidsRuby contient déjà une image que tu vas pouvoir utiliser.

    +

    Va dans la classe de ton joueur et ajoute lui cette image avec le code suivant :

    +
    Code inséré automatiquement ici...
    + +

    Il nous reste juste à ajouter une méthode draw qui va dessiner le joueur avec cette image. Tape ce qui suit :

    +
    Code inséré automatiquement ici...
    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + + +

    Leçon 2 - Ajout d'un Joueur

    +

    Ajouter le Joueur dans le Jeu

    +

    Maintenant, nous sommes pratiquement prêts à relancer le jeu. Il nous faut d'abord retourner dans la classe MyGame, et instancier le joueur que nous avons défini.

    +

    Pour faire ça il suffit d'ajouter le code suivant à la méthode d'initialisation de la classe MyGame :

    +
    Code inséré automatiquement ici...
    + +

    Ca va dire au joueur dans quelle fenêtre il doit se dessiner.

    +

    Pour finir, nous devons ajouter ceci dans la méthode draw de la fenêtre du jeu :

    +
    Code inséré automatiquement ici...
    +

    Ca va permettre de dessiner le joueur quand le jeu sera executé.

    +

    Encore une dernière chose ! Nous avons besoin de mettre require 'player' juste en dessous de require 'gosu', ainsi le programme va savoir que nous utilisons la classe Player.

    +

    Maintenant testons tout ça ! Clique sur le bouton "Exécuter". Est-ce que ça a marché ?

    +

    Voici le programme en entier comme tu as dû l'écrire :

    +
    Code inséré automatiquement ici...
    +

    Ca y est tu as appris comment on fait pour ajouter un joueur. Pourquoi n'allons nous pas voir comment faire pour que le joueur bouge vers la gauche dans la leçon 3 ?!

    + + « Retour + Retour aux Leçons + Suivant » + +
    +
    + + Retour en Haut + + + From 97afbd74d8d15a3df29e3db023428f1c50bf6298 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Tue, 10 Jul 2012 19:44:15 +0200 Subject: [PATCH 26/31] relecture --- public/help/fr/index.html | 54 +-- public/help/fr/keyboard-shortcuts.html | 634 ++++++++++++------------- public/help/fr/rubywarrior/index.html | 86 ++-- 3 files changed, 387 insertions(+), 387 deletions(-) diff --git a/public/help/fr/index.html b/public/help/fr/index.html index 1946e5e..04f0dcd 100644 --- a/public/help/fr/index.html +++ b/public/help/fr/index.html @@ -1,27 +1,27 @@ - - - - Aide - - - - - - - - - - - - - - + + + + Aide + + + + + + + + + + + + + + diff --git a/public/help/fr/keyboard-shortcuts.html b/public/help/fr/keyboard-shortcuts.html index 1556dc5..87c9b09 100644 --- a/public/help/fr/keyboard-shortcuts.html +++ b/public/help/fr/keyboard-shortcuts.html @@ -1,317 +1,317 @@ - - - - Aide - - - - - - - - - - - -
    - -

    Raccourcis Clavier par Défaut

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PC (Windows/Linux)Macaction
    Ctrl-Lcentrer la sélection
    Ctrl-UCtrl-Utransformer en majuscule(s)
    Ctrl-Shift-UCtrl-Shift-Utransformer en minuscule(s)
    Ctrl-Alt-BasPomme-Option-Bascopier la ligne vers le bas
    Ctrl-Alt-HautPomme-Option-Hautcopier la ligne vers le haut
    Ctrl-FPomme-Fchercher
    Ctrl-KPomme-Gchercher le suivant
    Ctrl-Shift-KPomme-Shift-Gchercher le précédent
    Alt-0Option-0tout replier
    Alt-Shift-0Option-Shift-0tout déplier
    BasBas,Ctrl-Naller à la ligne du dessous
    HautHaut,Ctrl-Paller à la ligne du dessus
    Ctrl-Fin,Ctrl-BasPomme-Fin,Pomme-Basaller à la fin
    GaucheGauche,Ctrl-Baller à gauche
    Ctrl-LPomme-Laller à la ligne numéro...
    Alt-Droite,FinPomme-Droite,Fin,Ctrl-Ealler à la fin de la ligne
    Alt-Gauche,DébutPomme-Gauche,Début,Ctrl-Aaller au début de la ligne
    PageSuivOption-PageSuiv,Ctrl-Valler en bas de la page
    PagePrécOption-PagePrécaller en haut de la page
    DroiteDroite,Ctrl-Faller vers la droite
    Ctrl-Début,Ctrl-HautPomme-Début,Pomme-Hautaller au début du document
    Ctrl-GaucheOption-Gauchealler au début du mot de gauche
    Ctrl-DroiteOption-Droitealler au début du mot de droite
    TabTabajouter une indentation de la ligne
    Alt-BasOption-Basdéplacer les lignes vers le bas
    Alt-HautOption-Hautdéplacer les lignes vers le haut
    Shift-TabShift-Tabsupprimer une indentation de la ligne
    InserInseractiver/désactiver le mode insertion
    PageSuivPageSuivdescendre dans la page
    PagePrécPagePrécmonter dans la page
    Ctrl-Shift-Z,Ctrl-YPomme-Shift-Z,Pomme-Yrefaire
    Ctrl-DPomme-Dsupprimer la ligne
    Ctrl-Ksupprimer la fin de la ligne
    Option-Retour_Arrièresupprimer le début de la ligne
    Alt-Retour_Arrière,Ctrl-Alt-Retour_Arrièresupprimer le mot de gauche
    Alt-Deletesupprimer le mot de droite
    Ctrl-RPomme-Option-Fremplacer
    Ctrl-Shift-RPomme-Shift-Option-Ftout remplacer
    Ctrl-APomme-Asélectionner tout
    Shift-BasShift-Bassélectionner vers le bas
    Shift-GaucheShift-Gauchesélectionner vers la gauche
    Shift-FinShift-Finsélectionner la fin de la ligne
    Shift-DébutShift-Débutsélectionner le début de la ligne
    Shift-PageSuivShift-PageSuivsélectionner le bas de la page
    Shift-PagePrécShift-PagePrécsélectionner le haut de la page
    Shift-DroiteShift-Droitesélectionner vers la droite
    Ctrl-Shift-Fin,Alt-Shift-BasPomme-Shift-Bassélectionner tout jusqu'à la fin du document
    Alt-Shift-DroitePomme-Shift-Droitesélectionner jusqu'à la fin de la ligne
    Alt-Shift-GauchePomme-Shift-Gauchesélectionner jusqu'au début de la ligne
    Ctrl-Shift-Début,Alt-Shift-HautPomme-Shift-Hautsélectionner tout jusqu'au début du document
    Shift-HautShift-Hautsélectionner vers le haut
    Ctrl-Shift-GaucheOption-Shift-Gauchesélectionner le mot de gauche
    Ctrl-Shift-DroiteOption-Shift-Droitesélectionner le mot de droite
    Ctrl-Odiviser la ligne en 2
    Ctrl-7Pomme-7activer/désactiver la mise en commentaire
    Ctrl-TCtrl-Tinverser les lettres de la sélection
    Ctrl-ZPomme-Zdéfaire
    - -
    - - + + + + Aide + + + + + + + + + + + +
    + +

    Raccourcis Clavier par Défaut

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PC (Windows/Linux)Macaction
    Ctrl-Lcentrer la sélection
    Ctrl-UCtrl-Utransformer en majuscule(s)
    Ctrl-Shift-UCtrl-Shift-Utransformer en minuscule(s)
    Ctrl-Alt-BasPomme-Option-Bascopier la ligne vers le bas
    Ctrl-Alt-HautPomme-Option-Hautcopier la ligne vers le haut
    Ctrl-FPomme-Frechercher
    Ctrl-KPomme-Grechercher le suivant
    Ctrl-Shift-KPomme-Shift-Grechercher le précédent
    Alt-0Option-0tout replier
    Alt-Shift-0Option-Shift-0tout déplier
    BasBas,Ctrl-Naller à la ligne du dessous
    HautHaut,Ctrl-Paller à la ligne du dessus
    Ctrl-Fin,Ctrl-BasPomme-Fin,Pomme-Basaller à la fin
    GaucheGauche,Ctrl-Baller à gauche
    Ctrl-LPomme-Laller à la ligne numéro...
    Alt-Droite,FinPomme-Droite,Fin,Ctrl-Ealler à la fin de la ligne
    Alt-Gauche,DébutPomme-Gauche,Début,Ctrl-Aaller au début de la ligne
    PageSuivOption-PageSuiv,Ctrl-Valler en bas de la page
    PagePrécOption-PagePrécaller en haut de la page
    DroiteDroite,Ctrl-Faller vers la droite
    Ctrl-Début,Ctrl-HautPomme-Début,Pomme-Hautaller au début du document
    Ctrl-GaucheOption-Gauchealler au début du mot de gauche
    Ctrl-DroiteOption-Droitealler au début du mot de droite
    TabTabajouter une indentation de la ligne
    Alt-BasOption-Basdéplacer les lignes vers le bas
    Alt-HautOption-Hautdéplacer les lignes vers le haut
    Shift-TabShift-Tabsupprimer une indentation de la ligne
    InserInseractiver/désactiver le mode insertion
    PageSuivPageSuivdescendre dans la page
    PagePrécPagePrécmonter dans la page
    Ctrl-Shift-Z,Ctrl-YPomme-Shift-Z,Pomme-Yrefaire
    Ctrl-DPomme-Dsupprimer la ligne
    Ctrl-Ksupprimer la fin de la ligne
    Option-Retour_Arrièresupprimer le début de la ligne
    Alt-Retour_Arrière,Ctrl-Alt-Retour_Arrièresupprimer le mot de gauche
    Alt-Deletesupprimer le mot de droite
    Ctrl-RPomme-Option-Fremplacer
    Ctrl-Shift-RPomme-Shift-Option-Ftout remplacer
    Ctrl-APomme-Asélectionner tout
    Shift-BasShift-Bassélectionner vers le bas
    Shift-GaucheShift-Gauchesélectionner vers la gauche
    Shift-FinShift-Finsélectionner la fin de la ligne
    Shift-DébutShift-Débutsélectionner le début de la ligne
    Shift-PageSuivShift-PageSuivsélectionner le bas de la page
    Shift-PagePrécShift-PagePrécsélectionner le haut de la page
    Shift-DroiteShift-Droitesélectionner vers la droite
    Ctrl-Shift-Fin,Alt-Shift-BasPomme-Shift-Bassélectionner tout jusqu'à la fin du document
    Alt-Shift-DroitePomme-Shift-Droitesélectionner jusqu'à la fin de la ligne
    Alt-Shift-GauchePomme-Shift-Gauchesélectionner jusqu'au début de la ligne
    Ctrl-Shift-Début,Alt-Shift-HautPomme-Shift-Hautsélectionner tout jusqu'au début du document
    Shift-HautShift-Hautsélectionner vers le haut
    Ctrl-Shift-GaucheOption-Shift-Gauchesélectionner le mot de gauche
    Ctrl-Shift-DroiteOption-Shift-Droitesélectionner le mot de droite
    Ctrl-Odiviser la ligne en 2
    Ctrl-7Pomme-7activer/désactiver la mise en commentaire
    Ctrl-TCtrl-Tinverser les lettres de la sélection
    Ctrl-ZPomme-Zannuler
    + +
    + + diff --git a/public/help/fr/rubywarrior/index.html b/public/help/fr/rubywarrior/index.html index d49d146..e6f2548 100644 --- a/public/help/fr/rubywarrior/index.html +++ b/public/help/fr/rubywarrior/index.html @@ -1,43 +1,43 @@ - - - - Le Guerrier de Ruby - - - - - - - - - - - - - - -

    Le Guerrier de Ruby

    - -
    -

    Le Guerrier de Ruby (Ruby Warrior en anglais) est un jeu qui a été développé pour enseigner le langage Ruby de manière amusante et interactive. Il a été créé par Ryan Bates.

    -

    Tu joues le rôle d'un guerrier qui part à l'assaut d'une grande tour pour atteindre le précieux Rubis qui se trouve au dernier niveau. A chaque étage tu dois écrire un script en Ruby pour décrire ce que doit faire le guerrier : combattre les ennemis, sauver des prisoniers ou atteindre les escaliers. Tu as des indices sur ce que contient chaque étage, mais tu n'es jamais sûr de ce qui peut se passer. Tu dois donner au guerrier suffisamment d'indications pour qu'il puisse trouver son chemin tout seul.

    -

    Tu devra programmer les actions de ton joueur, lui dire comment il doit se débrouiller. Tu peux commencer par entrer ce petit bout de code Ruby dans l'éditeur à gauche:

    -
    Code automatiquement inséré ici...
    - -

    Pour lancer la partie, tu dois également ajouter cet autre morceau de code Ruby dans l'éditeur:

    -
    Code automatiquement inséré ici...
    - -

    Fait bien attention à ce que le code du joueur Player soit avant la commande RubyWarrior.play.

    -

    Pour commencer à jouer, il te suffit de cliquer sur le bouton "Exécuter", et de suivre les instructions qui apparaitront dans l'onglet "Sortie". Amuses toi bien !

    -
    - - - - + + + + Ruby Warrior + + + + + + + + + + + + + + +

    Ruby Warrior

    + +
    +

    Ruby Warrior (Le Guerrier de Ruby) est un jeu qui a été développé pour enseigner le langage Ruby de manière amusante et interactive. Il a été créé par Ryan Bates.

    +

    Tu joues le rôle d'un guerrier qui part à l'assaut d'une grande tour pour atteindre le précieux Rubis qui se trouve au dernier niveau. A chaque étage tu dois écrire un script en Ruby pour décrire ce que doit faire le guerrier : combattre les ennemis, sauver des prisonniers ou atteindre les escaliers. Tu as des indices sur ce que contient chaque étage, mais tu n'es jamais sûr de ce qui peut se passer. Tu dois donner au guerrier suffisamment d'indications pour qu'il puisse trouver son chemin tout seul.

    +

    Tu devras programmer les actions de ton joueur, lui dire comment il doit se débrouiller. Tu peux commencer par entrer ce petit bout de code Ruby dans l'éditeur à gauche :

    +
    Code inséré automatiquement ici...
    + +

    Pour lancer la partie, tu dois également ajouter cet autre morceau de code Ruby dans l'éditeur :

    +
    Code inséré automatiquement ici...
    + +

    Fait bien attention à ce que le code du joueur Player soit avant la commande RubyWarrior.play.

    +

    Pour commencer à jouer, il te suffit de cliquer sur le bouton "Exécuter", et de suivre les instructions qui apparaîtront dans l'onglet "Sortie". Amuse-toi bien !

    +
    + + + + From b142be7f57c1fd2ed46608b2e104011c4ae230f3 Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Tue, 10 Jul 2012 19:45:25 +0200 Subject: [PATCH 27/31] relecture --- public/help/fr/rubywarrior/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/help/fr/rubywarrior/index.html b/public/help/fr/rubywarrior/index.html index e6f2548..2baf1aa 100644 --- a/public/help/fr/rubywarrior/index.html +++ b/public/help/fr/rubywarrior/index.html @@ -35,7 +35,7 @@

    Ruby Warrior

    Code inséré automatiquement ici...

    Fait bien attention à ce que le code du joueur Player soit avant la commande RubyWarrior.play.

    -

    Pour commencer à jouer, il te suffit de cliquer sur le bouton "Exécuter", et de suivre les instructions qui apparaîtront dans l'onglet "Sortie". Amuse-toi bien !

    +

    Pour commencer à jouer, il te suffit de cliquer sur le bouton "Executer", et de suivre les instructions qui apparaîtront dans l'onglet "Sortie". Amuse-toi bien !

    From 71f75042fe1000e41be5a7ca226254f88cf7ea37 Mon Sep 17 00:00:00 2001 From: Ludovic Borie Date: Tue, 10 Jul 2012 23:31:05 +0200 Subject: [PATCH 28/31] basic_programming.html first version --- .../fr/hacketyhack/basic_programming.html | 178 +++++++++--------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/public/help/fr/hacketyhack/basic_programming.html b/public/help/fr/hacketyhack/basic_programming.html index a553edc..b89dc99 100644 --- a/public/help/fr/hacketyhack/basic_programming.html +++ b/public/help/fr/hacketyhack/basic_programming.html @@ -35,166 +35,166 @@

    Bases de la Programmation

    -

    Hello there!

    -

    Round One

    -

    So, you'd like to learn how to hack code with the best of 'em, eh? Well, you've come to the right place. This is the very first lesson I have to share with you. It all starts here.

    -

    I want to get you started off on the best possible foot with making programs, so we'll start off by talking a little bit about what programming is, and then we'll write some basic programs to draw fun things on the screen. Sound good? Off we go!

    +

    Bonjour tous!

    +

    Premier round

    +

    Bon, tu es l pour apprendre comment hacker du code avec les meilleurs d'entre eux hein ? Cool, t'es au bon endroit. C'est la premire des leons que je dois partager avec toi, et a commence maintenant.

    +

    Je tiens t'aider partir du bon pied dans la programmation, donc on va commencer par parler un peu de ce QU'EST la programmation, et ensuite on va commencer crire quelques programmes basiques pour dessiner des trucs cools l'cran. Ca vous plait ? Eh bien c'est parti !

    -

    Let's talk about programming

    -

    It's all about instructions

    -

    When you get down to it, programming is all about algorithms. That's a big fancy word for 'a list of instructions.' Every program is simply a big to-do list of instructions for the computer to follow.

    -

    You can turn almost anything into a list of instructions if you really think about it. Most of the time, you've got so much practice at doing things that you don't even think about these individual steps. You just do them. It's very natural.

    +

    Parlons programmation!

    +

    Tout est une question d'instructions

    +

    Quand tu te mets la programmation, tout est question d'algorithmes. C'est un mot bien compliqu pour dire "une liste d'instructions". Chaque programme est simplement une grosse liste d'instructions que l'ordinateur doit accomplir.

    +

    Tu peux peu prt tout traduire en liste d'instructions si tu y rflchis. La plupart du temps, tu as as tellement de pratique tout dcouper en tape sans y penser... Tu le fais simplement, naturellement.

    -

    The computer is simple

    -

    Unfortunately, computers are actually quite simple. This may be contrary to everything you've ever heard, but it's the truth. Even though we compare computers to things like our brains, it's a really poor analogy. What computers are actually really good at is performing simple, boring things over and over again very accurately. They can't think for themselves!

    -

    This is why computers appear to be complex. They blindly follow whatever orders they're given, without any thought about how those instructions are good or bad. It's hard to think in such simple terms!

    +

    L'ordinateur est simple

    +

    Malheureusement, les ordinateurs sont en effet assez simple. C'est sans doute contraire tout ce que tu as pu entendre, mais c'est la vrit. Mme si l'on compare les ordinateurs quelque chose comme notre cerveau, c'est une analogie assez simpliste. En ralit les ordinateurs sont juste trs forts effectuer des tches simples et ennuyeuses, encore et encore, trs vite. Ils n'ont pas de pense propre!

    +

    C'est la raison pour laquelle les ordinateurs ont l'air si complexes. Ils suivent aveuglment les ordres reus, en ne sachant nullement si les instructions sont bonnes ou mauvaises. C'est dur de penser avec des mots si simples !

    -

    Explain yourself well

    -

    It's important to remember that you have to fully explain yourself to the computer when you're programming. It can't figure out what you're trying to say, so you have to say what you mean!

    -

    This takes some practice, so we're going to start off with some exercises in explaining ourselves in very basic terms. It's almost like trying to explain math to a young child: you have to go slowly, triple check your work, and have some patience when it just doesn't quite get it.

    +

    Expliquez vous bien

    +

    Il est important de se rappeler que tu dois tout expliquer entirement l'ordinateur quand tu programmes. Il ne peut pas interprter ce que tu essayes de dire, alors tu dois le lui dire clairement !

    +

    Cela demande un peu de pratique, donc on va commencer par quelques exercices en nous exprimant en termes trs simples. C'est un peu comme essayer d'expliquer les maths un jeune enfant: tu dois aller doucement, vrifier trois fois ton travail, et avoir une certaine patience quand il n'a pas tout compris.

    -

    Lists of Instructions

    -

    A to-do list, not a shopping list

    -

    When I say that computers follow lists of instructions, I mean a to-do list, not a shopping list. What I'm trying to say is that these lists have an order to them that the computer follows. It does each step in turn as quickly as it possibly can.

    -

    A shopping list is a different kind of list entirely. You can go to whichever aisle you choose, and as long as you get everything before you leave, you're A-OK. This isn't what the computer does at all.

    +

    Listes d'intructions

    +

    Une liste de choses faire, pas une liste de courses

    +

    Quand je dis que l'ordinateur suit une liste d'instructions, je veux dire une liste de choses faire, pas une liste de commissions. Ce que j'essaye de dire, c'est que cette liste a un order que l'ordinateur suit. Il effectue chaque tape dans l'ordre, le plus rapidement possible.

    +

    Une liste de courses est un type de liste diffrent. Tu peux choisir n'importe quel lment,et partir du moment o tu as tout fait au moment de quitter, tout va bien. Ce n'est pas du tout ce que l'ordinateur fait.

    -

    How would you tell a person to do it?

    -

    Let's try an example: if you had to tell someone in words how to draw a square on a piece of paper, how would you do it?

    -

    You're not allowed to say "like this" or "this way," that's cheating! You have to spell out every detail.

    +

    Comment dirais-tu une personne de le faire ?

    +

    Un exemple : si tu avais dire en quelques mots une personne comment dessiner un carr sur un papier, comment ferais-tu ?

    +

    Tu n'es pas autoris dire "comme a", ou "de cette faon", c'est trich ! Tu dois lui dtailler chaque action.

    -

    Once again: computers are simple

    -

    How'd you do? I can't see what you said, but here's an example of how simple computers are compared to people. Did you forget to mention how long each side of the square is? If you didn't good job!

    -

    Here's how I'd do it, by the way. This isn't the only right answer, it's just an example:

    -

    1. Put your pen down on the paper.

    -

    2. Draw right one inch.

    -

    3. Draw down one inch.

    -

    4. Draw left one inch.

    -

    5. Draw up one inch.

    -

    6. Take your pen off of the paper.

    -

    7. You're done!

    +

    Encore une fois : les ordinateurs sont simples.

    +

    Comment ferais-tu ? As-tu oubli de mentionner la taille de chaque ct du carr ? Si c'est le cas, c'est rat...

    +

    Voil comment je l'aurais fait. Ce n'est pas la seule bonne rponse, c'est juste un exemple :

    +

    1. Pose ton crayon sur le papier.

    +

    2. Dessine vers la droite sur un cm.

    +

    3. Dessine vers le bas d'un cm.

    +

    4. Dessine vers la gauche d'un cm.

    +

    5. Dessine vers le haut d'un cm.

    +

    6. Lve ton crayon du papier.

    +

    7. C'est fait !

    -

    Turtles, all the way down.

    -

    Drawing... with turtles?

    -

    Okay! Enough of these thinking experiments. Let's actually make something. I bet you've been wondering when that was going to start, right? It's really important to get the basics down first.

    -

    We're going to tell the computer how to draw shapes... with turtles. Yes, you heard me right. You're going to have to give these instructions to a turtle.

    -

    This particular turtle is carrying a pen. You have a piece of paper. The turtle will follow your every word. But the turtle is a bit slow, and needs careful instruction. Are you up to it?

    +

    Tortues.

    +

    Dessiner... avec des tortues?

    +

    Ok! Assez parl, maintenant on va raliser quelque chose. Tu te demandes quand on va enfin commencer non? Mais c'est trs important de maitriser quelques bases avant...

    +

    On va dire l'ordinateur comment dessiner quelques motifs... avec des tortues.

    +

    Cette tortue un peu particulire tient un crayon. Tu as un morceau de papier. Cette tortue va suivre chacun de tes mots. Mais cette tortue est un peu lente, et a besoin d'instructions bien prcises. Tu te sens prt ?

    -

    The Turtle and its commands

    -

    We have to tell Ruby that we want to tell the Turtle what to do. To do that, we have a Turtle command. We can tell the Turtle two things:

    -

    draw: the turtle will follow our instructions at lightning speed, drawing our entire image in the blink of an eye. -

    start: an interactive window will appear, which lets you see the turtle move at each step in the program. You can move at your own pace. This is useful if the turtle isn't doing what you expect! +

    La Tortue et ses commandes

    +

    Nous devons dire Ruby que nous voulons dire la Tortue quoi faire. Pour a, nous avons une commande Turtle. Nous pouvons dire la Turtle deux choses :

    +

    draw: la tortue va suivre nos instructions la vitesse de la lumire, et dessiner l'image entire en un clignement de paupire. +

    start: une fentre intractive va apparatre, ce qui te permettra de voir la tortue se dplacer chaque tape du programme. Tu peux avancer ton rythme, c'est pratique si la tortue ne fait pas ce quoi tu t'attendais.

    -

    Type it in!

    -

    Cool. Now type this:

    +

    Ecrivons le !

    +

    Cool. Maintenant tape ceci :

    Turtle.draw

    -

    The period in between the Turtle and the draw connects them together. Programming languages have rules, just like English has rules! You can think of Turtle like a subject, and draw as a verb. Together, they make a sentence: hey turtle, draw me something!

    -

    Once you've typed that in, go ahead and click the 'Run' button. The turtle moves so quickly in draw mode that you won't even see him, but I assure you, he's there!

    +

    La priode entre la Turtle et le draw les inter connecte. La programmation a des rgles, tout comme le Franais en a. Tu peux imaginer la Turtle comme un sujet, et draw comme un verbe. Ensemble, ils forment une phrase : Hey la tortue, dessine moi un truc !

    +

    Une fois que tu as tap a, poursuivons en cliquant sur le bouton "Excuter". La tortue bouge si vite en mode draw que tu ne la verras pas, mais je le promets, elle bouge !

    -

    Do... what I tell you to

    -

    Awesome! We've got the turtle going, at least. Now we need to tell it what we want to draw!

    -

    Remember when we said that all programs are lists of instructions? In this case, our program only has one instruction: Turtledraw something! But we need to be able to give the Turtle its own list of instructions.

    -

    To do this, we'll use two words: do and end. These two words together make up a sublist of things, just for the Turtle!

    +

    Fait... Ce que je te dis

    +

    Trop cool ! On a au moins une tortue qui bouge. Maintenant, on veut pouvoir lui dire ce qu'elle doit dessiner !

    +

    Tu te rappelles quand on a dit que tous les programmes ne sont que des listes d'instructions ? Dans notre cas, notre programme a seulement une instruction : Turtle dessine quelque chose ! Mais on a besoin de pouvoir donner la Turtle sa propre liste d'instructions.

    +

    Pour ce faire, on va utiliser deux mots : do et end. Ces deux mots runis font une sous-liste de choses, juste pour la Turtle !

    -

    Changing the background

    -

    Let's try this: we can tell the Turtle that we want to use a different background color by using the background command. Check it out:

    +

    Modification de l'arrière plan

    +

    Essayons ceci : on peut dire à la Turtle que nous voulons utiliser une couleur d'arrière plan différente en utilisant la commande background. Vérifions :

    Code inséré automatiquement ici...
    -

    Type this in and click 'Run'!

    +

    Tape ceci et clic sur "Exécuter" !

    -

    The Turtle gets its orders

    -

    Cool stuff! The background is now maroon. Click here to see a full list of colors that are supported. -

    This is also how you make lists of instructions for the Turtle to follow. To make it a little easier to see, programmers will often put two spaces before sublists. Get in the habit now, you'll thank me later!

    +

    La Tortue a ses ordres

    +

    Beau boulot ! L'arrière plan est maintenant marron. Clic ici pour voir a liste complète de couleurs supportées. +

    C'est aussi la façon dont on fait des listes d'instructions que la Turtle suit. Pour le rendre un peu plus facile à lire, les programmeurs mettent souvent deux espaces devant les sous-listes. Prenez l'habitude dès maintenant, vous me remercierez plus tard !

    -

    The pen

    -

    Now that we've got a snazzy background color, how do we draw some lines? Well, the first thing you need to know about is the pen. The Turtle carries a pen along, and drags it along the ground behind itself. You can change the color of line the pen draws with the pencolor command.

    +

    Le crayon

    +

    Maintenant que nous avons une couleur d'arrière plan, comment dessiner quelques lignes ? Bon, la première chose dont on a besoin, c'est un crayon. La Turtle traine un crayon avec elle. On peut en changer la couleur avec la commande pencolor.

    -

    Drawing lines

    -

    Sally forth!

    -

    Okay, enough dilly-dallying. Let's tell the turtle to draw a line! Here's my line. Give this one a shot, then try your own colors and numbers!

    +

    Dessiner des lignes

    +

    Suite!

    +

    OK, assez tergiversé. Demandons à la tortue de dessiner une ligne ! Voici la mienne. Essaye, et personnalise la avec tes propres couleurs et chiffres !

    Code inséré automatiquement ici...
    -

    50 is the number of pixels to move forward, by the way.

    +

    Au fait, 50 est le nombre de pixels que va parcourir la Tortue.

    -

    You spin me right round, baby

    -

    Great! So you've got a line. But what if you don't want the Turtle to move forward? Well, you can tell it to turn by using a turnleft or turnright command, like this:

    +

    Tu me fais tourner la tête, chérie !

    +

    Cool, tu as une ligne. Mais quoi faire si tu ne veux pas seuleument faire avancer tout droit ta Turtle ? Eh bien tu peux lui dire de tourner en utilisant les commandes turnleft ou turnright, comme ceci :

    Code inséré automatiquement ici...
    -

    Give that a shot, then play with it a bit!

    -

    If you're wondering what 90 means, it's the number of degrees that it'll turn.

    +

    Essaye ça, et joue un peu avec !

    +

    Si tu te demandes ce que 90 veut dire, c'est le nombre de degrés de rotation effectués par la Tortue.

    I like to move it, move it

    -

    Okay, now we're cooking! Let's break this down again:

    -

    Turtle.draw tells the Turtle we want it to draw some things. The period connects the two.

    -

    do ... end is a sublist of things. This is what we want the Turtle to be drawing. Not for the rest of our program. -

    pencolor sets the color of the pen the Turtle is dragging along behind him, and background sets the color of the background.

    -

    turnright (or its buddy turnleft) tells the Turtle " to turn to the right or left.

    -

    forward (or its friend backward) tells the Turtle to move.

    +

    Ok, maintenant on va cuisiner ! Touillons tout ça encore un peu :

    +

    Turtle.draw dit à la Turtle que nous voulons dessiner quelque chose. La période connecte les deux.

    +

    do ... end est une sous-liste de choses. C'est ce que nous voulons faire dessiner à la Turtle. Pas pour le reste de notre programme. +

    pencolor configure la couleur du crayon que la Turtle transporte, et background configure la couleur de l'arrière plan.

    +

    turnright (ou son frère turnleft) dit à la Turtle " de tourner à droite ou à gauche.

    +

    forward (ou son copain backward) ordonne à la Turtle de bouger.

    -

    Let's try drawing that square

    -

    Go ahead. Give it a shot. Try to get the Turtle to draw a square.

    -

    I'll wait. :)

    +

    Essayons de dessiner un carré

    +

    En avant, essaye de faire dessiner un carré à la Turtle.

    +

    J'attends. :)

    -

    Here's my version

    -

    Here's how I did it:

    +

    Ma version

    +

    Voilà comment j'ai fait :

    Code inséré automatiquement ici...
    -

    Repeating ourselves

    -

    Pete and Repeat...

    -

    Man, that was a ton of repetition! My fingers almost fell off typing forward and turnright there!

    -

    I have good news, though: I mentioned something earlier about computers. It turns out that doing boring, repetitive things is something they're really good at! They'll do the same thing over and over again, forever even as long as you ask nicely.

    +

    Se le répéter

    +

    Encore et encore...

    +

    Mec, ça c'était un peu trop répété ! Mes doigts à moi ont juste du taper forward et turnright !

    +

    J'ai cependant de bonnes nouvelles : j'ai mentionné plus tôt quelque chose au sujet des ordinateurs. Il s'avère que faire des choses répétitives ennuyeuses, c'est un truc où ils sont vraiment bosn ! Ils vont faire la même chose maintes et maintes fois, aussi longtemps que vous voulez si vous le lui demandez gentiment.

    -

    Repeating repeating ourselves ourselves

    -

    Check it out: our Turtle actually knows numbers. For example:

    +

    Se le se le répéter répéter

    +

    Souvenez vous : notre Turtle connait les nombres. Par exemple :

    Code inséré automatiquement ici...
    -

    Try running this example. It also draws a square! Wow!

    +

    Essaye d'exécuter cet exemple. Il dessine aussi un carré ! Wah !

    4.times

    -

    It's pretty easy: 4 can take instructions too, just like our Turtle. This command repeats a list of instructions that many times. Fun! Four times. And the do and end show which list of instructions go with the 4 rather than with the Turtle.

    +

    C'est assez simple : 4 peut aussi recevoir des intructions, tout comme notre Turtle. Cette commande répète une liste d'instructions autant de fois que demandé. Fun! Quatre fois. Et le code do ainsi que end montrent quelle liste d'instructions vont avec le 4 plutôt qu'avec la Turtle.

    -

    Try it out!

    -

    Have a blast: make some fun shapes of your own!

    +

    Essaye par toi-même !

    +

    Lance-toi un défi : dessine autant de chouettes formes que tu peux !

    -

    Summary

    -

    Congratulations!

    -

    Wow, you're awesome. Pat yourself on the back. High five someone. You've got these basics down!

    -

    Check out the Basic Ruby lesson to pick up some totally different and exciting things!

    +

    Résumé

    +

    Félicitations !

    +

    Wah, t'as été trop fort, top là ! Tu connais maintenant la base.

    +

    Jette un oeil aux leçons Basic Ruby pour apprendre des choses encore différentes et excitantes !!

    From 58befb61fec51bc56076dce91f9497bcb4b5b9ea Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Wed, 11 Jul 2012 15:04:46 +0200 Subject: [PATCH 29/31] relecture + reencoding --- .../fr/hacketyhack/basic_programming.html | 114 +++++++++--------- 1 file changed, 56 insertions(+), 58 deletions(-) diff --git a/public/help/fr/hacketyhack/basic_programming.html b/public/help/fr/hacketyhack/basic_programming.html index b89dc99..53d790f 100644 --- a/public/help/fr/hacketyhack/basic_programming.html +++ b/public/help/fr/hacketyhack/basic_programming.html @@ -35,54 +35,52 @@

    Bases de la Programmation

    -

    Bonjour tous!

    -

    Premier round

    -

    Bon, tu es l pour apprendre comment hacker du code avec les meilleurs d'entre eux hein ? Cool, t'es au bon endroit. C'est la premire des leons que je dois partager avec toi, et a commence maintenant.

    -

    Je tiens t'aider partir du bon pied dans la programmation, donc on va commencer par parler un peu de ce QU'EST la programmation, et ensuite on va commencer crire quelques programmes basiques pour dessiner des trucs cools l'cran. Ca vous plait ? Eh bien c'est parti !

    +

    Bonjour à tous !

    +

    Premier Round

    +

    Bon, tu es là pour apprendre comment hacker du code avec les meilleurs d'entre eux hein ? Cool, t'es au bon endroit. C'est la première des leçons que je dois partager avec toi, et ça commence maintenant.

    +

    Je tiens à t'aider à partir du bon pied dans la programmation, donc on va commencer par parler un peu de ce qu'EST la programmation, et ensuite on va commencer à écrire quelques programmes basiques pour dessiner des trucs cools à l'écran. Ca te plaît ? Eh bien c'est parti !

    - - -

    Parlons programmation!

    -

    Tout est une question d'instructions

    -

    Quand tu te mets la programmation, tout est question d'algorithmes. C'est un mot bien compliqu pour dire "une liste d'instructions". Chaque programme est simplement une grosse liste d'instructions que l'ordinateur doit accomplir.

    -

    Tu peux peu prt tout traduire en liste d'instructions si tu y rflchis. La plupart du temps, tu as as tellement de pratique tout dcouper en tape sans y penser... Tu le fais simplement, naturellement.

    +

    Parlons Programmation !

    +

    Tout est une Question d'Instructions

    +

    Quand tu te mets à la programmation, tout est question d'algorithmes. C'est un mot bien compliqué pour dire "une liste d'instructions". Chaque programme est simplement une grosse liste d'instructions que l'ordinateur doit accomplir.

    +

    Tu peux à peu près tout traduire en liste d'instructions si tu y réfléchis. La plupart du temps, tu es habitué à tout découper en étapes sans y penser... Tu le fais simplement, naturellement.

    -

    L'ordinateur est simple

    -

    Malheureusement, les ordinateurs sont en effet assez simple. C'est sans doute contraire tout ce que tu as pu entendre, mais c'est la vrit. Mme si l'on compare les ordinateurs quelque chose comme notre cerveau, c'est une analogie assez simpliste. En ralit les ordinateurs sont juste trs forts effectuer des tches simples et ennuyeuses, encore et encore, trs vite. Ils n'ont pas de pense propre!

    -

    C'est la raison pour laquelle les ordinateurs ont l'air si complexes. Ils suivent aveuglment les ordres reus, en ne sachant nullement si les instructions sont bonnes ou mauvaises. C'est dur de penser avec des mots si simples !

    +

    L'Ordinateur est Simple

    +

    Malheureusement, les ordinateurs sont en effet assez simples. C'est sans doute contraire à tout ce que tu as pu entendre, mais c'est la vérité. Même si l'on compare les ordinateurs à quelque chose comme notre cerveau, c'est une analogie assez simpliste. En réalité les ordinateurs sont juste très forts pour effectuer des tâches simples et ennuyeuses, encore et encore, très vite. Ils n'ont pas de pensée propre !

    +

    C'est la raison pour laquelle les ordinateurs ont l'air si complexes. Ils suivent aveuglément les ordres reçus, en ne sachant nullement si les instructions sont bonnes ou mauvaises. C'est dur de penser avec des mots si simples !

    -

    Expliquez vous bien

    -

    Il est important de se rappeler que tu dois tout expliquer entirement l'ordinateur quand tu programmes. Il ne peut pas interprter ce que tu essayes de dire, alors tu dois le lui dire clairement !

    -

    Cela demande un peu de pratique, donc on va commencer par quelques exercices en nous exprimant en termes trs simples. C'est un peu comme essayer d'expliquer les maths un jeune enfant: tu dois aller doucement, vrifier trois fois ton travail, et avoir une certaine patience quand il n'a pas tout compris.

    +

    Explique-Toi Bien

    +

    Il est important de se rappeler que tu dois tout expliquer entièrement à l'ordinateur quand tu programmes. Il ne peut pas interpréter ce que tu essayes de dire, alors tu dois le lui dire clairement !

    +

    Cela demande un peu de pratique, donc on va commencer par quelques exercices en nous exprimant en termes très simples. C'est un peu comme essayer d'expliquer les maths à un jeune enfant : tu dois aller doucement, vérifier trois fois ton travail, et avoir une certaine patience quand il n'a pas tout compris.

    -

    Listes d'intructions

    -

    Une liste de choses faire, pas une liste de courses

    -

    Quand je dis que l'ordinateur suit une liste d'instructions, je veux dire une liste de choses faire, pas une liste de commissions. Ce que j'essaye de dire, c'est que cette liste a un order que l'ordinateur suit. Il effectue chaque tape dans l'ordre, le plus rapidement possible.

    -

    Une liste de courses est un type de liste diffrent. Tu peux choisir n'importe quel lment,et partir du moment o tu as tout fait au moment de quitter, tout va bien. Ce n'est pas du tout ce que l'ordinateur fait.

    +

    Listes d'Instructions

    +

    Une liste de choses à faire, pas une liste de courses

    +

    Quand je dis que l'ordinateur suit une liste d'instructions, je veux dire une liste de choses à faire, pas une liste de commissions. Ce que j'essaye de dire, c'est que cette liste a un ordre que l'ordinateur suit. Il effectue chaque étape dans l'ordre, le plus rapidement possible.

    +

    Une liste de courses est un type de liste différent. Tu peux choisir n'importe quel élément, et à partir du moment où tu as tout fait au moment de quitter, tout va bien. Ce n'est pas du tout ce que l'ordinateur fait.

    -

    Comment dirais-tu une personne de le faire ?

    -

    Un exemple : si tu avais dire en quelques mots une personne comment dessiner un carr sur un papier, comment ferais-tu ?

    -

    Tu n'es pas autoris dire "comme a", ou "de cette faon", c'est trich ! Tu dois lui dtailler chaque action.

    +

    Comment dirais-tu à une personne de le faire ?

    +

    Un exemple : si tu avais à dire en quelques mots à une personne comment dessiner un carré sur un papier, comment ferais-tu ?

    +

    Tu n'es pas autorisé à dire "comme ça", ou "de cette façon", c'est triché ! Tu dois lui détailler chaque action.

    Encore une fois : les ordinateurs sont simples.

    -

    Comment ferais-tu ? As-tu oubli de mentionner la taille de chaque ct du carr ? Si c'est le cas, c'est rat...

    -

    Voil comment je l'aurais fait. Ce n'est pas la seule bonne rponse, c'est juste un exemple :

    +

    Comment ferais-tu ? As-tu oublié de mentionner la taille de chaque côté du carré ? Si c'est le cas, c'est raté...

    +

    Voilà comment je l'aurais fait. Ce n'est pas la seule bonne réponse, c'est juste un exemple :

    1. Pose ton crayon sur le papier.

    2. Dessine vers la droite sur un cm.

    3. Dessine vers le bas d'un cm.

    4. Dessine vers la gauche d'un cm.

    5. Dessine vers le haut d'un cm.

    -

    6. Lve ton crayon du papier.

    +

    6. Lève ton crayon du papier.

    7. C'est fait !

    @@ -91,69 +89,69 @@

    Bases de la Programmation

    Tortues.

    Dessiner... avec des tortues?

    -

    Ok! Assez parl, maintenant on va raliser quelque chose. Tu te demandes quand on va enfin commencer non? Mais c'est trs important de maitriser quelques bases avant...

    -

    On va dire l'ordinateur comment dessiner quelques motifs... avec des tortues.

    -

    Cette tortue un peu particulire tient un crayon. Tu as un morceau de papier. Cette tortue va suivre chacun de tes mots. Mais cette tortue est un peu lente, et a besoin d'instructions bien prcises. Tu te sens prt ?

    +

    OK ! Assez parlé, maintenant on va réaliser quelque chose. Tu te demandes quand on va enfin commencer, non ? Mais c'est très important de maîtriser quelques bases avant...

    +

    On va dire à l'ordinateur comment dessiner quelques motifs... avec des tortues.

    +

    Cette tortue un peu particulière tient un crayon. Tu as un morceau de papier. Cette tortue va suivre chacun de tes mots. Mais cette tortue est un peu lente, et a besoin d'instructions bien précises. Tu te sens prêt ?

    La Tortue et ses commandes

    -

    Nous devons dire Ruby que nous voulons dire la Tortue quoi faire. Pour a, nous avons une commande Turtle. Nous pouvons dire la Turtle deux choses :

    -

    draw: la tortue va suivre nos instructions la vitesse de la lumire, et dessiner l'image entire en un clignement de paupire. -

    start: une fentre intractive va apparatre, ce qui te permettra de voir la tortue se dplacer chaque tape du programme. Tu peux avancer ton rythme, c'est pratique si la tortue ne fait pas ce quoi tu t'attendais. +

    Nous devons dire à Ruby que nous voulons dire à la Tortue quoi faire. Pour ça, nous avons une commande Turtle. Turtle veut dire Tortue en anglais. Nous pouvons dire à la Turtle deux choses :

    +

    draw : la tortue va suivre nos instructions à la vitesse de la lumière, et dessiner l'image entière en un clignement de paupière.

    +

    start : une fenêtre intéractive va apparaître, ce qui te permettra de voir la tortue se déplacer à chaque étape du programme. Tu peux avancer à ton rythme, c'est pratique si la tortue ne fait pas ce à quoi tu t'attendais.

    Ecrivons le !

    Cool. Maintenant tape ceci :

    Turtle.draw

    -

    La priode entre la Turtle et le draw les inter connecte. La programmation a des rgles, tout comme le Franais en a. Tu peux imaginer la Turtle comme un sujet, et draw comme un verbe. Ensemble, ils forment une phrase : Hey la tortue, dessine moi un truc !

    -

    Une fois que tu as tap a, poursuivons en cliquant sur le bouton "Excuter". La tortue bouge si vite en mode draw que tu ne la verras pas, mais je le promets, elle bouge !

    +

    La période entre la Turtle et le draw les interconnecte. La programmation a des règles, tout comme le Français en a. Tu peux imaginer la Turtle comme un sujet, et draw comme un verbe. Ensemble, ils forment une phrase : Hey la tortue, dessine-moi un truc !

    +

    Une fois que tu as tapé ça, poursuivons en cliquant sur le bouton "Exécuter". La tortue bouge si vite en mode draw que tu ne la verras pas, mais je le promets, elle bouge !

    Fait... Ce que je te dis

    Trop cool ! On a au moins une tortue qui bouge. Maintenant, on veut pouvoir lui dire ce qu'elle doit dessiner !

    -

    Tu te rappelles quand on a dit que tous les programmes ne sont que des listes d'instructions ? Dans notre cas, notre programme a seulement une instruction : Turtle dessine quelque chose ! Mais on a besoin de pouvoir donner la Turtle sa propre liste d'instructions.

    -

    Pour ce faire, on va utiliser deux mots : do et end. Ces deux mots runis font une sous-liste de choses, juste pour la Turtle !

    +

    Tu te rappelles quand on a dit que tous les programmes ne sont que des listes d'instructions ? Dans notre cas, notre programme a seulement une instruction : Turtle dessine quelque chose ! Mais on a besoin de pouvoir donner à la Turtle sa propre liste d'instructions.

    +

    Pour ce faire, on va utiliser deux mots : do et end. Ces deux mots réunis font une sous-liste de choses, juste pour la Turtle !

    Modification de l'arrière plan

    -

    Essayons ceci : on peut dire à la Turtle que nous voulons utiliser une couleur d'arrière plan différente en utilisant la commande background. Vérifions :

    +

    Essayons ceci : on peut dire à la Turtle que nous voulons utiliser une couleur d'arrière-plan différente en utilisant la commande background. Vérifions :

    Code inséré automatiquement ici...
    -

    Tape ceci et clic sur "Exécuter" !

    +

    Tape ceci et clique sur "Exécuter" !

    La Tortue a ses ordres

    -

    Beau boulot ! L'arrière plan est maintenant marron. Clic ici pour voir a liste complète de couleurs supportées. -

    C'est aussi la façon dont on fait des listes d'instructions que la Turtle suit. Pour le rendre un peu plus facile à lire, les programmeurs mettent souvent deux espaces devant les sous-listes. Prenez l'habitude dès maintenant, vous me remercierez plus tard !

    +

    Beau boulot ! L'arrière-plan est maintenant marron. Clique ici pour voir a liste complète de couleurs supportées.

    +

    C'est aussi la façon dont on fait des listes d'instructions que la Turtle suit. Pour le rendre un peu plus facile à lire, les programmeurs mettent souvent deux espaces devant les sous-listes. Prends l'habitude dès maintenant, tu me remercieras plus tard !

    Le crayon

    -

    Maintenant que nous avons une couleur d'arrière plan, comment dessiner quelques lignes ? Bon, la première chose dont on a besoin, c'est un crayon. La Turtle traine un crayon avec elle. On peut en changer la couleur avec la commande pencolor.

    +

    Maintenant que nous avons une couleur d'arrière plan, comment dessiner quelques lignes ? Bon, la première chose dont on a besoin, c'est d'un crayon. La Turtle traîne un crayon avec elle. On peut en changer la couleur avec la commande pencolor.

    -

    Dessiner des lignes

    -

    Suite!

    -

    OK, assez tergiversé. Demandons à la tortue de dessiner une ligne ! Voici la mienne. Essaye, et personnalise la avec tes propres couleurs et chiffres !

    +

    Dessiner Des Lignes

    +

    Suite !

    +

    OK, assez tergiversé. Demandons à la tortue de dessiner une ligne ! Voici la mienne. Essaye, et personnalise-la avec tes propres couleurs et chiffres !

    Code inséré automatiquement ici...

    Au fait, 50 est le nombre de pixels que va parcourir la Tortue.

    Tu me fais tourner la tête, chérie !

    -

    Cool, tu as une ligne. Mais quoi faire si tu ne veux pas seuleument faire avancer tout droit ta Turtle ? Eh bien tu peux lui dire de tourner en utilisant les commandes turnleft ou turnright, comme ceci :

    +

    Cool, tu as une ligne. Mais que faire si tu ne veux pas seulement faire avancer tout droit ta Turtle ? Eh bien tu peux lui dire de tourner en utilisant les commandes turnleft ou turnright, comme ceci :

    Code inséré automatiquement ici...

    Essaye ça, et joue un peu avec !

    Si tu te demandes ce que 90 veut dire, c'est le nombre de degrés de rotation effectués par la Tortue.

    I like to move it, move it

    -

    Ok, maintenant on va cuisiner ! Touillons tout ça encore un peu :

    -

    Turtle.draw dit à la Turtle que nous voulons dessiner quelque chose. La période connecte les deux.

    -

    do ... end est une sous-liste de choses. C'est ce que nous voulons faire dessiner à la Turtle. Pas pour le reste de notre programme. +

    Maintenant on va cuisiner ! Touillons tout ça encore un peu :

    +

    Turtle.draw dit à la Turtle que nous voulons dessiner quelque chose. Le point connecte la Tortue avec "draw" (dessiner).

    +

    do ... end est une sous-liste de choses. C'est ce que nous voulons faire dessiner à la Turtle.

    pencolor configure la couleur du crayon que la Turtle transporte, et background configure la couleur de l'arrière plan.

    -

    turnright (ou son frère turnleft) dit à la Turtle " de tourner à droite ou à gauche.

    -

    forward (ou son copain backward) ordonne à la Turtle de bouger.

    +

    turnright (ou son frère turnleft) dit à la Turtle de tourner à droite ou à gauche.

    +

    forward (ou son copain backward) ordonne à la Turtle d'avancer ou reculer.

    Essayons de dessiner un carré

    @@ -168,20 +166,20 @@

    Bases de la Programmation

    -

    Se le répéter

    +

    Se le Répéter

    Encore et encore...

    -

    Mec, ça c'était un peu trop répété ! Mes doigts à moi ont juste du taper forward et turnright !

    -

    J'ai cependant de bonnes nouvelles : j'ai mentionné plus tôt quelque chose au sujet des ordinateurs. Il s'avère que faire des choses répétitives ennuyeuses, c'est un truc où ils sont vraiment bosn ! Ils vont faire la même chose maintes et maintes fois, aussi longtemps que vous voulez si vous le lui demandez gentiment.

    +

    Hé, ça c'était un peu trop répété ! Mes doigts à moi ont juste dû taper forward et turnright !

    +

    J'ai cependant de bonnes nouvelles : j'ai mentionné plus tôt quelque chose au sujet des ordinateurs. Il s'avère que faire des choses répétitives ennuyeuses, c'est un truc pour lequel ils sont vraiment bons ! Ils vont faire la même chose maintes et maintes fois, aussi longtemps que tu veux si tu le lui demandes gentiment.

    -

    Se le se le répéter répéter

    -

    Souvenez vous : notre Turtle connait les nombres. Par exemple :

    +

    Se le Se le Répéter Répéter

    +

    Souviens-toi : notre Turtle connait les nombres. Par exemple :

    Code inséré automatiquement ici...

    Essaye d'exécuter cet exemple. Il dessine aussi un carré ! Wah !

    4.times

    -

    C'est assez simple : 4 peut aussi recevoir des intructions, tout comme notre Turtle. Cette commande répète une liste d'instructions autant de fois que demandé. Fun! Quatre fois. Et le code do ainsi que end montrent quelle liste d'instructions vont avec le 4 plutôt qu'avec la Turtle.

    +

    C'est assez simple : 4 peut aussi recevoir des intructions, tout comme notre Turtle. Cette commande répète une liste d'instructions autant de fois que demandé. Fun ! Quatre fois. Et le code do ainsi que end montrent quelle liste d'instructions vont avec le 4 plutôt qu'avec la Turtle.

    Essaye par toi-même !

    @@ -193,8 +191,8 @@

    Bases de la Programmation

    Résumé

    Félicitations !

    -

    Wah, t'as été trop fort, top là ! Tu connais maintenant la base.

    -

    Jette un oeil aux leçons Basic Ruby pour apprendre des choses encore différentes et excitantes !!

    +

    Wah, t'as été trop fort, tope-la ! Tu connais maintenant la base.

    +

    Jette un oeil aux leçons Bases de Ruby pour apprendre des choses encore différentes et excitantes !!

    From b30fcf93e94ea9eabed5519d83261e0d5e1d6cb5 Mon Sep 17 00:00:00 2001 From: Kanithael Date: Wed, 11 Jul 2012 23:24:55 +0200 Subject: [PATCH 30/31] relecture --- public/help/fr/kidsruby/glossary.html | 4 ++-- public/help/fr/kidsruby/how_to_use.html | 4 ++-- public/help/fr/ruby4kids/lesson_5.html | 4 ++-- public/help/fr/ruby4kids/lesson_6.html | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/help/fr/kidsruby/glossary.html b/public/help/fr/kidsruby/glossary.html index f80a269..a10cb74 100644 --- a/public/help/fr/kidsruby/glossary.html +++ b/public/help/fr/kidsruby/glossary.html @@ -29,14 +29,14 @@

    Glossaire

    caractère : Une unique lettre, nombre ou symbole

    classe : Une classe est un modèle pour créer des objets. Un objet d'une classe donnée est appelée une "instance" de cette classe. Une classe peut contenir des attributs, méthodes, et même d'autres classes !

    méthode : Les méthodes permettent aux classes de faire des choses. Elles sont un ensemble d'instructions, et peuvent retourner une valeur.

    -

    paramètre : Le type de variable entre parenthèses, qui met une ou des limites à la méthode sur laquelle il agit.

    +

    paramètre : Type de variable entre parenthèses, qui met une ou des limites à la méthode sur laquelle il agit.

    chaîne : Une chaîne est un ensemble de n'importe quels caractères (lettres, chiffres, ponctuation) entouré par des guillemets. Les guillemets simples (') et doubles (") sont utilisés pour créer des chaînes. (Source: Why's Poignant Guide)

    icône : Une image sur un écran qui représente un fichier, un répertoire, une fenêtre, une option, ou un programme spécifique. (Source: The Free Dictionary)

    pixel : Un des nombreux tous petits éléments qui font une image, comme sur un dispositif d'affichage. (Source: The Free Dictionary)

    attribut : Une propriété ou caractéristique d'une Entité. Par exemple, les attributs d'une personnes seraient le nom, l'âge, la taille etc... (Source: Computing Students)

    variable : Un symbole utilisé pour représenter les données assignées à la variable. Par exemple, dans x = 50, "x" est la variable et "50" est la donnée.

    objet : Un élément qui peut être sélectionné et manoeuvré, comme par exemple un élément graphique à l'écran. Les objets peuvent inclure des données et les procédures nécessaires pour faire des opérations sur ces données. (Source: The Free Dictionary)

    -

    .png : Signifie "Portable Network Graphics", c'est un format de fichier pour la compression d'images, qui consiste à réduire la taille de l'image sans trop en diminuer la qualité.

    +

    .png : Signifie "Portable Network Graphics", c'est un format de fichier pour la compression d'image, qui consiste à réduire la taille de l'image sans trop en diminuer la qualité.

    instancier : Créer une instance d'une classe. Par exemple, instancier une instance de la classe "Chat" pourrait être "Mon Chat".

    diff --git a/public/help/fr/kidsruby/how_to_use.html b/public/help/fr/kidsruby/how_to_use.html index 381581d..2876b86 100644 --- a/public/help/fr/kidsruby/how_to_use.html +++ b/public/help/fr/kidsruby/how_to_use.html @@ -24,7 +24,7 @@

    Comment Utiliser KidsRuby

    Bienvenue !

    Voici KidsRuby

    Bonjour et bienvenue dans KidsRuby. Nous espérons que tu es prêt à t'amuser à apprendre comment faire faire aux ordinateurs tout ce que tu veux qu'ils fassent.

    -

    Pour utiliser ce système d'"Aide", tu peux cliquer sur un titre de leçon, tout comme tu viens de cliquer sur celui-ci. Tu peux utiliser les liens ci-dessus pour revenir aux leçons "Précédentes" et passer aux "Suivantes". Tu peux aussi cliquer sur le lien "Retour aux Leçons" pour revenir à la liste principale de leçons à tout moment.

    +

    Pour utiliser ce système d'"Aide", tu peux cliquer sur un titre de leçon, tout comme tu viens de cliquer sur celui-ci. Tu peux utiliser les liens ci-dessus pour revenir aux leçons "Précédentes" et passer aux "Suivantes". Tu peux aussi cliquer sur le lien "Retour aux Leçons" pour revenir à tout moment à la liste principale de leçons.

    Qu'est-ce que Ruby?

    @@ -55,7 +55,7 @@

    Comment Utiliser KidsRuby

    Que Faire Ensuite

    Clique sur "Retour aux Leçons", et essaye "Hackety Hack"

    Il était une fois, il y avait quelqu'un d'incroyable nommé "_why the lucky stiff". Il faisait plein de programmes qui utilisaient Ruby, et l'un d'entre eux s'appelait Hackety Hack. Il était conçu pour aider les enfants à apprendre à programmer en Ruby.

    -

    Un jour, _why disparut. Il s'évapora et retourna sûrement vers le monde magique de la programmation dont il venait. Il laissa quelques superbes idées, et nous avons essayé de faire KidsRuby avec son esprit de fun et de découvertes. C'est pourquoi nous avons inclus quelques uns de ses écrits ici pour que tu puisses apprendre. Amuse-toi bien !

    +

    Un jour, _why disparut. Il s'évapora et retourna sûrement vers le monde magique de la programmation dont il venait. Il laissa quelques superbes idées, et nous avons essayé de faire KidsRuby dans cet esprit de fun et de découvertes. C'est pourquoi nous avons inclus quelques uns de ses écrits ici pour que tu puisses apprendre. Amuse-toi bien !

    diff --git a/public/help/fr/ruby4kids/lesson_5.html b/public/help/fr/ruby4kids/lesson_5.html index c1c1395..867cc1c 100644 --- a/public/help/fr/ruby4kids/lesson_5.html +++ b/public/help/fr/ruby4kids/lesson_5.html @@ -108,12 +108,12 @@

    Ruby4Kids - Programmation de Jeux - Leçon 5

    Code inséré automatiquement ici...
    -

    Et donc l'unique différence que tu verras ici est que le code - 10 est changé à + 10, car les nombres augmentent quand tu vas vers le bas :). Et voilà pour se déplacer partout !

    +

    Et donc l'unique différence que tu verras ici est que le code - 10 est changé en + 10, car les nombres augmentent quand tu vas vers le bas :). Et voilà pour se déplacer partout !

    Voici l'intégralité du progrmme que tu devrais avoir écrit jusqu'ici :

    Code inséré automatiquement ici...
    -

    Tu as tellement accompli déjà, alors pourquoi t'arrêter ?! Et si on augmentait la température en ajoutant quelques ballons dans la leçon 6 !

    +

    Tu as tellement accompli déjà, alors pourquoi s'arrêter en si bon chemin ?! Et si on augmentait la température en ajoutant quelques ballons dans la leçon 6 !

    « Précédent Retour aux Leçons diff --git a/public/help/fr/ruby4kids/lesson_6.html b/public/help/fr/ruby4kids/lesson_6.html index d1d4d90..7751936 100644 --- a/public/help/fr/ruby4kids/lesson_6.html +++ b/public/help/fr/ruby4kids/lesson_6.html @@ -45,7 +45,7 @@

    Ruby4Kids - Programmation de Jeux - Leçon 6

    Puis à faire se déplacer ce joueur autour de la fenêtre de jeu. On a aussi limité ses mouvements aux bords de la fenêtre de jeu.

    Alors nous sommes prêts à ajouter encore plus de piment au jeu.

    -

    Et si on jouait au ballon avec notre joueur ? On pourrait avoir une balle qui apparaît comme si elle était lancée dans la fenêtre de jeu, et notre joueur taperait la balle en bougeant avec les touches fléchées.

    +

    Et si on jouait au ballon avec notre joueur ? On pourrait avoir une balle qui apparaitrait comme si elle était lancée dans la fenêtre de jeu, et notre joueur taperait la balle en bougeant avec les touches fléchées.

    Essayons ça. On a déjà une image qui peut être utilisée, incluse dans KidsRuby.

    Commençons par créer une nouvelle classe pour notre ballon :

    @@ -100,9 +100,9 @@

    Ruby4Kids - Programmation de Jeux - Leçon 6

    Code inséré automatiquement ici...
    -

    A présent, le dernier nombre entre parenthèse dans le code ci-dessus se réfère a si la balle va tomber devant ou derrière le joueur. Pour l'instant, on va faire passer la balle devant le joueur, ce qui explique pourquoi le nombre est fixé à 2 plutôt que 1.

    +

    A présent, le dernier nombre entre parenthèse dans le code ci-dessus définit si la balle va tomber devant ou derrière le joueur. Pour l'instant, on va faire passer la balle devant le joueur, ce qui explique pourquoi le nombre est fixé à 2 plutôt que 1.

    -

    Maintenant nous allons dans la classe MyGame et ajouter @ball.draw à la méthode def draw. Cela devrait donner cela :

    +

    Maintenant nous allons dans la classe MyGame et ajouter @ball.draw à la méthode def draw. Cela devrait donner ceci :

    Code inséré automatiquement ici...
    From 141414805a6b14320a21b427d7e96a66cc81ff3a Mon Sep 17 00:00:00 2001 From: Aline Paponaud Date: Fri, 13 Jul 2012 09:41:36 +0200 Subject: [PATCH 31/31] Correction localisation Run --- public/help/fr/hacketyhack/basic_ruby.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/help/fr/hacketyhack/basic_ruby.html b/public/help/fr/hacketyhack/basic_ruby.html index 759dfc7..da22bf8 100644 --- a/public/help/fr/hacketyhack/basic_ruby.html +++ b/public/help/fr/hacketyhack/basic_ruby.html @@ -76,7 +76,7 @@

    Bases de Ruby

    Hello, World ! Bonjour le monde !

    Il y a deux moyens de le faire. Voici le premier : l'alerte :

    Code inséré automatiquement ici...
    -

    Tape ça et appuie sur le bouton "Run".

    +

    Tape ça et appuie sur le bouton "Exécuter".

    alert

    Voyons voir ça de plus près : il y a deux parties principales dans ce petit programme : tu as un alert et un "Hello, world!". Cela fonctionne comme une phrase en anglais : Le mot alert ("alerte") est un verbe et ce qui est entre guillemets est un objet. En Ruby, on appelle les verbes les methods. Le verbe alert veut dire "Mets une boîte d'alerte sur l'écran, et le contenu de la boîte sera n'importe quelle chose que tu me donnes"

    @@ -119,7 +119,7 @@

    Bases de Ruby

    Code inséré automatiquement ici...

    Erreurs

    -

    Sais-tu pourquoi rien ne s'est passé quand tu as appuyé sur Run avant ? C'était parce qu'il y a eu une erreur. Tu peux voir les erreurs dans l'onglet "Sortie".

    +

    Sais-tu pourquoi rien ne s'est passé quand tu as appuyé sur Exécuter avant ? C'était parce qu'il y a eu une erreur. Tu peux voir les erreurs dans l'onglet "Sortie".

    L'erreur qui vient de alert "hey" + 2 est :

    can't convert Fixnum into String

    Qu'est-ce que c'est que ça ?