mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -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.
|
* @return {array} the text and value for each menu item.
|
||||||
*/
|
*/
|
||||||
getLanguageMenu () {
|
getLanguageMenu () {
|
||||||
|
const editorLanguage = this.getEditorLanguage().toLowerCase();
|
||||||
// Get the array of localized language names
|
// Get the array of localized language names
|
||||||
const localizedNameMap = {};
|
const localizedNameMap = {};
|
||||||
let nameArray = languageNames.menuMap[this.getEditorLanguage()];
|
let nameArray = languageNames.menuMap[editorLanguage];
|
||||||
if (nameArray) {
|
if (nameArray) {
|
||||||
// Also get any localized names of spoken languages
|
// Also get any localized names of spoken languages
|
||||||
const spokenNameArray = languageNames.spokenLanguages[this.getEditorLanguage()];
|
const spokenNameArray = languageNames.spokenLanguages[editorLanguage];
|
||||||
if (spokenNameArray) {
|
if (spokenNameArray) {
|
||||||
nameArray = nameArray.concat(spokenNameArray);
|
nameArray = nameArray.concat(spokenNameArray);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue