From 26cdaf1258d31059377e0430385442a51aa1adac Mon Sep 17 00:00:00 2001
From: Alex Turner <35005779+alex-y-z@users.noreply.github.com>
Date: Mon, 25 Nov 2024 13:05:15 -0600
Subject: [PATCH 1/7] Update dictionary tutorial
---
.../coding-5/intro-to-dictionaries.md | 23 +++++++++----------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md b/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
index 25f250b9c..7014fdba5 100644
--- a/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
+++ b/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
@@ -5,7 +5,7 @@ next: /tutorials/fundamentals/coding-5/pairs-and-ipairs
prev: /tutorials/fundamentals/coding-5/making-changes-to-arrays
---
-Dictionaries are tables that associate names or "\*keys\*\*" with a value instead of an index.
+Dictionaries are tables that associate names or **keys** with a value instead of an index.
Example:
@@ -16,11 +16,11 @@ local pet = {
}
```
-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.
+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.
## Dictionary Syntax
-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.
+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.
```lua
local playerNames = {
@@ -87,8 +87,7 @@ One everyday use of dictionaries is organizing player or character information.
### Using Dictionary Values
There are two ways to access dictionary values:
-`tableName["keyName"]` -- Note the quotations
-`tableName.keyName`
+`tableName["keyName"]` — note the quotations — and `tableName.keyName`.
```lua
local enemy = {
@@ -100,7 +99,7 @@ print("The villain " .. enemy["Name"] .. " approaches!")
print("The villain " .. enemy.Name .. " approaches!")
```
-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.
+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`.
## Changing a Dictionary Value
@@ -158,7 +157,7 @@ Dictionaries can interact with pre-existing variables declared in other parts of
end
```
-4. Insert name into the `playerPoints` dictionary as a key, and set the value, the player's points, to 0.
+4. Insert `name` into the `playerPoints` dictionary as a key, and set the value, the player's points, to 0.
```lua
local function setPoints(newPlayer)
@@ -169,10 +168,10 @@ Dictionaries can interact with pre-existing variables declared in other parts of
```
- 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"]
+ 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"]`.
-5. Use `name` to print the name of the player and playerPoints[name] to print the value of the key matching the variable.
+5. Use `name` to print the name of the player and `playerPoints[name]` to print the value of the key matching the variable.
```lua
local function setPoints(newPlayer)
@@ -183,7 +182,7 @@ Dictionaries can interact with pre-existing variables declared in other parts of
end
```
-6. Run the project and look into the output editor.
+6. Run the project and observe the output.
```lua title="Finished script"
local Players = game:GetService("Players")
@@ -208,7 +207,7 @@ Below are some challenges that apply to using dictionaries in different ways. Se
- 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.
- Create a function that checks which of two players has the most points by accessing a dictionary.
-- 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.
+- 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."
## Dictionaries and pairs()
@@ -257,7 +256,7 @@ Dictionaries are tables that use key-value pairs instead of indexed values. Dict
All keys within a dictionary should use the same data type, but the values can mix data types without issue.
-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].
+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]`.
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]`.
From c27a778c79874518448e3cc2e1f5eb49a1898908 Mon Sep 17 00:00:00 2001
From: Alex Turner <35005779+alex-y-z@users.noreply.github.com>
Date: Mon, 25 Nov 2024 13:11:30 -0600
Subject: [PATCH 2/7] Fix link
---
content/en-us/reference/engine/classes/OrderedDataStore.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/content/en-us/reference/engine/classes/OrderedDataStore.yaml b/content/en-us/reference/engine/classes/OrderedDataStore.yaml
index 346840d2f..ae7953c69 100644
--- a/content/en-us/reference/engine/classes/OrderedDataStore.yaml
+++ b/content/en-us/reference/engine/classes/OrderedDataStore.yaml
@@ -41,8 +41,8 @@ methods:
**minValue**/**maxValue** are optional parameters which filter the
results.
- See [Data Stores](../../../cloud-services/data-stores) for request limits
- and descriptions of the error codes.
+ See [Data Stores](../../../cloud-services/data-stores/index.md) for
+ request limits and descriptions of the error codes.
code_samples:
parameters:
- name: ascending
From 0a7be2088b051e91b6456d5e8adacbe8afbbf4a9 Mon Sep 17 00:00:00 2001
From: Alex Turner <35005779+alex-y-z@users.noreply.github.com>
Date: Mon, 25 Nov 2024 13:28:11 -0600
Subject: [PATCH 3/7] Minor adjustments
---
.../localization/automatic-translations.md | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/content/en-us/production/localization/automatic-translations.md b/content/en-us/production/localization/automatic-translations.md
index 293804671..e00afdf77 100644
--- a/content/en-us/production/localization/automatic-translations.md
+++ b/content/en-us/production/localization/automatic-translations.md
@@ -27,22 +27,22 @@ To enable Automatic Text Capture:
-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.
+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.
ATC can not capture some experience objects. These objects may require special handling with localization scripts. The current exemptions are:
-- The default Roblox leaderboards and chat
-- Items or tools owned by a player
+- The default Roblox leaderboards and chat
+- Items or tools owned by a player
- Images with embedded text
- Badge names and descriptions pulled from the platform
-- Game Pass names and descriptions pulled from the platform.
+- Game Pass names and descriptions pulled from the platform
### Text Capture in Studio
-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.
+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.
To enable text capture in Studio:
@@ -92,7 +92,7 @@ You can track your automatic translation quota usage on your experience's locali
-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.
+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.
### Automatic Translation Updates
@@ -150,6 +150,9 @@ Roblox supports automatic translation between the languages listed below. Curren
| Korean |
+
+ | Polish |
+
| Portuguese |
@@ -165,9 +168,6 @@ Roblox supports automatic translation between the languages listed below. Curren
| Turkish |
-
- | Polish |
-
| Vietnamese |
From 84cf121ed290f10d11482b5e46a901df950c98e7 Mon Sep 17 00:00:00 2001
From: Alex Turner <35005779+alex-y-z@users.noreply.github.com>
Date: Mon, 25 Nov 2024 13:38:05 -0600
Subject: [PATCH 4/7] Correct default value
---
content/en-us/reference/engine/classes/DataStoreService.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/en-us/reference/engine/classes/DataStoreService.yaml b/content/en-us/reference/engine/classes/DataStoreService.yaml
index 456198d3b..27e159ae2 100644
--- a/content/en-us/reference/engine/classes/DataStoreService.yaml
+++ b/content/en-us/reference/engine/classes/DataStoreService.yaml
@@ -188,7 +188,7 @@ methods:
given prefix.
- name: pageSize
type: int
- default: 0
+ default: 32
summary: |
**(Optional)** Number of items to be returned in each page. By default
is 32.
From 44e098b6b132e88e995cb9c6867ed52052df4227 Mon Sep 17 00:00:00 2001
From: Alex Turner <35005779+alex-y-z@users.noreply.github.com>
Date: Mon, 25 Nov 2024 13:45:47 -0600
Subject: [PATCH 5/7] Minor adjustments
---
content/en-us/reference/engine/classes/Terrain.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/content/en-us/reference/engine/classes/Terrain.yaml b/content/en-us/reference/engine/classes/Terrain.yaml
index 2aaf272e0..3d0bdb840 100644
--- a/content/en-us/reference/engine/classes/Terrain.yaml
+++ b/content/en-us/reference/engine/classes/Terrain.yaml
@@ -475,7 +475,7 @@ methods:
type: CFrame
default:
summary: |
- The cframe (position and orientation) of the terrain block.
+ The position and orientation of the terrain block.
- name: size
type: Vector3
default:
@@ -513,7 +513,7 @@ methods:
type: CFrame
default:
summary: |
- The CFrame (position and orientation) of the terrain cylinder.
+ The position and orientation of the terrain cylinder.
- name: height
type: float
default:
From c8b24f9ede9a5e08b3fa78a4e645f0a5d272325f Mon Sep 17 00:00:00 2001
From: IgnisRBX <43388550+IgnisRBX@users.noreply.github.com>
Date: Tue, 26 Nov 2024 07:25:49 -1000
Subject: [PATCH 6/7] Apply suggestions from code review
---
.../en-us/production/localization/automatic-translations.md | 4 ++--
.../tutorials/fundamentals/coding-5/intro-to-dictionaries.md | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/content/en-us/production/localization/automatic-translations.md b/content/en-us/production/localization/automatic-translations.md
index e00afdf77..578f992c8 100644
--- a/content/en-us/production/localization/automatic-translations.md
+++ b/content/en-us/production/localization/automatic-translations.md
@@ -36,7 +36,7 @@ ATC can not capture some experience objects. These objects may require special h
Items or tools owned by a player
Images with embedded text
Badge names and descriptions pulled from the platform
-Game Pass names and descriptions pulled from the platform
+Pass names and descriptions pulled from the platform
@@ -92,7 +92,7 @@ You can track your automatic translation quota usage on your experience's locali
-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.
+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.
### Automatic Translation Updates
diff --git a/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md b/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
index 7014fdba5..cffcf56dc 100644
--- a/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
+++ b/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
@@ -87,7 +87,8 @@ One everyday use of dictionaries is organizing player or character information.
### Using Dictionary Values
There are two ways to access dictionary values:
-`tableName["keyName"]` — note the quotations — and `tableName.keyName`.
+- `tableName["keyName"]` (importantly, note the quotations)
+- `tableName.keyName`
```lua
local enemy = {
From cf660fc02bbc827875bac4bb8170477e2cf9c4c7 Mon Sep 17 00:00:00 2001
From: IgnisRBX <43388550+IgnisRBX@users.noreply.github.com>
Date: Tue, 26 Nov 2024 07:31:07 -1000
Subject: [PATCH 7/7] Update
content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
---
.../tutorials/fundamentals/coding-5/intro-to-dictionaries.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md b/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
index cffcf56dc..d6ed1453a 100644
--- a/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
+++ b/content/en-us/tutorials/fundamentals/coding-5/intro-to-dictionaries.md
@@ -87,6 +87,7 @@ One everyday use of dictionaries is organizing player or character information.
### Using Dictionary Values
There are two ways to access dictionary values:
+
- `tableName["keyName"]` (importantly, note the quotations)
- `tableName.keyName`