-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathlesson-23-append-to-arrays.pot
213 lines (188 loc) · 7.18 KB
/
lesson-23-append-to-arrays.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
# 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-23-append-to-arrays/lesson.tres:13
msgid ""
"In previous lessons, you learned how to create arrays to store lists of "
"values and how to loop over them. It's nice, but you won't go far with "
"only that.\n"
"\n"
"The real strength of arrays is that you can add and remove values from "
"them at any time. It allows you to [i]queue[/i] or [i]stack[/i] data."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:25
msgid "For now, let's take another example."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:33
msgid "Tracking orders in a restaurant management game"
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:35
msgid ""
"You're making a restaurant management game where customers place orders, "
"and you need to handle them as they come.\n"
"\n"
"In this game, customers order meals that end up in a queue. You need to "
"prepare them in the kitchen.\n"
"\n"
"In this example, we simulate orders arriving and getting completed over "
"time."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:59
msgid ""
"How do you keep track of pending and completed orders? With an array!\n"
"\n"
"When a customer purchases a meal, you want to [i]append[/i] it to the "
"array. Then, as you complete a meal in the kitchen and serve it, you want"
" to remove it from the array.\n"
"\n"
"You can do that with the [code]append()[/code] and the "
"[code]pop_front()[/code] functions of the array, respectively.\n"
"\n"
"Try to read the code below before moving on. Don't worry if not "
"everything makes sense, as we'll break it all down."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:85
msgid ""
"Notice how we call some functions by writing a dot after a variable name."
" Like a given value type can have sub-variables, it can also have its own"
" functions.\n"
"\n"
"Functions like [code]append()[/code] and [code]pop_front()[/code] only "
"exist on arrays. That's why to call them, we need to access it from the "
"array using the dot: [code]array.append()[/code]."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:97
msgid ""
"Let's break down the code.\n"
"\n"
"We queue orders in the [code]waiting_orders[/code] array by appending "
"them to the array."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:119
msgid ""
"We can use a string to represent a meal when calling the "
"[code]add_order()[/code] function."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:139
msgid ""
"When completing an order, we remove it from the "
"[code]waiting_orders[/code] array by calling its [code]pop_front()[/code]"
" function. This function gives us the order back, which allows us to "
"assign it to a temporary variable."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:159
msgid "We can then append the order to our [code]completed_orders[/code] array."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:179
msgid ""
"We call arrays like [code]waiting_orders[/code] a [i]queue[/i]: the first"
" element we append to the array is the first one we remove."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:187
msgid "What does #... mean?"
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:189
msgid ""
"We write [code]#...[/code] to represent ellipses in the code. It means "
"\"we're completing the function's code.\" We use that to break down code "
"examples and make them easier to learn from.\n"
"\n"
"The hash sign itself marks the start of a code comment. It's a line the "
"computer will ignore, which is why it typically appears in grey."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:199
msgid "Using arrays as stacks"
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:201
msgid ""
"Another common use of arrays is [i]stacks[/i] of data.\n"
"\n"
"Take a factory management game where you need to retrieve materials from "
"stacks of crates. They arrive at the factory piled up vertically, and you"
" need to take them from top to bottom."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:223
msgid ""
"To take a crate from the back of the array, this time, we use the "
"[code]pop_back()[/code] array function.\n"
"\n"
"This function removes (pops) the last value from the array and returns it"
" to you.\n"
"\n"
"Here we pop the last value of the array and print what's left of the "
"array to demonstrate how the array gets smaller."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:247
msgid ""
"Like [code]pop_front()[/code], the function returns the value removed "
"from the array. You will often store that value in a variable.\n"
"\n"
"The value in question could be the crate's content, which you can then "
"use to give resources to the player.\n"
"\n"
"In the following practices, you will use the [code]append()[/code], "
"[code]pop_front()[/code], and [code]pop_back()[/code] array functions."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:259
msgid "Completing orders"
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:260
msgid ""
"The [code]waiting_orders[/code] array will be filled over time.\n"
"\n"
"Your job is to move orders from the waiting list to the "
"[code]completed_orders[/code] list using the array's "
"[code]append()[/code] and [code]pop_front()[/code] functions.\n"
"\n"
"Remember that the array's [code]pop_front()[/code] function returns the "
"popped value, which allows you to store it in a variable and then pass it"
" to another function."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:277
msgid ""
"Orders are piling up in the kitchen, and we need to clear them fast using"
" the array's [code]pop_front()[/code] function."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:282
msgid "Clearing up the crates"
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:283
msgid ""
"Crates are piling up on the platform. Move them out of the way by popping"
" them from the [code]crates[/code] array.\n"
"\n"
"You need to remove them from top to bottom using the array's "
"[code]pop_back()[/code] function.\n"
"\n"
"Your code should remove all the crates in the array using a while loop.\n"
"\n"
"[b]Careful![/b] if you run a while loop carelessly, you can lock the "
"software.\n"
"\n"
"You can check if the [code]crates[/code] array still contains values by "
"writing [code]while crates:[/code]"
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:303
msgid ""
"Crates are piling up on the platform. Move them out of the way by popping"
" them from their array."
msgstr ""
#: course/lesson-23-append-to-arrays/lesson.tres:307
msgid "Appending and popping values from arrays"
msgstr ""