Skip to content

Commit

Permalink
fix Blockly language for default locale
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisaCG committed Aug 19, 2024
1 parent f7b9c4d commit 2e78b38
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/blockly-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ const plugin: JupyterFrontEndPlugin<IBlocklyRegistry> = {
// 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.
Expand Down

0 comments on commit 2e78b38

Please sign in to comment.