From 2e78b3866119d2c0d80551d4ca71c3c2baca7b95 Mon Sep 17 00:00:00 2001 From: DenisaCG Date: Mon, 19 Aug 2024 22:16:14 +0200 Subject: [PATCH] fix Blockly language for default locale --- packages/blockly-extension/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/blockly-extension/src/index.ts b/packages/blockly-extension/src/index.ts index b9016ad..8437fb7 100644 --- a/packages/blockly-extension/src/index.ts +++ b/packages/blockly-extension/src/index.ts @@ -168,8 +168,10 @@ const plugin: JupyterFrontEndPlugin = { // Get new language and call the function that modifies the language name accordingly. // Also, make the transformation to have the name of the language package as in Blockly. const language = - currentLocale[currentLocale.length - 2].toUpperCase() + - currentLocale[currentLocale.length - 1].toLowerCase(); + currentLocale === 'default' + ? 'En' + : currentLocale[currentLocale.length - 2].toUpperCase() + + currentLocale[currentLocale.length - 1].toLowerCase(); console.log(`Current Language : '${language}'`); // Transmitting the current language to the manager.