From 74b1ad5d9cba28faa9ae2f29f922f3423f3d2e4e Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 13 Dec 2018 17:21:02 +0100 Subject: [PATCH 1/4] Fix windows dictionary install --- gulpfile.babel.js | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index fc2820fed..74b183a1d 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -6,9 +6,10 @@ import server from 'gulp-server-livereload'; import { exec } from 'child_process'; import dotenv from 'dotenv'; import sassVariables from 'gulp-sass-variables'; -import { removeSync } from 'fs-extra'; +import { moveSync, removeSync } from 'fs-extra'; import kebabCase from 'kebab-case'; import hexRgb from 'hex-rgb'; +import path from 'path'; import config from './package.json'; @@ -45,6 +46,7 @@ const paths = { }; function _shell(cmd, cb) { + console.log('executing', cmd); exec(cmd, { cwd: paths.dest, }, (error, stdout, stderr) => { @@ -141,13 +143,25 @@ export function dictionaries(done) { let packages = ''; Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { packages = `${packages} hunspell-dict-${key}`; }); - _shell(` - rm -rf ${paths.dictionaries} - npm install --prefix ${paths.dictionaries} ${packages} - mv ${paths.dictionaries}/node_modules/* ${paths.dictionaries} - rm -rf ${paths.dictionaries}/node_modules ${paths.dictionaries}/package-lock.json - pwd`, - done); + if (process.platform !== 'win32') { + _shell(` + rm -rf ${paths.dictionaries} + npm install --prefix ${path.join(__dirname, paths.dictionaries)} ${packages} + mv ${paths.dictionaries}/node_modules/* ${paths.dictionaries} + rm -rf ${paths.dictionaries}/node_modules ${paths.dictionaries}/package-lock.json`, + done); + } else { + _shell(`npm install --prefix ${path.join(__dirname, 'temp')} ${packages}`, () => { + moveSync( + path.join(__dirname, 'temp', 'node_modules'), + path.join(__dirname, 'build', paths.dictionaries) + ); + + removeSync(path.join(__dirname, 'temp')); + + done(); + }); + } } export function sign(done) { From d5dadc116d18c49cb78da7d892c95b0c34df2c96 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 13 Dec 2018 19:59:46 +0100 Subject: [PATCH 2/4] make dictionary download platform independent --- gulpfile.babel.js | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 74b183a1d..ae7002eb2 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -143,25 +143,16 @@ export function dictionaries(done) { let packages = ''; Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { packages = `${packages} hunspell-dict-${key}`; }); - if (process.platform !== 'win32') { - _shell(` - rm -rf ${paths.dictionaries} - npm install --prefix ${path.join(__dirname, paths.dictionaries)} ${packages} - mv ${paths.dictionaries}/node_modules/* ${paths.dictionaries} - rm -rf ${paths.dictionaries}/node_modules ${paths.dictionaries}/package-lock.json`, - done); - } else { - _shell(`npm install --prefix ${path.join(__dirname, 'temp')} ${packages}`, () => { - moveSync( - path.join(__dirname, 'temp', 'node_modules'), - path.join(__dirname, 'build', paths.dictionaries) - ); - - removeSync(path.join(__dirname, 'temp')); - - done(); - }); - } + _shell(`npm install --prefix ${path.join(__dirname, 'temp')} ${packages}`, () => { + moveSync( + path.join(__dirname, 'temp', 'node_modules'), + path.join(__dirname, 'build', paths.dictionaries), + ); + + removeSync(path.join(__dirname, 'temp')); + + done(); + }); } export function sign(done) { From 89c2eeb74a3bd3c2b03f1074ee525e24cc9fd332 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 13 Dec 2018 20:06:08 +0100 Subject: [PATCH 3/4] fix(i18n): Fix "greek" spellchecker name Co-Authored-By: modivin --- src/i18n/languages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/languages.js b/src/i18n/languages.js index b262df01e..aa3f2316a 100644 --- a/src/i18n/languages.js +++ b/src/i18n/languages.js @@ -34,7 +34,7 @@ export const SPELLCHECKER_LOCALES = { 'cs-cz': 'Čeština', 'da-dk': 'Dansk', 'de-de': 'Deutsch', - 'el-gr': 'λληνικά (Greek)', + 'el-gr': 'ελληνικά (Greek)', 'en-us': 'English', 'es-es': 'Español', 'et-ee': 'Estonian', From b6b8c067a04938837cd1756e1a4ea6c97b999d64 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 13 Dec 2018 20:50:23 +0100 Subject: [PATCH 4/4] bump version to b22 --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16578ff1d..e14cde6e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ + +# [5.0.0-beta.22](https://github.com/meetfranz/franz/compare/5.0.0-beta.20...5.0.0-beta.22) (2018-12-13) + + +### Bug Fixes + +* **Windows:** Package spellchecker dictionaries + + # [5.0.0-beta.21](https://github.com/meetfranz/franz/compare/5.0.0-beta.20...5.0.0-beta.21) (2018-12-11) diff --git a/package.json b/package.json index 551727ca9..05921d1a1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "franz", "productName": "Franz", "appId": "com.meetfranz.franz", - "version": "5.0.0-beta.21", + "version": "5.0.0-beta.22", "description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.", "copyright": "adlk x franz - Stefan Malzner", "main": "index.js",