The group strings in the toolbox aren’t applied during translation. Why? I checked, they’re in the files. They’re designated as category and group. But for some reason, they’re not applied when building the static version?
I speak Russian too!
hmmm… looks like the strings are being fetched when localizing the categories and blocks but they aren’t being injected into the localizations that rlf pulls from. this definitely seems like a bug… i’ll try to take a look at it tomorrow
Related discussion and what I’ve determined so far: https://github.com/orgs/pxt-ev3-community/discussions/3#discussioncomment-16808881
Looks like they only go to bundled-strings.json in the static package, but the group labels are only looked up from strings.json. I don’t understand why.
So far I’ve determined that:
-
The localization files downloaded for static package are specified in https://github.com/microsoft/pxt/blob/master/pxtlib/util.ts#L1402
-
Using browser devtools console, with static package,
ts.pxtc.apiLocalizationStrings['{id:group}Indicator']has the string butts.pxtc.Util.getLocalizedStrings()['{id:group}Indicator']does not. -
When using live translations it is the opposite.
But I don’t know why this happens. I guess I could hack it in javascript to move the strings to the other map, but I’d like to know a real fix.
here’s a PR that should fix the issue: https://github.com/microsoft/pxt/pull/11293
@PetteriAimonen @THEb0nny any chance you could test out the changes locally and make sure it works for you?
Thanks for the fix
