Skip to content

Commit

Permalink
Merge pull request #91 from QuantStack/fixBlocklyLanguage
Browse files Browse the repository at this point in the history
Fix `Blockly` language for default locale
  • Loading branch information
DenisaCG authored Aug 19, 2024
2 parents f7b9c4d + 2e78b38 commit 567d75e
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 567d75e

Please sign in to comment.