From dad1ced3d43e65d2801dba8f2607cc2e5776f330 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Thu, 3 Oct 2019 12:42:50 -0400 Subject: [PATCH] Use lowercase lang code for editor lang (to match ja-Hira) --- src/extensions/scratch3_text2speech/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/extensions/scratch3_text2speech/index.js b/src/extensions/scratch3_text2speech/index.js index 305eb2ac7..ef91464c9 100644 --- a/src/extensions/scratch3_text2speech/index.js +++ b/src/extensions/scratch3_text2speech/index.js @@ -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); }