Skip to content

Commit

Permalink
Fixes issue 220. Electron's getLocale, and Chromium's l10n_util, can …
Browse files Browse the repository at this point in the history
…return the language code in the IETF BCP 47 format (en-US) instead of the ISO 15897 format (en_US). Hunspell, the dictionaries included with this project, and the JavaScript code here assumes the ISO 15897 format, so this hotfix converts what getLocale returns. (#234)
  • Loading branch information
pnickerson-cashstar authored and IsmaelMartinez committed Aug 18, 2019
1 parent 1e7d467 commit 97eb15f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/browser/rightClickMenuWithSpellcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const { remote, webFrame } = require('electron');
const buildEditorContextMenu = remote.require('electron-editor-context-menu');
const spellchecker = require('spellchecker');
const appLocale = remote.app.getLocale();
const appLocale = remote.app.getLocale().replace('-', '_');
var EN_VARIANT = /^en/;

// Prevent the spellchecker from showing contractions as errors.
Expand Down

0 comments on commit 97eb15f

Please sign in to comment.