forked from GDQuest/learn-gdscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson-8-defining-variables.pot
193 lines (172 loc) · 6.28 KB
/
lesson-8-defining-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
# 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-8-defining-variables/lesson.tres:13
msgid ""
"In the previous lesson, you used a predefined member variable named "
"[code]position[/code].\n"
"\n"
"In your projects, you will need to define your own variables.\n"
"\n"
"Imagine that you need to track the player's health in your game.\n"
"\n"
"They may start with [code]5[/code] health points. When taking a hit, the "
"health should go down to [code]4[/code]. After another hit, it should be "
"[code]3[/code]. And so on.\n"
"\n"
"To keep track of that, you can create a variable named "
"[code]health[/code] to which you add and subtract points.\n"
"\n"
"[i]The example below introduces the [code]print()[/code] function, which "
"outputs its parameter to the output box on the left.[/i]"
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:43
msgid ""
"After executing the first two lines of code, you will have a health "
"variable storing a value of [code]4[/code].\n"
"\n"
"Below, we'll break down how you define new variables and explain the "
"[code]print()[/code] function."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:53
msgid "Defining a variable"
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:55
msgid ""
"To use a variable, you must first define it so the computer registers its"
" name.\n"
"\n"
"To do so, you start a line of code with the [code]var[/code] keyword "
"followed by your desired variable name. Like [code]func[/code] stands for"
" [i]function[/i], [code]var[/code] stands for [i]variable[/i].\n"
"\n"
"The following line defines a [code]health[/code] variable pointing to no "
"value. You can think of it as creating a product label you have yet to "
"stick onto something."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:79
msgid ""
"Like with functions, a member variable's name must be unique inside a "
"given code file. Creating two variables next to each other with the same "
"name will cause an error."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:99
msgid ""
"To use a variable, you want to assign it a starting value. You can do so "
"using the equal sign (=).\n"
"\n"
"This code assigns the value [code]100[/code] to a new variable named "
"[code]health[/code]."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:121
msgid ""
"After defining your variable, you can access its value by writing the "
"variable's name."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:141
msgid ""
"The code above will display the number [code]100[/code] to some output "
"window.\n"
"\n"
"Notice we don't use the [code]var[/code] keyword anymore as we only need "
"it to [i]define[/i] a variable.\n"
"\n"
"Also, once you defined a variable, you can change its value anytime with "
"the equal sign."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:163
msgid "About the print function"
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:165
msgid ""
"The [code]print()[/code] function is generally the first function you "
"learn in academic programming courses.\n"
"\n"
"It sends (\"prints\") the message or value you give it to some output "
"window, often a black window with plain white text."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:177
msgid ""
"Programmers often use [code]print()[/code] to quickly check the value of "
"their variables when their game runs.\n"
"\n"
"In the app, we made a special output window that captures calls to "
"[code]print()[/code] and displays a card to make it friendlier for you."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:199
msgid ""
"Here, the verb [i]print[/i] means \"to send information to display on the"
" screen.\"\n"
"\n"
"The function \"prints\" things on your computer display; It does not "
"relate to printers."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:209
msgid "Variables are like labels"
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:211
msgid ""
"As we hinted above, in GDScript, variables work a bit like labels.\n"
"\n"
"Assigning a value to a variable is like taking your label (the variable) "
"and sticking it onto some item (the value)."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:223
msgid ""
"Like a supermarket has a database of product labels, the computer keeps a"
" list of all variables in your code.\n"
"\n"
"Given the variable name, the computer can look up the attached value.\n"
"\n"
"It has an important consequence. In GDScript, you can stick that label to"
" any other value."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:247
msgid ""
"The above code is like taking a label from the appropriate item and "
"sticking it to the wrong thing:\n"
"\n"
"- At line 1, the [code]health[/code] variable holds a number.\n"
"- From line 2, [code]health[/code] holds text.\n"
"\n"
"The computer will let you do that! The code's syntax and \"grammar\" are "
"correct, but it's not good.\n"
"\n"
"Later on, we'll see how to avoid this issue with [i]variable types[/i]. "
"For now, let's practice creating variables!"
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:262
msgid "Define a health variable"
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:263
msgid ""
"Define a variable named [code]health[/code] with a starting value of "
"[code]100[/code].\n"
"\n"
"You can define variables inside or outside functions. In this practice, "
"you shouldn't create a function."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:272
msgid ""
"In this practice, you'll define your first variable and give it a "
"specific starting value."
msgstr ""
#: course/lesson-8-defining-variables/lesson.tres:276
msgid "Defining Your Own Variables"
msgstr ""