Skip to content

Commit 8637fd3

Browse files
Averyhmdne
authored andcommitted
de: Section #4 translated
Signed-off-by: Avery <>
1 parent 50d3954 commit 8637fd3

8 files changed

Lines changed: 106 additions & 81 deletions

File tree

translations/de/try_ruby_240.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
11
---
2-
lang: EN
3-
title: A Wee Blank Book
2+
lang: DE
3+
title: Ein kleines leeres Buch
44
answer: ^(splendid|quite_good|mediocre|quite_not_good|abysmal)$
55
load: books = {}
6-
ok: Yes that's a new review
7-
error: Use one of splendid, quite_good, mediocre, quite_not_good, abysmal.<br/>Don't forget the colon
6+
ok: Ja, das ist eine neue Bewertung
7+
error: Verwende einen der Begriffe splendid, quite_good, mediocre, quite_not_good, abysmal.<br/>Den Doppelpunkt nicht vergessen
88
---
99

10-
You've made an empty __hash__. A hash is like an array, only every one of its elements has a name.
10+
Du hast einen leeren __Hash__ erstellt. Ein Hash ist wie ein Array, nur dass
11+
jedes seiner Elemente einen Namen hat.
1112

12-
We're going to stuff some miniature book reviews in our new hash. Here's our rating system:
13+
Wir werden einige Mini-Buchrezensionen in unseren neuen Hash packen. Hier ist
14+
unser Bewertungssystem:
1315

14-
- :splendid &rarr; a masterpiece
15-
- :quite\_good &rarr; enjoyed, sure, yes
16-
- :mediocre &rarr; equal parts great and terrible
17-
- :quite\_not\_good &rarr; notably bad
18-
- :abysmal &rarr; steaming wreck
16+
- :splendid &rarr; ein Meisterwerk
17+
- :quite\_good &rarr; genossen, sicher, ja
18+
- :mediocre &rarr; gleichermaßen gut und schlecht
19+
- :quite\_not\_good &rarr; ausgesprochen schlecht
20+
- :abysmal &rarr; dampfendes Wrack
1921

20-
To rate a book, put the title in square brackets and put the rating after the equals. For example:
22+
Um ein Buch zu bewerten, setze den Titel in eckige Klammern und die Bewertung
23+
nach den Gleichheitszeichen. Zum Beispiel:
2124

2225
books["Gravitys Rainbow"] = :splendid
2326

24-
> By now I think it is only fair to tell you that all lessons in TryRuby are separate from each other.
25-
> So if you go crazy typing book reviews here, you can only use 'em in this lesson.
26-
> If you want to use your reviews in the next lesson you should copy/paste them.
27-
> Don't worry about this too much, each lesson has plenty of predefined stuff for you to play around with.
27+
> Ich denke, es ist nur angemessen, dir zu sagen, dass alle Lektionen in TryRuby
28+
unabhängig voneinander sind.
29+
> Wenn du also wild drauf los tippst, Buchbesprechungen zu schreiben, kannst du
30+
die nur in dieser Lektion verwenden.
31+
> Wenn du deine Bewertungen in der nächsten Lektion verwenden möchtest,
32+
solltest du sie kopieren und einfügen.
33+
> Mach dir nicht zu viele Gedanken darüber, jede Lektion enthält eine Menge
34+
vorgegebener Dinge, mit denen du herumspielen kannst.

translations/de/try_ruby_250.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
---
2-
lang: EN
3-
title: More Bite-Size Reviews
2+
lang: DE
3+
title: Mehr Kurzbewertungen
44
answer: [3-9]
55
load: books = {"Gravitys Rainbow" => :splendid}
6-
ok: See, the length method works on strings, arrays and hashes.
6+
ok: Siehst du, die length-Methode funktioniert bei Strings, Arrays und Hashes.
77
error:
88
---
99

10-
Keep going, fill it up with reviews. And, if you want to see the whole list, just type: __puts books__
10+
Mach weiter, fülle sie mit Bewertungen. Und wenn du die ganze Liste sehen
11+
willst, tippe einfach: __puts books__
1112

12-
Again, the ratings are: :splendid, :quite\_good, :mediocre, :quite\_not\_good and :abysmal.
13+
Noch einmal, die Bewertungen sind: :splendid, :quite\_good, :mediocre,
14+
:quite\_not\_good und :abysmal.
1315

14-
These ratings are not strings. When you place a colon in front of a simple word, you get a __symbol__.
15-
Symbols are cheaper than strings (in terms of computer memory.) If you use a word over and over in your program,
16-
use a symbol. Rather than having thousands of copies of that word in memory, the computer will store the symbol only
17-
__once__.
16+
Diese Bewertungen sind keine Strings. Wenn du einen Doppelpunkt vor ein
17+
einfaches Wort setzt, erhältst du ein __Symbol__. Symbole sind sparsamer als
18+
Strings (in Bezug auf den Computerspeicher). Wenn du ein Wort immer wieder in
19+
deinem Programm benutzt, verwende ein Symbol. Anstatt Tausende von Kopien
20+
dieses Wortes im Speicher zu haben, speichert der Computer das Symbol nur
21+
__einmal__.
1822

