From 870b31ce5caf08f936ea043104bdf317764f227a Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Thu, 4 Oct 2018 17:17:25 +0200 Subject: [PATCH 01/11] Fix typo update bookshelf service --- .../strapi-generate-api/templates/bookshelf/service.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-generate-api/templates/bookshelf/service.template b/packages/strapi-generate-api/templates/bookshelf/service.template index 948a990494..3bcefb435e 100644 --- a/packages/strapi-generate-api/templates/bookshelf/service.template +++ b/packages/strapi-generate-api/templates/bookshelf/service.template @@ -120,7 +120,7 @@ module.exports = { const data = _.omit(values, <%= globalID %>.associations.map(ast => ast.alias)); // Create entry with no-relational data. - const entry = <%= globalID %>.forge(params).save(data, { path: true }); + const entry = <%= globalID %>.forge(params).save(data); // Create relational data and return the entry. return <%= globalID %>.updateRelations(Object.assign(params, { values: relations })); From 6574ede3487c41e8175d635fa4a032f79f23d680 Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 4 Oct 2018 12:06:15 -0500 Subject: [PATCH 02/11] Fix `handleClick` invocation `handleClick` declared at line 69 expects 0 arguments, wrong invocation was done. --- .../admin/src/components/TableRow/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js b/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js index 50bb74aedf..b44738fbca 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js @@ -74,7 +74,7 @@ class TableRow extends React.Component { this.handleClick(this.props.destination) }, + { icoType: 'pencil', onClick: this.handleClick }, { id: this.props.record.id, icoType: 'trash', onClick: this.props.onDelete }, ]} /> @@ -119,7 +119,7 @@ class TableRow extends React.Component { render() { return ( - this.handleClick(this.props.destination)}> + {this.renderCells()} ); From 7721f38ee62c8c1e5d1a1d90c747de813364ee8b Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 4 Oct 2018 12:12:47 -0500 Subject: [PATCH 03/11] Fix `defaultProps` declaration Was done in multiple places. --- .../admin/src/components/TableRow/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js b/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js index b44738fbca..e42a9af38b 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js @@ -130,11 +130,6 @@ TableRow.contextTypes = { router: PropTypes.object.isRequired, }; -TableRow.defaultProps = { - enableBulkActions: true, - value: false, -}; - TableRow.propTypes = { destination: PropTypes.string.isRequired, enableBulkActions: PropTypes.bool, @@ -147,7 +142,9 @@ TableRow.propTypes = { }; TableRow.defaultProps = { + enableBulkActions: true, onDelete: () => {}, + value: false, }; export default TableRow; From ac7aa866584b92f72b9e34c289cca02f59309086 Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 4 Oct 2018 15:16:41 -0500 Subject: [PATCH 04/11] Fix conditional returning the same --- .../admin/src/components/List/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-plugin-users-permissions/admin/src/components/List/index.js b/packages/strapi-plugin-users-permissions/admin/src/components/List/index.js index 3b029e8f84..a404d56e7f 100644 --- a/packages/strapi-plugin-users-permissions/admin/src/components/List/index.js +++ b/packages/strapi-plugin-users-permissions/admin/src/components/List/index.js @@ -38,7 +38,7 @@ const generateListTitle = (data, settingType) => { const disabledProviders = size(data) - enabledProvidersSize > 1 ? - : ; + : ; return
{enabledProviders} {disabledProviders}
; From 017e713ec4163d4352186b15e45cde004afa7396 Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 4 Oct 2018 15:19:56 -0500 Subject: [PATCH 05/11] Remove unused imported library --- packages/strapi-admin/scripts/preSetup.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/strapi-admin/scripts/preSetup.js b/packages/strapi-admin/scripts/preSetup.js index ac619911bb..22bf763312 100644 --- a/packages/strapi-admin/scripts/preSetup.js +++ b/packages/strapi-admin/scripts/preSetup.js @@ -1,6 +1,5 @@ const shell = require('shelljs'); const path = require('path'); -const _ = require('lodash'); shell.echo(''); shell.echo('🕓 The setup process can take few minutes.'); From e4f60a26ab2be42ed6e2ccc350544e9e2c1f0467 Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 4 Oct 2018 15:21:05 -0500 Subject: [PATCH 06/11] Use just one call system --- packages/strapi-admin/scripts/preSetup.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/strapi-admin/scripts/preSetup.js b/packages/strapi-admin/scripts/preSetup.js index 22bf763312..40999fbf94 100644 --- a/packages/strapi-admin/scripts/preSetup.js +++ b/packages/strapi-admin/scripts/preSetup.js @@ -1,11 +1,12 @@ const shell = require('shelljs'); const path = require('path'); -shell.echo(''); -shell.echo('🕓 The setup process can take few minutes.'); -shell.echo(''); -shell.echo('🔸 Administration Panel'); -shell.echo('📦 Installing packages...'); +shell.echo(` +🕓 The setup process can take few minutes. + +🔸 Administration Panel +📦 Installing packages... +`); const pwd = shell.pwd(); From 2410d5ab9d1e780b46d21baa8aba06bac2245f3e Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 4 Oct 2018 15:22:10 -0500 Subject: [PATCH 07/11] Simplify logic --- .../lib/internals/webpack/webpack.dll.babel.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js index b6d0a487c4..9cf7b23f22 100644 --- a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js +++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js @@ -1,26 +1,17 @@ /** * WEBPACK DLL GENERATOR * - * This profile is used to cache webpack's module - * contexts for external library and framework type - * dependencies which will usually not change often enough - * to warrant building them from scratch every time we use - * the webpack process. + * This profile is used to cache webpack's module contexts for external library and framework type dependencies which + * will usually not change often enough to warrant building them from scratch every time we use the webpack process. */ const path = require('path'); const webpack = require('webpack'); const isAdmin = process.env.IS_ADMIN === 'true'; -const appPath = (() => { - if (process.env.APP_PATH) { - return process.env.APP_PATH; - } - - return isAdmin ? path.resolve(process.env.PWD, '..') : path.resolve(process.env.PWD, '..', '..'); -})(); // const isSetup = path.resolve(process.env.PWD, '..', '..') === path.resolve(process.env.INIT_CWD); const isSetup = process.env.IS_MONOREPO; +const appPath = process.env.APP_PATH || path.resolve(process.env.PWD, '..', ( isAdmin ? '' : '..' )); const rootAdminpath = (() => { if (isSetup) { From bdde29eba83ac2c66c0ca915ad7f35c663301077 Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 4 Oct 2018 17:05:29 -0500 Subject: [PATCH 08/11] Use the personal repository for contributions Or, the fork step should not be there... --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47723e14fb..e271fe6335 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,14 +38,14 @@ Then, please follow the instructions below: [Go to the repository](https://github.com/strapi/strapi) and fork it to your own GitHub account. -#### 2. 💿 Clone the repository +#### 2. 💿 Clone from your repository ```bash -git clone git@github.com:strapi/strapi.git +git clone git@github.com:YOUR_USERNAME/strapi.git ``` #### 3. ⏳ Installation - + Go to the root of the repository. ```bash cd strapi From 540d5571ab6f63ccbd9c8d3ac9ed763647a06b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=B3l?= Date: Sun, 7 Oct 2018 19:03:05 +0200 Subject: [PATCH 09/11] Add missing translations for 2 plugins --- packages/strapi-plugin-email/admin/src/translations/pl.json | 5 ++++- .../admin/src/translations/pl.json | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/strapi-plugin-email/admin/src/translations/pl.json b/packages/strapi-plugin-email/admin/src/translations/pl.json index c957a5b4f1..c412ad1830 100644 --- a/packages/strapi-plugin-email/admin/src/translations/pl.json +++ b/packages/strapi-plugin-email/admin/src/translations/pl.json @@ -1,4 +1,7 @@ { "plugin.description.long": "Wysyłaj E-maile", - "plugin.description.short": "Wysyłaj E-maile" + "plugin.description.short": "Wysyłaj E-maile", + "EditForm.Input.select.inputDescription": "E-maile mogą być wysyłane z wykorzystaniem domyślnego (Sendmail) albo zewnętrznego dostawcy", + "EditForm.Input.select.label": "Dostawcy", + "EditForm.Input.toggle.label": "Włącz wysyłkę e-maili" } \ No newline at end of file diff --git a/packages/strapi-plugin-settings-manager/admin/src/translations/pl.json b/packages/strapi-plugin-settings-manager/admin/src/translations/pl.json index 6854fd667a..c2cbfe2fe1 100644 --- a/packages/strapi-plugin-settings-manager/admin/src/translations/pl.json +++ b/packages/strapi-plugin-settings-manager/admin/src/translations/pl.json @@ -79,6 +79,11 @@ "form.server.item.host": "Host", "form.server.item.port": "Port", "form.server.name": "Serwer", + "form.server.item.proxy": "Ustawienia Proxy", + "form.server.item.proxy.enable": "Włącz Proxy", + "form.server.item.proxy.host": "Host Proxy", + "form.server.item.proxy.port": "Port Proxy", + "form.server.item.proxy.ssl": "SSL Proxy", "language.af": "Afrikaans", "language.af_NA": "Afrikaans (Namibië)", "language.af_ZA": "Afrikaans (Suid-Afrika)", From 6642c640bfabff5726cf7b79970d3035057a3d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=B3l?= Date: Sun, 7 Oct 2018 19:27:22 +0200 Subject: [PATCH 10/11] Add missing translations --- .../admin/src/translations/pl.json | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/packages/strapi-plugin-content-manager/admin/src/translations/pl.json b/packages/strapi-plugin-content-manager/admin/src/translations/pl.json index ae373a56a6..9deecea003 100644 --- a/packages/strapi-plugin-content-manager/admin/src/translations/pl.json +++ b/packages/strapi-plugin-content-manager/admin/src/translations/pl.json @@ -43,9 +43,12 @@ "containers.List.pluginHeaderDescription": "{label} elementów znalezionych", "containers.List.pluginHeaderDescription.singular": "{label} element znaleziony", "containers.ListPage.displayedFields": "Wyświetlone atrybuty", + "containers.SettingPage.attributes.description": "Zdefiniuj kolejność atrybutów", + "containers.SettingPage.listSettings.title": "Lista - Ustawienia", + "containers.SettingsPage.Block.generalSettings.title": "Ogólne", "containers.SettingPage.addField": "Dodaj nowy atrybut", - "containers.SettingPage.editSettings.description": "Drag & drop the fields to build the layout", - "containers.SettingPage.editSettings.title": "Edit — Settings", + "containers.SettingPage.editSettings.description": "Przeciągnij i upuś pola by zbudować układ", + "containers.SettingPage.editSettings.title": "Edycja - Ustawienia", "containers.SettingPage.relations": "Relational fields", "emptyAttributes.button": "Przejdź do konstruktora modeli", "emptyAttributes.description": "Dodaj swoje pierwszy atrybut do modelu", @@ -70,16 +73,27 @@ "error.validation.minSupMax": "Nie może być większa", "error.validation.regex": "Wartość nie jest zgodna z wymaganym wzorcem.", "error.validation.required": "Wpisanie wartości dla tego atrybutu jest wymagane.", - "form.Input.description": "Description", + "form.Input.description": "Opis", "form.Input.description.placeholder": "Display name in the profile", - "form.Input.disabled": "Editable field", + "form.Input.disabled": "Edytowalne pole", "form.Input.label": "Etykieta", "form.Input.placeholder": "Placeholder", "form.Input.placeholder.placeholder": "Moja wartość", + "form.Input.bulkActions": "Włącz akcje masowe", + "form.Input.defaultSort": "Domyślny atrybut sortowania", + "form.Input.filters": "Włącz filtry", + "form.Input.label.inputDescription": "Ta wartość nadpisuje etykietę wyświetlaną w nagłówku tabeli", + "form.Input.pageEntries": "Wpisy per strona", + "form.Input.search": "Włącz wyszukiwanie", + "form.Input.search.field": "Włącz wyszukiwanie po tym polu", + "form.Input.sort.field": "Włącz sortowanie po tym polu", "notification.error.relationship.fetch": "Wystąpił błąd podczas pobierania relacji.", "pageNotFound": "Strona nie znaleziona", "plugin.description.long": "Szybki sposób na przeglądanie, zmianę i usuwanie elementów z twojej bazy danych.", "plugin.description.short": "Szybki sposób na przeglądanie, zmianę i usuwanie elementów z twojej bazy danych.", + "notification.error.displayedFields": "Co najmniej jedno pole musi być wyświetlane", + "notification.info.SettingPage.disableSort": "Co najmniej jeden atrybut musi mieć włączoną możliwość sortowania", + "popUpWarning.bodyMessage.contentType.delete.all": "Czy na pewno chcesz usunąć te wpisy?", "popUpWarning.bodyMessage.contentType.delete": "Czy na pewno chcesz usunąć ten wpis?", "popUpWarning.button.cancel": "Nie", "popUpWarning.button.confirm": "Tak", From 99ce46f6bb3cd38c8022320f4145535dad84b441 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Mon, 8 Oct 2018 10:40:28 +0200 Subject: [PATCH 11/11] Delete path on save in sql column generator --- packages/strapi-hook-bookshelf/lib/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/strapi-hook-bookshelf/lib/index.js b/packages/strapi-hook-bookshelf/lib/index.js index 42548eb2d4..89422c36da 100644 --- a/packages/strapi-hook-bookshelf/lib/index.js +++ b/packages/strapi-hook-bookshelf/lib/index.js @@ -513,8 +513,6 @@ module.exports = function(strapi) { if (existTable) { await StrapiConfigs.forge({id: existTable.id}).save({ value: JSON.stringify(attributes) - }, { - path: true }); } else { await StrapiConfigs.forge({