From c0d33d97f2c8d4e9371a03d4ad3022df3ed64d3d Mon Sep 17 00:00:00 2001 From: Ghassen Rjab Date: Mon, 26 Feb 2018 03:17:56 +0100 Subject: Fix lint errors related to language names --- client/components/main/layouts.js | 12 ++++++++---- client/components/users/userHeader.js | 14 ++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js index df22fc14..f12718a7 100644 --- a/client/components/main/layouts.js +++ b/client/components/main/layouts.js @@ -17,10 +17,14 @@ Template.userFormsLayout.onRendered(() => { Template.userFormsLayout.helpers({ languages() { return _.map(TAPi18n.getLanguages(), (lang, code) => { - return { - tag: code, - name: lang.name === 'br' ? 'Brezhoneg' : lang.name === 'ig' ? 'Igbo' : lang.name, - }; + const tag = code; + let name = lang.name; + if (lang.name === 'br') { + name = 'Brezhoneg'; + } else if (lang.name === 'ig') { + name = 'Igbo'; + } + return { tag, name }; }).sort(function(a, b) { if (a.name === b.name) { return 0; diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js index 96c8c95e..be7d4dcb 100644 --- a/client/components/users/userHeader.js +++ b/client/components/users/userHeader.js @@ -114,10 +114,16 @@ Template.changePasswordPopup.onRendered(function () { Template.changeLanguagePopup.helpers({ languages() { return _.map(TAPi18n.getLanguages(), (lang, code) => { - return { - tag: code, - name: lang.name === 'br' ? 'Brezhoneg' : lang.name === 'ig' ? 'Igbo' : lang.name, - }; + // Same code in /client/components/main/layouts.js + // TODO : Make code reusable + const tag = code; + let name = lang.name; + if (lang.name === 'br') { + name = 'Brezhoneg'; + } else if (lang.name === 'ig') { + name = 'Igbo'; + } + return { tag, name }; }).sort(function (a, b) { if (a.name === b.name) { return 0; -- cgit v1.2.3-1-g7c22 From 951a0db380d60f3d948ae38d50b85a54983a51de Mon Sep 17 00:00:00 2001 From: Ghassen Rjab Date: Mon, 26 Feb 2018 03:18:26 +0100 Subject: Fix lint errors related to trello creator --- models/trelloCreator.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/models/trelloCreator.js b/models/trelloCreator.js index 2d85ee71..89e48a16 100644 --- a/models/trelloCreator.js +++ b/models/trelloCreator.js @@ -401,19 +401,19 @@ export class TrelloCreator { } createSwimlanes(boardId) { - const swimlaneToCreate = { - archived: false, - boardId, - // We are being defensing here by providing a default date (now) if the - // creation date wasn't found on the action log. This happen on old - // Wekan boards (eg from 2013) that didn't log the 'createList' action - // we require. - createdAt: this._now(), - title: 'Default', - }; - const swimlaneId = Swimlanes.direct.insert(swimlaneToCreate); - Swimlanes.direct.update(swimlaneId, {$set: {'updatedAt': this._now()}}); - this.swimlane = swimlaneId; + const swimlaneToCreate = { + archived: false, + boardId, + // We are being defensing here by providing a default date (now) if the + // creation date wasn't found on the action log. This happen on old + // Wekan boards (eg from 2013) that didn't log the 'createList' action + // we require. + createdAt: this._now(), + title: 'Default', + }; + const swimlaneId = Swimlanes.direct.insert(swimlaneToCreate); + Swimlanes.direct.update(swimlaneId, {$set: {'updatedAt': this._now()}}); + this.swimlane = swimlaneId; } createChecklists(trelloChecklists) { -- cgit v1.2.3-1-g7c22 From 373e9782dcf87a9c1169b5d1f8175ce14e4898c9 Mon Sep 17 00:00:00 2001 From: Ghassen Rjab Date: Mon, 26 Feb 2018 03:19:27 +0100 Subject: Add Swimlanes to globals --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index a6d651a5..ba0437e0 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -129,6 +129,7 @@ "Integrations": true, "HTTP": true, "AccountSettings": true, - "Announcements": true + "Announcements": true, + "Swimlanes": true } } -- cgit v1.2.3-1-g7c22 From 0a16147470246c8f49bb918f5ddc7bb2e54fba14 Mon Sep 17 00:00:00 2001 From: Ghassen Rjab Date: Mon, 26 Feb 2018 03:19:59 +0100 Subject: Fix lint errors related to sandstorm --- .eslintrc.json | 3 ++- sandstorm.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index ba0437e0..8bd678b3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -130,6 +130,7 @@ "HTTP": true, "AccountSettings": true, "Announcements": true, - "Swimlanes": true + "Swimlanes": true, + "Npm": true } } diff --git a/sandstorm.js b/sandstorm.js index bb3e5011..3dcbf03c 100644 --- a/sandstorm.js +++ b/sandstorm.js @@ -22,9 +22,9 @@ const sandstormBoard = { if (isSandstorm && Meteor.isServer) { const fs = require('fs'); - const pathParts = process.cwd().split("/"); - var path = pathParts.join("/"); - const Capnp = Npm.require(path + "../../../node_modules/capnp.js"); + const pathParts = process.cwd().split('/'); + const path = pathParts.join('/'); + const Capnp = Npm.require(`${path}../../../node_modules/capnp.js`); const Package = Capnp.importSystem('sandstorm/package.capnp'); const Powerbox = Capnp.importSystem('sandstorm/powerbox.capnp'); const Identity = Capnp.importSystem('sandstorm/identity.capnp'); -- cgit v1.2.3-1-g7c22 From dc8c9053c2d454f14983903880fbf481eab2be20 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 26 Feb 2018 16:10:18 +0200 Subject: - Fix lint errors related to sandstorm - Add Swimlanes to globals - Fix lint errors related to trello creator - Fix lint errors related to language names Thanks to GhassenRjab ! --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7bd8b16..e4eab854 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# Upcoming Wekan release + +This release fixes the following bugs: + +- [Fix lint errors related to sandstorm](https://github.com/wekan/wekan/commit/0a16147470246c8f49bb918f5ddc7bb2e54fba14); +- [Add Swimlanes to globals](https://github.com/wekan/wekan/commit/373e9782dcf87a9c1169b5d1f8175ce14e4898c9); +- [Fix lint errors related to trello creator](https://github.com/wekan/wekan/commit/951a0db380d60f3d948ae38d50b85a54983a51de); +- [Fix lint errors related to language names](https://github.com/wekan/wekan/commit/c0d33d97f2c8d4e9371a03d4ad3022df3ed64d3d). + +Thanks to GitHub user GhassenRjab for contributions. + # v0.77 2018-02-23 Wekan release This release adds the following new features: -- cgit v1.2.3-1-g7c22