19-
More importantly, a symbol tells you that it is not just any old word but has a meaning within your program.
23+
Noch wichtiger ist, ein Symbol zeigt dir, dass es nicht irgendein Wort ist,
24+
sondern eine Bedeutung innerhalb deines Programms hat.
2025

21-
Enter 2 more bookreviews, use __books.length__ to see how many reviews there are in the hash:
26+
Gib 2 weitere Buchrezensionen ein, verwende __books.length__, um zu sehen, wie
27+
viele Rezensionen der Hash enthält:
2228

2329
books["The deep end"] = :abysmal
2430
books["Living colors"] = :mediocre

translations/de/try_ruby_260.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
---
2-
lang: EN
3-
title: Wait, Did I Like Gravity's Rainbow?
2+
lang: DE
3+
title: Warte, hat mir Gravity's Rainbow gefallen?
44
answer: ^(splendid|quite_good|mediocre|quite_not_good|abysmal)$
55
load: books = {"Gravitys Rainbow" => :splendid, "The deep end" => :abysmal, "Living colors" => :mediocre}
6-
ok: I liked it a lot
6+
ok: Es hat mir sehr gut gefallen
77
error:
88
---
99

10-
One great thing about Ruby is that names are often reused, which means fewer names you need to remember.
10+
Eine tolle Sache an Ruby ist, dass Namen oft wiederverwendet werden, was
11+
weniger Namen bedeutet, die man sich merken muss.
1112

12-
Remember how we retrieved items from an array using a number:
13+
Erinnerst du dich daran, wie wir mit Hilfe einer Nummer Elemente aus einem
14+
Array abgerufen haben?
1315
__puts ticket[1]__.
1416

15-
For a hash this works the same way, except we don't use a number to get an element but a name.
17+
Bei einem Hash funktioniert das genauso, nur dass wir keine Nummer, sondern
18+
einen Namen verwenden, um ein Element zu erhalten.
1619

17-
So, if you'd like to look up one of your old reviews, again put the title in the square. But leave off the equals.
18-
Just like this:
20+
Wenn Sie also einen Ihrer alten Beiträge nachschlagen möchten, setzen Sie den
21+
Titel wieder in die eckigen Klammern. Aber lass die Gleichheitszeichen weg.
22+
Etwa so:
1923

2024
puts books["Gravitys Rainbow"]

translations/de/try_ruby_270.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
---
2-
lang: EN
3-
title: Hashes as Pairs
2+
lang: DE
3+
title: Hashes als Paare
44
answer: ^\[".*"\]
55
load: prev
6-
ok: You found the keys
6+
ok: Du hast die Schlüssel gefunden
77
error:
88
---
99

10-
Keep in mind that hashes won't keep things in order. That's not their job. It'll just pair up
11-
two things: a __key__ and a __value__.
10+
Vergiss nicht, dass Hashes nicht für die Reihenfolge der Dinge sorgen. Das ist
11+
nicht ihre Aufgabe. Sie verbinden nur zwei Dinge miteinander: einen __key
12+
(Schlüssel)__ und einen __value (Wert)__.
1213

13-
In your reviews, the book's title is the key and the rating is the value.
14+
In deinen Rezensionen ist der Titel des Buches der Schlüssel und die Bewertung
15+
ist der Wert.
1416

15-
If you want to just see the titles of all the books you've reviewed:
17+
Wenn du nur die Titel aller Bücher sehen willst, die du bewertet hast:
1618

1719
books.keys
1820

19-
You can also try this with .values instead of .keys.
21+
Du kannst es auch mit .values anstelle von .keys ausprobieren.

translations/de/try_ruby_280.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
---
22
lang: EN
3-
title: Are You Harsh?
3+
title: Bist du hart?
44
answer: :mediocre
55
load: books = {"Gravitys Rainbow" => :splendid, "The deep end" => :abysmal, "Living colors" => :mediocre, "Bumblebees" => :mediocre}
6-
ok: Great, wow! You've made a scorecard of your ratings
6+
ok: Toll, wow! Du hast eine Übersicht über deine Bewertungen erstellt
77
error:
88
---
99

10-
So are you giving out harsh, unfair reviews? Let's keep score with a new hash __ratings__:
10+
Verteilst du also harte, unfaire Bewertungen? Lassen Sie uns mit einem neuen
11+
Hash __ratings__ die Punkte zählen:
1112

12-
Then, okay, now let's count up your reviews. Just stay with me. Type:
13+
Dann, okay, zählen wir jetzt deine Bewertungen zusammen. Mach einfach mit.
14+
Tippe:
1315

1416
ratings = Hash.new {0}
1517

@@ -19,9 +21,10 @@ Then, okay, now let's count up your reviews. Just stay with me. Type:
1921

2022
puts ratings
2123

22-
The straight line in the code is the pipe character, probably located right above the Enter key
23-
on your keyboard.
24+
Die gerade Linie im Code ist das Pipe-Zeichen, das sich wahrscheinlich links
25+
neben der Y-Taste auf deiner Tastatur befindet.
2426

