mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-14 07:21:32 -04:00
Add explanatory comment
This commit is contained in:
parent
64eace3b90
commit
27c424532f
1 changed files with 5 additions and 0 deletions
|
@ -615,6 +615,11 @@ class Scratch3Text2SpeechBlocks {
|
|||
nameArray = nameArray.concat(spokenNameArray);
|
||||
}
|
||||
// Create a map of language code to localized name
|
||||
// The localized spoken language names have been concatenated onto
|
||||
// the end of the name array, so the result of the forEach below is
|
||||
// when there is both a written language name (e.g. 'Chinese
|
||||
// (simplified)') and a spoken language name (e.g. 'Chinese
|
||||
// (Mandarin)', we always use the spoken version.
|
||||
nameArray.forEach(lang => {
|
||||
localizedNameMap[lang.code] = lang.name;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue