Reproduction Steps
When testing my game this afternoon, I noticed that some parts of it didn’t load in studio, but worked fine in in-game. After tracking down the cause of the problem, it turns out the LocaleIdRefactor2
flag that was turned on today causes GetTranslatorForPlayerAsync to yield indefinitely in studio when wrapped in a pcall.
How to reproduce this:
- Open up a game that has been published to Roblox
- Run the following piece of code in the command bar:
local LocalizationService = game:GetService("LocalizationService")
local success, playerTranslator = pcall(LocalizationService.GetTranslatorForPlayerAsync, LocalizationService, game.Players.LocalPlayer)
print(success, playerTranslator)
- Observe how nothing is printed in the output because it yields indefinitely
Expected Behavior
I expect GetTranslatorForPlayerAsync to not yield indefinitely in studio when wrapped in a pcall.
Actual Behavior
GetTranslatorForPlayerAsync yields indefinitely in studio when wrapped in a pcall and when the flag LocaleIdRefactor2
is turned on.
Workaround
The best workaround is to manually turn off LocaleIdRefactor2
, but that’s something that most developers aren’t familiar with. The worst workaround would be to not wrap GetTranslatorForPlayerAsync in a pcall because it has the potential to error, as mentioned in the docs.
Issue Area: Studio
Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-10-13 13:00:00 (-07:00)
Date Last Experienced: 2022-10-13 14:00:00 (-07:00)