25-
That _+= 1_ line means: increase the value by 1.
27+
Die Zeile _+= 1_ bedeutet: Erhöhe den Wert um 1.
2628

27-
Don't worry if you don't understand everything that is going on here. It will be revealed later.
29+
Mach dir keine Sorgen, wenn du nicht alles verstehst, was hier vor sich geht.
30+
Es wird später erklärt werden.

translations/de/try_ruby_290.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
---
2-
lang: EN
3-
title: A Tally
2+
lang: DE
3+
title: Ein Strichliste
44
answer: \w+
55
ok: Yodelay!
66
error:
77
---
88

9-
One of the amazing new things we've just used is a __block__. We're going to explore these more
10-
in this and the next lesson. But, basically, a block is a bit of Ruby code surrounded by curly
11-
braces.
9+
Eines der tollen neuen Dinge, die wir gerade benutzt haben, ist ein __Block__.
10+
Wir werden sie in dieser und in der nächsten Lektion genauer betrachten. Aber
11+
im Grunde ist ein Block ein Stück Ruby-Code, das von geschweiften Klammern
12+
umgeben ist.
1213

13-
Let's try another block:
14+
Probieren wir einen anderen Block aus:
1415

1516
5.times { print "Odelay! " }
1617

17-
Blocks are always attached to methods. Like the __times__ method, which takes the block and runs
18-
the code over and over. (In our example: five times.)
18+
Blöcke sind immer mit Methoden verbunden. Wie die Methode __times__, die den
19+
Block nimmt und den Code immer wieder ausführt. (In unserem Beispiel: fünfmal.)

translations/de/try_ruby_300.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
---
2-
lang: EN
3-
title: Have you got the time?
2+
lang: DE
3+
title: Hast du die Zeit?
44
answer: ^[0-9]$
5-
ok: You timed it just right!
6-
error: Run the block 0 to 9 times
5+
ok: Du hast genau das richtige Timing!
6+
error: Führe den Block 0 bis 9 Mal aus
77
---
88

9-
As we saw in the first example with a block (when counting ratings) we can pass a value to the block. Which
10-
values are __passed__ is determined by the method that is running the block.
9+
Wie wir im ersten Beispiel mit einem Block (beim Zählen von Bewertungen)
10+
gesehen haben, können wir einen Wert an den Block übergeben. Welche Werte
11+
__übergeben__ werden, hängt von der Methode ab, die den Block ausführt.
1112

12-
The values that are __received__ by the block are placed in the variable name at the beginning of the block,
13-
between two pipe symbols: |
13+
Die Werte, die vom Block __empfangen__ werden, stehen im Variablennamen am
14+
Anfang des Blocks, zwischen zwei Pipe-Symbolen: |
1415

15-
Let's try that with this block:
16+
Versuchen wir das mal mit diesem Block:
1617

1718
5.times { |time|
1819
puts time
1920
}
2021

21-
Here, method __.times__ sends a value to variable __|time|__. But note that variable time is only known within the block.
22+
Hier sendet die Methode __.times__ einen Wert an die Variable __|time|__. Aber
23+
beachte, dass die Variable time nur innerhalb des Blocks bekannt ist.
2224

23-
> Did you notice that you can split code over multiple lines. This makes it a bit easier to read.
25+
> Hast du gemerkt, dass du den Code über mehrere Zeilen aufteilen kannst? Das
26+
macht es etwas einfacher zu lesen.

translations/de/try_ruby_310.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
---
2-
lang: EN
3-
title: Now Arriving at Summary #4
2+
lang: DE
3+
title: Wir kommen zur Zusammenfassung #4
44
answer:
55
class: stretcher chapmark
66
ok:
77
error:
88
---
99

10-
This last lesson was a bit longer. You've probably used up three minutes learning about:
10+
Diese letzte Lektion war ein bisschen länger. Du hast sicher bis zu drei Minuten damit verbracht, etwas zu lernen über:
1111

1212
### Hashes
13-
The little dictionary with the curly pages: __{}__
13+
Das kleine Wörterbuch mit den geschweiften Seiten: __{}__
1414

15-
### Symbols
16-
Tiny, efficient code words with a colon, like: __:splendid__
15+
### Symbole
16+
Kleine, effiziente Codewörter mit einem Doppelpunkt, wie: __:splendid__
1717

18-
### Blocks
19-
Chunks of code which can be tacked on to many of Ruby's methods. Here's the code you used to
20-
build a scorecard:
18+
### Blöcke
19+
Codestücke, die an viele der Methoden von Ruby angehängt werden können. Hier ist der Code, den du verwendet hast, um eine Übersicht über die Bewerungen zu erstellen:
2120
__books.values.each { |rate| ratings[rate] += 1 }__
2221

23-
### Next
24-
In the next lesson we will delve a little bit deeper into methods.
22+
### Als nächstes
23+
In der nächsten Lektion werden wir uns ein wenig näher mit Methoden beschäftigen.

0 commit comments

Comments
 (0)