diff options
Diffstat (limited to 'use-system-dictionaries.patch')
-rw-r--r-- | use-system-dictionaries.patch | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/use-system-dictionaries.patch b/use-system-dictionaries.patch index 9e74973e2cb3..f6618556d14b 100644 --- a/use-system-dictionaries.patch +++ b/use-system-dictionaries.patch @@ -1,25 +1,16 @@ diff -ura package.orig/src/scripts/spellChecking.js package.new/src/scripts/spellChecking.js ---- package.orig/src/scripts/spellChecking.js 2020-02-04 20:01:17.366294000 +0100 -+++ package.new/src/scripts/spellChecking.js 2020-02-04 20:26:35.530104166 +0100 -@@ -74,7 +74,7 @@ - const registerSpellCheckingDictionary = async (dictionary) => { - let args; - try { -- const dictionaryPath = path.join(dictionariesPath, `${ dictionary.replace(/_/g, '-') }.bdic`); -+ const dictionaryPath = path.join(dictionariesPath, `${dictionary}.bdic`); - args = [dictionary, await fs.promises.readFile(dictionaryPath)]; - } catch (error) { - args = [dictionary]; -@@ -117,11 +117,7 @@ - export const setupSpellChecking = async () => { - const embeddedDictionaries = getAvailableDictionaries(); +--- package.orig/src/scripts/spellChecking.js 2020-02-11 13:55:00.000000000 +0100 ++++ package.new/src/scripts/spellChecking.js 2020-02-11 15:52:41.031198167 +0100 +@@ -140,11 +140,7 @@ -- dictionariesPath = path.join( + await provider.initialize(); + +- const appDirectoriesPath = path.join( - remote.app.getAppPath(), - remote.app.getAppPath().endsWith('app.asar') ? '..' : '.', - 'dictionaries', - ); -+ dictionariesPath = '/usr/share/qt/qtwebengine_dictionaries'; ++ const appDirectoriesPath = '/usr/share/hunspell'; + + const appDictionaries = await getPairsOfDictionaryFiles(appDirectoriesPath); - let installedDictionaries = []; - if (process.platform !== 'darwin') { |