Skip to content

Commit 2decb84

Browse files
committed
Create initial translation files for en, fr, ru, ko
1 parent 915df27 commit 2decb84

48 files changed

Lines changed: 6632 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.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
#
2+
msgid ""
3+
msgstr ""
4+
"Project-Id-Version: Introduction to Programming with Python 0.1\n"
5+
"Report-Msgid-Bugs-To: \n"
6+
"POT-Creation-Date: 2013-10-25 09:37\n"
7+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9+
"Language-Team: LANGUAGE <LL@li.org>\n"
10+
"MIME-Version: 1.0\n"
11+
"Content-Type: text/plain; charset=UTF-8\n"
12+
"Content-Transfer-Encoding: 8bit\n"
13+
14+
#: ../../../source/conditional_loops.rst:2
15+
msgid "Conditional Loops"
16+
msgstr ""
17+
18+
#: ../../../source/conditional_loops.rst:4
19+
msgid "Introduction"
20+
msgstr ""
21+
22+
#: ../../../source/conditional_loops.rst:6
23+
msgid ""
24+
"Conditional loops are way to repeat something while a certain condition is "
25+
"satisfied, or **True**. If the condition is always satisfied (never becomes "
26+
"**False**), the loop can become infinite. If the condition starts off false,"
27+
" the code in the loop will never run! In Python conditional loops are "
28+
"defined with the ``while`` statement::"
29+
msgstr ""
30+
31+
#: ../../../source/conditional_loops.rst:23
32+
msgid "We call this part of the code the 'conditional': ``'.' not in word``"
33+
msgstr ""
34+
35+
#: ../../../source/conditional_loops.rst:25
36+
msgid ""
37+
"Whether the conditional return True or not determines whether the code "
38+
"inside the ``while`` loop runs."
39+
msgstr ""
40+
41+
#: ../../../source/conditional_loops.rst:28
42+
msgid ""
43+
"Read the code above, and see if you can summarise in your head what it what "
44+
"it do (what its final output will be)."
45+
msgstr ""
46+
47+
#: ../../../source/conditional_loops.rst:31
48+
msgid ""
49+
"Then copy it into a file, say :file:`sentence.py` and run it - see exactly "
50+
"what it does. Does that match up with what you thought?"
51+
msgstr ""
52+
53+
#: ../../../source/conditional_loops.rst:36
54+
msgid ""
55+
"If you are using Python 2, you will need to replace ``input`` with "
56+
"``raw_input`` to run the program correctly."
57+
msgstr ""
58+
59+
#: ../../../source/conditional_loops.rst:40
60+
msgid "Turtle prison"
61+
msgstr ""
62+
63+
#: ../../../source/conditional_loops.rst:43
64+
#: ../../../source/conditional_loops.rst:87
65+
msgid "Exercise"
66+
msgstr ""
67+
68+
#: ../../../source/conditional_loops.rst:45
69+
msgid ""
70+
"The turtle has been up to its usual tricks again, robbing liqour stores and "
71+
"building up huge gambling debts. It's time for turtle to be put into a cell "
72+
"that it can't get out of."
73+
msgstr ""
74+
75+
#: ../../../source/conditional_loops.rst:49
76+
msgid ""
77+
"Let's make a new version of ``forward()``. One that will turn the turtle "
78+
"around if it tries to go further than 100 from the origin. We'll need a "
79+
"``while`` loop, and some new turtle functions:"
80+
msgstr ""
81+
82+
#: ../../../source/conditional_loops.rst:53
83+
msgid "``turtle.distance(0,0)`` - Distance of the turtle from the origin"
84+
msgstr ""
85+
86+
#: ../../../source/conditional_loops.rst:54
87+
msgid "``turtle.towards(0,0)`` - The angle to get back to origin"
88+
msgstr ""
89+
90+
#: ../../../source/conditional_loops.rst:55
91+
msgid "``turtle.setheading(angle)`` - Directly sets the turtle direction"
92+
msgstr ""
93+
94+
#: ../../../source/conditional_loops.rst:57
95+
msgid ""
96+
"You could try playing with a turtle in the interpreter and using these "
97+
"functions to check exactly what they do, if you like."
98+
msgstr ""
99+
100+
#: ../../../source/conditional_loops.rst:60
101+
msgid ""
102+
"Now you will need to implement the prison logic using these turtle "
103+
"functions, perhaps a ``while`` loop and a bit of conditional logic. It's a "
104+
"bit of a stretch but keep at it! Don't be afraid to talk it out with a coach"
105+
" or another student."
106+
msgstr ""
107+
108+
#: ../../../source/conditional_loops.rst:66
109+
#: ../../../source/conditional_loops.rst:104
110+
msgid "Solution"
111+
msgstr ""
112+
113+
#: ../../../source/conditional_loops.rst:80
114+
msgid "Draw a spiral"
115+
msgstr ""
116+
117+
#: ../../../source/conditional_loops.rst:82
118+
msgid ""
119+
"Loops can be interrupted with the ``break`` statement. This is especially "
120+
"useful if you write an *infinite loop*, which is a loop where the "
121+
"conditional is always **True**."
122+
msgstr ""
123+
124+
#: ../../../source/conditional_loops.rst:89
125+
msgid ""
126+
"Write a ``while`` loop with a condition that is always **True** to draw a "
127+
"spiral. Interrupt the loop when the turtle reaches a certain distance from "
128+
"the center. Use the function ``turtle.distance(x, y)`` to get the turtle's "
129+
"distance to the point defined by the coordinates ``x`` and ``y``."
130+
msgstr ""
131+
132+
#: ../../../source/conditional_loops.rst:94
133+
msgid ""
134+
"To do this you will need the ``turtle.xcor()`` and ``turtle.ycor()`` "
135+
"functions, which return the position of the turtle in X and Y axes "
136+
"respectively."
137+
msgstr ""
138+
139+
#: ../../../source/conditional_loops.rst:100
140+
msgid ""
141+
"To draw a spiral, the turtle has to rotate by a constant value and move "
142+
"forward by an increasing value."
143+
msgstr ""
144+
145+
#: ../../../source/conditional_loops.rst:120
146+
msgid "Bonus"
147+
msgstr ""
148+
149+
#: ../../../source/conditional_loops.rst:122
150+
msgid ""
151+
"Can you make a conditional for this loop, so you don't need the infinite "
152+
"loop ``while True`` or the ``break``? Which version do you find easier to "
153+
"understand?"
154+
msgstr ""
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
#
2+
msgid ""
3+
msgstr ""
4+
"Project-Id-Version: Introduction to Programming with Python 0.1\n"
5+
"Report-Msgid-Bugs-To: \n"
6+
"POT-Creation-Date: 2013-10-25 09:37\n"
7+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9+
"Language-Team: LANGUAGE <LL@li.org>\n"
10+
"MIME-Version: 1.0\n"
11+
"Content-Type: text/plain; charset=UTF-8\n"
12+
"Content-Transfer-Encoding: 8bit\n"
13+
14+
#: ../../../source/conditionals.rst:2
15+
msgid "Conditional statements"
16+
msgstr ""
17+
18+
#: ../../../source/conditionals.rst:5
19+
msgid "Introduction"
20+
msgstr ""
21+
22+
#: ../../../source/conditionals.rst:7
23+
msgid ""
24+
"So far we have accomplished predefined tasks, but in all honesty we were "
25+
"accomplishing no better than old-time music boxes following one set of "
26+
"instructions to the end. What makes programming so much more powerful are "
27+
"conditional statements. This is the ability to *test* a variable against a "
28+
"value and act in one way if the condition is met by the variable or another "
29+
"way if not. They are also commonly called by programmers *if statements*."
30+
msgstr ""
31+
32+
#: ../../../source/conditionals.rst:15
33+
msgid ""
34+
"To know if a condition is *True* of *False*, we need a new type of data: the"
35+
" booleans. They allow logical operations. A logic statement or operation can"
36+
" be evaluated to be *True* or *False*. Our conditional statement can then be"
37+
" understood like this:"
38+
msgstr ""
39+
40+
#: ../../../source/conditionals.rst:20
41+
msgid "**if** *(a condition evaluates to True)*:"
42+
msgstr ""
43+
44+
#: ../../../source/conditionals.rst:21
45+
msgid "*then do these things only for 'True'*"
46+
msgstr ""
47+
48+
#: ../../../source/conditionals.rst:23
49+
msgid "**else**:"
50+
msgstr ""
51+
52+
#: ../../../source/conditionals.rst:23
53+
msgid "*otherwise do these things only for 'False'*."
54+
msgstr ""
55+
56+
#: ../../../source/conditionals.rst:25
57+
msgid ""
58+
"The condition can be anything that evaluates as *True* or *False*. "
59+
"Comparisons always return *True* or *False*, for example ``==`` (equal to), "
60+
"``>`` (greater than), ``<`` (less than.)"
61+
msgstr ""
62+
63+
#: ../../../source/conditionals.rst:29
64+
msgid ""
65+
"The **else** part is optional. If you leave it off, nothing will happen if "
66+
"the conditional evaluates to 'False'."
67+
msgstr ""
68+
69+
#: ../../../source/conditionals.rst:34
70+
msgid "Examples"
71+
msgstr ""
72+
73+
#: ../../../source/conditionals.rst:36
74+
msgid ""
75+
"Here are some examples. You may want to read them over line-by-line and see "
76+
"what you think they do, or run them to be certain::"
77+
msgstr ""
78+
79+
#: ../../../source/conditionals.rst:54
80+
msgid "Giving Directions"
81+
msgstr ""
82+
83+
#: ../../../source/conditionals.rst:56
84+
msgid ""
85+
"Python turtles can be very good at following instructions. Let's use the "
86+
"``input()`` function to ask the user for a direction to move the turtle. To "
87+
"keep things easy we will only accept two instructions: \"left\" and "
88+
"\"right\"."
89+
msgstr ""
90+
91+
#: ../../../source/conditionals.rst:63
92+
msgid "Using Python 2? The ``input()`` function is called ``raw_input()``."
93+
msgstr ""
94+
95+
#: ../../../source/conditionals.rst:65
96+
msgid "It's much easier to define this as a function, like so::"
97+
msgstr ""
98+
99+
#: ../../../source/conditionals.rst:76
100+
msgid ""
101+
"Now whenever you use ``move()`` you are prompted to choose ``left`` or "
102+
"``right``."
103+
msgstr ""
104+
105+
#: ../../../source/conditionals.rst:81
106+
msgid "\"data munging\""
107+
msgstr ""
108+
109+
#: ../../../source/conditionals.rst:83
110+
msgid ""
111+
"In this program, the turtle will only respond to exactly ``left`` or "
112+
"``right`` with no variation. Though ``Left`` or ``LEFT`` might seem the same"
113+
" as ``left`` to a human, that isn't the case when programming. Python has a "
114+
"few utility methods to help with that. A string has the methods "
115+
"``.strip()``, which removes whitespace and ``.lower()`` which makes "
116+
"everything lower-case."
117+
msgstr ""
118+
119+
#: ../../../source/conditionals.rst:90
120+
msgid ""
121+
"Here are some examples to print out the effects of ``.strip()`` and "
122+
"``.lower()``::"
123+
msgstr ""
124+
125+
#: ../../../source/conditionals.rst:99
126+
msgid ""
127+
"Try adding ``direction = direction.strip().lower()`` to the ``move()`` "
128+
"function, to see the effect. We often call this kind of code \"data "
129+
"munging\", and it is very common."
130+
msgstr ""
131+
132+
#: ../../../source/conditionals.rst:103
133+
msgid ""
134+
"Can you add some extra input choices to make the turtle draw other things? "
135+
"How about ``hexagon``?"
136+
msgstr ""
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
msgid ""
3+
msgstr ""
4+
"Project-Id-Version: Introduction to Programming with Python 0.1\n"
5+
"Report-Msgid-Bugs-To: \n"
6+
"POT-Creation-Date: 2013-10-25 09:37\n"
7+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9+
"Language-Team: LANGUAGE <LL@li.org>\n"
10+
"MIME-Version: 1.0\n"
11+
"Content-Type: text/plain; charset=UTF-8\n"
12+
"Content-Transfer-Encoding: 8bit\n"
13+
14+
#: ../../../source/copyright.rst:2
15+
msgid "License"
16+
msgstr ""
17+
18+
#: ../../../source/copyright.rst:4
19+
msgid ""
20+
"This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 "
21+
"Unported License. To view a copy of this license, visit "
22+
"http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative "
23+
"Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, "
24+
"USA."
25+
msgstr ""

0 commit comments

Comments
 (0)