mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Use lowercase lang code for editor lang (to match ja-Hira)
This commit is contained in:
parent
03e6d73cc6
commit
dad1ced3d4
1 changed files with 3 additions and 2 deletions
|
@ -602,12 +602,13 @@ class Scratch3Text2SpeechBlocks {
|
|||
* @return {array} the text and value for each menu item.
|
||||
*/
|
||||
getLanguageMenu () {
|
||||
const editorLanguage = this.getEditorLanguage().toLowerCase();
|
||||
// Get the array of localized language names
|
||||
const localizedNameMap = {};
|
||||
let nameArray = languageNames.menuMap[this.getEditorLanguage()];
|
||||
let nameArray = languageNames.menuMap[editorLanguage];
|
||||
if (nameArray) {
|
||||
// Also get any localized names of spoken languages
|
||||
const spokenNameArray = languageNames.spokenLanguages[this.getEditorLanguage()];
|
||||
const spokenNameArray = languageNames.spokenLanguages[editorLanguage];
|
||||
if (spokenNameArray) {
|
||||
nameArray = nameArray.concat(spokenNameArray);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue