forked from GDQuest/learn-gdscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson-7-member-variables.pot
282 lines (250 loc) · 9.53 KB
/
lesson-7-member-variables.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
# Translations template for Learn GDScript From Zero.
# Copyright (C) 2022 GDQuest
# This file is distributed under the same license as the Learn GDScript From
# Zero project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
#
#, 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: 2022-02-18 15:02+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.9.0\n"
#: course/lesson-7-member-variables/lesson.tres:14
msgid ""
"In this lesson, we take a first look at variables.\n"
"\n"
"In games, you need to keep track of many values that change over time:\n"
"\n"
"- The player's score.\n"
"- Every character or enemy's health.\n"
"- The last checkpoint.\n"
"\n"
"And so much more. You need to store, retrieve, and update those values.\n"
"\n"
"We call those values [i]variables[/i]. Variables are labels you use to "
"keep track of values that vary over time. Here's an example of a variable"
" tracking a character or monster's health."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:44
msgid ""
"The line above defines a new variable named [code]health[/code] and "
"assigns it a starting value of [code]100[/code] (that's what the equal "
"sign does, more on that below).\n"
"\n"
"Function parameters, which you saw in the previous lesson, are another "
"example of variables."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:56
msgid ""
"In this lesson, we start using variables built into Godot. They're a "
"particular kind called [i]member variables[/i].\n"
"\n"
"Member variables are values attached to a game entity. They're useful "
"properties like the [code]position[/code], [code]rotation[/code], and "
"[code]scale[/code] of a character.\n"
"\n"
"In a previous lesson, we saw how we could use the [code]rotate()[/code] "
"function to rotate our character."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:80
msgid ""
"This function increases or decreases the value of the entity's "
"[code]rotation[/code] member variable.\n"
"\n"
"Say we want to reset the rotation to [code]0[/code] and make the "
"character upright. Using the [code]rotate()[/code] function can prove "
"difficult: you need to know the character's exact current angle to cancel"
" it out.\n"
"\n"
"It's much easier to use the member variable rather than the function.\n"
"\n"
"The following code assigns the value [code]0[/code] to the character's "
"rotation, resetting its angle and making it upright."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:106
msgid ""
"Notice how we use the equal sign ([code]=[/code]) to change the value of "
"a variable."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:114
msgid "What's a variable?"
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:117
msgid ""
"Variables are labels you use to access values that change over time.\n"
"\n"
"You can also use them to put a name on a value you want to reuse "
"throughout your code. It makes your code easier to read and to change."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:120
#: course/lesson-7-member-variables/lesson.tres:121
msgid "A label you use to keep track of a value that can change."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:120
msgid "A function that varies over time."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:120
msgid "A decimal number."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:128
msgid "Accessing sub-variables with the dot"
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:130
msgid ""
"In video games, you will see many member variables that have sub-values.\n"
"\n"
"For example, the [code]position[/code] we mentioned has two coordinates: "
"[code]x[/code] and [code]y[/code].\n"
"\n"
"It's the same for the [code]scale[/code]: it has [code]x[/code] and "
"[code]y[/code] sub-variables. They respectively control the horizontal "
"and vertical size of the game entity.\n"
"\n"
"To access those X and Y sub-components, you add a dot (\".\") after the "
"variable name.\n"
"\n"
"The code below places the entity at [code]180[/code] pixels on the x-axis"
" and [code]120[/code] pixels on the y-axis."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:158
msgid ""
"Notice how we use the equal sign (\"=\") to assign the numbers on the "
"right to the sub-variables on the left.\n"
"\n"
"Unlike in maths, in computer programming, the equal sign (\"=\") does not"
" mean \"is equal to.\"\n"
"\n"
"Instead, it means \"assign the result of the expression on the right to "
"the variable on the left\". We assign values so often in code that we "
"prefer to reserve the equal sign for that."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:170
msgid "In games, the Y-axis is positive going down"
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:172
msgid ""
"Note that in games, assuming your character's position starts at (0, 0), "
"the code above moves the entity [code]180[/code] pixels to the right and "
"[code]120[/code] pixels down.\n"
"\n"
"In math, the y-axis is generally positive going up by convention.\n"
"\n"
"The convention is the [i]opposite[/i] in video games and many computer "
"applications: the y-axis is positive going down."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:196
msgid ""
"This may be confusing if you only saw the y-axis pointing up in math "
"classes. However, in math, axes go in any direction. They don't even have"
" to be perpendicular.\n"
"\n"
"On the computer, the position (0, 0) happens to correspond to the top-"
"left of your computer screen. It then makes sense for coordinates to be "
"positive when going towards the bottom-right corner.\n"
"\n"
"This leads to another question: why is position zero the top left of the "
"screen? This is due to computer and TV displays history: they would "
"calculate and display pixels starting from the top left corner and moving"
" towards the bottom right corner."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:210
msgid ""
"Let's look at one last example before moving on to the practice. The "
"following code makes the character 1.5 times its starting size."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:228
msgid "How do you access sub-variables?"
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:229
msgid ""
"Variables often hold sub-values, like the [code]position[/code] has two "
"sub-variables: [code]x[/code] and [code]y[/code]. How would you access "
"the [code]x[/code], for example?"
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:231
msgid ""
"To access a sub-variable, you need to write a dot between the parent "
"variable name and the sub-variable name.\n"
"\n"
"For example, to access the [code]x[/code] sub-variable of the "
"[code]position[/code] variable, you'll write [code]position.x[/code]."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:234
#: course/lesson-7-member-variables/lesson.tres:235
msgid "You write a dot (\".\") between the variable and the sub-variable name."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:234
msgid ""
"You write an arrow (\"->\") between the variable and the sub-variable "
"name."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:234
msgid "You write a slash (\"/\") between the variable and the sub-variable name."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:244
msgid ""
"In a future lesson, we'll explain why and how those variables have sub-"
"variables.\n"
"\n"
"For now, just know you can use the dot to access them.\n"
"\n"
"We'll tell you which variables have sub-components and what their names "
"are.\n"
"\n"
"In the next lessons, you'll create your own variables and do operations "
"on them to add or remove [code]score[/code], [code]health[/code], you "
"name it.\n"
"\n"
"For now, let's practice accessing variables."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:260
msgid "Draw a rectangle at a precise position"
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:261
msgid ""
"Draw a rectangle of 200 by 120 pixels at the X position of 120 pixels and"
" Y position of 100 pixels.\n"
"\n"
"You need to replace the numbers in the code editor to draw the correct "
"rectangle."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:273
msgid ""
"Use the position member variable and its sub-variables to change the "
"rectangle's position."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:278
msgid "Draw rectangles at different positions"
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:279
msgid ""
"Draw three squares of size 100 by 100 that are 100 pixels apart on the "
"horizontal axis. In other words, there should be a 100-pixel gap between "
"two squares.\n"
"\n"
"You should draw the squares starting at the position (100, 100). This "
"means you should position the first square at 100 on the X axis and 100 "
"on the Y axis.\n"
"\n"
"Remember you need to use the equal sign ([code]=[/code]) to change the "
"value of a variable, like the turtle's position.\n"
"\n"
"Write your code inside the [code]run()[/code] function so the computer "
"can recognize it."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:293
msgid ""
"Now you can place and draw one rectangle, how about placing several? To "
"really get the hang of properties."
msgstr ""
#: course/lesson-7-member-variables/lesson.tres:297
msgid "Introduction to Member Variables"
msgstr ""