Skip to content

Commit b12c222

Browse files
Averyhmdne
authored andcommitted
de: init german translation
Signed-off-by: Avery <>
1 parent a2696b0 commit b12c222

57 files changed

Lines changed: 1463 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

translations/de/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Copyright (C)
2+
Try Ruby version 4 German version, 2023, _Avery (onichama)_
3+
4+
## The MIT License
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

translations/de/try_ruby_10.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
lang: EN
3+
title: Got 30 minutes? Give Ruby a shot right now!
4+
answer:
5+
class: stretcher chapmark
6+
ok:
7+
error:
8+
---
9+
10+
Ruby is a programming language from Japan which is revolutionizing
11+
software development.
12+
13+
The beauty of Ruby is found in its balance between simplicity and power.
14+
15+
You can type some Ruby code in the editor and use these buttons to navigate:
16+
17+
- __Run__ &rarr; Executes the code in the editor
18+
- __Copy__ &rarr; Copies the example code to the editor
19+
- __Next__ &rarr; Allows you to go to the next lesson
20+
- __Back__ &rarr; Allows you to return to the previous lesson
21+
22+
<div class="foxes">Click on <strong>Next</strong> to start learning.</div>

translations/de/try_ruby_100.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
lang: EN
3+
title: Stop, You're Barking Mad!
4+
answer: ^\d{1,}$
5+
ok: Only strings can be reversed
6+
error:
7+
---
8+
9+
You can't reverse the number forty. I guess you can hold your monitor up to the mirror, but reversing a number just doesn't make sense.
10+
11+
Ruby has tossed an error message. Ruby is telling you there is no method reverse for numbers.
12+
13+
Maybe if you turn the number into a string first:
14+
15+
40.to_s.reverse

translations/de/try_ruby_110.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
lang: EN
3+
title: Apples are Different From Oranges
4+
answer: \[\]
5+
ok: Great, that's an empty list
6+
error:
7+
---
8+
9+
And numbers are different from strings.
10+
11+
While you can use methods on any object in Ruby, some methods only work on certain types of things.
12+
But you can always convert between different types using Ruby's "to" methods.
13+
14+
- __to_s__ converts things to __s__trings
15+
- __to_i__ converts things to __i__ntegers (numbers)
16+
- __to_a__ converts things to __a__rrays
17+
18+
__What are arrays?!__
19+
20+
They are lists. Type in a pair of brackets:
21+
22+
[]

translations/de/try_ruby_120.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
lang: EN
3+
title: Standing in Line
4+
answer: ^\[([-\.\d]+)(\s*,\s*[-\d\.]+){3,}\]$
5+
ok: Excellent
6+
error: Try adding a fourth number to the list
7+
---
8+
9+
Lists (arrays) store things __in some order__.
10+
11+
Like standing in line for popcorn. You are behind someone and you wouldn't dream of pushing them aside,
12+
right? And the guy behind you, you've got a close eye on him, right?
13+
14+
Here's a list for you. Lottery numbers:
15+
16+
[12, 47, 35]
17+
18+
Try adding a number to this list: type a comma after 35 followed by a number. The space is optional.

translations/de/try_ruby_130.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
lang: EN
3+
title: One Raises Its Hand
4+
answer: ^47$
5+
ok: Okay
6+
error:
7+
---
8+
9+
A list of lottery numbers. Which one is the highest?
10+
11+
Try:
12+
13+
[12, 47, 35].max

translations/de/try_ruby_140.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
lang: EN
3+
title: Tucking a List Away
4+
answer: ^\[(\d+)(,\s*\d+){2,}\]$
5+
ok: Saved!
6+
error:
7+
---
8+
9+
Good, good. But it's annoying to have to retype that list every time you need it, isn't it?
10+
11+
Let's save our numbers inside a ticket like so:
12+
13+
ticket = [12, 47, 35]

translations/de/try_ruby_150.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
lang: EN
3+
title: Now Type Ticket
4+
answer: \[(\d+(, )?){2,}\]
5+
load: ticket = [12, 47, 35]
6+
ok: Restored!
7+
error:
8+
---
9+
10+
Now, type:
11+
12+
ticket

translations/de/try_ruby_160.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
lang: EN
3+
title: Saved, Tucked Away
4+
answer: \[12, 35, 47\]
5+
load: ticket = [12, 47, 35]
6+
ok: You've sorted the list
7+
error:
8+
---
9+
10+
You've hung on to your lotto numbers, tucking them away inside a __variable__ called ticket.
11+
But any other name, like _jimmyslist_, would have been fine too.
12+
13+
Programming, you will discover, is mostly about working with variables.
14+
15+
Let's put your lotto numbers in order, how about?
16+
17+
Use:
18+
19+
ticket.sort!
20+
21+
You had a list. You sorted the list. The ticket variable is now changed.
22+
Did you notice that the _sort!_ method has a big, bright exclamation at the end?
23+
A lot of times Ruby methods shout like that if they alter the variable for good.
24+
It's nothin special, just a mark.

translations/de/try_ruby_170.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
lang: EN
3+
title: Elemental
4+
answer: ^(12|35|47)$
5+
load: ticket = [12, 47, 35]
6+
ok: Ok
7+
error: Almost
8+
---
9+
10+
So we stored our lotto numbers inside variable ticket. How to get 'em out again?
11+
12+
We already saw that we can get the highest number with __max__. Similarly you can
13+
get the __first__ or the __last__ element of the list.
14+
But what if you want a specific element?
15+
16+
### [ ]
17+
Ruby uses the square brackets [ ] to target an element.
18+
The square brackets are very common in Ruby.
19+
They are like sights used to line up a target. Exactly.
20+
These brackets mean, "I am looking for ____" Ready, aim.
21+
22+
Let's get all of our lotto numbers:
23+
24+
puts ticket[0]
25+
puts ticket[1]
26+
puts ticket[2]
27+
28+
Why do we use [0], [1], [2]?
29+
30+
And not [1], [2] and [3]? Is that some kind of Japanese Zen thing?
31+
No, we computer people just like to begin counting from zero. It's not just a Ruby thing,
32+
this _zero based indexing_ is used in most programming languages.
33+
34+
> A little reminder: you can use the __Copy__ button to copy the example code to the editor.

0 commit comments

Comments
 (0)