-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathlesson-13-conditions.pot
302 lines (264 loc) · 8.63 KB
/
lesson-13-conditions.pot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# Translations template for Learn GDScript From Zero.
# Copyright (C) 2024 GDQuest
# This file is distributed under the same license as the Learn GDScript From
# Zero project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Learn GDScript From Zero \n"
"Report-Msgid-Bugs-To: https://github.com/GDQuest/learn-gdscript\n"
"POT-Creation-Date: 2024-12-12 14:39+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.1\n"
#: course/lesson-13-conditions/lesson.tres:14
msgid ""
"In previous lessons, we decreased and increased a character's health, but"
" there was no limit to how much health they could have."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:34
msgid ""
"As a result, the player could increase their character's health "
"indefinitely, which we do not want."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:52
msgid "What happens to health when we damage our character?"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:53
msgid ""
"Suppose our character has [code]100[/code] health.\n"
"\n"
"What would the value of health be if we called "
"[code]take_damage(25)[/code] [b]five times[/b]?"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:57
msgid ""
"Calling [code]take_damage(25)[/code] five times would subtract a total of"
" [code]125[/code] from [code]100[/code].\n"
"\n"
"100\n"
"75\n"
"50\n"
"25\n"
"0\n"
"-25"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:65
#: course/lesson-13-conditions/lesson.tres:66
msgid "-25"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:65
msgid "25"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:65
msgid "0"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:75
msgid ""
"We can use conditions to run actions [b]selectively[/b].\n"
"\n"
"Conditions make your code branch into two paths: if the condition is met,"
" the computer will run the corresponding instructions. Otherwise, those "
"instructions will not run at all."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:87
msgid ""
"Video games and other computer programs are full of conditions. For "
"example, game input largely relies on conditions: [i]if[/i] the player "
"presses the button on a gamepad, the character jumps."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:107
msgid ""
"When the computer checks a condition, this is called [b]to evaluate[/b] a"
" condition. All conditions [b]evaluate[/b] to either [code]true[/code] or"
" [code]false[/code].\n"
"\n"
"Either the player is pressing the button, or not. Either the character is"
" touching an enemy, or not.\n"
"\n"
"In our case, [i]if[/i] the health goes over a maximum value, we want to "
"reset it to the maximum.\n"
"\n"
"To define a condition, we use the [code]if[/code] keyword. We write a "
"line starting with [code]if[/code], [ignore]type the condition to "
"evaluate, and end the line with a colon."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:133
msgid ""
"Notice the [code]>[/code] comparison sign. We read this symbol as "
"\"greater than\".\n"
"\n"
"We've seen how function definitions use a colon at the end of the first "
"line and nest content inside.\n"
"\n"
"In GDScript, this syntax is a recurring pattern for all code blocks.\n"
"\n"
"The computer knows which instructions belong to the condition because "
"they are indented."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:157
msgid "Comparisons"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:159
msgid ""
"In the above example, we used the [code]>[/code] syntax to mean \"greater"
" than\".\n"
"\n"
"We can compare numbers in other ways too.\n"
"\n"
"[code]>[/code] means \"greater than\"\n"
"[code]<[/code] means \"less than\"\n"
"[code]==[/code] means \"equal to\"\n"
"[code]!=[/code] means \"not equal to\"\n"
"\n"
"Here's how we might use these in [code]if[/code] statements.\n"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:187
msgid "What does \"pass\" do in the code?"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:189
msgid ""
"The [code]pass[/code] keyword prevents errors in our code when a line "
"cannot be empty.\n"
"\n"
"For example, we must have a line of code after a function definition or "
"an [code]if[/code] block. When you don't know what to write yet, you can "
"use the [code]pass[/code] keyword as a placeholder, and Godot won't give "
"any errors.\n"
"\n"
"In the previous example, if there was nothing below the [code]if[/code] "
"lines, Godot would give us an \"Expected an indented block after 'if' \" "
"error."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:201
msgid "Which of these statements are true?"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:204
msgid ""
"The comparison [code]3 > 1[/code] means \"three is greater than one\" "
"which is [b]true[/b].\n"
"The comparison [code]2 < 3[/code] means \"two is less than three\" which "
"is [b]true[/b].\n"
"The comparison [code]1 != 3[/code] means \"one is not equal to three\" "
"which is [b]true[/b].\n"
"\n"
"The comparison [code]2 == 1[/code] means \"two is equal to one\" which is"
" [b]false[/b].\n"
"The comparison [code]3 < 1[/code] means \"three is less than one\" which "
"is [b]false[/b]."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:210
#: course/lesson-13-conditions/lesson.tres:211
msgid "3 > 1"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:210
msgid "2 == 1"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:210
#: course/lesson-13-conditions/lesson.tres:211
msgid "2 < 3"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:210
#: course/lesson-13-conditions/lesson.tres:211
msgid "1 != 3"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:210
msgid "3 < 1"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:218
msgid "Or else..."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:220
msgid ""
"The [code]if[/code] keyword comes with a complementary [code]else[/code] "
"keyword.\n"
"\n"
"You can write an [code]else[/code] block after an [code]if[/code] block, "
"like so."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:242
msgid ""
"The [code]else[/code] block will run whenever the condition above it "
"isn't met."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:252
msgid ""
"In the following practices, we'll use conditions and improve the way our "
"character's health changes so it has limits."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:260
msgid "Using Comparisons"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:261
msgid ""
"This series of [code]if[/code] statements is all wrong. Change the "
"comparisons so each comparison matches the instruction below it.\n"
"\n"
"Keep the values and statements as they are; only change the comparison "
"signs.\n"
"\n"
"As a reminder, the comparison signs are:\n"
"[code]\n"
"> greater than\n"
"< less than\n"
"== equal to\n"
"!= not equal to\n"
"[/code]\n"
"\n"
"The line [code]health < 5:[/code] means \"health is less than 5\".\n"
"\n"
"Because [code]health = 100[/code], this is false so [code]print(\"health "
"is greater than five.\")[/code] won't run."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:297
msgid ""
"Comparing values allows us to make decisions in code. But there's "
"something wrong with these statements.."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:302
msgid "Limiting Healing"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:303
msgid ""
"We have a heal function that adds an amount to the character's health.\n"
"\n"
"Add to the function so the character's health is never greater than "
"[code]80[/code]."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:315
msgid ""
"As much as we might like, we don't want our robot to have too much "
"health. Limit how much healing the robot can take."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:320
msgid "Preventing Health from Going Below Zero"
msgstr ""
#: course/lesson-13-conditions/lesson.tres:321
msgid ""
"When the robot takes damage, its health can be negative.\n"
"\n"
"We might want to display the health number on screen, like in Japanese "
"RPGs.\n"
"\n"
"We don't want negative numbers. We want to stop at zero instead.\n"
"\n"
"Calling the function should reduce [code]health[/code] by "
"[code]amount[/code].\n"
"\n"
"If [code]health[/code] goes below [code]0[/code], set it to "
"[code]0[/code] again."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:339
msgid ""
"Having a negative health value doesn't make a lot of sense. Make sure the"
" robot's health can't go below zero."
msgstr ""
#: course/lesson-13-conditions/lesson.tres:343
msgid "Conditions"
msgstr ""