You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Changes
Fixed typos and revised a few documents to increase clarity & cohesion.
## Checks
By submitting your pull request for review, you agree to the following:
- [X] This contribution was created in whole or in part by me, and I
have the right to submit it under the terms of this repository's open
source licenses.
- [X] I understand and agree that this contribution and a record of it
are public, maintained indefinitely, and may be redistributed under the
terms of this repository's open source licenses.
- [X] To the best of my knowledge, all proposed changes are accurate.
---------
width="800" alt="The Localization Settings section highlighting the toggle for Capture text from Experience UI while users play."/>
29
29
30
-
ATC adds text strings to the localization table within 1-2 minutes of encountering the text in the experience. If you do not want ATC to collect a certain text string, such as a name or unique text entry, disable the `Class.GuiBase2d.AutoLocalize|AutoLocalize` property of the text object.
30
+
ATC adds text strings to the localization table within 1–2 minutes of encountering the text in the experience. If you do not want ATC to collect a certain text string, such as a name or unique text entry, disable the `Class.GuiBase2d.AutoLocalize|AutoLocalize` property of the text object.
31
31
32
32
<Alertseverity="info">
33
33
ATC can not capture some experience objects. These objects may require special handling with <ahref="./localizing-with-scripting.md">localization scripts</a>. The current exemptions are:
34
34
<ul>
35
-
<li>The default Roblox leaderboards and chat</li>
36
-
<li>Items or tools owned by a player</li>
35
+
<li>The default Roblox leaderboards and chat</li>
36
+
<li>Items or tools owned by a player</li>
37
37
<li>Images with embedded text</li>
38
38
<li>Badge names and descriptions pulled from the platform</li>
39
-
<li>Game Pass names and descriptions pulled from the platform.</li>
39
+
<li>Pass names and descriptions pulled from the platform</li>
40
40
</ul>
41
41
</Alert>
42
42
43
43
### Text Capture in Studio
44
44
45
-
There may be situations in which you need to immediately capture strings to your translation table. In these cases, you can use the text capture tool in Studio to capture strings while playtesting. These strings will be added to the localization table within 1-2 minutes of encountering them.
45
+
There may be situations in which you need to immediately capture strings to your translation table. In these cases, you can use the text capture tool in Studio to capture strings while playtesting. These strings will be added to the localization table within 1–2 minutes of encountering them.
46
46
47
47
To enable text capture in Studio:
48
48
@@ -92,7 +92,7 @@ You can track your automatic translation quota usage on your experience's locali
width="800" alt="The Localization Languages section depicting the Automatic Translation Quotas at the top of the page, including the date of the monthly quota renewal." />
94
94
95
-
Quotas are calculated on a **per-character** and **per-language basis**. For example, translating the source string "hello" into all 15 automatic translation-supported languages will count as 5 x 15 = 75 characters towards your quota.
95
+
Quotas are calculated on a **per-character** and **per-language basis**. For example, translating the source string "hello" into all 15 automatic translation-supported languages will count as 5×15 (75) characters towards your quota.
96
96
97
97
### Automatic Translation Updates
98
98
@@ -150,6 +150,9 @@ Roblox supports automatic translation between the languages listed below. Curren
150
150
<tr>
151
151
<td>Korean</td>
152
152
</tr>
153
+
<tr>
154
+
<td>Polish</td>
155
+
</tr>
153
156
<tr>
154
157
<td>Portuguese</td>
155
158
</tr>
@@ -165,9 +168,6 @@ Roblox supports automatic translation between the languages listed below. Curren
Dictionaries are tables that associate names or "\*keys\*\*" with a value instead of an index.
8
+
Dictionaries are tables that associate names or **keys** with a value instead of an index.
9
9
10
10
Example:
11
11
@@ -16,11 +16,11 @@ local pet = {
16
16
}
17
17
```
18
18
19
-
Use dictionaries when you need to label values, not just list them in order as an array does —practice using dictionaries in this tutorial by manipulating values associated with a player.
19
+
Use dictionaries when you need to label values, not just list them in order as an array does. Practice using dictionaries in this tutorial by manipulating values associated with a player.
20
20
21
21
## Dictionary Syntax
22
22
23
-
Like arrays, dictionaries are assigned to a variable with curly brackets`{}`. **Keyvalue pairs** are stored on separate lines followed by a comma. Keys and values can be any data type, including strings, numbers, and variable names.
23
+
Like arrays, dictionaries are assigned to a variable with curly brackets`{}`. **Key-value pairs** are stored on separate lines followed by a comma. Keys and values can be any data type, including strings, numbers, and variable names.
24
24
25
25
```lua
26
26
localplayerNames= {
@@ -87,8 +87,9 @@ One everyday use of dictionaries is organizing player or character information.
87
87
### Using Dictionary Values
88
88
89
89
There are two ways to access dictionary values:
90
-
`tableName["keyName"]` -- Note the quotations
91
-
`tableName.keyName`
90
+
91
+
-`tableName["keyName"]` (importantly, note the quotations)
Which style to use usually depends on the purpose of the table. For tables holding a collection of values like a list of players in a server, coders will usually use tableName["keyName"]. For a dictionary used to describe an object, coders are more likely to use tableName.keyName.
104
+
Which style to use usually depends on the purpose of the table. For tables holding a collection of values like a list of players in a server, coders will usually use `tableName["keyName"]`. For a dictionary used to describe an object, coders are more likely to use `tableName.keyName`.
104
105
105
106
## Changing a Dictionary Value
106
107
@@ -158,7 +159,7 @@ Dictionaries can interact with pre-existing variables declared in other parts of
158
159
end
159
160
```
160
161
161
-
4. Insert name into the `playerPoints` dictionary as a key, and set the value, the player's points, to 0.
162
+
4. Insert `name` into the `playerPoints` dictionary as a key, and set the value, the player's points, to 0.
162
163
163
164
```lua
164
165
localfunctionsetPoints(newPlayer)
@@ -169,10 +170,10 @@ Dictionaries can interact with pre-existing variables declared in other parts of
169
170
```
170
171
171
172
<Alertseverity="warning">
172
-
Since `name` was created as a variable, it can be accessed with the actual variable name. If `name`had been simply a key name, it would need to be accessed the same as other strings, playerPoints["name"]
173
+
Since `name` was created as a variable, it can be accessed with the actual variable name. If `name`were a key name, it would need to be accessed the same as other strings: `playerPoints["name"]`.
173
174
</Alert>
174
175
175
-
5. Use `name` to print the name of the player and playerPoints[name] to print the value of the key matching the variable.
176
+
5. Use `name` to print the name of the player and `playerPoints[name]` to print the value of the key matching the variable.
176
177
177
178
```lua
178
179
localfunctionsetPoints(newPlayer)
@@ -183,7 +184,7 @@ Dictionaries can interact with pre-existing variables declared in other parts of
183
184
end
184
185
```
185
186
186
-
6. Run the project and look into the output editor.
187
+
6. Run the project and observe the output.
187
188
188
189
```lua title="Finished script"
189
190
localPlayers=game:GetService("Players")
@@ -208,7 +209,7 @@ Below are some challenges that apply to using dictionaries in different ways. Se
208
209
209
210
- Create a trap part that does damage over time to a player. Once a player touches the trap, damage them, wait, then allow them to be damaged again.
210
211
- Create a function that checks which of two players has the most points by accessing a dictionary.
211
-
- Create a cipher, a system of swapping one word for another to create a "secret" code, for example, how the letter "A" can be swapped with "G", or how the word apple can be swapped for the word orange.
212
+
- Create a cipher, a system of swapping one string for another to create a "secret" code. For example, the letter "A" can be swapped with "G," or the word "apple" can be swapped with "orange."
212
213
213
214
## Dictionaries and pairs()
214
215
@@ -257,7 +258,7 @@ Dictionaries are tables that use key-value pairs instead of indexed values. Dict
257
258
258
259
All keys within a dictionary should use the same data type, but the values can mix data types without issue.
259
260
260
-
The style of how a dictionary is accessed can convey the purpose of a dictionary. A dictionary of enemy properties will likely be accessed with the dot operator, while a list of names will likely use tableName[keyName].
261
+
The way in which a dictionary is accessed can convey its purpose. A dictionary of enemy properties will likely be accessed with the dot operator, while a list of names will likely use `tableName[keyName]`.
261
262
262
263
When using brackets, be careful; key names created within the table must be treated as strings: `tableName["keyName"]`. However, when referencing objects like parts, the quotations are not needed: `tableName[keyName]`.
0 commit comments