Skip to content

Commit 567d75e

Browse files
authored
Merge pull request #91 from QuantStack/fixBlocklyLanguage
Fix `Blockly` language for default locale
2 parents f7b9c4d + 2e78b38 commit 567d75e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/blockly-extension/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,10 @@ const plugin: JupyterFrontEndPlugin<IBlocklyRegistry> = {
168168
// Get new language and call the function that modifies the language name accordingly.
169169
// Also, make the transformation to have the name of the language package as in Blockly.
170170
const language =
171-
currentLocale[currentLocale.length - 2].toUpperCase() +
172-
currentLocale[currentLocale.length - 1].toLowerCase();
171+
currentLocale === 'default'
172+
? 'En'
173+
: currentLocale[currentLocale.length - 2].toUpperCase() +
174+
currentLocale[currentLocale.length - 1].toLowerCase();
173175
console.log(`Current Language : '${language}'`);
174176

175177
// Transmitting the current language to the manager.

0 commit comments

Comments
 (0)