From ab5b80e9341ed97cf9ab649f041abfb475423f0b Mon Sep 17 00:00:00 2001 From: Javier Castro Date: Fri, 7 Dec 2018 12:19:51 -0300 Subject: [PATCH 01/66] Fix #2444: avoid duplicating the message when wrapping errors with Bom --- packages/strapi/lib/middlewares/boom/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi/lib/middlewares/boom/index.js b/packages/strapi/lib/middlewares/boom/index.js index c73b8d57ea..1b7dc2a98a 100644 --- a/packages/strapi/lib/middlewares/boom/index.js +++ b/packages/strapi/lib/middlewares/boom/index.js @@ -37,7 +37,7 @@ module.exports = strapi => { ctx.status = error.status || 500; ctx.body = _.get(ctx.body, 'isBoom') ? ctx.body || error && error.message - : Boom.wrap(error, ctx.status, ctx.body || error.message); + : Boom.wrap(error, ctx.status); } if (ctx.response.headers.location) { From 012b0c5e0ca99f0d7207c9dd28b2ff5e787ee2aa Mon Sep 17 00:00:00 2001 From: Michael Barajas Date: Sun, 16 Dec 2018 14:46:22 -0500 Subject: [PATCH 02/66] Updated documentation for model indexing --- docs/3.x.x/guides/models.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/3.x.x/guides/models.md b/docs/3.x.x/guides/models.md index c286de9bc6..50ca2245a8 100644 --- a/docs/3.x.x/guides/models.md +++ b/docs/3.x.x/guides/models.md @@ -56,6 +56,7 @@ If you're using SQL databases, you should use the native SQL constraints to appl - `required` (boolean) — if true adds a required validator for this property. - `unique` (boolean) — whether to define a unique index on this property. + - `index` (boolean) — adds an index on this property, this will use the default mongodb index for the type and will run in the background. - `max` (integer) — checks if the value is greater than or equal to the given minimum. - `min` (integer) — checks if the value is less than or equal to the given maximum. @@ -100,7 +101,8 @@ To improve the Developer eXperience when developing or using the administration "age": { "type": "integer", "min": 18, - "max": 99 + "max": 99, + "index": true }, "birthday": { "type": "date" From a5dc07c0a5fb76f3ad0dba3ef8c48903b0cf6aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?= Date: Wed, 19 Dec 2018 19:25:52 +0100 Subject: [PATCH 03/66] Avoid write files if not development environment --- packages/strapi-plugin-graphql/services/Schema.js | 6 ++++-- packages/strapi/lib/core/plugins.js | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-graphql/services/Schema.js b/packages/strapi-plugin-graphql/services/Schema.js index d13249e3ed..dcb8a29949 100644 --- a/packages/strapi-plugin-graphql/services/Schema.js +++ b/packages/strapi-plugin-graphql/services/Schema.js @@ -266,8 +266,10 @@ module.exports = { resolvers, }); - // Write schema. - this.writeGenerateSchema(graphql.printSchema(schema)); + if (strapi.config.environment === 'development') { + // Write schema. + this.writeGenerateSchema(graphql.printSchema(schema)); + } // Remove custom scaler (like Upload); typeDefs = Types.removeCustomScalar(typeDefs, resolvers); diff --git a/packages/strapi/lib/core/plugins.js b/packages/strapi/lib/core/plugins.js index 51893e0f8b..d239e96b0a 100644 --- a/packages/strapi/lib/core/plugins.js +++ b/packages/strapi/lib/core/plugins.js @@ -88,6 +88,10 @@ module.exports = async function() { return; } + if (strapi.config.environment !== 'development') { + return; + } + // arrange system directories await Promise.all([ fs.remove(sourcePath), From df162c13878f0144c3bd82ec1a64e2cd2564104f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?= Date: Wed, 19 Dec 2018 19:42:10 +0100 Subject: [PATCH 04/66] Avoid write actions.json if not development environment --- .../services/UsersPermissions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-users-permissions/services/UsersPermissions.js b/packages/strapi-plugin-users-permissions/services/UsersPermissions.js index 397fb1221a..35ed7cfdf6 100644 --- a/packages/strapi-plugin-users-permissions/services/UsersPermissions.js +++ b/packages/strapi-plugin-users-permissions/services/UsersPermissions.js @@ -438,8 +438,10 @@ module.exports = { try { // Disable auto-reload. strapi.reload.isWatching = false; - // Rewrite actions.json file. - fs.writeFileSync(actionsPath, JSON.stringify({ actions: data }), 'utf8'); + if (strapi.config.environment === 'development') { + // Rewrite actions.json file. + fs.writeFileSync(actionsPath, JSON.stringify({ actions: data }), 'utf8'); + } // Set value to AST to avoid restart. _.set(strapi.plugins['users-permissions'], 'config.actions', data); // Disable auto-reload. From cbcd8749a32ccd7ea8d96e523079c07a58b53849 Mon Sep 17 00:00:00 2001 From: Michael Barajas Date: Wed, 19 Dec 2018 14:40:33 -0500 Subject: [PATCH 05/66] Updated models to document mongodbs index --- docs/3.x.x/guides/models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.x.x/guides/models.md b/docs/3.x.x/guides/models.md index 50ca2245a8..48e4664901 100644 --- a/docs/3.x.x/guides/models.md +++ b/docs/3.x.x/guides/models.md @@ -56,7 +56,7 @@ If you're using SQL databases, you should use the native SQL constraints to appl - `required` (boolean) — if true adds a required validator for this property. - `unique` (boolean) — whether to define a unique index on this property. - - `index` (boolean) — adds an index on this property, this will use the default mongodb index for the type and will run in the background. + - `index` (boolean) — adds an index on this property, this will create a [single field index](https://docs.mongodb.com/manual/indexes/#single-field) that will run in the background. - `max` (integer) — checks if the value is greater than or equal to the given minimum. - `min` (integer) — checks if the value is less than or equal to the given maximum. From 7d039644fae62e63994546783fade20158db72ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdo=CC=81n=20Rodri=CC=81guez=20Davila?= Date: Sun, 23 Dec 2018 17:02:45 +0100 Subject: [PATCH 06/66] Check if plugins.json exists --- packages/strapi/lib/core/plugins.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/strapi/lib/core/plugins.js b/packages/strapi/lib/core/plugins.js index d239e96b0a..04e8b10625 100644 --- a/packages/strapi/lib/core/plugins.js +++ b/packages/strapi/lib/core/plugins.js @@ -88,8 +88,11 @@ module.exports = async function() { return; } - if (strapi.config.environment !== 'development') { + const existBuildPath = await fs.pathExists(buildPath); + if (strapi.config.environment !== 'development' && existBuildPath) { return; + } else if (strapi.config.environment !== 'development' && !existBuildPath) { + console.log('The plugins.json file is missing and the front-end cannot work without it. Please, create it first at development environment.'); } // arrange system directories @@ -97,7 +100,6 @@ module.exports = async function() { fs.remove(sourcePath), (async () => { - const existBuildPath = await fs.pathExists(buildPath); if (existBuildPath) { await fs.remove(buildPath); } else { From 382722b74c1b59d4c7d0560e9d0751f750f1d910 Mon Sep 17 00:00:00 2001 From: Paolo Ragone Date: Wed, 26 Dec 2018 11:10:35 +1300 Subject: [PATCH 07/66] Fix provider query building bug Fixes #2536 Does so by fixing the parameters to the query call --- .../strapi-plugin-users-permissions/services/Providers.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/strapi-plugin-users-permissions/services/Providers.js b/packages/strapi-plugin-users-permissions/services/Providers.js index 158674e7b9..79e7e891b4 100644 --- a/packages/strapi-plugin-users-permissions/services/Providers.js +++ b/packages/strapi-plugin-users-permissions/services/Providers.js @@ -47,7 +47,10 @@ exports.connect = (provider, query) => { try { const users = await strapi.query('user', 'users-permissions').find({ where: { - email: profile.email + email: { + symbol: '=', + value: profile.email + } } }); @@ -85,6 +88,7 @@ exports.connect = (provider, query) => { return resolve([createdUser, null]); } catch (err) { + strapi.log.error(err) reject([null, err]); } }); From 947dd2b5023e2bcca42effeae6ccefab077388ad Mon Sep 17 00:00:00 2001 From: Paolo Ragone Date: Wed, 26 Dec 2018 12:11:12 +1300 Subject: [PATCH 08/66] Added missing semicolon --- packages/strapi-plugin-users-permissions/services/Providers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-plugin-users-permissions/services/Providers.js b/packages/strapi-plugin-users-permissions/services/Providers.js index 79e7e891b4..a281b8b4d7 100644 --- a/packages/strapi-plugin-users-permissions/services/Providers.js +++ b/packages/strapi-plugin-users-permissions/services/Providers.js @@ -88,7 +88,7 @@ exports.connect = (provider, query) => { return resolve([createdUser, null]); } catch (err) { - strapi.log.error(err) + strapi.log.error(err); reject([null, err]); } }); From b04ba69370254fa745ae63b91db3e587de15b4d2 Mon Sep 17 00:00:00 2001 From: Chaitanya Choudhary Date: Fri, 28 Dec 2018 14:17:12 +0530 Subject: [PATCH 09/66] Ability to use custom timestamps. --- packages/strapi-hook-bookshelf/lib/index.js | 10 +++++----- packages/strapi-hook-mongoose/lib/index.js | 5 ++++- .../admin/src/containers/EditPage/saga.js | 13 ++++--------- .../config/functions/bootstrap.js | 4 +++- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/strapi-hook-bookshelf/lib/index.js b/packages/strapi-hook-bookshelf/lib/index.js index c4e6b7a533..a57b73f54a 100644 --- a/packages/strapi-hook-bookshelf/lib/index.js +++ b/packages/strapi-hook-bookshelf/lib/index.js @@ -89,7 +89,7 @@ module.exports = function(strapi) { // Register the final model for Bookshelf. const loadedModel = _.assign({ tableName: definition.collectionName, - hasTimestamps: _.get(definition, 'options.timestamps') === true, + hasTimestamps: _.get(definition, 'options.timestamps'), idAttribute: _.get(definition, 'options.idAttribute', 'id'), associations: [], defaults: Object.keys(definition.attributes).reduce((acc, current) => { @@ -619,10 +619,10 @@ module.exports = function(strapi) { // Add created_at and updated_at field if timestamp option is true if (loadedModel.hasTimestamps) { - definition.attributes['created_at'] = { + definition.attributes[loadedModel.hasTimestamps[0]] = { type: 'timestamp' }; - definition.attributes['updated_at'] = { + definition.attributes[loadedModel.hasTimestamps[1]] = { type: 'timestampUpdate' }; } @@ -701,8 +701,8 @@ module.exports = function(strapi) { // Remove from attributes (auto handled by bookshlef and not displayed on ctb) if (loadedModel.hasTimestamps) { - delete definition.attributes['created_at']; - delete definition.attributes['updated_at']; + delete definition.attributes[loadedModel.hasTimestamps[0]]; + delete definition.attributes[loadedModel.hasTimestamps[1]]; } resolve(); diff --git a/packages/strapi-hook-mongoose/lib/index.js b/packages/strapi-hook-mongoose/lib/index.js index 025ea36247..0c3654837f 100644 --- a/packages/strapi-hook-mongoose/lib/index.js +++ b/packages/strapi-hook-mongoose/lib/index.js @@ -207,7 +207,10 @@ module.exports = function (strapi) { }); }); - collection.schema.set('timestamps', _.get(definition, 'options.timestamps') === true); + let timestamps = {}; + _.set(timestamps.createdAt, _.get(definition, 'options.timestamps[0]')); + _.set(timestamps.updatedAt, _.get(definition, 'options.timestamps[1]')); + collection.schema.set('timestamps', timestamps); collection.schema.set('minimize', _.get(definition, 'options.minimize', false) === true); collection.schema.options.toObject = collection.schema.options.toJSON = { diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/EditPage/saga.js b/packages/strapi-plugin-content-manager/admin/src/containers/EditPage/saga.js index 1c906ba375..cd94930713 100644 --- a/packages/strapi-plugin-content-manager/admin/src/containers/EditPage/saga.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/EditPage/saga.js @@ -77,15 +77,10 @@ export function* submit() { let shouldAddTranslationSuffix = false; // Remove the updated_at & created_at fields so it is updated correctly when using Postgres or MySQL db - if (record.updated_at) { - delete record.created_at; - delete record.updated_at; - } - - // Remove the updatedAt & createdAt fields so it is updated correctly when using MongoDB - if (record.updatedAt) { - delete record.createdAt; - delete record.updatedAt; + const timestamps = get(schema, ['models', currentModelName, 'options', 'timestamps'], null); + if (timestamps) { + delete record[timestamps[0]]; + delete record[timestamps[1]]; } try { diff --git a/packages/strapi-plugin-content-manager/config/functions/bootstrap.js b/packages/strapi-plugin-content-manager/config/functions/bootstrap.js index 19f95e9c33..3935330f40 100644 --- a/packages/strapi-plugin-content-manager/config/functions/bootstrap.js +++ b/packages/strapi-plugin-content-manager/config/functions/bootstrap.js @@ -17,6 +17,7 @@ const pickData = (model) => _.pick(model, [ 'globalId', 'globalName', 'orm', + 'options.timestamps', 'loadedModel', 'primaryKey', 'associations' @@ -330,8 +331,9 @@ module.exports = async cb => { // Here we just need to add the data from the current schema Object apisToAdd.map(apiPath => { const api = _.get(schema.models, apiPath); - const { search, filters, bulkActions, pageEntries } = _.get(prevSchema, 'generalSettings'); + const { search, filters, bulkActions, pageEntries, options } = _.get(prevSchema, 'generalSettings'); + _.set(api, 'options', options); _.set(api, 'filters', filters); _.set(api, 'search', search); _.set(api, 'bulkActions', bulkActions); From 6835fdf4263e6af7f2981cc4a198ebeed6d2b75b Mon Sep 17 00:00:00 2001 From: Chaitanya Choudhary Date: Fri, 28 Dec 2018 17:04:36 +0530 Subject: [PATCH 10/66] Handle different types of timestamp values --- packages/strapi-hook-bookshelf/lib/index.js | 19 +++++++++++++------ packages/strapi-hook-mongoose/lib/index.js | 14 ++++++++++---- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/packages/strapi-hook-bookshelf/lib/index.js b/packages/strapi-hook-bookshelf/lib/index.js index a57b73f54a..3d1c0649b6 100644 --- a/packages/strapi-hook-bookshelf/lib/index.js +++ b/packages/strapi-hook-bookshelf/lib/index.js @@ -89,7 +89,7 @@ module.exports = function(strapi) { // Register the final model for Bookshelf. const loadedModel = _.assign({ tableName: definition.collectionName, - hasTimestamps: _.get(definition, 'options.timestamps'), + hasTimestamps: _.get(definition, 'options.timestamps', false), idAttribute: _.get(definition, 'options.idAttribute', 'id'), associations: [], defaults: Object.keys(definition.attributes).reduce((acc, current) => { @@ -100,7 +100,14 @@ module.exports = function(strapi) { return acc; }, {}) }, definition.options); - + // Use default timestamp column names if value is `true` + if (_.get(loadedModel, 'hasTimestamps') === true) { + _.set(loadedModel, 'hasTimestamps', ['created_at', 'updated_at']); + } + // Use false for values other than `Boolean` or `Array` + if (!_.isArray(_.get(loadedModel, 'hasTimestamps')) || !_.isBoolean(_.get(loadedModel, 'hasTimestamps'))) { + _.set(loadedModel, 'hasTimestamps', false); + } if (_.isString(_.get(connection, 'options.pivot_prefix'))) { loadedModel.toJSON = function(options = {}) { const { shallow = false, omitPivot = false } = options; @@ -619,10 +626,10 @@ module.exports = function(strapi) { // Add created_at and updated_at field if timestamp option is true if (loadedModel.hasTimestamps) { - definition.attributes[loadedModel.hasTimestamps[0]] = { + definition.attributes[_.isString(loadedModel.hasTimestamps[0]) ? loadedModel.hasTimestamps[0] : 'created_at'] = { type: 'timestamp' }; - definition.attributes[loadedModel.hasTimestamps[1]] = { + definition.attributes[_.isString(loadedModel.hasTimestamps[1]) ? loadedModel.hasTimestamps[1] : 'updated_at'] = { type: 'timestampUpdate' }; } @@ -701,8 +708,8 @@ module.exports = function(strapi) { // Remove from attributes (auto handled by bookshlef and not displayed on ctb) if (loadedModel.hasTimestamps) { - delete definition.attributes[loadedModel.hasTimestamps[0]]; - delete definition.attributes[loadedModel.hasTimestamps[1]]; + delete definition.attributes[_.isString(loadedModel.hasTimestamps[0]) ? loadedModel.hasTimestamps[0] : 'created_at']; + delete definition.attributes[_.isString(loadedModel.hasTimestamps[1]) ? loadedModel.hasTimestamps[1] : 'updated_at']; } resolve(); diff --git a/packages/strapi-hook-mongoose/lib/index.js b/packages/strapi-hook-mongoose/lib/index.js index 0c3654837f..80ab48fcaf 100644 --- a/packages/strapi-hook-mongoose/lib/index.js +++ b/packages/strapi-hook-mongoose/lib/index.js @@ -207,10 +207,16 @@ module.exports = function (strapi) { }); }); - let timestamps = {}; - _.set(timestamps.createdAt, _.get(definition, 'options.timestamps[0]')); - _.set(timestamps.updatedAt, _.get(definition, 'options.timestamps[1]')); - collection.schema.set('timestamps', timestamps); + // Use provided timestamps if the elemnets in the array are string else use default. + if (_.isArray(_.get(definition, 'options.timestamps'))) { + const timestamps = { + createdAt: _.isString(_.get(definition, 'options.timestamps[0]')) ? _.get(definition, 'options.timestamps[0]') : 'createdAt', + updatedAt: _.isString(_.get(definition, 'options.timestamps[1]')) ? _.get(definition, 'options.timestamps[1]') : 'updatedAt' + }; + collection.schema.set('timestamps', timestamps); + } else { + collection.schema.set('timestamps', _.get(definition, 'options.timestamps') === true); + } collection.schema.set('minimize', _.get(definition, 'options.minimize', false) === true); collection.schema.options.toObject = collection.schema.options.toJSON = { From 1c4aafae5b30c08272c0022a3e3219375afbf3ff Mon Sep 17 00:00:00 2001 From: Chaitanya Choudhary Date: Fri, 28 Dec 2018 19:24:24 +0530 Subject: [PATCH 11/66] Fixed conditional statement for hasTimestamps --- packages/strapi-hook-bookshelf/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-hook-bookshelf/lib/index.js b/packages/strapi-hook-bookshelf/lib/index.js index 3d1c0649b6..abfaa347bb 100644 --- a/packages/strapi-hook-bookshelf/lib/index.js +++ b/packages/strapi-hook-bookshelf/lib/index.js @@ -105,7 +105,7 @@ module.exports = function(strapi) { _.set(loadedModel, 'hasTimestamps', ['created_at', 'updated_at']); } // Use false for values other than `Boolean` or `Array` - if (!_.isArray(_.get(loadedModel, 'hasTimestamps')) || !_.isBoolean(_.get(loadedModel, 'hasTimestamps'))) { + if (!_.isArray(_.get(loadedModel, 'hasTimestamps')) && !_.isBoolean(_.get(loadedModel, 'hasTimestamps'))) { _.set(loadedModel, 'hasTimestamps', false); } if (_.isString(_.get(connection, 'options.pivot_prefix'))) { From 3950503acfba9fa989cad5d0ab9d9cba67a0a2ce Mon Sep 17 00:00:00 2001 From: Justin Greene Date: Sun, 30 Dec 2018 18:17:05 -0600 Subject: [PATCH 12/66] Update inquirer to fix windows console freezing --- packages/strapi-generate-new/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index fdfb911a97..20428b7a8c 100644 --- a/packages/strapi-generate-new/package.json +++ b/packages/strapi-generate-new/package.json @@ -15,7 +15,7 @@ "dependencies": { "enpeem": "^2.2.0", "fs-extra": "^4.0.0", - "inquirer": "^4.0.2", + "inquirer": "^6.2.1", "listr": "^0.14.1", "lodash": "^4.17.5", "ora": "^2.1.0", @@ -49,4 +49,4 @@ "npm": ">= 6.0.0" }, "license": "MIT" -} \ No newline at end of file +} From 9755836c5d2ca0ca222c554ef46d515adb603ae6 Mon Sep 17 00:00:00 2001 From: Justin Greene Date: Sun, 30 Dec 2018 18:17:58 -0600 Subject: [PATCH 13/66] Update inquirer to fix windows hang --- packages/strapi-hook-bookshelf/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-hook-bookshelf/package.json b/packages/strapi-hook-bookshelf/package.json index 2a02e9b4ed..5c9cbc5ba2 100644 --- a/packages/strapi-hook-bookshelf/package.json +++ b/packages/strapi-hook-bookshelf/package.json @@ -17,7 +17,7 @@ "main": "./lib", "dependencies": { "bookshelf": "^0.12.1", - "inquirer": "^5.2.0", + "inquirer": "^6.2.1", "lodash": "^4.17.5", "pluralize": "^6.0.0", "rimraf": "^2.6.2", @@ -56,4 +56,4 @@ "npm": ">= 6.0.0" }, "license": "MIT" -} \ No newline at end of file +} From 2ab9be48ee87f8a76812268d84f8565b15a8e6f0 Mon Sep 17 00:00:00 2001 From: soupette Date: Thu, 3 Jan 2019 17:24:06 +0100 Subject: [PATCH 14/66] Fixes #2555 --- .../strapi-plugin-users-permissions/config/routes.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/strapi-plugin-users-permissions/config/routes.json b/packages/strapi-plugin-users-permissions/config/routes.json index 848bfbb616..5598810339 100644 --- a/packages/strapi-plugin-users-permissions/config/routes.json +++ b/packages/strapi-plugin-users-permissions/config/routes.json @@ -111,6 +111,14 @@ "policies": [] } }, + { + "method": "GET", + "path": "/permissions", + "handler": "UsersPermissions.getPermissions", + "config": { + "policies": [] + } + }, { "method": "GET", "path": "/providers", From ed16bdb30548719561a8c664a09d95535849c6e3 Mon Sep 17 00:00:00 2001 From: codarrior Date: Fri, 4 Jan 2019 17:13:04 +1100 Subject: [PATCH 15/66] Update deployment guide with helpful hint Deployment guide enhanced for helpful hint for production environment setup. --- docs/3.x.x/guides/deployment.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/3.x.x/guides/deployment.md b/docs/3.x.x/guides/deployment.md index 3c69f63588..eaf8a6da34 100644 --- a/docs/3.x.x/guides/deployment.md +++ b/docs/3.x.x/guides/deployment.md @@ -21,6 +21,22 @@ Update the `production` settings with the IP and domain name where the project w In case your database is not running on the same server, make sure that the environment of your production database (`./config/environments/production/database.json`) is set properly. +If you are passing a number of configuration item values via environment variables which is always encouraged for production environment to keep application stateless, checkout the section for [Dynamic Configuration](../configurations/configurations.md#dynamic-configurations). Here is a hint on how to do it for production, for the configuration mentioned above: + + **Path —** `./config/environments/production/server.json`. +```js +{ + "host": "${process.env.APP_HOST || '127.0.0.1'}" + "port": "${process.env.NODE_PORT || 1337}", + "autoReload": { + "enabled": false + }, + "admin": { + "path": "/dashboard" // We highly recommend to change the default `/admin` path for security reasons. + } +} +``` + **⚠️ If you changed the path to access to the administration, the step #2 is required.** #### #2 - Setup (optional) From dd4d869e0122485ee21976824ac2065dc86f4c19 Mon Sep 17 00:00:00 2001 From: Chaitanya Choudhary Date: Fri, 4 Jan 2019 15:22:07 +0530 Subject: [PATCH 16/66] Fixed mongo updated timestamp issue. --- .../strapi-plugin-content-manager/config/functions/bootstrap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/strapi-plugin-content-manager/config/functions/bootstrap.js b/packages/strapi-plugin-content-manager/config/functions/bootstrap.js index 3935330f40..3886c5b8cc 100644 --- a/packages/strapi-plugin-content-manager/config/functions/bootstrap.js +++ b/packages/strapi-plugin-content-manager/config/functions/bootstrap.js @@ -85,6 +85,7 @@ module.exports = async cb => { pageEntries: 10, defaultSort: model.primaryKey, sort: 'ASC', + options: model.options, editDisplay: { availableFields: {}, fields: [], From febd868feef9ac2a4bf9c5bf78c11cc8b467fbb3 Mon Sep 17 00:00:00 2001 From: Chaitanya Choudhary Date: Fri, 4 Jan 2019 15:40:47 +0530 Subject: [PATCH 17/66] Updated documentation for timestamp values. --- docs/3.x.x/guides/models.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/3.x.x/guides/models.md b/docs/3.x.x/guides/models.md index c286de9bc6..edb9cc73f3 100644 --- a/docs/3.x.x/guides/models.md +++ b/docs/3.x.x/guides/models.md @@ -27,6 +27,7 @@ The info key on the model-json states information about the model. This informat The options key on the model-json states. - `idAttribute`: This tells the model which attribute to expect as the unique identifier for each database row (typically an auto-incrementing primary key named 'id'). _Only valid for strapi-hook-bookshelf_ - `idAttributeType`: Data type of `idAttribute`, accepted list of value bellow. _Only valid for strapi-hook-bookshelf_ + - `timestamps`: This tells the model which attributes to use for timestamps. Accepts either `boolean` or `Array` of strings where frist element is create data and second elemtent is update date. Default value when set to `true` for Bookshelf is `["created_at", "updated_at"]` and for MongoDB is `["createdAt", "updatedAt"]`. ## Define the attributes From c025bc87cbf20752925e4a3815f37cd63ed46e4e Mon Sep 17 00:00:00 2001 From: Patrick Black Date: Fri, 4 Jan 2019 11:20:43 -0600 Subject: [PATCH 18/66] Grammar improvements --- docs/3.x.x/getting-started/installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/3.x.x/getting-started/installation.md b/docs/3.x.x/getting-started/installation.md index 821079ca66..683a1d7c0c 100644 --- a/docs/3.x.x/getting-started/installation.md +++ b/docs/3.x.x/getting-started/installation.md @@ -28,9 +28,9 @@ npm install strapi@alpha -g If you encounter npm permissions issues, [change the permissions to npm default directory](https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-1-change-the-permission-to-npms-default-directory). ::: -It takes about 20 seconds with a good Internet connection. You can take a coffee ☕️ if you have a slow one. +It takes about 20 seconds with a good Internet connection. You can take a coffee ☕️ break if your internet is slow. -Having troubles during the installation? Check if someone already had the [same issue](https://github.com/strapi/strapi/issues). If not, please [post one](https://github.com/strapi/strapi/issues/new). +Having troubles during the installation? Check if someone already had the [same issue](https://github.com/strapi/strapi/issues). If not, please [submit an issue](https://github.com/strapi/strapi/issues/new). ## Check installation From e0c8243259764ecf9b3ccee1cb53b7655cd038c4 Mon Sep 17 00:00:00 2001 From: Patrick Black Date: Fri, 4 Jan 2019 13:31:11 -0600 Subject: [PATCH 19/66] More friendly / grammar updates --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ded3a2b0a9..dcabfe8d68 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Node: * NodeJS >= 10.x * NPM >= 6.x -**Please note that right now Node 11 is not Officially supported, and the current Node LTS (v10) should be used.** +**Please note that right now Node 11 is not supported, and the current Node LTS (v10) should be used.** Database: * MongoDB >= 3.x @@ -71,8 +71,8 @@ Database: npm install strapi@alpha -g ```` -**We recommend to use the latest version of Strapi to start your new project**. -Some breaking changes might happen, new releases are shipped every two weeks to fix/enhance the product. +**We recommend always using the latest version of Strapi to start your new project**. +As this project is currently in Alpha, some breaking changes may occur. New releases are shipped every two weeks to fix/enhance the project. #### 🏗 Create a new project @@ -80,7 +80,7 @@ Some breaking changes might happen, new releases are shipped every two weeks to strapi new my-project ``` -It will generate a brand new project with the default features (authentication, permissions, content management, content type builder & file upload). +This command will generate a brand new project with the default features (authentication, permissions, content management, content type builder & file upload). #### 🚀 Start your project @@ -109,8 +109,7 @@ Be aware that one of the content type builder won't work due to the writing file ## Features -- **Modern Admin Panel:** - Elegant, entirely customizable and fully extensible admin panel. +- **Modern Admin Panel:** Elegant, entirely customizable and fully extensible admin panel. - **Secure by default:** Reusable policies, CSRF, CORS, P3P, Xframe, XSS, and more. - **Plugins Oriented:** Install auth system, content management, custom plugins, and more, in seconds. - **Blazing Fast:** Built on top of Node.js, Strapi delivers amazing performances. @@ -133,7 +132,7 @@ For more information on the upcoming version, please take a look to our [ROADMAP For general help using Strapi, please refer to [the official Strapi documentation](https://strapi.io/documentation/). For additional help, you can use one of this channel to ask question: - [StackOverflow](http://stackoverflow.com/questions/tagged/strapi) -- [Slack](http://slack.strapi.io) (highly recommended for realtime support) +- [Slack](http://slack.strapi.io) (highly recommended for faster support) - [GitHub](https://github.com/strapi/strapi) - [Twitter](https://twitter.com/strapijs) - [Facebook](https://www.facebook.com/Strapi-616063331867161). From e1079ce362be253dcef6770bd9072d2f37777d0d Mon Sep 17 00:00:00 2001 From: Paolo Ragone Date: Sat, 5 Jan 2019 09:51:06 +1300 Subject: [PATCH 20/66] Added comment so linting doesn't go crazy on generated service files --- .../strapi-generate-api/templates/bookshelf/service.template | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/strapi-generate-api/templates/bookshelf/service.template b/packages/strapi-generate-api/templates/bookshelf/service.template index c21d5f54a5..a0d1bc496d 100644 --- a/packages/strapi-generate-api/templates/bookshelf/service.template +++ b/packages/strapi-generate-api/templates/bookshelf/service.template @@ -1,3 +1,4 @@ +/* global <%= globalID %> */ 'use strict'; /** From 2b3af8300c44a229370aadb4b26a70d7fb7cc3be Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Sun, 6 Jan 2019 14:00:04 +0100 Subject: [PATCH 21/66] Add migration of jwt.json file --- .../migration-guide/migration-guide-alpha.10-to-alpha.11.md | 2 +- .../migration-guide/migration-guide-alpha.11-to-alpha.12.md | 2 +- .../migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md | 2 +- .../migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md | 2 +- .../migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md | 2 +- .../migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md | 2 +- .../migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md | 2 +- .../migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md | 2 +- .../migration-guide/migration-guide-alpha.12.7-to-alpha.13.md | 2 +- .../migration-guide/migration-guide-alpha.13-to-alpha.13.1.md | 2 +- .../migration-guide/migration-guide-alpha.13.1-to-alpha.14.md | 2 +- .../migration-guide/migration-guide-alpha.14-to-alpha.14.1.md | 2 +- .../migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md | 2 +- .../migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md | 2 +- .../migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md | 2 +- .../migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md | 2 +- .../migration-guide/migration-guide-alpha.14.5-to-alpha.15.md | 2 +- .../migration-guide/migration-guide-alpha.15-to-alpha.16.md | 2 +- .../migration-guide/migration-guide-alpha.16-to-alpha.17.md | 2 +- .../migration-guide/migration-guide-alpha.17-to-alpha.18.md | 2 +- .../3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md | 2 +- .../migration-guide/migration-guide-alpha.9-to-alpha.10.md | 2 +- .../admin/src/containers/AuthPage/saga.js | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.10-to-alpha.11.md b/docs/3.x.x/migration-guide/migration-guide-alpha.10-to-alpha.11.md index ee8ae2bc7b..499da425b4 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.10-to-alpha.11.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.10-to-alpha.11.md @@ -49,7 +49,7 @@ Delete your old admin folder and replace it by the new one. Copy this file `/plugins/users-permissions/config/jwt.json` **from your old project** and paste it in the corresponding one in your new project. -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.11-to-alpha.12.md b/docs/3.x.x/migration-guide/migration-guide-alpha.11-to-alpha.12.md index 99f919af0b..b241352b6d 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.11-to-alpha.12.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.11-to-alpha.12.md @@ -45,7 +45,7 @@ Delete your old admin folder and replace it by the new one. ## Update the Plugins -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md index 617e4ceb4f..a46511eaee 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it by the new one. If you did custom update on one of the plugin, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md index 8a5c3fcc04..eb73c78b2a 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md @@ -52,7 +52,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md index 3e6cb83e65..d2047ad8fd 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md @@ -51,7 +51,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md index 40383792be..96f7896bc5 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md index 0c501cec7c..582d46174c 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md @@ -52,7 +52,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md index e5e572c1c7..c837e6ee86 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.7-to-alpha.13.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.7-to-alpha.13.md index ab9ca361c1..ea64fa1317 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.7-to-alpha.13.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.7-to-alpha.13.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.13-to-alpha.13.1.md b/docs/3.x.x/migration-guide/migration-guide-alpha.13-to-alpha.13.1.md index 115d438be3..4753f0d87a 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.13-to-alpha.13.1.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.13-to-alpha.13.1.md @@ -51,7 +51,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.13.1-to-alpha.14.md b/docs/3.x.x/migration-guide/migration-guide-alpha.13.1-to-alpha.14.md index 6bcf9c6266..be26b35945 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.13.1-to-alpha.14.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.13.1-to-alpha.14.md @@ -51,7 +51,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14-to-alpha.14.1.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14-to-alpha.14.1.md index be905d6945..46bab8798c 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14-to-alpha.14.1.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14-to-alpha.14.1.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md index efb9d11724..70ae766485 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md index dcca160861..65f7374d82 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md index 44b7ccf907..52a24ffe6f 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md @@ -44,7 +44,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md index 5af978fd02..f395127c84 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.5-to-alpha.15.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.5-to-alpha.15.md index e481ea6586..90a0ec9a83 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.5-to-alpha.15.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.5-to-alpha.15.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.15-to-alpha.16.md b/docs/3.x.x/migration-guide/migration-guide-alpha.15-to-alpha.16.md index 8da2aaf60f..e9a103e80b 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.15-to-alpha.16.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.15-to-alpha.16.md @@ -48,7 +48,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.16-to-alpha.17.md b/docs/3.x.x/migration-guide/migration-guide-alpha.16-to-alpha.17.md index 4a2bb70ac6..dc8aa358f8 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.16-to-alpha.17.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.16-to-alpha.17.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md b/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md index 048f573b62..77baf53262 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md b/docs/3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md index 396bef9ab2..7186ae1a48 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md @@ -60,7 +60,7 @@ Delete your old admin folder and replace it by the new one. Copy this file `/plugins/users-permissions/config/jwt.json` **from your old project** and paste it in the corresponding one in your new project. -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.9-to-alpha.10.md b/docs/3.x.x/migration-guide/migration-guide-alpha.9-to-alpha.10.md index 6d6f698585..41ee41e793 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.9-to-alpha.10.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.9-to-alpha.10.md @@ -49,7 +49,7 @@ Delete your old admin folder and replace it by the new one. Copy this file `/plugins/users-permissions/config/jwt.json` **from your old project** and paste it in the corresponding one in your new project. -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/packages/strapi-plugin-users-permissions/admin/src/containers/AuthPage/saga.js b/packages/strapi-plugin-users-permissions/admin/src/containers/AuthPage/saga.js index 3d8f4addb7..a72ff96c22 100644 --- a/packages/strapi-plugin-users-permissions/admin/src/containers/AuthPage/saga.js +++ b/packages/strapi-plugin-users-permissions/admin/src/containers/AuthPage/saga.js @@ -37,7 +37,7 @@ export function* submitForm(action) { const response = yield call(request, requestURL, { method: 'POST', body: omit(body, 'news') }); if(get(response, 'user.role.name', '') === 'Administrator' || isRegister){ - + yield call(auth.setToken, response.jwt, body.rememberMe); yield call(auth.setUserInfo, response.user, body.rememberMe); } From a23fe2c307016996eddd03640199d410b3ac3a9d Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Sun, 6 Jan 2019 15:17:59 +0100 Subject: [PATCH 22/66] Remove relations route from bookshelf template --- .../strapi-generate-api/json/routes.json.js | 25 ---------------- .../templates/bookshelf/controller.template | 30 ------------------- 2 files changed, 55 deletions(-) diff --git a/packages/strapi-generate-api/json/routes.json.js b/packages/strapi-generate-api/json/routes.json.js index 7f65faf4af..3fba474798 100644 --- a/packages/strapi-generate-api/json/routes.json.js +++ b/packages/strapi-generate-api/json/routes.json.js @@ -64,31 +64,6 @@ module.exports = scope => { }] }; - if (scope.args.tpl && scope.args.tpl !== 'mongoose') { - routes.routes.push({ - method: 'POST', - path: '/' + scope.idPluralized + '/:' + tokenID + '/relationships/:relation', - handler: scope.globalID + '.createRelation', - config: { - policies: [] - } - }, { - method: 'PUT', - path: '/' + scope.idPluralized + '/:' + tokenID + '/relationships/:relation', - handler: scope.globalID + '.updateRelation', - config: { - policies: [] - } - }, { - method: 'DELETE', - path: '/' + scope.idPluralized + '/:' + tokenID + '/relationships/:relation', - handler: scope.globalID + '.destroyRelation', - config: { - policies: [] - } - }); - } - return routes; } diff --git a/packages/strapi-generate-api/templates/bookshelf/controller.template b/packages/strapi-generate-api/templates/bookshelf/controller.template index 48ed7c3a4f..e8da47f529 100644 --- a/packages/strapi-generate-api/templates/bookshelf/controller.template +++ b/packages/strapi-generate-api/templates/bookshelf/controller.template @@ -70,35 +70,5 @@ module.exports = { destroy: async (ctx, next) => { return strapi.services.<%= id %>.remove(ctx.params); - }, - - /** - * Add relation to a/an <%= id %> record. - * - * @return {Object} - */ - - createRelation: async (ctx, next) => { - return strapi.services.<%= id %>.addRelation(ctx.params, ctx.request.body); - }, - - /** - * Update relation to a/an <%= id %> record. - * - * @return {Object} - */ - - updateRelation: async (ctx, next) => { - return strapi.services.<%= id %>.editRelation(ctx.params, ctx.request.body); - }, - - /** - * Destroy relation to a/an <%= id %> record. - * - * @return {Object} - */ - - destroyRelation: async (ctx, next) => { - return strapi.services.<%= id %>.removeRelation(ctx.params, ctx.request.body); } }; From 71cac31e57472f475762b3102d9a276c9217cc21 Mon Sep 17 00:00:00 2001 From: invader Date: Sun, 6 Jan 2019 21:44:52 +0300 Subject: [PATCH 23/66] admin: fix typos and punctuation in ru locale --- .../admin/src/translations/ru.json | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/strapi-admin/admin/src/translations/ru.json b/packages/strapi-admin/admin/src/translations/ru.json index 86ce858d85..be3f6aac43 100644 --- a/packages/strapi-admin/admin/src/translations/ru.json +++ b/packages/strapi-admin/admin/src/translations/ru.json @@ -16,9 +16,9 @@ "Users": "Пользователи", "Users & Permissions": "Пользователи & Доступы", "app.components.BlockLink.code": "Примеры кода", - "app.components.BlockLink.code.content": "Обучайтесь на реальных проектах разработанных в сообществе.", + "app.components.BlockLink.code.content": "Обучайтесь на реальных проектах, разработанных в сообществе.", "app.components.BlockLink.documentation": "Прочитать документацию", - "app.components.BlockLink.documentation.content": "Ознакомтесь с концепциями, документацией и обучающими материалами.", + "app.components.BlockLink.documentation.content": "Ознакомьтесь с концепциями, документацией и обучающими материалами.", "app.components.Button.cancel": "Отменить", "app.components.Button.save": "Сохранить", "app.components.ComingSoonPage.comingSoon": "Скоро", @@ -42,7 +42,7 @@ "app.components.HomePage.welcome": "Добро пожаловать!", "app.components.HomePage.welcome.again": "Добро пожаловать", "app.components.HomePage.welcomeBlock.content": "Мы рады, что вы вступили в сообщество. Нам необходима обратная связь для развития проекта, поэтому не стесняйтесь писать нам ", - "app.components.HomePage.welcomeBlock.content.again": "Надеемся у вы делаете успехи в вашем проекте... Следите с последними новостями о Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт основываясь на ваших пожеланиях.", + "app.components.HomePage.welcomeBlock.content.again": "Надеемся, что вы делаете успехи в вашем проекте... Следите с последними новостями о Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт основываясь на ваших пожеланиях.", "app.components.HomePage.welcomeBlock.content.issues": "проблема.", "app.components.HomePage.welcomeBlock.content.raise": " или поднять ", "app.components.ImgPreview.hint": "Перетащите файл в эту область или {browse} для загрузки файла", @@ -56,7 +56,7 @@ "app.components.InstallPluginPage.InputSearch.placeholder": "Искать плагин... (ex: authentication)", "app.components.InstallPluginPage.description": "Расширяйте ваше приложение без усилий.", "app.components.InstallPluginPage.helmet": "Магазин - Плагины", - "app.components.InstallPluginPage.plugin.support-us.description": "Поддержите нас купив футболку Strapi. Это поможет нам продолжать работу над проектом, чтобы предоставить вам наилучшее из возможных решений!", + "app.components.InstallPluginPage.plugin.support-us.description": "Поддержите нас, купив футболку Strapi. Это поможет нам продолжать работу над проектом, чтобы предоставить вам наилучшее из возможных решений!", "app.components.InstallPluginPage.title": "Магазин - Плагины", "app.components.InstallPluginPopup.downloads": "скачать", "app.components.InstallPluginPopup.navLink.avis": "avis", @@ -70,23 +70,23 @@ "app.components.LeftMenuLinkContainer.general": "Общие", "app.components.LeftMenuLinkContainer.installNewPlugin": "Магазин", "app.components.LeftMenuLinkContainer.listPlugins": "Плагины", - "app.components.LeftMenuLinkContainer.noPluginsInstalled": "Нет установленых плагинов", + "app.components.LeftMenuLinkContainer.noPluginsInstalled": "Нет установленных плагинов", "app.components.LeftMenuLinkContainer.plugins": "Плагины", - "app.components.ListPluginsPage.description": "Список установленых плагинов.", + "app.components.ListPluginsPage.description": "Список установленных плагинов.", "app.components.ListPluginsPage.helmet.title": "Список плагинов", "app.components.ListPluginsPage.title": "Плагины", "app.components.NotFoundPage.back": "Вернуться на главную", "app.components.NotFoundPage.description": "Не найдено", "app.components.Official": "Официальный", "app.components.PluginCard.Button.label.download": "Скачать", - "app.components.PluginCard.Button.label.install": "Уже становленно", + "app.components.PluginCard.Button.label.install": "Уже установленно", "app.components.PluginCard.Button.label.support": "Поддержать нас", "app.components.PluginCard.compatible": "Совместимо с вашим приложением", "app.components.PluginCard.compatibleCommunity": "Совместимо с сообществом", "app.components.PluginCard.more-details": "Больше деталей", "app.components.PluginCard.price.free": "Бесплатно", "app.components.listPlugins.button": "Добавить новый плагин", - "app.components.listPlugins.title.none": "Нет установленых плагинов", + "app.components.listPlugins.title.none": "Нет установленных плагинов", "app.components.listPlugins.title.plural": "{number} плагинов установленно", "app.components.listPlugins.title.singular": "{number} плагин установлен", "app.components.listPluginsPage.deletePlugin.error": "Возникла ошибка при установке плагина", @@ -109,9 +109,9 @@ "components.Input.error.validation.minLength": "Слишком короткое.", "components.Input.error.validation.minSupMax": "Не может быть выше", "components.Input.error.validation.regex": "Не соответствует регулярному выражению.", - "components.Input.error.validation.required": "Необходимое поле для заполнение.", + "components.Input.error.validation.required": "Необходимое поле для заполнения.", "components.ListRow.empty": "Нет данных для отображения.", - "components.OverlayBlocker.description": "Вы воспользовались функционалом который требует перезапуска сервера. Пожалуста подождете пока подниметься сервер.", + "components.OverlayBlocker.description": "Вы воспользовались функционалом, который требует перезапуска сервера. Пожалуйста, подождете пока поднимется сервер.", "components.OverlayBlocker.title": "Ожидание перезапуска...", "components.PageFooter.select": "записей на странице", "components.ProductionBlocker.description": "Для безопасности мы должны заблокировать его для других вариантов.", @@ -128,13 +128,13 @@ "components.Wysiwyg.selectOptions.title": "Добавить заголовок", "components.WysiwygBottomControls.charactersIndicators": "букв", "components.WysiwygBottomControls.fullscreen": "Развернуть", - "components.WysiwygBottomControls.uploadFiles": "Перетащите файлы в эту область, добавляйте из буфер обмена или {browse}.", + "components.WysiwygBottomControls.uploadFiles": "Перетащите файлы в эту область, добавляйте из буфера обмена или {browse}.", "components.WysiwygBottomControls.uploadFiles.browse": "выделите их", "components.popUpWarning.button.cancel": "Отменить", "components.popUpWarning.button.confirm": "Подтвердить", "components.popUpWarning.message": "Вы уверены, что хотите удалить это?", - "components.popUpWarning.title": "Пожалуйста подтвердите", + "components.popUpWarning.title": "Пожалуйста, подтвердите", "notification.error": "Произошла ошибка", "notification.error.layout": "Не удалось получить макет", "request.error.model.unknown": "Модель данных не существует" -} \ No newline at end of file +} From fe7cef549d1ad94d45565874675805e723e4fe81 Mon Sep 17 00:00:00 2001 From: invader Date: Sun, 6 Jan 2019 22:20:14 +0300 Subject: [PATCH 24/66] admin: update ru locale for home page welcome block --- packages/strapi-admin/admin/src/translations/ru.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/strapi-admin/admin/src/translations/ru.json b/packages/strapi-admin/admin/src/translations/ru.json index be3f6aac43..39ef159c9e 100644 --- a/packages/strapi-admin/admin/src/translations/ru.json +++ b/packages/strapi-admin/admin/src/translations/ru.json @@ -41,10 +41,10 @@ "app.components.HomePage.support.link": "ЗАКАЗАТЬ НАШУ ФУТБОЛКУ СЕЙЧАС", "app.components.HomePage.welcome": "Добро пожаловать!", "app.components.HomePage.welcome.again": "Добро пожаловать", - "app.components.HomePage.welcomeBlock.content": "Мы рады, что вы вступили в сообщество. Нам необходима обратная связь для развития проекта, поэтому не стесняйтесь писать нам ", + "app.components.HomePage.welcomeBlock.content": "Мы рады, что вы присоединились к сообществу. Нам необходима обратная связь для развития проекта, поэтому не стесняйтесь писать нам в ", "app.components.HomePage.welcomeBlock.content.again": "Надеемся, что вы делаете успехи в вашем проекте... Следите с последними новостями о Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт основываясь на ваших пожеланиях.", - "app.components.HomePage.welcomeBlock.content.issues": "проблема.", - "app.components.HomePage.welcomeBlock.content.raise": " или поднять ", + "app.components.HomePage.welcomeBlock.content.issues": "проблемах.", + "app.components.HomePage.welcomeBlock.content.raise": " или сообщать о ", "app.components.ImgPreview.hint": "Перетащите файл в эту область или {browse} для загрузки файла", "app.components.ImgPreview.hint.browse": "просмотреть", "app.components.InputFile.newFile": "Добавить новый файл", From ec899b3be46039f1b0127626148f7a093bd02d62 Mon Sep 17 00:00:00 2001 From: invader Date: Sun, 6 Jan 2019 23:41:12 +0300 Subject: [PATCH 25/66] admin russian locale: more typo --- packages/strapi-admin/admin/src/translations/ru.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-admin/admin/src/translations/ru.json b/packages/strapi-admin/admin/src/translations/ru.json index 39ef159c9e..761047a1e3 100644 --- a/packages/strapi-admin/admin/src/translations/ru.json +++ b/packages/strapi-admin/admin/src/translations/ru.json @@ -27,7 +27,7 @@ "app.components.DownloadInfo.text": "Это может занять около минуты. Спасибо за ваше терпение.", "app.components.EmptyAttributes.title": "Пока нет полей", "app.components.HomePage.button.blog": "СМОТРИТЕ БОЛЬШЕ В БЛОГЕ", - "app.components.HomePage.button.quickStart": "ОЗНАКОМТЕСЬ С РУКОВОДСТВОМ ПО БЫСТРОМУ СТАРТУ", + "app.components.HomePage.button.quickStart": "ОЗНАКОМЬТЕСЬ С РУКОВОДСТВОМ ПО БЫСТРОМУ СТАРТУ", "app.components.HomePage.community": "Найти сообщество в интернете", "app.components.HomePage.community.content": "Обсудите с членами команды и разработчиками в разных каналах", "app.components.HomePage.create": "Создайте ваш первый Тип Контента", @@ -42,7 +42,7 @@ "app.components.HomePage.welcome": "Добро пожаловать!", "app.components.HomePage.welcome.again": "Добро пожаловать", "app.components.HomePage.welcomeBlock.content": "Мы рады, что вы присоединились к сообществу. Нам необходима обратная связь для развития проекта, поэтому не стесняйтесь писать нам в ", - "app.components.HomePage.welcomeBlock.content.again": "Надеемся, что вы делаете успехи в вашем проекте... Следите с последними новостями о Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт основываясь на ваших пожеланиях.", + "app.components.HomePage.welcomeBlock.content.again": "Надеемся, что вы делаете успехи в вашем проекте... Следите за последними новостями о Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт, основываясь на ваших пожеланиях.", "app.components.HomePage.welcomeBlock.content.issues": "проблемах.", "app.components.HomePage.welcomeBlock.content.raise": " или сообщать о ", "app.components.ImgPreview.hint": "Перетащите файл в эту область или {browse} для загрузки файла", From a72b05f2911847b9c277f02d402093ddaffb4596 Mon Sep 17 00:00:00 2001 From: invader Date: Mon, 7 Jan 2019 00:21:25 +0300 Subject: [PATCH 26/66] admin: better texts for russian locale --- .../strapi-admin/admin/src/translations/ru.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/strapi-admin/admin/src/translations/ru.json b/packages/strapi-admin/admin/src/translations/ru.json index 761047a1e3..2651e04ee0 100644 --- a/packages/strapi-admin/admin/src/translations/ru.json +++ b/packages/strapi-admin/admin/src/translations/ru.json @@ -18,7 +18,7 @@ "app.components.BlockLink.code": "Примеры кода", "app.components.BlockLink.code.content": "Обучайтесь на реальных проектах, разработанных в сообществе.", "app.components.BlockLink.documentation": "Прочитать документацию", - "app.components.BlockLink.documentation.content": "Ознакомьтесь с концепциями, документацией и обучающими материалами.", + "app.components.BlockLink.documentation.content": "Ознакомьтесь с концепциями, справочниками и обучающими материалами.", "app.components.Button.cancel": "Отменить", "app.components.Button.save": "Сохранить", "app.components.ComingSoonPage.comingSoon": "Скоро", @@ -27,17 +27,17 @@ "app.components.DownloadInfo.text": "Это может занять около минуты. Спасибо за ваше терпение.", "app.components.EmptyAttributes.title": "Пока нет полей", "app.components.HomePage.button.blog": "СМОТРИТЕ БОЛЬШЕ В БЛОГЕ", - "app.components.HomePage.button.quickStart": "ОЗНАКОМЬТЕСЬ С РУКОВОДСТВОМ ПО БЫСТРОМУ СТАРТУ", - "app.components.HomePage.community": "Найти сообщество в интернете", - "app.components.HomePage.community.content": "Обсудите с членами команды и разработчиками в разных каналах", + "app.components.HomePage.button.quickStart": "ОЗНАКОМИТЬСЯ С РУКОВОДСТВОМ ПО БЫСТРОМУ СТАРТУ", + "app.components.HomePage.community": "Найдите сообщество в интернете", + "app.components.HomePage.community.content": "Обсуждайте с членами команды и разработчиками в разных каналах", "app.components.HomePage.create": "Создайте ваш первый Тип Контента", "app.components.HomePage.createBlock.content.first": " ", - "app.components.HomePage.createBlock.content.second": " плагин поможет вам создать структуру ваших данных. Если вы новичок, мы настоятельно рекомендуем вам следить за нашими ", + "app.components.HomePage.createBlock.content.second": " — плагин, который поможет вам определить структуру ваших данных. Если вы новичок, мы настоятельно рекомендуем вам изучить наше ", "app.components.HomePage.createBlock.content.tutorial": " руководство.", - "app.components.HomePage.cta": "ПОДТВЕРДИТЬ", - "app.components.HomePage.newsLetter": "Подпишитесь на рассылку, чтобы быть в курсе новостей о Strapi", + "app.components.HomePage.cta": "ПОДПИСАТЬСЯ", + "app.components.HomePage.newsLetter": "Подпишитесь на нашу рассылку, чтобы быть в курсе новостей Strapi", "app.components.HomePage.support": "ПОДДЕРЖИТЕ НАС", - "app.components.HomePage.support.content": "Купите футболку, это поможет нам продолжать работу над проектом, чтобы предоставить вам наилучшее из возможных решений!", + "app.components.HomePage.support.content": "Покупая футболку, вы помогаете нам продолжать работу над проектом и предоставлять вам наилучшее из возможных решений!", "app.components.HomePage.support.link": "ЗАКАЗАТЬ НАШУ ФУТБОЛКУ СЕЙЧАС", "app.components.HomePage.welcome": "Добро пожаловать!", "app.components.HomePage.welcome.again": "Добро пожаловать", From 6d488931b15827fdb090243b297eaab9d82e7628 Mon Sep 17 00:00:00 2001 From: invader Date: Mon, 7 Jan 2019 01:14:33 +0300 Subject: [PATCH 27/66] admin: fix text in img preview for Russian locale --- packages/strapi-admin/admin/src/translations/ru.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-admin/admin/src/translations/ru.json b/packages/strapi-admin/admin/src/translations/ru.json index 2651e04ee0..72a4346ce1 100644 --- a/packages/strapi-admin/admin/src/translations/ru.json +++ b/packages/strapi-admin/admin/src/translations/ru.json @@ -45,8 +45,8 @@ "app.components.HomePage.welcomeBlock.content.again": "Надеемся, что вы делаете успехи в вашем проекте... Следите за последними новостями о Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт, основываясь на ваших пожеланиях.", "app.components.HomePage.welcomeBlock.content.issues": "проблемах.", "app.components.HomePage.welcomeBlock.content.raise": " или сообщать о ", - "app.components.ImgPreview.hint": "Перетащите файл в эту область или {browse} для загрузки файла", - "app.components.ImgPreview.hint.browse": "просмотреть", + "app.components.ImgPreview.hint": "Перетащите файл в эту область или {browse} файл для загрузки", + "app.components.ImgPreview.hint.browse": "выберите", "app.components.InputFile.newFile": "Добавить новый файл", "app.components.InputFileDetails.open": "Открыть в новой вкладке", "app.components.InputFileDetails.originalName": "Первоначальное название:", From cedf4a8cb660e2973571fc18b033b0f2907457b5 Mon Sep 17 00:00:00 2001 From: invader Date: Mon, 7 Jan 2019 01:29:39 +0300 Subject: [PATCH 28/66] admin: russian locale text improvements --- packages/strapi-admin/admin/src/translations/ru.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/strapi-admin/admin/src/translations/ru.json b/packages/strapi-admin/admin/src/translations/ru.json index 72a4346ce1..a81ff0ff58 100644 --- a/packages/strapi-admin/admin/src/translations/ru.json +++ b/packages/strapi-admin/admin/src/translations/ru.json @@ -42,7 +42,7 @@ "app.components.HomePage.welcome": "Добро пожаловать!", "app.components.HomePage.welcome.again": "Добро пожаловать", "app.components.HomePage.welcomeBlock.content": "Мы рады, что вы присоединились к сообществу. Нам необходима обратная связь для развития проекта, поэтому не стесняйтесь писать нам в ", - "app.components.HomePage.welcomeBlock.content.again": "Надеемся, что вы делаете успехи в вашем проекте... Следите за последними новостями о Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт, основываясь на ваших пожеланиях.", + "app.components.HomePage.welcomeBlock.content.again": "Надеемся, что вы делаете успехи в вашем проекте... Следите за последними новостями Strapi. Мы стараемся изо всех сил, чтобы улучшить продукт, основываясь на ваших пожеланиях.", "app.components.HomePage.welcomeBlock.content.issues": "проблемах.", "app.components.HomePage.welcomeBlock.content.raise": " или сообщать о ", "app.components.ImgPreview.hint": "Перетащите файл в эту область или {browse} файл для загрузки", @@ -111,7 +111,7 @@ "components.Input.error.validation.regex": "Не соответствует регулярному выражению.", "components.Input.error.validation.required": "Необходимое поле для заполнения.", "components.ListRow.empty": "Нет данных для отображения.", - "components.OverlayBlocker.description": "Вы воспользовались функционалом, который требует перезапуска сервера. Пожалуйста, подождете пока поднимется сервер.", + "components.OverlayBlocker.description": "Вы воспользовались функционалом, который требует перезапуска сервера. Пожалуйста, подождете.", "components.OverlayBlocker.title": "Ожидание перезапуска...", "components.PageFooter.select": "записей на странице", "components.ProductionBlocker.description": "Для безопасности мы должны заблокировать его для других вариантов.", @@ -128,7 +128,7 @@ "components.Wysiwyg.selectOptions.title": "Добавить заголовок", "components.WysiwygBottomControls.charactersIndicators": "букв", "components.WysiwygBottomControls.fullscreen": "Развернуть", - "components.WysiwygBottomControls.uploadFiles": "Перетащите файлы в эту область, добавляйте из буфера обмена или {browse}.", + "components.WysiwygBottomControls.uploadFiles": "Перетащите файлы в эту область, вставьте из буфера обмена или {browse}.", "components.WysiwygBottomControls.uploadFiles.browse": "выделите их", "components.popUpWarning.button.cancel": "Отменить", "components.popUpWarning.button.confirm": "Подтвердить", From dbd1d68ccc9021d8528b9dafbbd7b7b955851bbe Mon Sep 17 00:00:00 2001 From: invader Date: Mon, 7 Jan 2019 01:26:04 +0300 Subject: [PATCH 29/66] admin: add intl support in Logout component and add ru translations --- .../strapi-admin/admin/src/components/Logout/index.js | 11 +++++++++-- packages/strapi-admin/admin/src/translations/ru.json | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/strapi-admin/admin/src/components/Logout/index.js b/packages/strapi-admin/admin/src/components/Logout/index.js index c97d9a9c35..03c15244a6 100644 --- a/packages/strapi-admin/admin/src/components/Logout/index.js +++ b/packages/strapi-admin/admin/src/components/Logout/index.js @@ -5,6 +5,7 @@ */ import React from 'react'; +import { FormattedMessage } from 'react-intl'; import { get } from 'lodash'; import PropTypes from 'prop-types'; import { ButtonDropdown, DropdownItem, DropdownMenu, DropdownToggle } from 'reactstrap'; @@ -40,10 +41,16 @@ class Logout extends React.Component { // eslint-disable-line react/prefer-state - Profile + - Logout + diff --git a/packages/strapi-admin/admin/src/translations/ru.json b/packages/strapi-admin/admin/src/translations/ru.json index 86ce858d85..240ce0cedd 100644 --- a/packages/strapi-admin/admin/src/translations/ru.json +++ b/packages/strapi-admin/admin/src/translations/ru.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "Список установленых плагинов.", "app.components.ListPluginsPage.helmet.title": "Список плагинов", "app.components.ListPluginsPage.title": "Плагины", + "app.components.Logout.profile": "Профиль", + "app.components.Logout.logout": "Выйти", "app.components.NotFoundPage.back": "Вернуться на главную", "app.components.NotFoundPage.description": "Не найдено", "app.components.Official": "Официальный", From 8e87f42289c80d37a6568fa79c65d336e1e1c63b Mon Sep 17 00:00:00 2001 From: invader Date: Mon, 7 Jan 2019 01:56:34 +0300 Subject: [PATCH 30/66] admin: add logout component translation keys to every locale (google translate) --- packages/strapi-admin/admin/src/translations/ar.json | 4 +++- packages/strapi-admin/admin/src/translations/de.json | 2 ++ packages/strapi-admin/admin/src/translations/en.json | 4 +++- packages/strapi-admin/admin/src/translations/es.json | 4 +++- packages/strapi-admin/admin/src/translations/fr.json | 2 ++ packages/strapi-admin/admin/src/translations/it.json | 2 ++ packages/strapi-admin/admin/src/translations/ja.json | 2 ++ packages/strapi-admin/admin/src/translations/ko.json | 4 +++- packages/strapi-admin/admin/src/translations/nl.json | 4 +++- packages/strapi-admin/admin/src/translations/pl.json | 2 ++ packages/strapi-admin/admin/src/translations/pt-BR.json | 2 ++ packages/strapi-admin/admin/src/translations/pt.json | 4 +++- packages/strapi-admin/admin/src/translations/tr.json | 4 +++- packages/strapi-admin/admin/src/translations/zh-Hans.json | 4 +++- packages/strapi-admin/admin/src/translations/zh.json | 4 +++- 15 files changed, 39 insertions(+), 9 deletions(-) diff --git a/packages/strapi-admin/admin/src/translations/ar.json b/packages/strapi-admin/admin/src/translations/ar.json index 6202ac2ee8..434cc5bb7c 100644 --- a/packages/strapi-admin/admin/src/translations/ar.json +++ b/packages/strapi-admin/admin/src/translations/ar.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "قائمة الإضافيات المثبتة في المشروع.", "app.components.ListPluginsPage.helmet.title": "قائمة الإضافات", "app.components.ListPluginsPage.title": "الإضافات", + "app.components.Logout.profile": "الملف الشخصي", + "app.components.Logout.logout": "الخروج", "app.components.NotFoundPage.back": "العودة للرئيسية", "app.components.NotFoundPage.description": "لا يوجد", "app.components.Official": "الرسمية", @@ -138,4 +140,4 @@ "notification.error.layout": "تعذّر استرداد التنسيق", "request.error.model.unknow": "هذا النموذج غير موجود", "request.error.model.unknown": "هذا النموذج غير موجود" -} \ No newline at end of file +} diff --git a/packages/strapi-admin/admin/src/translations/de.json b/packages/strapi-admin/admin/src/translations/de.json index 05ecb5c30d..70cc7a304a 100644 --- a/packages/strapi-admin/admin/src/translations/de.json +++ b/packages/strapi-admin/admin/src/translations/de.json @@ -75,6 +75,8 @@ "app.components.LeftMenuLinkContainer.plugins": "Plugins", "app.components.ListPluginsPage.description": "Liste aller im Projekt installierten Plugins.", "app.components.ListPluginsPage.helmet.title": "Plugins anzeigen", + "app.components.Logout.profile": "Profil", + "app.components.Logout.logout": "Ausloggen", "app.components.ListPluginsPage.title": "Plugins", "app.components.NotFoundPage.back": "Zurück zur Homepage", "app.components.NotFoundPage.description": "Nicht gefunden", diff --git a/packages/strapi-admin/admin/src/translations/en.json b/packages/strapi-admin/admin/src/translations/en.json index ed3f265cfe..f54f55f160 100644 --- a/packages/strapi-admin/admin/src/translations/en.json +++ b/packages/strapi-admin/admin/src/translations/en.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "List of the installed plugins in the project.", "app.components.ListPluginsPage.helmet.title": "List plugins", "app.components.ListPluginsPage.title": "Plugins", + "app.components.Logout.profile": "Profile", + "app.components.Logout.logout": "Logout", "app.components.NotFoundPage.back": "Back to homepage", "app.components.NotFoundPage.description": "Not Found", "app.components.Official": "Official", @@ -138,4 +140,4 @@ "notification.error.layout": "Couldn't retrieve the layout", "request.error.model.unknown": "This model doesn't exist", "app.utils.delete": "Delete" -} \ No newline at end of file +} diff --git a/packages/strapi-admin/admin/src/translations/es.json b/packages/strapi-admin/admin/src/translations/es.json index d12f1837f6..fb109317e3 100644 --- a/packages/strapi-admin/admin/src/translations/es.json +++ b/packages/strapi-admin/admin/src/translations/es.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "Lista de los plugins instalados en el proyecto.", "app.components.ListPluginsPage.helmet.title": "Lista de plugins", "app.components.ListPluginsPage.title": "Plugins", + "app.components.Logout.profile": "Perfil", + "app.components.Logout.logout": "Cerrar sesión", "app.components.NotFoundPage.back": "Volver a la página de inicio", "app.components.NotFoundPage.description": "No encontrado", "app.components.Official": "Oficial", @@ -138,4 +140,4 @@ "notification.error.layout": "No se pudo recuperar el esquema", "request.error.model.unknown": "Este modelo no existe", "app.utils.delete": "Eliminar" -} \ No newline at end of file +} diff --git a/packages/strapi-admin/admin/src/translations/fr.json b/packages/strapi-admin/admin/src/translations/fr.json index 7f002a80e8..8734c39f8c 100644 --- a/packages/strapi-admin/admin/src/translations/fr.json +++ b/packages/strapi-admin/admin/src/translations/fr.json @@ -75,6 +75,8 @@ "app.components.LeftMenuLinkContainer.plugins": "Plugins", "app.components.ListPluginsPage.description": "Liste des plugins installés dans le projet.", "app.components.ListPluginsPage.helmet.title": "List plugins", + "app.components.Logout.profile": "Profil", + "app.components.Logout.logout": "Connectez - Out", "app.components.ListPluginsPage.title": "Plugins", "app.components.NotFoundPage.back": "Retourner à la page d'accueil", "app.components.NotFoundPage.description": "Page introuvable", diff --git a/packages/strapi-admin/admin/src/translations/it.json b/packages/strapi-admin/admin/src/translations/it.json index 6e97e59eca..872f38ee0e 100644 --- a/packages/strapi-admin/admin/src/translations/it.json +++ b/packages/strapi-admin/admin/src/translations/it.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "Lista dei plugin installati nel progetto.", "app.components.ListPluginsPage.helmet.title": "Lista plugin", "app.components.ListPluginsPage.title": "Plugins", + "app.components.Logout.profile": "Profilo", + "app.components.Logout.logout": "Disconnettersi", "app.components.NotFoundPage.back": "Torna alla home", "app.components.NotFoundPage.description": "Non trovato", "app.components.Official": "Ufficiale", diff --git a/packages/strapi-admin/admin/src/translations/ja.json b/packages/strapi-admin/admin/src/translations/ja.json index dc940acb2f..4207c7f8b3 100644 --- a/packages/strapi-admin/admin/src/translations/ja.json +++ b/packages/strapi-admin/admin/src/translations/ja.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "このプロジェクトでインストールされたプラグイン一覧", "app.components.ListPluginsPage.helmet.title": "プラグイン一覧", "app.components.ListPluginsPage.title": "プラグイン", + "app.components.Logout.profile": "プロフィール", + "app.components.Logout.logout": "ログアウト", "app.components.NotFoundPage.back": "ホームページに戻る", "app.components.NotFoundPage.description": "見つかりません", "app.components.Official": "オフィシャル", diff --git a/packages/strapi-admin/admin/src/translations/ko.json b/packages/strapi-admin/admin/src/translations/ko.json index 50f7c3321b..8fd25623f2 100644 --- a/packages/strapi-admin/admin/src/translations/ko.json +++ b/packages/strapi-admin/admin/src/translations/ko.json @@ -74,6 +74,8 @@ "app.components.ListPluginsPage.description": "이 프로젝트에 설치된 플러그인 목록입니다.", "app.components.ListPluginsPage.helmet.title": "플러그인 목록", "app.components.ListPluginsPage.title": "플러그인", + "app.components.Logout.profile": "옆모습", + "app.components.Logout.logout": "로그 아웃", "app.components.NotFoundPage.back": "홈으로 돌아가기", "app.components.NotFoundPage.description": "찾을 수 없는 페이지입니다.", "app.components.Official": "공식", @@ -136,4 +138,4 @@ "notification.error": "에러가 발생했습니다.", "notification.error.layout": "레이아웃을 가져올 수 없습니다.", "request.error.model.unknown": "모델이 없습니다." -} \ No newline at end of file +} diff --git a/packages/strapi-admin/admin/src/translations/nl.json b/packages/strapi-admin/admin/src/translations/nl.json index aba6364ec7..cc573ccf02 100644 --- a/packages/strapi-admin/admin/src/translations/nl.json +++ b/packages/strapi-admin/admin/src/translations/nl.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "Lijst van alle plugins voor dit project", "app.components.ListPluginsPage.helmet.title": "Alle extensies", "app.components.ListPluginsPage.title": "Extensies", + "app.components.Logout.profile": "Profil", + "app.components.Logout.logout": "Log ud", "app.components.NotFoundPage.back": "Terug naar home pagina", "app.components.NotFoundPage.description": "Niets gevonden", "app.components.Official": "Officieel", @@ -137,4 +139,4 @@ "notification.error": "Er is een fout opgetreden", "notification.error.layout": "Kon de opzet niet laden", "request.error.model.unknown": "Dit model bestaat niet" -} \ No newline at end of file +} diff --git a/packages/strapi-admin/admin/src/translations/pl.json b/packages/strapi-admin/admin/src/translations/pl.json index a0f72f429e..521e345e75 100644 --- a/packages/strapi-admin/admin/src/translations/pl.json +++ b/packages/strapi-admin/admin/src/translations/pl.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "Lista zainstalowanych wtyczek w projekcie.", "app.components.ListPluginsPage.helmet.title": "Lista wtyczek", "app.components.ListPluginsPage.title": "Wtyczki", + "app.components.Logout.profile": "Profil", + "app.components.Logout.logout": "Wyloguj", "app.components.NotFoundPage.back": "Powrót do strony głównej", "app.components.NotFoundPage.description": "Nie znaleziono", "app.components.Official": "Oficjalna", diff --git a/packages/strapi-admin/admin/src/translations/pt-BR.json b/packages/strapi-admin/admin/src/translations/pt-BR.json index 0c1282247e..f47a81e4d5 100644 --- a/packages/strapi-admin/admin/src/translations/pt-BR.json +++ b/packages/strapi-admin/admin/src/translations/pt-BR.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "Lista de extensões instaladas no projeto.", "app.components.ListPluginsPage.helmet.title": "Lista de extensões", "app.components.ListPluginsPage.title": "Extensões", + "app.components.Logout.profile": "Perfil", + "app.components.Logout.logout": "Sair", "app.components.NotFoundPage.back": "Voltar à página inicial", "app.components.NotFoundPage.description": "Não encontrado", "app.components.Official": "Oficial", diff --git a/packages/strapi-admin/admin/src/translations/pt.json b/packages/strapi-admin/admin/src/translations/pt.json index 7e2be79f02..9cbe9da034 100644 --- a/packages/strapi-admin/admin/src/translations/pt.json +++ b/packages/strapi-admin/admin/src/translations/pt.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "Lista de extensões instaladas no projecto.", "app.components.ListPluginsPage.helmet.title": "Lista de extensões", "app.components.ListPluginsPage.title": "Extensões", + "app.components.Logout.profile": "Perfil", + "app.components.Logout.logout": "Sair", "app.components.NotFoundPage.back": "Voltar à página inicial", "app.components.NotFoundPage.description": "Não encontrado", "app.components.Official": "Oficial", @@ -137,4 +139,4 @@ "notification.error": "Ocorreu um erro", "notification.error.layout": "Não foi possível recuperar o layout", "request.error.model.unknown": "Este modelo não existe" -} \ No newline at end of file +} diff --git a/packages/strapi-admin/admin/src/translations/tr.json b/packages/strapi-admin/admin/src/translations/tr.json index a617294458..e381ea668a 100644 --- a/packages/strapi-admin/admin/src/translations/tr.json +++ b/packages/strapi-admin/admin/src/translations/tr.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "Projedeki yüklenen eklentiler.", "app.components.ListPluginsPage.helmet.title": "Eklenti Listesi", "app.components.ListPluginsPage.title": "Etklentiler", + "app.components.Logout.profile": "Profil", + "app.components.Logout.logout": "Çıkış Yap", "app.components.NotFoundPage.back": "Anasayfaya geri dön", "app.components.NotFoundPage.description": "Bulunamadı", "app.components.Official": "Resmi", @@ -138,4 +140,4 @@ "notification.error.layout": "Düzen alınamadı", "request.error.model.unknown": "Bu model bulunmamaktadır.", "app.utils.delete": "Sil" -} \ No newline at end of file +} diff --git a/packages/strapi-admin/admin/src/translations/zh-Hans.json b/packages/strapi-admin/admin/src/translations/zh-Hans.json index 666d0f9b29..196a24fa43 100644 --- a/packages/strapi-admin/admin/src/translations/zh-Hans.json +++ b/packages/strapi-admin/admin/src/translations/zh-Hans.json @@ -72,6 +72,8 @@ "app.components.ListPluginsPage.description": "项目中已安装的插件列表", "app.components.ListPluginsPage.helmet.title": "插件列表", "app.components.ListPluginsPage.title": "插件", + "app.components.Logout.profile": "轮廓", + "app.components.Logout.logout": "登出", "app.components.NotFoundPage.back": "返回主页", "app.components.NotFoundPage.description": "没有找到", "app.components.Official": "官方", @@ -133,4 +135,4 @@ "notification.error": "发生了一个错误", "notification.error.layout": "无法获取布局", "request.error.model.unknown": "这个模型已不存在" -} \ No newline at end of file +} diff --git a/packages/strapi-admin/admin/src/translations/zh.json b/packages/strapi-admin/admin/src/translations/zh.json index d00b103c4f..8a343ea8e3 100644 --- a/packages/strapi-admin/admin/src/translations/zh.json +++ b/packages/strapi-admin/admin/src/translations/zh.json @@ -75,6 +75,8 @@ "app.components.ListPluginsPage.description": "這個專案安裝的擴充功能列表", "app.components.ListPluginsPage.helmet.title": "擴充功能列表", "app.components.ListPluginsPage.title": "擴充功能", + "app.components.Logout.profile": "輪廓", + "app.components.Logout.logout": "登出", "app.components.NotFoundPage.back": "回到主頁", "app.components.NotFoundPage.description": "找不到此頁面", "app.components.Official": "官方", @@ -138,4 +140,4 @@ "notification.error.layout": "無法取得佈局", "request.error.model.unknown": "不存在的資料", "app.utils.delete": "刪除" -} \ No newline at end of file +} From e34be57d52ba5eb334470d05f9737a2825d96556 Mon Sep 17 00:00:00 2001 From: invader Date: Mon, 7 Jan 2019 02:00:04 +0300 Subject: [PATCH 31/66] admin: AdminPage container - define prop types for getAdminData --- packages/strapi-admin/admin/src/containers/AdminPage/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/strapi-admin/admin/src/containers/AdminPage/index.js b/packages/strapi-admin/admin/src/containers/AdminPage/index.js index 72c6a31ce9..0580bb6dea 100644 --- a/packages/strapi-admin/admin/src/containers/AdminPage/index.js +++ b/packages/strapi-admin/admin/src/containers/AdminPage/index.js @@ -256,6 +256,7 @@ AdminPage.propTypes = { blockApp: PropTypes.bool.isRequired, disableGlobalOverlayBlocker: PropTypes.func.isRequired, enableGlobalOverlayBlocker: PropTypes.func.isRequired, + getAdminData: PropTypes.func.isRequired, hasUserPlugin: PropTypes.bool, history: PropTypes.object.isRequired, isAppLoading: PropTypes.bool, From aba68be9d48476730103c5465f603d0503cd1fab Mon Sep 17 00:00:00 2001 From: invader Date: Mon, 7 Jan 2019 02:03:35 +0300 Subject: [PATCH 32/66] admin: remove defaultMessages in Logout component (now keys defined in all locales) --- .../strapi-admin/admin/src/components/Logout/index.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/strapi-admin/admin/src/components/Logout/index.js b/packages/strapi-admin/admin/src/components/Logout/index.js index 03c15244a6..2f94aabc0a 100644 --- a/packages/strapi-admin/admin/src/components/Logout/index.js +++ b/packages/strapi-admin/admin/src/components/Logout/index.js @@ -41,16 +41,10 @@ class Logout extends React.Component { // eslint-disable-line react/prefer-state - + - + From c660ac57b27bc251abba8dd385498e09c6e79907 Mon Sep 17 00:00:00 2001 From: Trevor Kirpaul Date: Mon, 7 Jan 2019 22:42:40 -0500 Subject: [PATCH 33/66] fixed grammar in Documentation withing the 'guides' section on the 'filters' page --- docs/3.x.x/guides/filters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.x.x/guides/filters.md b/docs/3.x.x/guides/filters.md index 262bf885b9..315401fd59 100644 --- a/docs/3.x.x/guides/filters.md +++ b/docs/3.x.x/guides/filters.md @@ -82,7 +82,7 @@ Requests system can be implemented in custom code sections. ### Extracting requests filters -To extract the filters from an JavaScript object or a request, you need to call the [`strapi.utils.models.convertParams` helper](../api-reference/reference.md#strapiutils). +To extract the filters from a JavaScript object or a request, you need to call the [`strapi.utils.models.convertParams` helper](../api-reference/reference.md#strapiutils). ::: note The returned objects are formatted according to the ORM used by the model. From e08d8a2fb15b263854c03c0bc542268e917f84e8 Mon Sep 17 00:00:00 2001 From: DMehaffy Date: Tue, 8 Jan 2019 05:49:28 -0700 Subject: [PATCH 34/66] Update PR Template with database testing checks --- .github/PULL_REQUEST_TEMPLATE.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0b97e00b61..f8fdeddbf3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,6 +14,13 @@ Main update on the: - [ ] Framework - [ ] Plugin + +Manual testing done on the follow databases: +- [ ] Not applicable +- [ ] MongoDB +- [ ] MySQL +- [ ] Postgres + From e41948de3f997e63db672a14f22a1ba7bb14d4a1 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Wed, 9 Jan 2019 14:19:39 +0100 Subject: [PATCH 35/66] Add setting for production environment --- .../files/config/environments/production/server.json | 1 + .../files/config/environments/staging/server.json | 1 + packages/strapi-plugin-graphql/services/Schema.js | 2 +- .../services/UsersPermissions.js | 2 +- packages/strapi/lib/core/plugins.js | 4 ++-- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/strapi-generate-new/files/config/environments/production/server.json b/packages/strapi-generate-new/files/config/environments/production/server.json index 4e5d9d1b5e..a72d469d48 100644 --- a/packages/strapi-generate-new/files/config/environments/production/server.json +++ b/packages/strapi-generate-new/files/config/environments/production/server.json @@ -1,6 +1,7 @@ { "host": "localhost", "port": "${process.env.PORT || 1337}", + "production": true, "proxy": { "enabled": false }, diff --git a/packages/strapi-generate-new/files/config/environments/staging/server.json b/packages/strapi-generate-new/files/config/environments/staging/server.json index 4e5d9d1b5e..a72d469d48 100644 --- a/packages/strapi-generate-new/files/config/environments/staging/server.json +++ b/packages/strapi-generate-new/files/config/environments/staging/server.json @@ -1,6 +1,7 @@ { "host": "localhost", "port": "${process.env.PORT || 1337}", + "production": true, "proxy": { "enabled": false }, diff --git a/packages/strapi-plugin-graphql/services/Schema.js b/packages/strapi-plugin-graphql/services/Schema.js index dcb8a29949..dc5d28261b 100644 --- a/packages/strapi-plugin-graphql/services/Schema.js +++ b/packages/strapi-plugin-graphql/services/Schema.js @@ -266,7 +266,7 @@ module.exports = { resolvers, }); - if (strapi.config.environment === 'development') { + if (!strapi.config.currentEnvironment.server.production) { // Write schema. this.writeGenerateSchema(graphql.printSchema(schema)); } diff --git a/packages/strapi-plugin-users-permissions/services/UsersPermissions.js b/packages/strapi-plugin-users-permissions/services/UsersPermissions.js index 35ed7cfdf6..6df284bd8e 100644 --- a/packages/strapi-plugin-users-permissions/services/UsersPermissions.js +++ b/packages/strapi-plugin-users-permissions/services/UsersPermissions.js @@ -438,7 +438,7 @@ module.exports = { try { // Disable auto-reload. strapi.reload.isWatching = false; - if (strapi.config.environment === 'development') { + if (!strapi.config.currentEnvironment.server.production) { // Rewrite actions.json file. fs.writeFileSync(actionsPath, JSON.stringify({ actions: data }), 'utf8'); } diff --git a/packages/strapi/lib/core/plugins.js b/packages/strapi/lib/core/plugins.js index 04e8b10625..a22cf4dfec 100644 --- a/packages/strapi/lib/core/plugins.js +++ b/packages/strapi/lib/core/plugins.js @@ -89,9 +89,9 @@ module.exports = async function() { } const existBuildPath = await fs.pathExists(buildPath); - if (strapi.config.environment !== 'development' && existBuildPath) { + if (strapi.config.currentEnvironment.server.production && existBuildPath) { return; - } else if (strapi.config.environment !== 'development' && !existBuildPath) { + } else if (strapi.config.currentEnvironment.server.production && !existBuildPath) { console.log('The plugins.json file is missing and the front-end cannot work without it. Please, create it first at development environment.'); } From 934d2a3739b37c33f06165a250130215e604e42f Mon Sep 17 00:00:00 2001 From: Pierre Burgy Date: Thu, 10 Jan 2019 16:11:58 +0100 Subject: [PATCH 36/66] Add Documentation and Help links --- .../src/components/LeftMenuFooter/index.js | 20 +++++++++++++-- .../components/LeftMenuFooter/messages.json | 8 ++++++ .../src/components/LeftMenuFooter/styles.scss | 21 +++++++++------- .../src/components/LeftMenuLink/index.js | 25 ++++++++++++++++--- .../LeftMenuLinkContainer/styles.scss | 1 + .../admin/src/containers/AdminPage/index.js | 1 + .../admin/src/translations/en.json | 2 ++ .../admin/src/translations/fr.json | 2 ++ 8 files changed, 66 insertions(+), 14 deletions(-) diff --git a/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js b/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js index fda0e7abc4..c1957b2a08 100644 --- a/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js +++ b/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js @@ -8,6 +8,8 @@ import React from 'react'; import { defineMessages, FormattedMessage } from 'react-intl'; import { PropTypes } from 'prop-types'; +import LeftMenuLink from 'components/LeftMenuLink'; + import styles from './styles.scss'; import messages from './messages.json'; defineMessages(messages); @@ -15,8 +17,22 @@ defineMessages(messages); function LeftMenuFooter({ version }) { // eslint-disable-line react/prefer-stateless-function return (
- - v{version} +
    + + +
+
+ + v{version} +
); } diff --git a/packages/strapi-admin/admin/src/components/LeftMenuFooter/messages.json b/packages/strapi-admin/admin/src/components/LeftMenuFooter/messages.json index 1259c5c559..6db35356c0 100644 --- a/packages/strapi-admin/admin/src/components/LeftMenuFooter/messages.json +++ b/packages/strapi-admin/admin/src/components/LeftMenuFooter/messages.json @@ -1,4 +1,12 @@ { + "documentation": { + "id": "app.components.LeftMenuFooter.documentation", + "defaultMessage": "Documentation" + }, + "help": { + "id": "app.components.LeftMenuFooter.help", + "defaultMessage": "Help" + }, "poweredBy": { "id": "app.components.LeftMenuFooter.poweredBy", "defaultMessage": "Proudly powered by " diff --git a/packages/strapi-admin/admin/src/components/LeftMenuFooter/styles.scss b/packages/strapi-admin/admin/src/components/LeftMenuFooter/styles.scss index ad1f464c5d..b75b326c92 100644 --- a/packages/strapi-admin/admin/src/components/LeftMenuFooter/styles.scss +++ b/packages/strapi-admin/admin/src/components/LeftMenuFooter/styles.scss @@ -3,6 +3,18 @@ .leftMenuFooter { /* stylelint-disable */ position: absolute; + width: 100%; + background: $left-menu-bg; + bottom: 0; +} + +.list { + list-style: none; + padding: 0; + margin-bottom: 0; +} + +.poweredBy { width: 100%; display: flex; justify-content: space-between; @@ -11,19 +23,10 @@ padding-left: 15px; padding-right: 15px; line-height: 3rem; - font-family: 'Lato'; background-color: rgba(255, 255, 255, .02); font-size: 1rem; font-weight: 400; letter-spacing: 0.05rem; vertical-align: middle; color: $strapi-gray-light; - - a { - color: #0097f7; - } - - select{ - outline: none; - } } diff --git a/packages/strapi-admin/admin/src/components/LeftMenuLink/index.js b/packages/strapi-admin/admin/src/components/LeftMenuLink/index.js index d37f84e0bc..3ee932c32c 100644 --- a/packages/strapi-admin/admin/src/components/LeftMenuLink/index.js +++ b/packages/strapi-admin/admin/src/components/LeftMenuLink/index.js @@ -47,8 +47,22 @@ class LeftMenuLink extends React.Component { {this.props.label} ); - return ( -
  • + // Icon. + const icon = ; + + // Create external or internal link. + const link = this.props.destination.includes('http') + ? ( + + {icon} + {content} + + ) + : ( - + {icon} {content} + ); + + return ( +
  • + {link} {plugin}
  • ); diff --git a/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/styles.scss b/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/styles.scss index bdf52d6f93..ac571ffbea 100644 --- a/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/styles.scss +++ b/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/styles.scss @@ -3,6 +3,7 @@ .leftMenuLinkContainer { /* stylelint-ignore */ padding-top: .6rem; + padding-bottom: 10.2rem; // LeftMenuFooter height position: absolute; top: 60px; right: 0; diff --git a/packages/strapi-admin/admin/src/containers/AdminPage/index.js b/packages/strapi-admin/admin/src/containers/AdminPage/index.js index 72c6a31ce9..0580bb6dea 100644 --- a/packages/strapi-admin/admin/src/containers/AdminPage/index.js +++ b/packages/strapi-admin/admin/src/containers/AdminPage/index.js @@ -256,6 +256,7 @@ AdminPage.propTypes = { blockApp: PropTypes.bool.isRequired, disableGlobalOverlayBlocker: PropTypes.func.isRequired, enableGlobalOverlayBlocker: PropTypes.func.isRequired, + getAdminData: PropTypes.func.isRequired, hasUserPlugin: PropTypes.bool, history: PropTypes.object.isRequired, isAppLoading: PropTypes.bool, diff --git a/packages/strapi-admin/admin/src/translations/en.json b/packages/strapi-admin/admin/src/translations/en.json index ed3f265cfe..a2f0084ee1 100644 --- a/packages/strapi-admin/admin/src/translations/en.json +++ b/packages/strapi-admin/admin/src/translations/en.json @@ -65,6 +65,8 @@ "app.components.InstallPluginPopup.navLink.faq": "faq", "app.components.InstallPluginPopup.navLink.screenshots": "Screenshots", "app.components.InstallPluginPopup.noDescription": "No description available", + "app.components.LeftMenuFooter.documentation": "Documentation", + "app.components.LeftMenuFooter.help": "Help", "app.components.LeftMenuFooter.poweredBy": "Powered by ", "app.components.LeftMenuLinkContainer.configuration": "Configurations", "app.components.LeftMenuLinkContainer.general": "General", diff --git a/packages/strapi-admin/admin/src/translations/fr.json b/packages/strapi-admin/admin/src/translations/fr.json index 7f002a80e8..eb3762d3df 100644 --- a/packages/strapi-admin/admin/src/translations/fr.json +++ b/packages/strapi-admin/admin/src/translations/fr.json @@ -66,6 +66,8 @@ "app.components.InstallPluginPopup.navLink.faq": "FAQ", "app.components.InstallPluginPopup.navLink.screenshots": "Captures d'écran", "app.components.InstallPluginPopup.noDescription": "Aucune description disponible", + "app.components.LeftMenuFooter.documentation": "Documentation", + "app.components.LeftMenuFooter.help": "Aide", "app.components.LeftMenuFooter.poweredBy": "Propulsé par ", "app.components.LeftMenuLinkContainer.configuration": "Configurations", "app.components.LeftMenuLinkContainer.general": "Général", From 1533657015fecb0e28bbb6b08ef1524302e894fd Mon Sep 17 00:00:00 2001 From: Pierre Burgy Date: Thu, 10 Jan 2019 16:41:13 +0100 Subject: [PATCH 37/66] Add Strapi in powered by sentence --- .../strapi-admin/admin/src/components/LeftMenuFooter/index.js | 2 +- .../admin/src/components/LeftMenuFooter/styles.scss | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js b/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js index c1957b2a08..ec6f44ca77 100644 --- a/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js +++ b/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js @@ -31,7 +31,7 @@ function LeftMenuFooter({ version }) { // eslint-disable-line react/prefer-state ); diff --git a/packages/strapi-admin/admin/src/components/LeftMenuFooter/styles.scss b/packages/strapi-admin/admin/src/components/LeftMenuFooter/styles.scss index b75b326c92..e4d6360667 100644 --- a/packages/strapi-admin/admin/src/components/LeftMenuFooter/styles.scss +++ b/packages/strapi-admin/admin/src/components/LeftMenuFooter/styles.scss @@ -16,8 +16,6 @@ .poweredBy { width: 100%; - display: flex; - justify-content: space-between; bottom: 0; height: 3rem; padding-left: 15px; From dedd2551c16d08e2f888a0307bee931c26a18993 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Thu, 10 Jan 2019 16:45:02 +0100 Subject: [PATCH 38/66] Add mongo support --- docs/3.x.x/guides/models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.x.x/guides/models.md b/docs/3.x.x/guides/models.md index 48e4664901..5a3b250093 100644 --- a/docs/3.x.x/guides/models.md +++ b/docs/3.x.x/guides/models.md @@ -56,7 +56,7 @@ If you're using SQL databases, you should use the native SQL constraints to appl - `required` (boolean) — if true adds a required validator for this property. - `unique` (boolean) — whether to define a unique index on this property. - - `index` (boolean) — adds an index on this property, this will create a [single field index](https://docs.mongodb.com/manual/indexes/#single-field) that will run in the background. + - `index` (boolean) — adds an index on this property, this will create a [single field index](https://docs.mongodb.com/manual/indexes/#single-field) that will run in the background (*only supported by MongoDB*). - `max` (integer) — checks if the value is greater than or equal to the given minimum. - `min` (integer) — checks if the value is less than or equal to the given maximum. From 34f98dd8518e9c530ff567f05dc87633f15b1a03 Mon Sep 17 00:00:00 2001 From: invader Date: Thu, 10 Jan 2019 21:19:45 +0300 Subject: [PATCH 39/66] plugin-content-manager: fix typo in Russian locale --- .../admin/src/translations/ru.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-content-manager/admin/src/translations/ru.json b/packages/strapi-plugin-content-manager/admin/src/translations/ru.json index ac5160cfa4..4bf0ed4d53 100644 --- a/packages/strapi-plugin-content-manager/admin/src/translations/ru.json +++ b/packages/strapi-plugin-content-manager/admin/src/translations/ru.json @@ -88,7 +88,7 @@ "form.Input.disabled": "Editable field", "form.Input.filters": "Применить фильтры", "form.Input.label": "Метка", - "form.Input.label.inputDescription": "Это знчение переопределит метку, в заголовке таблицы", + "form.Input.label.inputDescription": "Это значение переопределит метку, в заголовке таблицы", "form.Input.pageEntries": "Записей на страницу", "form.Input.pageEntries.inputDescription": "Заметка: вы можете переопределить это значение на странице настроек Типа Данных", "form.Input.placeholder": "Плейсхолдер", @@ -111,4 +111,4 @@ "popUpWarning.warning.updateAllSettings": "Это изменит все ваши настройки", "success.record.delete": "Удалено", "success.record.save": "Сохранено" -} \ No newline at end of file +} From 3a79e40080087e926f2bbd5c38ae137b81b121b3 Mon Sep 17 00:00:00 2001 From: invader Date: Thu, 10 Jan 2019 22:52:41 +0300 Subject: [PATCH 40/66] Update Russian translations in the Content Manager plugin --- .../admin/src/translations/ru.json | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/strapi-plugin-content-manager/admin/src/translations/ru.json b/packages/strapi-plugin-content-manager/admin/src/translations/ru.json index 4bf0ed4d53..b4646070c3 100644 --- a/packages/strapi-plugin-content-manager/admin/src/translations/ru.json +++ b/packages/strapi-plugin-content-manager/admin/src/translations/ru.json @@ -12,9 +12,9 @@ "components.FilterOptions.FILTER_TYPES._contains": "содержит", "components.FilterOptions.FILTER_TYPES._containss": "содержит (с учетом регистра)", "components.FilterOptions.FILTER_TYPES._gt": "больше чем", - "components.FilterOptions.FILTER_TYPES._gte": "равно или больше чем", + "components.FilterOptions.FILTER_TYPES._gte": "больше или равно", "components.FilterOptions.FILTER_TYPES._lt": "меньше чем", - "components.FilterOptions.FILTER_TYPES._lte": "меньше или равно чем", + "components.FilterOptions.FILTER_TYPES._lte": "меньше или равно", "components.FilterOptions.FILTER_TYPES._ne": "не равно", "components.FilterOptions.button.apply": "Применить", "components.FiltersPickWrapper.PluginHeader.actions.apply": "Применить", @@ -26,12 +26,12 @@ "containers.ListPage.displayedFields": "Отображаемые поля", "components.Search.placeholder": "Поиск записей...", "containers.SettingPage.addRelationalField": "Добавить связанное поле", - "containers.SettingPage.editSettings.description": "Перетащите поля для сборки макета", - "containers.SettingPage.editSettings.title": "Правка — Настройки", + "containers.SettingPage.editSettings.description": "Перетащите поля, чтобы определить макет", + "containers.SettingPage.editSettings.title": "Редактирование — Настройки", "containers.SettingPage.relations": "Связанные поля", "components.TableDelete.delete": "Удалить все", - "components.TableDelete.entries.plural": "{число} записей выбрано", - "components.TableDelete.entries.singular": "{число} записей выделено", + "components.TableDelete.entries.plural": "Выбрано {number} записей", + "components.TableDelete.entries.singular": "Выбрана {number} запись", "components.TableEmpty.withFilters": "Нет {contentType} с примененными фильтрами...", "components.TableEmpty.withSearch": "Нет {contentType} согласно поиску ({search})", "components.TableEmpty.withoutFilter": "Нет {contentType}...", @@ -43,14 +43,14 @@ "containers.Home.introduction": "Для того чтобы отредактировать ваши записи используйте соответствующую ссылку в меню слева. У плагина отсутствует полноценная возможность редактировать настройки и он все еще находится в стадии активной разработки.", "containers.Home.pluginHeaderDescription": "Manage your entries through a powerful and beautiful interface.", "containers.Home.pluginHeaderTitle": "Редактор контента", - "containers.List.addAnEntry": "Добавить новые {entity}", + "containers.List.addAnEntry": "Добавить {entity}", "containers.List.errorFetchRecords": "Ошибка", "containers.List.pluginHeaderDescription": "{label} записей найдено", "containers.List.pluginHeaderDescription.singular": "{label} запись найдена", "containers.SettingPage.addField": "Добавить новое поле", "containers.SettingPage.attributes": "Поля атрибутов", - "containers.SettingPage.attributes.description": "Определить порядок атребутов", - "containers.SettingPage.listSettings.description": "Указать порядок атрибутов", + "containers.SettingPage.attributes.description": "Определить порядок атрибутов", + "containers.SettingPage.listSettings.description": "Настройки списка записей для этого Типа Данных", "containers.SettingPage.listSettings.title": "Список — Настройки", "containers.SettingPage.pluginHeaderDescription": "Отдельные настройки для этого Типа Данных", "containers.SettingsPage.Block.contentType.description": "Настроить отдельные параметры", @@ -59,7 +59,7 @@ "containers.SettingsPage.Block.generalSettings.title": "Общее", "containers.SettingsPage.pluginHeaderDescription": "Настройте параметры по умолчанию для всех Типов Данных", "emptyAttributes.button": "Перейти в редактор контента", - "emptyAttributes.description": "Добавте новое поле в ваш Тип Данных", + "emptyAttributes.description": "Добавьте новое поле в ваш Тип Данных", "emptyAttributes.title": "Пока нет полей", "error.attribute.key.taken": "Это значение уже существует", "error.attribute.sameKeyAndName": "Не может быть одинаковым", @@ -81,21 +81,21 @@ "error.validation.minSupMax": "Не может быть выше", "error.validation.regex": "Значение не соответствует регулярному выражению.", "error.validation.required": "Обязательное значение.", - "form.Input.bulkActions": "Применить массовые действия", + "form.Input.bulkActions": "Включить массовые действия", "form.Input.defaultSort": "Сортировка по умолчанию", - "form.Input.description": "Description", - "form.Input.description.placeholder": "Display name in the profile", - "form.Input.disabled": "Editable field", - "form.Input.filters": "Применить фильтры", - "form.Input.label": "Метка", - "form.Input.label.inputDescription": "Это значение переопределит метку, в заголовке таблицы", - "form.Input.pageEntries": "Записей на страницу", + "form.Input.description": "Описание", + "form.Input.description.placeholder": "Имя, отображаемое в профиле", + "form.Input.disabled": "Редактируемое поле", + "form.Input.filters": "Включить фильтры", + "form.Input.label": "Подпись", + "form.Input.label.inputDescription": "Это значение переопределяет название, отображаемое в заголовке таблицы", + "form.Input.pageEntries": "Записей на странице", "form.Input.pageEntries.inputDescription": "Заметка: вы можете переопределить это значение на странице настроек Типа Данных", "form.Input.placeholder": "Плейсхолдер", "form.Input.placeholder.placeholder": "Мое значение", - "form.Input.search": "Применить поиск", - "form.Input.search.field": "Применить поиск по этому полю", - "form.Input.sort.field": "Применить сортировку по этому полю", + "form.Input.search": "Включить поиск", + "form.Input.search.field": "Включить поиск по этому полю", + "form.Input.sort.field": "Включить сортировку по этому полю", "notification.error.displayedFields": "Необходимо добавить хотя бы одно поле", "notification.error.relationship.fetch": "Возникла ошибка при получении связей.", "notification.info.SettingPage.disableSort": "У вас должен быть один атрибут с разрешенной сортировкой", @@ -106,8 +106,8 @@ "popUpWarning.bodyMessage.contentType.delete.all": "Вы уверенны, что хотите удалить эти записи?", "popUpWarning.button.cancel": "Отменить", "popUpWarning.button.confirm": "Подтвердить", - "popUpWarning.title": "Пожалуйста подтвердите", - "popUpWarning.warning.cancelAllSettings": "Вы уверенны, что хотите отменить ваши модификации?", + "popUpWarning.title": "Пожалуйста, подтвердите", + "popUpWarning.warning.cancelAllSettings": "Вы уверенны, что хотите отменить ваши изменения?", "popUpWarning.warning.updateAllSettings": "Это изменит все ваши настройки", "success.record.delete": "Удалено", "success.record.save": "Сохранено" From 7659bdb697d5074d4b1e597a4d1aa1713e87becd Mon Sep 17 00:00:00 2001 From: invader Date: Fri, 11 Jan 2019 02:26:44 +0300 Subject: [PATCH 41/66] admin: update Russian translations in users and permissions plugin --- .../admin/src/translations/ru.json | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/packages/strapi-plugin-users-permissions/admin/src/translations/ru.json b/packages/strapi-plugin-users-permissions/admin/src/translations/ru.json index 8209ef2ee5..be91604640 100644 --- a/packages/strapi-plugin-users-permissions/admin/src/translations/ru.json +++ b/packages/strapi-plugin-users-permissions/admin/src/translations/ru.json @@ -1,10 +1,10 @@ { "Auth.advanced.allow_register": "", - "Auth.form.button.forgot-password": "Послать письмо", - "Auth.form.button.forgot-password.success": "Послать еще раз", + "Auth.form.button.forgot-password": "Отправить письмо", + "Auth.form.button.forgot-password.success": "Отправить еще раз", "Auth.form.button.login": "Войти", "Auth.form.button.register": "Готов начать", - "Auth.form.button.register-success": "Послать еще раз", + "Auth.form.button.register-success": "Отправить еще раз", "Auth.form.button.reset-password": "Сменить пароль", "Auth.form.error.blocked": "Ваш аккаунт заблокирован администратором.", "Auth.form.error.code.provide": "Неверный код.", @@ -12,8 +12,8 @@ "Auth.form.error.email.invalid": "Неправильный адрес электронной почты.", "Auth.form.error.email.provide": "Укажите свое имя пользователя или адрес электронной почты.", "Auth.form.error.email.taken": "Почтовый адрес уже используется", - "Auth.form.error.invalid": "Недопустимый идентификатор или пароль.", - "Auth.form.error.noAdminAccess": "Вы не можете получить доступ к панели администрирования.", + "Auth.form.error.invalid": "Неверный логин или пароль.", + "Auth.form.error.noAdminAccess": "У вас нет доступа к панели администрирования.", "Auth.form.error.params.provide": "Неправильные параметры.", "Auth.form.error.password.format": "Пароль не может содержать символ `$` больше трех раз.", "Auth.form.error.password.local": "Этот пользователь никогда не задавал пароль, пожалуйста, войдите в систему через провайдера, используемого при создании учетной записи.", @@ -33,51 +33,51 @@ "Auth.form.login.rememberMe.label": "Запомнить меня", "Auth.form.login.username.label": "Имя пользователя", "Auth.form.login.username.placeholder": "John Doe", - "Auth.form.register-success.email.label": "Письмо успешно отправлено по адресу", + "Auth.form.register-success.email.label": "Письмо успешно отправлено", "Auth.form.register-success.email.placeholder": "mysuperemail@gmail.com", "Auth.form.register.confirmPassword.label": "Подтверждение пароля", "Auth.form.register.email.label": "Email", "Auth.form.register.email.placeholder": "johndoe@gmail.com", - "Auth.form.register.news.label": "Держите меня в курсе по поводу новых возможностей и предстоящих улучшениях.", + "Auth.form.register.news.label": "Держите меня в курсе новых возможностей и предстоящих улучшений.", "Auth.form.register.password.label": "Пароль", "Auth.form.register.username.label": "Имя пользователя", "Auth.form.register.username.placeholder": "John Doe", - "Auth.header.register.description": "Для завершения установки и обеспечения безопасности приложения, создайте вашего первого пользователя (root admin) заполнив необходимую информацию ниже.", + "Auth.header.register.description": "Для завершения установки и обеспечения безопасности приложения, создайте вашего первого пользователя (root admin), заполнив форму ниже.", "Auth.link.forgot-password": "Забыли пароль?", "Auth.link.ready": "Готовы войти?", "BoundRoute.title": "Связать путь с", "Controller.input.label": "{label} ", "Controller.selectAll": "Выделить все", "components.Input.error.password.length": "Пароль слишком короткий", - "EditForm.inputSelect.description.role": "Он присоединит нового аутентифицированного пользователя к выбранной роли.", + "EditForm.inputSelect.description.role": "При регистрации пользователи будут иметь выбранную роль.", "EditForm.inputSelect.durations.description": "Количество часов, в течение которых пользователь не может подписаться.", "EditForm.inputSelect.durations.label": "Длительность", - "EditForm.inputSelect.label.role": "Роль по умолчанию для аутентифицированных пользователей", + "EditForm.inputSelect.label.role": "Роль по умолчанию для новых пользователей", "EditForm.inputSelect.subscriptions.description": "Ограничить количество подписчиков на каждый IP-адрес в час.", "EditForm.inputSelect.subscriptions.label": "Управление квотами на подписку", "EditForm.inputToggle.description.email": "Запретить пользователю создавать несколько учетных записей, используя один и тот же адрес электронной почты с различными провайдерами аутентификации.", - "EditForm.inputToggle.description.email-confirmation": "Если включено (ON), новые пользователи получат уведомление по электронной почте.", - "EditForm.inputToggle.description.email-confirmation-redirection": "После подтверждения электронной почты укажите URL-адрес для перенаправления.", - "EditForm.inputToggle.description.sign-up": "Когда выключенно (OFF) процесс регистрации запрещен. Никто не может подписаться, независимо от провайдера.", + "EditForm.inputToggle.description.email-confirmation": "Если включено (ON), при регистрации пользователи будут получать письмо для подтверждения адреса электронной почты.", + "EditForm.inputToggle.description.email-confirmation-redirection": "Укажите URL-адрес для перенаправления после подтверждения адреса электронной почты.", + "EditForm.inputToggle.description.sign-up": "Когда выключенно (OFF) процесс регистрации запрещен. Никто не может зарегистрироваться, независимо от провайдера.", "EditForm.inputToggle.label.email": "Одна учетная запись на адрес электронной почты", "EditForm.inputToggle.label.email-confirmation": "Включить подтверждение по электронной почте", "EditForm.inputToggle.label.email-confirmation-redirection": "URL-адрес для перенаправления", - "EditForm.inputToggle.label.sign-up": "Включить регистрации", + "EditForm.inputToggle.label.sign-up": "Включить регистрацию", "EditPage.cancel": "Отменить", "EditPage.form.roles": "Детали роли", "EditPage.form.roles.label.description": "Описание", "EditPage.form.roles.label.name": "Название", - "EditPage.form.roles.label.users": "Пользователи с этой ролью — ({number})", + "EditPage.form.roles.label.users": "Пользователи с этой ролью ({number})", "EditPage.form.roles.name.error": "Это значение обязательно.", "EditPage.header.description": "{description} ", "EditPage.header.description.create": " ", "EditPage.header.title": "{name} ", "EditPage.header.title.create": "Создать новую роль", "EditPage.notification.permissions.error": "Возникла ошибка при загрузке доступов", - "EditPage.notification.policies.error": "Возникла ошибка при загрузке политики пользователя", + "EditPage.notification.policies.error": "Возникла ошибка при загрузке политик пользователя", "EditPage.notification.role.error": "Возникла ошибка при загрузке роли", "EditPage.submit": "Сохранить", - "Email.template.email_confirmation": "Адрес электронной почты для подтверждения", + "Email.template.email_confirmation": "Подтверждение адреса электронной почты", "Email.template.reset_password": "Сброс пароля", "Email.template.success_register": "Регистрация прошла успешно", "Email.template.validation_email": "Валидация почтового адреса", @@ -85,46 +85,46 @@ "HeaderNav.link.emailTemplates": "Шаблоны писем", "HeaderNav.link.providers": "Провайдеры", "HeaderNav.link.roles": "Роли и доступы", - "HomePage.header.description": "Задавай роли и доступы для ваших пользователей.", + "HomePage.header.description": "Определяйте роли и доступы для ваших пользователей.", "HomePage.header.title": "Роли и доступы", "InputSearch.placeholder": "Искать пользователя", "List.button.providers": "Добавить нового провайдера", "List.button.roles": "Добавить новую роль", - "List.title.emailTemplates.plural": "{number} – количество доступных шаблонов", + "List.title.emailTemplates.plural": "{number} шаблонов доступно", "List.title.emailTemplates.singular": "{number} шаблон доступен", "List.title.providers.disabled.plural": "{number} отключено", "List.title.providers.disabled.singular": "{number} отключен", - "List.title.providers.enabled.plural": "{number} — количество провайдеров включено and", + "List.title.providers.enabled.plural": "{number} провайдеров включено и", "List.title.providers.enabled.singular": "{number} провайдер включен и", - "List.title.roles.plural": "{number} - количество доступных ролей", + "List.title.roles.plural": "{number} доступных ролей", "List.title.roles.singular": "{number} роль доступна", - "Plugin.permissions.application.description": "Задайте действия доступные для вашего проекта.", - "Plugin.permissions.plugins.description": "Задайте все возможные действия для {name} плагина.", - "Plugins.header.description": "Только действия связанные с маршрутом показаны в списке.", + "Plugin.permissions.application.description": "Определяйте все действия доступные для вашего проекта.", + "Plugin.permissions.plugins.description": "Определить действия доступные для плагина {name}.", + "Plugins.header.description": "В списке выводятся только действия, связанные с маршрутом.", "Plugins.header.title": "Доступы", "Policies.InputSelect.empty": "Нет", "Policies.InputSelect.label": "Разрешить выполнение этого действия для:", - "Policies.header.hint": "Выберите действия приложения или действия плагина и щелкните значок шестеренки, чтобы отобразить связанный маршрут", + "Policies.header.hint": "Выберите действия приложения или плагина и щелкните значок шестеренки, чтобы отобразить связанный маршрут", "Policies.header.title": "Расширенные настройки", "PopUpForm.Email.email_templates.inputDescription": "Если вы не уверены как использовать переменные, {link}", - "PopUpForm.Email.link.documentation": "ознакомтесь с нашей документацией.", - "PopUpForm.Email.options.from.email.label": "Почтовый адрес доставщика", + "PopUpForm.Email.link.documentation": "ознакомьтесь с нашей документацией.", + "PopUpForm.Email.options.from.email.label": "Адрес отправителя", "PopUpForm.Email.options.from.email.placeholder": "johndoe@gmail.com", - "PopUpForm.Email.options.from.name.label": "Название доставщика", + "PopUpForm.Email.options.from.name.label": "Имя отправителя", "PopUpForm.Email.options.from.name.placeholder": "John Doe", - "PopUpForm.Email.options.message.label": "Послание", + "PopUpForm.Email.options.message.label": "Сообщение", "PopUpForm.Email.options.object.label": "Тема", - "PopUpForm.Email.options.response_email.label": "Обратный почтовый адрес", + "PopUpForm.Email.options.response_email.label": "Адрес для ответа", "PopUpForm.Email.options.response_email.placeholder": "johndoe@gmail.com", - "PopUpForm.Email.reset_password.options.message.placeholder": "

    Пажалуйста нажмите на ссылку чтобы подтвердить вашу учетную запись

    ", + "PopUpForm.Email.reset_password.options.message.placeholder": "

    Пожалуйста, нажмите на ссылку чтобы подтвердить вашу учетную запись

    ", "PopUpForm.Email.reset_password.options.object.placeholder": "Пожалуйста подтвердите ваш почтовый адрес для %APP_NAME%", - "PopUpForm.Email.success_register.options.message.placeholder": "

    Пажалуйста нажмите на ссылку чтобы подтвердить вашу учетную запись

    ", + "PopUpForm.Email.success_register.options.message.placeholder": "

    Пожалуйста, нажмите на ссылку чтобы подтвердить вашу учетную запись

    ", "PopUpForm.Email.success_register.options.object.placeholder": "Пожалуйста подтвердите ваш почтовый адрес для %APP_NAME%", - "PopUpForm.Email.validation_email.options.message.placeholder": "

    Пажалуйста нажмите на ссылку чтобы подтвердить вашу учетную запись

    ", + "PopUpForm.Email.validation_email.options.message.placeholder": "

    Пожалуйста, нажмите на ссылку чтобы подтвердить вашу учетную запись

    ", "PopUpForm.Email.validation_email.options.object.placeholder": "Пожалуйста подтвердите ваш почтовый адрес для %APP_NAME%", "PopUpForm.Providers.callback.placeholder": "TEXT", "PopUpForm.Providers.discord.providerConfig.redirectURL": "URL-адрес перенаправления, который необходимо добавить в настройки Discord приложения", - "PopUpForm.Providers.enabled.description": "Если отключено, пользователь не сможет использовать этот провайдер.", + "PopUpForm.Providers.enabled.description": "Если отключено, пользователи не смогут использовать этот провайдер.", "PopUpForm.Providers.enabled.label": "Включить", "PopUpForm.Providers.facebook.providerConfig.redirectURL": "URL-адрес перенаправления, который необходимо добавить в настройки Facebook приложения", "PopUpForm.Providers.github.providerConfig.redirectURL": "URL-адрес перенаправления, который необходимо добавить в настройки GitHub приложения", @@ -140,8 +140,8 @@ "PopUpForm.button.cancel": "Отменить", "PopUpForm.button.save": "Сохранить", "PopUpForm.header.add.providers": "Добавить нового провайдера", - "PopUpForm.header.edit.email-templates": "Отредактировать шаблон письма", - "PopUpForm.header.edit.providers": "Отредактировать {provider} провайдера", + "PopUpForm.header.edit.email-templates": "Редактировать шаблон письма", + "PopUpForm.header.edit.providers": "Редактирование провайдера {provider}", "PopUpForm.inputSelect.providers.label": "Выбрать провайдера", "components.Input.error.password.noMatch": "Пароль не совпадает", "notification.error.delete": "Возникла ошибка в процессе удаления", @@ -150,6 +150,6 @@ "notification.info.emailSent": "Письмо отправленно", "notification.success.delete": "Успешно удалено", "notification.success.submit": "Настройки обновлены", - "plugin.description.long": "Защитите ваш API с процессом полной аутентификации основаном на JWT. Этот плагин также идет с ACL (Access Control List) возможностями, которые позволяет вам настраивать доступы для групп пользователей.", - "plugin.description.short": "Защитите ваш API с процессом полной аутентификации основаном на JWT" -} \ No newline at end of file + "plugin.description.long": "Защитите ваш API с помощью процесса полной аутентификации, основанном на JWT. Этот плагин также включает в себя возможности ACL (Access Control List), которые позволят вам настраивать доступы для групп пользователей.", + "plugin.description.short": "Защитите ваш API с помощью процесса полной аутентификации, основанном на JWT" +} From b6fc2682971f3adf1dab44bcd15688efe484150e Mon Sep 17 00:00:00 2001 From: Paolo Ragone Date: Fri, 11 Jan 2019 22:52:28 +1300 Subject: [PATCH 42/66] Fixed bug following recommendation --- .../services/Providers.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/strapi-plugin-users-permissions/services/Providers.js b/packages/strapi-plugin-users-permissions/services/Providers.js index a281b8b4d7..34291a4f38 100644 --- a/packages/strapi-plugin-users-permissions/services/Providers.js +++ b/packages/strapi-plugin-users-permissions/services/Providers.js @@ -45,14 +45,9 @@ exports.connect = (provider, query) => { } try { - const users = await strapi.query('user', 'users-permissions').find({ - where: { - email: { - symbol: '=', - value: profile.email - } - } - }); + const users = await strapi.query('user', 'users-permissions').find(strapi.utils.models.convertParams('user', { + email: profile.email + })); const advanced = await strapi.store({ environment: '', From 4bffe2749ca1fe08734ce0872ba778a15577b3bd Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 11 Jan 2019 10:55:21 +0100 Subject: [PATCH 43/66] Remove error log We will work on a complete logs tag plan in the future. --- packages/strapi-plugin-users-permissions/services/Providers.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/strapi-plugin-users-permissions/services/Providers.js b/packages/strapi-plugin-users-permissions/services/Providers.js index 34291a4f38..4c2f28533e 100644 --- a/packages/strapi-plugin-users-permissions/services/Providers.js +++ b/packages/strapi-plugin-users-permissions/services/Providers.js @@ -83,7 +83,6 @@ exports.connect = (provider, query) => { return resolve([createdUser, null]); } catch (err) { - strapi.log.error(err); reject([null, err]); } }); From 1688641bc7834edafc6277cf993f4f01b34f8e35 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 11 Jan 2019 12:46:14 +0100 Subject: [PATCH 44/66] Update style --- .github/PULL_REQUEST_TEMPLATE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f8fdeddbf3..eeda5718dd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,25 +2,26 @@ -My PR is a: +**My PR is a:** - [ ] 💥 Breaking change - [ ] 🐛 Bug fix #issueNumber - [ ] 💅 Enhancement - [ ] 🚀 New feature -Main update on the: +**Main update on the:** - [ ] Admin - [ ] Documentation - [ ] Framework - [ ] Plugin -Manual testing done on the follow databases: +**Manual testing done on the follow databases:** - [ ] Not applicable - [ ] MongoDB - [ ] MySQL - [ ] Postgres +**Description:** From 4edd70d54992e1f5993df661d9b63a444009652c Mon Sep 17 00:00:00 2001 From: mohamead Date: Fri, 11 Jan 2019 15:20:20 +0100 Subject: [PATCH 45/66] Fix connection issue with Heroku Postgres --- packages/strapi-generate-new/lib/before.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-generate-new/lib/before.js b/packages/strapi-generate-new/lib/before.js index 3bdce44d98..c7c0a48520 100644 --- a/packages/strapi-generate-new/lib/before.js +++ b/packages/strapi-generate-new/lib/before.js @@ -190,7 +190,7 @@ module.exports = (scope, cb) => { default: _.get(scope.database, 'authenticationDatabase', undefined) }, { - when: !hasDatabaseConfig && scope.client.database === 'mongo', + when: !hasDatabaseConfig, type: 'boolean', name: 'ssl', message: 'Enable SSL connection:', @@ -209,7 +209,7 @@ module.exports = (scope, cb) => { scope.database.settings.username = answers.username; scope.database.settings.password = answers.password; scope.database.options.authenticationDatabase = answers.authenticationDatabase; - scope.database.options.ssl = _.toString(answers.ssl) === 'true'; + scope.database.settings.ssl = scope.database.options.ssl = _.toString(answers.ssl) === 'true'; console.log(); console.log('⏳ Testing database connection...'); From 80e80c9788289b1c4bccf351c432450a3923b22d Mon Sep 17 00:00:00 2001 From: invader Date: Fri, 11 Jan 2019 23:05:25 +0300 Subject: [PATCH 46/66] =?UTF-8?q?Admin:=20"=D0=A2=D0=B8=D0=BF=D1=8B=20?= =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=BD=D1=8B=D1=85"=20->=20"=D0=A2=D0=B8?= =?UTF-8?q?=D0=BF=D1=8B=20=D0=9A=D0=BE=D0=BD=D1=82=D0=B5=D0=BD=D1=82=D0=B0?= =?UTF-8?q?"=20in=20content-manager=20plugin=20Russian=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/translations/ru.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/strapi-plugin-content-manager/admin/src/translations/ru.json b/packages/strapi-plugin-content-manager/admin/src/translations/ru.json index b4646070c3..dc6a4974aa 100644 --- a/packages/strapi-plugin-content-manager/admin/src/translations/ru.json +++ b/packages/strapi-plugin-content-manager/admin/src/translations/ru.json @@ -50,16 +50,16 @@ "containers.SettingPage.addField": "Добавить новое поле", "containers.SettingPage.attributes": "Поля атрибутов", "containers.SettingPage.attributes.description": "Определить порядок атрибутов", - "containers.SettingPage.listSettings.description": "Настройки списка записей для этого Типа Данных", + "containers.SettingPage.listSettings.description": "Настройки списка записей для этого Типа Контента", "containers.SettingPage.listSettings.title": "Список — Настройки", - "containers.SettingPage.pluginHeaderDescription": "Отдельные настройки для этого Типа Данных", + "containers.SettingPage.pluginHeaderDescription": "Отдельные настройки для этого Типа Контента", "containers.SettingsPage.Block.contentType.description": "Настроить отдельные параметры", - "containers.SettingsPage.Block.contentType.title": "Типы данных", - "containers.SettingsPage.Block.generalSettings.description": "Настройте опции по умолчанию для ваших Типов Данных", + "containers.SettingsPage.Block.contentType.title": "Типы Контента", + "containers.SettingsPage.Block.generalSettings.description": "Настройте опции по умолчанию для ваших Типов Контента", "containers.SettingsPage.Block.generalSettings.title": "Общее", - "containers.SettingsPage.pluginHeaderDescription": "Настройте параметры по умолчанию для всех Типов Данных", + "containers.SettingsPage.pluginHeaderDescription": "Настройте параметры по умолчанию для всех ваших Типов Контента", "emptyAttributes.button": "Перейти в редактор контента", - "emptyAttributes.description": "Добавьте новое поле в ваш Тип Данных", + "emptyAttributes.description": "Добавьте новое поле в ваш Тип Контента", "emptyAttributes.title": "Пока нет полей", "error.attribute.key.taken": "Это значение уже существует", "error.attribute.sameKeyAndName": "Не может быть одинаковым", @@ -90,7 +90,7 @@ "form.Input.label": "Подпись", "form.Input.label.inputDescription": "Это значение переопределяет название, отображаемое в заголовке таблицы", "form.Input.pageEntries": "Записей на странице", - "form.Input.pageEntries.inputDescription": "Заметка: вы можете переопределить это значение на странице настроек Типа Данных", + "form.Input.pageEntries.inputDescription": "Примечание: вы можете переопределить это значение в настройках Типа Контента", "form.Input.placeholder": "Плейсхолдер", "form.Input.placeholder.placeholder": "Мое значение", "form.Input.search": "Включить поиск", From 2566e4477a73518782f8573f3b879adb22c43d7b Mon Sep 17 00:00:00 2001 From: invader Date: Sat, 12 Jan 2019 01:25:00 +0300 Subject: [PATCH 47/66] admin: update Russian translations in content type builder plugin --- .../admin/src/translations/ru.json | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/packages/strapi-plugin-content-type-builder/admin/src/translations/ru.json b/packages/strapi-plugin-content-type-builder/admin/src/translations/ru.json index f502b57c58..e09e895d63 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/translations/ru.json +++ b/packages/strapi-plugin-content-type-builder/admin/src/translations/ru.json @@ -14,8 +14,8 @@ "attribute.string": "String", "attribute.text": "Text", "button.attributes.add": "Добавить Новое Поле", - "button.contentType.add": "Добавить Тип Данных", - "button.contentType.create": "Создать Тип Данных", + "button.contentType.add": "Добавить Тип Контента", + "button.contentType.create": "Создать Тип Контента", "contentType.temporaryDisplay": "(Не сохранено)", "error.attribute.forbidden": "Такое имя атрибута зарезервировано", "error.attribute.key.taken": "Это значение уже существует", @@ -29,23 +29,23 @@ "error.validation.minSupMax": "Не может быть выше", "error.validation.regex": "Не соответствует регулярному выражению.", "error.validation.required": "Это поле является обязательным.", - "form.attribute.item.appearance.description": "В противном случае значение будет доступно для редактирования как обычное текстовое поле", - "form.attribute.item.appearance.label": "Показывать WYSIWYG", + "form.attribute.item.appearance.description": "Если отключено, значение будет доступно для редактирования как обычное текстовое поле", + "form.attribute.item.appearance.label": "Отображать как WYSIWYG", "form.attribute.item.appearance.name": "Отображение", "form.attribute.item.boolean.name": "Название", - "form.attribute.item.customColumnName": "Настраиваемые названия столбца", - "form.attribute.item.customColumnName.description": "Это удобно иметь возможность переименовывать название столбцов для настройки ответов от API.", + "form.attribute.item.customColumnName": "Названия столбцов", + "form.attribute.item.customColumnName.description": "Может быть полезно переименовать названия столбцов для более читаемых ответов API.", "form.attribute.item.date.name": "Название", "form.attribute.item.defineRelation.fieldName": "Название поля", - "form.attribute.item.enumeration.graphql": "Name override for GraphQL", - "form.attribute.item.enumeration.graphql.description": "Allows you to override the default generated name for GraphQL", + "form.attribute.item.enumeration.graphql": "Название поля в GraphQL", + "form.attribute.item.enumeration.graphql.description": "Позволяет переопределить название поля в GraphQL, сгенерированное по умолчанию", "form.attribute.item.enumeration.name": "Название", "form.attribute.item.enumeration.placeholder": "Например: morning,noon,evening", - "form.attribute.item.enumeration.rules": "Значения (разделять запятой)", + "form.attribute.item.enumeration.rules": "Значения (через запятую)", "form.attribute.item.json.name": "Название", "form.attribute.item.maximum": "Максимальное значение", "form.attribute.item.maximumLength": "Максимальная длина", - "form.attribute.item.media.multiple": "Возможно несколько файлов", + "form.attribute.item.media.multiple": "Разрешить несколько файлов", "form.attribute.item.media.name": "Название", "form.attribute.item.minimum": "Минимальное значение", "form.attribute.item.minimumLength": "Минимальная длина", @@ -55,56 +55,56 @@ "form.attribute.item.number.type.float": "float (ex: 3.33333333)", "form.attribute.item.number.type.integer": "integer (ex: 10)", "form.attribute.item.requiredField": "Обязательное поле", - "form.attribute.item.requiredField.description": "Вы не сможете создать запись, если это поле останется пустым", + "form.attribute.item.requiredField.description": "Вы не сможете создать запись, если это поле не заполнено", "form.attribute.item.settings.name": "Настройки", "form.attribute.item.string.name": "Название", "form.attribute.item.textarea.name": "Название", "form.attribute.item.uniqueField": "Уникальное поле", - "form.attribute.item.uniqueField.description": "Вы не сможете создать запись, если существует запись с аналогичным содержанием", + "form.attribute.item.uniqueField.description": "Вы не сможете создать запись, если уже существует запись с таким значением", "form.attribute.settings.default": "Стандартное значение", - "form.attribute.settings.default.checkboxLabel": "Установить значение — true", + "form.attribute.settings.default.checkboxLabel": "True", "form.button.cancel": "Отменить", "form.button.continue": "Продолжить", "form.button.save": "Сохранить", "form.contentType.item.collectionName": "Название коллекции", - "form.contentType.item.collectionName.inputDescription": "Полезно, когда название вашего Типа Данных и название вашей таблицы различаются", + "form.contentType.item.collectionName.inputDescription": "Полезно, когда название вашего Типа Контента и название вашей таблицы различаются", "form.contentType.item.connections": "Соединение", "form.contentType.item.description": "Описание", - "form.contentType.item.description.placeholder": "Добавьте ваше короткое описание...", + "form.contentType.item.description.placeholder": "Добавьте короткое описание...", "form.contentType.item.name": "Название", - "form.contentType.item.name.description": "Название Типов Данных должны быть уникальными: {link}", + "form.contentType.item.name.description": "Название Типа Контента должно быть уникальным: {link}", "form.contentType.item.name.link.description": "Ознакомьтесь с нашей документацией", "from": "from", - "home.contentTypeBuilder.description": "Создавайте и обновляйте ваши Типы Данных.", - "home.contentTypeBuilder.name": "Типы Данных", - "home.emptyAttributes.description": "Добавьте первое поле в ваш новый Тип Данных", + "home.contentTypeBuilder.description": "Создавайте и обновляйте ваши Типы Контента.", + "home.contentTypeBuilder.name": "Типы Контента", + "home.emptyAttributes.description": "Добавьте первое поле в ваш новый Тип Контента", "home.emptyAttributes.title": "Пока ни одного поля не создано", - "home.emptyContentType.description": "Создайте ваш первый Тип Данных и у вас появится возможность загружать ваши данные при помощи API.", - "home.emptyContentType.title": "Нет Типов Данных", - "menu.section.contentTypeBuilder.name.plural": "Типы Данных", - "menu.section.contentTypeBuilder.name.singular": "Тип Данных", - "menu.section.documentation.guide": "Прочтите больше о Типах Данных в нашем", + "home.emptyContentType.description": "Создайте ваш первый Тип Контента и у вас появится возможность загружать ваши данные при помощи API.", + "home.emptyContentType.title": "Нет Типов Контента", + "menu.section.contentTypeBuilder.name.plural": "Типы Контента", + "menu.section.contentTypeBuilder.name.singular": "Тип Контента", + "menu.section.documentation.guide": "Прочтите больше о Типах Контента в нашем", "menu.section.documentation.guideLink": "руководстве.", "menu.section.documentation.name": "Документация", "menu.section.documentation.tutorial": "Посмотрите наши", "menu.section.documentation.tutorialLink": "обучающие видео.", - "modelPage.attribute.relationWith": "Связан с", - "modelPage.contentHeader.emptyDescription.description": "Нет описания для этого Типа Данных", - "modelPage.contentType.list.relationShipTitle.plural": "связи", + "modelPage.attribute.relationWith": "Связь с", + "modelPage.contentHeader.emptyDescription.description": "Для этого Типа Контента нет описания", + "modelPage.contentType.list.relationShipTitle.plural": "связей", "modelPage.contentType.list.relationShipTitle.singular": "связь", - "modelPage.contentType.list.title.including": "включает", - "modelPage.contentType.list.title.plural": "поля", - "modelPage.contentType.list.title.singular": "поле", + "modelPage.contentType.list.title.including": "включая", + "modelPage.contentType.list.title.plural": "полей,", + "modelPage.contentType.list.title.singular": "поле,", "noTableWarning.description": "Не забудьте создать таблицу `{modelName}` в вашей базе данных", "noTableWarning.infos": "Больше информации", "notification.error.message": "Возникла ошибка", - "notification.info.contentType.creating.notSaved": "Пожалуйста сохраните ваш текущий Тип Данных перед тем как создавать новый", + "notification.info.contentType.creating.notSaved": "Пожалуйста, сохраните текущий Тип Контента перед тем как создавать новый", "notification.info.disable": "В данный момент это поле нельзя редактировать...😮", - "notification.info.optimized": "Плагин оптимизирован с вашим localstorage", - "notification.success.contentTypeDeleted": "Ваш Тип Данных удален", - "notification.success.message.contentType.create": "Ваш Тип Данных создан", - "notification.success.message.contentType.edit": "Ваш Тип Данных обновлен", - "plugin.description.long": "Моделируйте структуру данных вашего API. Создавайте новые поля и связи всего за минуту. Файлы автоматически создаются и обновляются в вашем проекте.", + "notification.info.optimized": "Плагин оптимизирован с вашим localStorage", + "notification.success.contentTypeDeleted": "Ваш Тип Контента удален", + "notification.success.message.contentType.create": "Ваш Тип Контента создан", + "notification.success.message.contentType.edit": "Ваш Тип Контента обновлен", + "plugin.description.long": "Моделируйте структуру данных вашего API. Создавайте новые поля и связи всего за минуту. Файлы в вашем проекте создаются и обновляются автоматически.", "plugin.description.short": "Моделируйте структуру данных вашего API.", "popUpForm.attributes.boolean.description": "Да или нет, 1 или 0, true или false", "popUpForm.attributes.boolean.name": "Boolean", @@ -114,7 +114,7 @@ "popUpForm.attributes.email.name": "Email", "popUpForm.attributes.enumeration.description": "Список вариантов", "popUpForm.attributes.enumeration.name": "Enumeration", - "popUpForm.attributes.json.description": "Данные в JSON формате", + "popUpForm.attributes.json.description": "Данные в формате JSON", "popUpForm.attributes.json.name": "JSON", "popUpForm.attributes.media.description": "Картинки, видео, PDF и другие файлы", "popUpForm.attributes.media.name": "Media", @@ -122,24 +122,24 @@ "popUpForm.attributes.number.name": "Number", "popUpForm.attributes.password.description": "Пароль пользователя...", "popUpForm.attributes.password.name": "Password", - "popUpForm.attributes.relation.description": "Связан с Типом Данных", + "popUpForm.attributes.relation.description": "Ссылка на другой Тип Контента", "popUpForm.attributes.relation.name": "Relation", "popUpForm.attributes.string.description": "Заголовки, названия, имена, перечень названий", "popUpForm.attributes.string.name": "String", - "popUpForm.attributes.text.description": "Описания, текстовые параграфы, статьи", + "popUpForm.attributes.text.description": "Описания, параграфы, статьи", "popUpForm.attributes.text.name": "Text", "popUpForm.choose.attributes.header.title": "Добавить новое поле", - "popUpForm.create": "Добавить новое", - "popUpForm.create.contentType.header.title": "Добавить новый Тип Данных", + "popUpForm.create": "Добавить ", + "popUpForm.create.contentType.header.title": "Добавить Тип Контента", "popUpForm.edit": "Отредактировать", - "popUpForm.edit.contentType.header.title": "Отредактировать Тип Данных", + "popUpForm.edit.contentType.header.title": "Отредактировать Тип Контента", "popUpForm.field": "Поле", "popUpForm.navContainer.advanced": "Расширенные настройки", "popUpForm.navContainer.base": "Базовые настройки", "popUpForm.navContainer.relation": "Определить связь", "popUpRelation.title": "Связь", "popUpWarning.bodyMessage.attribute.delete": "Вы уверены, что хотите удалить это поле?", - "popUpWarning.bodyMessage.contentType.delete": "Вы уверены, что хотите удалить этот Тип Данных?", + "popUpWarning.bodyMessage.contentType.delete": "Вы уверены, что хотите удалить этот Тип Контента?", "popUpWarning.button.cancel": "Отменить", "popUpWarning.button.confirm": "Подтвердить", "popUpWarning.title": "Пожалуйста подтвердите", @@ -152,6 +152,6 @@ "table.contentType.head.description": "Описание", "table.contentType.head.fields": "Поля", "table.contentType.head.name": "Название", - "table.contentType.title.plural": "Типа Данных доступны", - "table.contentType.title.singular": "Тип Данных доступен" -} \ No newline at end of file + "table.contentType.title.plural": "Типов Контента доступны", + "table.contentType.title.singular": "Тип Контента доступен" +} From ce7d92767718e998e8206633d9d670ab416829e0 Mon Sep 17 00:00:00 2001 From: invader Date: Sat, 12 Jan 2019 01:50:52 +0300 Subject: [PATCH 48/66] admin: translate documentation plugin to Russian --- .../admin/src/translations/ru.json | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/packages/strapi-plugin-documentation/admin/src/translations/ru.json b/packages/strapi-plugin-documentation/admin/src/translations/ru.json index 1d12935d7a..037e9bc4ef 100755 --- a/packages/strapi-plugin-documentation/admin/src/translations/ru.json +++ b/packages/strapi-plugin-documentation/admin/src/translations/ru.json @@ -1,26 +1,29 @@ { - "containers.HomePage.Button.open": "Open the documentation", - "containers.HomePage.Button.update": "Update", - "containers.HomePage.PluginHeader.title": "Documentation - Settings", - "containers.HomePage.PluginHeader.description": "Configure the documentation plugin", - "containers.HomePage.Block.title": "Versions", - "containers.HomePage.PopUpWarning.message": "Are you sure you want to delete this version?", - "containers.HomePage.PopUpWarning.confirm": "I understand", + "containers.HomePage.Button.open": "Открыть документацию", + "containers.HomePage.Button.update": "Обновить", + "containers.HomePage.copied": "Токен скопирован в буфер обмена", + "containers.HomePage.PluginHeader.title": "Документация - Настройки", + "containers.HomePage.PluginHeader.description": "Настройте плагин документации", + "containers.HomePage.Block.title": "Версии", + "containers.HomePage.PopUpWarning.message": "Вы уверены что хотите удалить эту версию?", + "containers.HomePage.PopUpWarning.confirm": "Я понимаю", - "containers.HomePage.form.restrictedAccess": "Restricted access", - "containers.HomePage.form.restrictedAccess.inputDescription": "Make the documentation endpoint private. By default, the access is public", - "containers.HomePage.form.password": "Password", - "containers.HomePage.form.password.inputDescription": "Set the password to access the documentation", - "containers.HomePage.form.showGeneratedFiles": "Show generated files", - "containers.HomePage.form.showGeneratedFiles.inputDescription": "Useful when you want to override the generated documentation. \nThe plugin will generate files split by model and plugin. \nBy enabling this option it will be easier to customize your documentation", + "containers.HomePage.form.jwtToken": "Получите ваш JWT токен", + "containers.HomePage.form.jwtToken.description": "Скопируйте этот токен и используйте его в swagger, чтобы делать запросы", + "containers.HomePage.form.restrictedAccess": "Закрытый доступ", + "containers.HomePage.form.restrictedAccess.inputDescription": "Сделайте вашу документацию приватной. По умолчанию доступ открыть", + "containers.HomePage.form.password": "Пароль", + "containers.HomePage.form.password.inputDescription": "Установите пароль для доступа к документации", + "containers.HomePage.form.showGeneratedFiles": "Показать сгенерированные файлы", + "containers.HomePage.form.showGeneratedFiles.inputDescription": "Полезно, если вы хотите изменить сгенерированную документацию. \nПлагин разделяет файлы на модели и плагины. \nПри включенной опции вам будет проще кастомизировать документацию", - "components.Row.generatedDate": "Last generation", - "components.Row.open": "Open", - "components.Row.regenerate": "Regenerate", + "components.Row.generatedDate": "Последнее обновление", + "components.Row.open": "Открыть", + "components.Row.regenerate": "Обновить", - "error.regenerateDoc": "An error occurred while regenerating the doc", - "error.noVersion": "A version is required", - "error.regenerateDoc.versionMissing": "The version you are trying to generate doesn't exist", - "error.deleteDoc.versionMissing": "The version you are trying to delete does not exist.", - "notification.update.success": "Settings updated successfully" -} \ No newline at end of file + "error.regenerateDoc": "При генерации документации возникла ошибка", + "error.noVersion": "Необходимо указать версию", + "error.regenerateDoc.versionMissing": "Версии, которую вы пытаетесь сгенерировать, не существует", + "error.deleteDoc.versionMissing": "Версии, которую вы пытаетесь удалить, не существует.", + "notification.update.success": "Настройки успешно обновлены" +} From 421a8a482d45195f88831fbc9dc1038a6124f363 Mon Sep 17 00:00:00 2001 From: invader Date: Sat, 12 Jan 2019 01:55:36 +0300 Subject: [PATCH 49/66] admin: update Russian translation in email plugin --- packages/strapi-plugin-email/admin/src/translations/ru.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-email/admin/src/translations/ru.json b/packages/strapi-plugin-email/admin/src/translations/ru.json index 2990cab738..ce82ee0510 100644 --- a/packages/strapi-plugin-email/admin/src/translations/ru.json +++ b/packages/strapi-plugin-email/admin/src/translations/ru.json @@ -2,10 +2,10 @@ "ConfigPage.description": "Настройка плагина email", "ConfigPage.title": "Email - Настройки", "EditForm.Input.number.label": "Максимально допустимый размер (в МБ)", - "EditForm.Input.select.inputDescription": "Письма могут быть отправлены стандартным провайдером (Sendmail), или внешними провайдерами", + "EditForm.Input.select.inputDescription": "Письма могут быть отправлены стандартным способом (Sendmail) или с помощью внешних провайдеров", "EditForm.Input.select.label": "Провайдеры", "EditForm.Input.toggle.label": "Активировать отправку писем", "notification.config.success": "Настройки успешно обновлены", "plugin.description.long": "Отсылка почты.", "plugin.description.short": "Отсылка почты." -} \ No newline at end of file +} From 6241c58f17fec23de38532548ff315a46a17c115 Mon Sep 17 00:00:00 2001 From: invader Date: Sat, 12 Jan 2019 01:59:22 +0300 Subject: [PATCH 50/66] admin: fix updated Russian translation in documentation plugin --- .../admin/src/translations/ru.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-documentation/admin/src/translations/ru.json b/packages/strapi-plugin-documentation/admin/src/translations/ru.json index 037e9bc4ef..8b25439010 100755 --- a/packages/strapi-plugin-documentation/admin/src/translations/ru.json +++ b/packages/strapi-plugin-documentation/admin/src/translations/ru.json @@ -11,7 +11,7 @@ "containers.HomePage.form.jwtToken": "Получите ваш JWT токен", "containers.HomePage.form.jwtToken.description": "Скопируйте этот токен и используйте его в swagger, чтобы делать запросы", "containers.HomePage.form.restrictedAccess": "Закрытый доступ", - "containers.HomePage.form.restrictedAccess.inputDescription": "Сделайте вашу документацию приватной. По умолчанию доступ открыть", + "containers.HomePage.form.restrictedAccess.inputDescription": "Сделайте вашу документацию приватной. По умолчанию доступ открыт", "containers.HomePage.form.password": "Пароль", "containers.HomePage.form.password.inputDescription": "Установите пароль для доступа к документации", "containers.HomePage.form.showGeneratedFiles": "Показать сгенерированные файлы", @@ -19,7 +19,7 @@ "components.Row.generatedDate": "Последнее обновление", "components.Row.open": "Открыть", - "components.Row.regenerate": "Обновить", + "components.Row.regenerate": "Сгенерировать", "error.regenerateDoc": "При генерации документации возникла ошибка", "error.noVersion": "Необходимо указать версию", From 9fe2f358d495a773031b751c954cde97e3328a1b Mon Sep 17 00:00:00 2001 From: invader Date: Sat, 12 Jan 2019 02:22:45 +0300 Subject: [PATCH 51/66] admin: update Russian translations for settings manager plugin --- .../admin/src/translations/ru.json | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/strapi-plugin-settings-manager/admin/src/translations/ru.json b/packages/strapi-plugin-settings-manager/admin/src/translations/ru.json index 95145b37e2..9657f9ec46 100644 --- a/packages/strapi-plugin-settings-manager/admin/src/translations/ru.json +++ b/packages/strapi-plugin-settings-manager/admin/src/translations/ru.json @@ -5,7 +5,7 @@ "form.advanced.item.admin": "URL-адрес панели администратора", "form.advanced.item.prefix": "Приставка API", "form.advanced.name": "Расширенные", - "form.application.description": "Зайдайте настройки вашего приложения.", + "form.application.description": "Задайте настройки вашего приложения.", "form.application.item.description": "Описание", "form.application.item.name": "Название", "form.application.item.version": "Версия", @@ -17,7 +17,7 @@ "form.database.item.client": "Клиент", "form.database.item.connector": "Коннектор", "form.database.item.database": "Базы данных", - "form.database.item.default": "Задать как стандартное значение", + "form.database.item.default": "Сделать подключением по умолчанию", "form.database.item.host": "Хост", "form.database.item.name": "Название соединения", "form.database.item.password": "Пароль", @@ -28,11 +28,11 @@ "form.database.item.provider.redis": "Redis", "form.database.item.ssl": "SSL", "form.database.item.username": "Имя пользователя", - "form.databases.description": "Настройки базы данных в зависимости от окружения.", + "form.databases.description": "Настройки базы данных для разных окружений.", "form.databases.name": "База данных", "form.language.choose": "Выберите язык:", - "form.language.description": "Настройте ваш язык.", - "form.language.name": "Язык", + "form.language.description": "Настройте ваши языки.", + "form.language.name": "Языки", "form.request.description": "Задайте настройки запроса.", "form.request.item.logger": "Логирование", "form.request.item.logger.exposeInContext": "Выводить в контексте", @@ -79,7 +79,7 @@ "form.server.item.host": "Host", "form.server.item.port": "Port", "form.server.item.proxy": "Настройки прокси", - "form.server.item.proxy.enable": "Прокси включен", + "form.server.item.proxy.enable": "Включить прокси", "form.server.item.proxy.host": "Хост", "form.server.item.proxy.port": "Порт", "form.server.item.proxy.ssl": "SSL", @@ -579,13 +579,13 @@ "language.zu": "isiZulu", "language.zu_ZA": "isiZulu (iNingizimu Afrika)", "list.databases.button.label": "Добавить новое соединение", - "list.databases.title.plural": "соединения в этом окружении", + "list.databases.title.plural": "соединений в этом окружении", "list.databases.title.singular": "соединение в этом окружении", - "list.languages.button.label": "Добавить новый языка", - "list.languages.default.languages": "Стандартный язык", - "list.languages.set.languages": "Задать как стандартный", - "list.languages.title.plural": "языка доступны", - "list.languages.title.singular": "языка доступен", + "list.languages.button.label": "Добавить новый язык", + "list.languages.default.languages": "Язык по умолчанию", + "list.languages.set.languages": "Выбрать по умолчанию", + "list.languages.title.plural": "языков доступно", + "list.languages.title.singular": "язык доступен", "menu.item.advanced": "Расширенные", "menu.item.application": "Приложение", "menu.item.database": "База данных", @@ -596,15 +596,15 @@ "menu.item.server": "Сервер", "menu.section.environments": "Окружения приложения", "menu.section.global-settings": "Глобальные настройки", - "pageNotFound": "Cтраница не найдена", - "plugin.description.long": "Настройте ваш проект в течении считаных секунд.", - "plugin.description.short": "Настройте ваш проект в течении считаных секунд.", + "pageNotFound": "Страница не найдена", + "plugin.description.long": "Настройте ваш проект в считанные секунды.", + "plugin.description.short": "Настройте ваш проект в считанные секунды.", "popUpWarning.danger.ok.message": "Я понимаю", - "popUpWarning.databases.danger.message": "Типы Данных все еще подключены этому соединению. Удалив его, возможна критическая ошибка в приложении. Будте осторожны...", + "popUpWarning.databases.danger.message": "Типы Контента все еще ссылаются на это соединение. При его удалении в приложении может возникнуть критическая ошибка. Будьте осторожны...", "popUpWarning.databases.delete.message": "Вы уверены, что хотите удалить эту базу данных?", "popUpWarning.languages.delete.message": "Вы уверены, что хотите удалить этот язык?", - "popUpWarning.title": "Пожалуйта подтвердите", - "request.error.config": "Файл с настройками отсутствует.", + "popUpWarning.title": "Пожалуйста, подтвердите", + "request.error.config": "Файл с настройками не существует.", "request.error.database.exist": "Это соединение уже существует", "request.error.database.unknow": "Нет такого соединения", "request.error.environment.required": "Окружение необходимо.", @@ -625,11 +625,11 @@ "strapi.notification.error": "Возникла ошибка", "strapi.notification.info.serverRestart": "Сервер будет перезапущен", "strapi.notification.info.settingsEqual": "Значения идентичны", - "strapi.notification.success.databaseAdd": "База данных успешно добавлен.", + "strapi.notification.success.databaseAdd": "База данных успешно добавлена.", "strapi.notification.success.databaseDelete": "База данных успешно удалена.", "strapi.notification.success.databaseDeleted": "База данных была удалена.", "strapi.notification.success.databaseEdit": "Настройки базы данных успешно обновлены.", "strapi.notification.success.languageAdd": "Язык успешно добавлен.", - "strapi.notification.success.languageDelete": "Язык успешно удалена.", + "strapi.notification.success.languageDelete": "Язык успешно удален.", "strapi.notification.success.settingsEdit": "Настройки успешно обновлены." -} \ No newline at end of file +} From a85ea98e8b49e797cb65c8d404bf88ad1819a63c Mon Sep 17 00:00:00 2001 From: invader Date: Sat, 12 Jan 2019 02:25:27 +0300 Subject: [PATCH 52/66] admin: update Russian translations in upload plugin --- .../strapi-plugin-upload/admin/src/translations/ru.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/strapi-plugin-upload/admin/src/translations/ru.json b/packages/strapi-plugin-upload/admin/src/translations/ru.json index 66a28d4b1b..542d2e9d16 100644 --- a/packages/strapi-plugin-upload/admin/src/translations/ru.json +++ b/packages/strapi-plugin-upload/admin/src/translations/ru.json @@ -7,7 +7,7 @@ "EditForm.Input.toggle.label": "Включить загрузку файлов", "EmptyLi.message": "Нет загруженных файлов", "EntriesNumber.number": "{number} файл найден", - "EntriesNumber.number.plural": "Количество найденных файлов: {number}", + "EntriesNumber.number.plural": "{number} файлов найдено", "HomePage.InputSearch.placeholder": "Искать файл...", "HomePage.description": "Посмотреть все загруженные файлы", "HomePage.title": "Загрузка файлов", @@ -20,9 +20,9 @@ "ListHeader.updated": "Обновлен", "PluginInputFile.link": "выберите", "PluginInputFile.loading": "Ваши файлы загружаются...", - "PluginInputFile.text": "Претащите файлы на эту область или {link} локальный файл", + "PluginInputFile.text": "Перетащите файлы на эту область или {link} локальный файл", "notification.config.success": "Настройки обновлены", "notification.delete.success": "Файл удален", "notification.dropFile.success": "Ваш файл загружен", "notification.dropFiles.success": "Файлов загружено: {number}" -} \ No newline at end of file +} From 4b27e6f2e7922d8635587a259ab59dd668ce7974 Mon Sep 17 00:00:00 2001 From: invader Date: Sat, 12 Jan 2019 02:39:18 +0300 Subject: [PATCH 53/66] =?UTF-8?q?admin:=20rename=20'=D0=9A=D0=BE=D0=BD?= =?UTF-8?q?=D1=81=D1=82=D1=80=D1=83=D0=BA=D1=82=D0=BE=D1=80=20=D0=A2=D0=B8?= =?UTF-8?q?=D0=BF=D0=BE=D0=B2=20=D0=9A=D0=BE=D0=BD=D1=82=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=B0'=20to=20'=D0=A2=D0=B8=D0=BF=D1=8B=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=82=D0=B5=D0=BD=D1=82=D0=B0'=20in=20left=20menu=20for=20Russ?= =?UTF-8?q?ian=20translation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/strapi-admin/admin/src/translations/ru.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi-admin/admin/src/translations/ru.json b/packages/strapi-admin/admin/src/translations/ru.json index a81ff0ff58..777f92ea62 100644 --- a/packages/strapi-admin/admin/src/translations/ru.json +++ b/packages/strapi-admin/admin/src/translations/ru.json @@ -1,7 +1,7 @@ { "Analytics": "Аналитика", "Content Manager": "Редактор контента", - "Content Type Builder": "Конструктор Типов Контента", + "Content Type Builder": "Типы Контента", "Email": "Email", "Files Upload": "Загрузка файлов", "HomePage.notification.newsLetter.success": "Успешная подписка на рассылку новостей", From 0b5421dc29ed349ba10ec84273dac28370316214 Mon Sep 17 00:00:00 2001 From: AndroAmater Date: Sat, 12 Jan 2019 19:12:46 +0100 Subject: [PATCH 54/66] Update graphql.md "Lower than or equal to" repeats twice so on line 197 it says "`_gte`: Lower than or equal to. --- docs/3.x.x/guides/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.x.x/guides/graphql.md b/docs/3.x.x/guides/graphql.md index e2c120af41..48dfa1752f 100644 --- a/docs/3.x.x/guides/graphql.md +++ b/docs/3.x.x/guides/graphql.md @@ -194,7 +194,7 @@ You can also apply different parameters to the query to make more complex querie - `_lt`: Lower than. - `_lte`: Lower than or equal to. - `_gt`: Greater than. - - `_gte`: Lower than or equal to. + - `_gte`: Greater than or equal to. - `_contains`: Contains. - `_containss`: Contains sensitive. From a11b4842fed2288e05b19dde96ee55472441a668 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Tue, 15 Jan 2019 11:26:26 +0100 Subject: [PATCH 55/66] Apply the correct value by db --- packages/strapi-generate-new/lib/before.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/strapi-generate-new/lib/before.js b/packages/strapi-generate-new/lib/before.js index c7c0a48520..37df224a4c 100644 --- a/packages/strapi-generate-new/lib/before.js +++ b/packages/strapi-generate-new/lib/before.js @@ -209,7 +209,11 @@ module.exports = (scope, cb) => { scope.database.settings.username = answers.username; scope.database.settings.password = answers.password; scope.database.options.authenticationDatabase = answers.authenticationDatabase; - scope.database.settings.ssl = scope.database.options.ssl = _.toString(answers.ssl) === 'true'; + if (scope.client.database === 'mongo') { + scope.database.settings.ssl = _.toString(answers.ssl) === 'true'; + } else { + scope.database.options.ssl = _.toString(answers.ssl) === 'true'; + } console.log(); console.log('⏳ Testing database connection...'); From 9246c856b33fc21a12aea7177a8c142ffd0a144b Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Tue, 15 Jan 2019 11:45:36 +0100 Subject: [PATCH 56/66] Fix condition --- packages/strapi-generate-new/lib/before.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-generate-new/lib/before.js b/packages/strapi-generate-new/lib/before.js index 37df224a4c..f8cc961ac8 100644 --- a/packages/strapi-generate-new/lib/before.js +++ b/packages/strapi-generate-new/lib/before.js @@ -210,9 +210,9 @@ module.exports = (scope, cb) => { scope.database.settings.password = answers.password; scope.database.options.authenticationDatabase = answers.authenticationDatabase; if (scope.client.database === 'mongo') { - scope.database.settings.ssl = _.toString(answers.ssl) === 'true'; - } else { scope.database.options.ssl = _.toString(answers.ssl) === 'true'; + } else { + scope.database.settings.ssl = _.toString(answers.ssl) === 'true'; } console.log(); From c01124388dc0ce83feee56b1a9c23a771d3b1e5b Mon Sep 17 00:00:00 2001 From: David Baxter Date: Wed, 16 Jan 2019 14:39:24 +1100 Subject: [PATCH 57/66] Incorrect params variable name in user update --- packages/strapi-plugin-users-permissions/controllers/User.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-users-permissions/controllers/User.js b/packages/strapi-plugin-users-permissions/controllers/User.js index 8098ee9519..7e496e724d 100644 --- a/packages/strapi-plugin-users-permissions/controllers/User.js +++ b/packages/strapi-plugin-users-permissions/controllers/User.js @@ -120,7 +120,7 @@ module.exports = { if (advancedConfigs.unique_email && ctx.request.body.email) { const users = await strapi.plugins['users-permissions'].services.user.fetchAll({ email: ctx.request.body.email }); - if (users && _.find(users, user => (user.id || user._id).toString() !== ctx.params.id)) { + if (users && _.find(users, user => (user.id || user._id).toString() !== ctx.params._id)) { return ctx.badRequest(null, ctx.request.admin ? [{ messages: [{ id: 'Auth.form.error.email.taken', field: ['email'] }] }] : 'Email is already taken.'); } } @@ -140,7 +140,7 @@ module.exports = { email: ctx.request.body.email }); - if (user !== null && (user.id || user._id).toString() !== ctx.params.id) { + if (user !== null && (user.id || user._id).toString() !== ctx.params._id) { return ctx.badRequest(null, ctx.request.admin ? [{ messages: [{ id: 'Auth.form.error.email.taken', field: ['email'] }] }] : 'Email is already taken.'); } } From 72d0f771ed54edd65d19f5f34208284d6a401020 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Wed, 16 Jan 2019 11:48:21 +0100 Subject: [PATCH 58/66] Add migration guide alpha.19 --- docs/3.x.x/migration-guide/README.md | 2 +- .../migration-guide-alpha.18-to-alpha.19.md | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 docs/3.x.x/migration-guide/migration-guide-alpha.18-to-alpha.19.md diff --git a/docs/3.x.x/migration-guide/README.md b/docs/3.x.x/migration-guide/README.md index 000a49d734..c46bbaed4d 100644 --- a/docs/3.x.x/migration-guide/README.md +++ b/docs/3.x.x/migration-guide/README.md @@ -22,6 +22,6 @@ - [Migration guide from alpha.14.4 to alpha.14.5](migration-guide-alpha.14.4-to-alpha.14.5.md) - [Migration guide from alpha.14.5 to alpha.15](migration-guide-alpha.14.5-to-alpha.15.md) - [Migration guide from alpha.15 to alpha.16](migration-guide-alpha.15-to-alpha.16.md) -- [Migration guide from alpha.15 to alpha.16](migration-guide-alpha.15-to-alpha.16.md) - [Migration guide from alpha.16 to alpha.17](migration-guide-alpha.16-to-alpha.17.md) - [Migration guide from alpha.17 to alpha.18](migration-guide-alpha.17-to-alpha.18.md) +- [Migration guide from alpha.18 to alpha.19](migration-guide-alpha.18-to-alpha.19.md) diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.18-to-alpha.19.md b/docs/3.x.x/migration-guide/migration-guide-alpha.18-to-alpha.19.md new file mode 100644 index 0000000000..b563b8d941 --- /dev/null +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.18-to-alpha.19.md @@ -0,0 +1,76 @@ +# Migration guide from alpha.18 to alpha.19 + +**Here are the major changes:** + +- Fix CLI database issue for Windows +- Custom timestamp +- Fix write file on production environment + +**Useful links:** +- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.19](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.19) +- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.18...v3.0.0-alpha.19](https://github.com/strapi/strapi/compare/v3.0.0-alpha.18...v3.0.0-alpha.19) + +
    + +::: note +Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process. +::: + +
    + +## Getting started + +Install Strapi `alpha.19` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.19 -g`. + +When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration). + +
    + +## Update node modules + +Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.19` version) of your project. + +Run `npm install strapi@3.0.0-alpha.19 --save` to update your strapi version. + +
    + +## Update the Admin + +::: note +If you performed updates in the Admin, you will have to manually migrate your changes. +::: + +Delete your old admin folder and replace it with the new one. + +
    + +## Update the Plugins + +::: note +If you did a custom update on one of the plugins, you will have to manually migrate your update. +::: + +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. + +Then, delete your old `plugins` folder and replace it with the new one. + +## Production environment + +If you deploy your application on a server that you don't have write file access you will have to update your procution config file. +In `config/environments/production/server.json` file you have to add `production` key with `true` as value. + +``` +{ + ... + "port": "${process.env.PORT || 1337}", + "production": true, + "proxy": { + "enabled": false + }, + ... +} +``` + +
    + +That's all, you have now upgraded to Strapi `alpha.19`. From c3c24ca7ad415ecdebe53d95ab777eb793c43526 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Wed, 16 Jan 2019 11:49:16 +0100 Subject: [PATCH 59/66] 3.0.0-alpha.19 --- package.json | 2 +- packages/strapi-admin/package.json | 6 ++--- packages/strapi-generate-admin/package.json | 6 ++--- packages/strapi-generate-api/package.json | 2 +- .../strapi-generate-controller/package.json | 2 +- packages/strapi-generate-model/package.json | 2 +- packages/strapi-generate-new/package.json | 6 ++--- packages/strapi-generate-plugin/package.json | 2 +- packages/strapi-generate-policy/package.json | 2 +- packages/strapi-generate-service/package.json | 2 +- packages/strapi-generate/package.json | 4 ++-- packages/strapi-helper-plugin/package.json | 2 +- packages/strapi-hook-bookshelf/package.json | 8 +++---- packages/strapi-hook-ejs/package.json | 2 +- packages/strapi-hook-knex/package.json | 2 +- packages/strapi-hook-mongoose/package.json | 4 ++-- packages/strapi-hook-redis/package.json | 4 ++-- packages/strapi-lint/package.json | 2 +- packages/strapi-middleware-views/package.json | 2 +- .../package.json | 4 ++-- .../package.json | 8 +++---- .../strapi-plugin-documentation/package.json | 4 ++-- packages/strapi-plugin-email/package.json | 6 ++--- packages/strapi-plugin-graphql/package.json | 4 ++-- .../package.json | 4 ++-- packages/strapi-plugin-upload/package.json | 6 ++--- .../package.json | 6 ++--- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../strapi-provider-upload-local/package.json | 2 +- .../package.json | 2 +- packages/strapi-utils/package.json | 2 +- packages/strapi/package.json | 22 +++++++++---------- 37 files changed, 72 insertions(+), 72 deletions(-) diff --git a/package.json b/package.json index 3df98bc00a..42d22a2447 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "dependencies": {}, "devDependencies": { "assert": "~1.3.0", diff --git a/packages/strapi-admin/package.json b/packages/strapi-admin/package.json index b9518fed2a..2299547e38 100644 --- a/packages/strapi-admin/package.json +++ b/packages/strapi-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-admin", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Strapi Admin", "repository": { "type": "git", @@ -31,8 +31,8 @@ }, "devDependencies": { "sanitize.css": "^4.1.0", - "strapi-helper-plugin": "3.0.0-alpha.18", - "strapi-utils": "3.0.0-alpha.18" + "strapi-helper-plugin": "3.0.0-alpha.19", + "strapi-utils": "3.0.0-alpha.19" }, "author": { "name": "Strapi", diff --git a/packages/strapi-generate-admin/package.json b/packages/strapi-generate-admin/package.json index 28264fb9ef..54de357e79 100644 --- a/packages/strapi-generate-admin/package.json +++ b/packages/strapi-generate-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-admin", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Generate the default admin panel for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ @@ -15,8 +15,8 @@ "dependencies": { "fs-extra": "^4.0.1", "lodash": "^4.17.5", - "strapi-admin": "3.0.0-alpha.18", - "strapi-utils": "3.0.0-alpha.18" + "strapi-admin": "3.0.0-alpha.19", + "strapi-utils": "3.0.0-alpha.19" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-generate-api/package.json b/packages/strapi-generate-api/package.json index 9ade023cf8..80b73c7237 100644 --- a/packages/strapi-generate-api/package.json +++ b/packages/strapi-generate-api/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-api", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Generate an API for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-controller/package.json b/packages/strapi-generate-controller/package.json index fbdd4638c4..c9cb06ab00 100644 --- a/packages/strapi-generate-controller/package.json +++ b/packages/strapi-generate-controller/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-controller", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Generate a controller for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-model/package.json b/packages/strapi-generate-model/package.json index c030aca1ea..10b26801a3 100644 --- a/packages/strapi-generate-model/package.json +++ b/packages/strapi-generate-model/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-model", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Generate a model for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index 079ddd6638..9b9f1ec706 100644 --- a/packages/strapi-generate-new/package.json +++ b/packages/strapi-generate-new/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-new", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Generate a new Strapi application.", "homepage": "http://strapi.io", "keywords": [ @@ -19,7 +19,7 @@ "listr": "^0.14.1", "lodash": "^4.17.5", "ora": "^2.1.0", - "strapi-utils": "3.0.0-alpha.18", + "strapi-utils": "3.0.0-alpha.19", "uuid": "^3.1.0" }, "scripts": { @@ -49,4 +49,4 @@ "npm": ">= 6.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-generate-plugin/package.json b/packages/strapi-generate-plugin/package.json index 7f0aa48f52..5860f2306a 100644 --- a/packages/strapi-generate-plugin/package.json +++ b/packages/strapi-generate-plugin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-plugin", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Generate an plugin for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-policy/package.json b/packages/strapi-generate-policy/package.json index c956efe970..cea23c27da 100644 --- a/packages/strapi-generate-policy/package.json +++ b/packages/strapi-generate-policy/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-policy", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Generate a policy for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-service/package.json b/packages/strapi-generate-service/package.json index a6477e7dc2..fc5a10e61d 100644 --- a/packages/strapi-generate-service/package.json +++ b/packages/strapi-generate-service/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-service", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Generate a service for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate/package.json b/packages/strapi-generate/package.json index 4530ae077b..ff5c256d16 100644 --- a/packages/strapi-generate/package.json +++ b/packages/strapi-generate/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Master of ceremonies for the Strapi generators.", "homepage": "http://strapi.io", "keywords": [ @@ -17,7 +17,7 @@ "fs-extra": "^4.0.0", "lodash": "^4.17.5", "reportback": "^2.0.1", - "strapi-utils": "3.0.0-alpha.18" + "strapi-utils": "3.0.0-alpha.19" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index 83df546fe6..25ac5263e7 100644 --- a/packages/strapi-helper-plugin/package.json +++ b/packages/strapi-helper-plugin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-helper-plugin", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Helper for Strapi plugins development", "engines": { "node": ">= 10.0.0", diff --git a/packages/strapi-hook-bookshelf/package.json b/packages/strapi-hook-bookshelf/package.json index 44997432eb..e22975a8e6 100644 --- a/packages/strapi-hook-bookshelf/package.json +++ b/packages/strapi-hook-bookshelf/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-bookshelf", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Bookshelf hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -21,8 +21,8 @@ "lodash": "^4.17.5", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-hook-knex": "3.0.0-alpha.18", - "strapi-utils": "3.0.0-alpha.18" + "strapi-hook-knex": "3.0.0-alpha.19", + "strapi-utils": "3.0.0-alpha.19" }, "strapi": { "dependencies": [ @@ -56,4 +56,4 @@ "npm": ">= 6.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-hook-ejs/package.json b/packages/strapi-hook-ejs/package.json index fb5f497570..2c2c9f1886 100644 --- a/packages/strapi-hook-ejs/package.json +++ b/packages/strapi-hook-ejs/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-ejs", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "EJS hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-hook-knex/package.json b/packages/strapi-hook-knex/package.json index 639fec3a5a..c6afce30e5 100644 --- a/packages/strapi-hook-knex/package.json +++ b/packages/strapi-hook-knex/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-knex", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Knex hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-hook-mongoose/package.json b/packages/strapi-hook-mongoose/package.json index eb4f8d46e8..f8678381c7 100644 --- a/packages/strapi-hook-mongoose/package.json +++ b/packages/strapi-hook-mongoose/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-mongoose", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Mongoose hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -20,7 +20,7 @@ "mongoose-float": "^1.0.3", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-utils": "3.0.0-alpha.18" + "strapi-utils": "3.0.0-alpha.19" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-hook-redis/package.json b/packages/strapi-hook-redis/package.json index 26b965c73f..964ca648c5 100644 --- a/packages/strapi-hook-redis/package.json +++ b/packages/strapi-hook-redis/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-redis", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Redis hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -19,7 +19,7 @@ "lodash": "^4.17.5", "rimraf": "^2.6.2", "stack-trace": "0.0.10", - "strapi-utils": "3.0.0-alpha.18" + "strapi-utils": "3.0.0-alpha.19" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-lint/package.json b/packages/strapi-lint/package.json index 0b68645a0d..9cbc4a447f 100644 --- a/packages/strapi-lint/package.json +++ b/packages/strapi-lint/package.json @@ -1,6 +1,6 @@ { "name": "strapi-lint", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Strapi eslint and prettier configurations", "directories": { "lib": "lib" diff --git a/packages/strapi-middleware-views/package.json b/packages/strapi-middleware-views/package.json index 85b8e80616..11fa8372bf 100644 --- a/packages/strapi-middleware-views/package.json +++ b/packages/strapi-middleware-views/package.json @@ -1,6 +1,6 @@ { "name": "strapi-middleware-views", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Views middleware to enable server-side rendering for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-plugin-content-manager/package.json b/packages/strapi-plugin-content-manager/package.json index 4470a36399..00b77c04e3 100644 --- a/packages/strapi-plugin-content-manager/package.json +++ b/packages/strapi-plugin-content-manager/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-content-manager", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "A powerful UI to easily manage your data.", "strapi": { "name": "Content Manager", @@ -26,7 +26,7 @@ "draft-js": "^0.10.5", "react-select": "^1.2.1", "showdown": "^1.8.6", - "strapi-helper-plugin": "3.0.0-alpha.18" + "strapi-helper-plugin": "3.0.0-alpha.19" }, "dependencies": { "pluralize": "^7.0.0" diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 248ed8c09b..9e4fc78981 100644 --- a/packages/strapi-plugin-content-type-builder/package.json +++ b/packages/strapi-plugin-content-type-builder/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-content-type-builder", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Strapi plugin to create content type (API).", "strapi": { "name": "Content Type Builder", @@ -24,11 +24,11 @@ "dependencies": { "immutable": "^3.8.2", "pluralize": "^7.0.0", - "strapi-generate": "3.0.0-alpha.18", - "strapi-generate-api": "3.0.0-alpha.18" + "strapi-generate": "3.0.0-alpha.19", + "strapi-generate-api": "3.0.0-alpha.19" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.18" + "strapi-helper-plugin": "3.0.0-alpha.19" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-documentation/package.json b/packages/strapi-plugin-documentation/package.json index ef58a8d1da..9573370bc6 100755 --- a/packages/strapi-plugin-documentation/package.json +++ b/packages/strapi-plugin-documentation/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-documentation", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "This is the description of the plugin.", "strapi": { "name": "Documentation", @@ -29,7 +29,7 @@ "swagger-ui-dist": "^3.18.3-republish2" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.18" + "strapi-helper-plugin": "3.0.0-alpha.19" }, "author": { "name": "soupette", diff --git a/packages/strapi-plugin-email/package.json b/packages/strapi-plugin-email/package.json index fcc3b1a40e..1049aa8d64 100644 --- a/packages/strapi-plugin-email/package.json +++ b/packages/strapi-plugin-email/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-email", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "This is the description of the plugin.", "strapi": { "name": "Email", @@ -22,11 +22,11 @@ "prepublishOnly": "IS_MONOREPO=true npm run build" }, "dependencies": { - "strapi-provider-email-sendmail": "3.0.0-alpha.18" + "strapi-provider-email-sendmail": "3.0.0-alpha.19" }, "devDependencies": { "react-copy-to-clipboard": "5.0.1", - "strapi-helper-plugin": "3.0.0-alpha.18" + "strapi-helper-plugin": "3.0.0-alpha.19" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-graphql/package.json b/packages/strapi-plugin-graphql/package.json index 47d96fb787..f1b92d7587 100644 --- a/packages/strapi-plugin-graphql/package.json +++ b/packages/strapi-plugin-graphql/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-graphql", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "This is the description of the plugin.", "strapi": { "name": "graphql", @@ -30,7 +30,7 @@ "graphql-type-json": "^0.2.1", "graphql-type-datetime": "^0.2.2", "pluralize": "^7.0.0", - "strapi-utils": "3.0.0-alpha.18" + "strapi-utils": "3.0.0-alpha.19" }, "author": { "name": "A Strapi developer", diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index bb764771a4..0890a67353 100644 --- a/packages/strapi-plugin-settings-manager/package.json +++ b/packages/strapi-plugin-settings-manager/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-settings-manager", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Strapi plugin to manage settings.", "strapi": { "name": "Settings Manager", @@ -25,7 +25,7 @@ "devDependencies": { "flag-icon-css": "^2.8.0", "react-select": "^1.0.0-rc.5", - "strapi-helper-plugin": "3.0.0-alpha.18" + "strapi-helper-plugin": "3.0.0-alpha.19" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-upload/package.json b/packages/strapi-plugin-upload/package.json index 0ce4d7d143..9b209cb4c7 100644 --- a/packages/strapi-plugin-upload/package.json +++ b/packages/strapi-plugin-upload/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-upload", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "This is the description of the plugin.", "strapi": { "name": "Files Upload", @@ -22,12 +22,12 @@ "prepublishOnly": "IS_MONOREPO=true npm run build" }, "dependencies": { - "strapi-provider-upload-local": "3.0.0-alpha.18", + "strapi-provider-upload-local": "3.0.0-alpha.19", "stream-to-array": "^2.3.0", "uuid": "^3.2.1" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.18" + "strapi-helper-plugin": "3.0.0-alpha.19" }, "author": { "name": "A Strapi developer", diff --git a/packages/strapi-plugin-users-permissions/package.json b/packages/strapi-plugin-users-permissions/package.json index c276ad5026..4b47e26de9 100644 --- a/packages/strapi-plugin-users-permissions/package.json +++ b/packages/strapi-plugin-users-permissions/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-users-permissions", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Protect your API with a full-authentication process based on JWT", "strapi": { "name": "Roles & Permissions", @@ -29,11 +29,11 @@ "koa2-ratelimit": "^0.6.1", "purest": "^2.0.1", "request": "^2.83.0", - "strapi-utils": "3.0.0-alpha.18", + "strapi-utils": "3.0.0-alpha.19", "uuid": "^3.1.0" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.18" + "strapi-helper-plugin": "3.0.0-alpha.19" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-provider-email-amazon-ses/package.json b/packages/strapi-provider-email-amazon-ses/package.json index 90835cb311..50a34dcebd 100644 --- a/packages/strapi-provider-email-amazon-ses/package.json +++ b/packages/strapi-provider-email-amazon-ses/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-amazon-ses", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Amazon SES provider for strapi email", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-email-mailgun/package.json b/packages/strapi-provider-email-mailgun/package.json index 4b92e64b55..3a50c7f4ae 100644 --- a/packages/strapi-provider-email-mailgun/package.json +++ b/packages/strapi-provider-email-mailgun/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-mailgun", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Mailgun provider for strapi email plugin", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-email-sendgrid/package.json b/packages/strapi-provider-email-sendgrid/package.json index ed90354386..3ee4e4004b 100644 --- a/packages/strapi-provider-email-sendgrid/package.json +++ b/packages/strapi-provider-email-sendgrid/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-sendgrid", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Sendgrid provider for strapi email", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-email-sendmail/package.json b/packages/strapi-provider-email-sendmail/package.json index 2b4cc2d0c5..ff825739be 100644 --- a/packages/strapi-provider-email-sendmail/package.json +++ b/packages/strapi-provider-email-sendmail/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-sendmail", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Sendmail provider for strapi email", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-aws-s3/package.json b/packages/strapi-provider-upload-aws-s3/package.json index 02440749e7..0706ad7bf9 100644 --- a/packages/strapi-provider-upload-aws-s3/package.json +++ b/packages/strapi-provider-upload-aws-s3/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-aws-s3", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "AWS S3 provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-cloudinary/package.json b/packages/strapi-provider-upload-cloudinary/package.json index 09e4d897f5..adcd163f5e 100644 --- a/packages/strapi-provider-upload-cloudinary/package.json +++ b/packages/strapi-provider-upload-cloudinary/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-cloudinary", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Cloudinary provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-local/package.json b/packages/strapi-provider-upload-local/package.json index f5d880fe3e..63a302eea9 100644 --- a/packages/strapi-provider-upload-local/package.json +++ b/packages/strapi-provider-upload-local/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-local", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Local provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-rackspace/package.json b/packages/strapi-provider-upload-rackspace/package.json index 9c02ba1ca4..12e751a8e4 100644 --- a/packages/strapi-provider-upload-rackspace/package.json +++ b/packages/strapi-provider-upload-rackspace/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-rackspace", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Rackspace provider for strapi upload", "main": "./lib", "scripts": { diff --git a/packages/strapi-utils/package.json b/packages/strapi-utils/package.json index 52cf337974..a7185fd8e9 100644 --- a/packages/strapi-utils/package.json +++ b/packages/strapi-utils/package.json @@ -1,6 +1,6 @@ { "name": "strapi-utils", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "Shared utilities for the Strapi packages", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi/package.json b/packages/strapi/package.json index b4896681b9..45977dddba 100644 --- a/packages/strapi/package.json +++ b/packages/strapi/package.json @@ -1,6 +1,6 @@ { "name": "strapi", - "version": "3.0.0-alpha.18", + "version": "3.0.0-alpha.19", "description": "An open source solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier.", "homepage": "http://strapi.io", "keywords": [ @@ -60,16 +60,16 @@ "rimraf": "^2.6.2", "semver": "^5.4.1", "stack-trace": "0.0.10", - "strapi-generate": "3.0.0-alpha.18", - "strapi-generate-admin": "3.0.0-alpha.18", - "strapi-generate-api": "3.0.0-alpha.18", - "strapi-generate-controller": "3.0.0-alpha.18", - "strapi-generate-model": "3.0.0-alpha.18", - "strapi-generate-new": "3.0.0-alpha.18", - "strapi-generate-plugin": "3.0.0-alpha.18", - "strapi-generate-policy": "3.0.0-alpha.18", - "strapi-generate-service": "3.0.0-alpha.18", - "strapi-utils": "3.0.0-alpha.18" + "strapi-generate": "3.0.0-alpha.19", + "strapi-generate-admin": "3.0.0-alpha.19", + "strapi-generate-api": "3.0.0-alpha.19", + "strapi-generate-controller": "3.0.0-alpha.19", + "strapi-generate-model": "3.0.0-alpha.19", + "strapi-generate-new": "3.0.0-alpha.19", + "strapi-generate-plugin": "3.0.0-alpha.19", + "strapi-generate-policy": "3.0.0-alpha.19", + "strapi-generate-service": "3.0.0-alpha.19", + "strapi-utils": "3.0.0-alpha.19" }, "author": { "email": "hi@strapi.io", From 37c942915ef09f3e0a435057fd06d23a57cb6510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=B3n=20Rodr=C3=ADguez=20Davila?= Date: Wed, 16 Jan 2019 14:58:50 +0100 Subject: [PATCH 60/66] Avoid write files if production mode --- packages/strapi/lib/core/admin.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/strapi/lib/core/admin.js b/packages/strapi/lib/core/admin.js index 010bffe825..1e2f91aca1 100644 --- a/packages/strapi/lib/core/admin.js +++ b/packages/strapi/lib/core/admin.js @@ -58,13 +58,15 @@ module.exports = function() { $('body').attr('back', `/`); } - fs.writeFile(sourcePath, $.html(), (err) => { - if (err) { - return reject(err); - } + if (!strapi.config.currentEnvironment.server.production) { + fs.writeFile(sourcePath, $.html(), (err) => { + if (err) { + return reject(err); + } - resolve(); - }); + resolve(); + }); + } }); }); }); From c9145ae690a1496bade5471ae13cc32539e1ad6f Mon Sep 17 00:00:00 2001 From: Roman Ponomarev Date: Wed, 16 Jan 2019 19:28:18 +0300 Subject: [PATCH 61/66] Update webhooks.md --- docs/3.x.x/guides/webhooks.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/3.x.x/guides/webhooks.md b/docs/3.x.x/guides/webhooks.md index d8103ef950..c6b1b2ff18 100644 --- a/docs/3.x.x/guides/webhooks.md +++ b/docs/3.x.x/guides/webhooks.md @@ -63,10 +63,10 @@ Do the same thing for other environments. #### HTTP call -Now it is time to make the HTTP call. In this example we will use `request` as it is already in the list of Strapi's dependencies. Let's install it: +Now it is time to make the HTTP call. In this example we will use `axios`. Let's install it: ``` -npm i request --save +npm i axios --save ``` Edit `api/yourContentType/models/YourContentType.js`: @@ -76,7 +76,7 @@ Edit `api/yourContentType/models/YourContentType.js`: ```js 'use strict'; -const request = require('request'); +const axios = require('axios'); /** * Lifecycle callbacks for the `Post` model. @@ -119,5 +119,5 @@ So, to trigger an url on delete, please add `request.post(strapi.config.currentE - `delete` action of `plugins/content-manager/services/ContentManager.js` (triggered by the Content Manager). ::: note -Do not forget to require `request` at the top of these files. +Do not forget to require `axios` at the top of these files. ::: From f534340ca2083087dc62ffc39e73a7625f02bdb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Fri, 18 Jan 2019 16:08:15 +0100 Subject: [PATCH 62/66] Add listeners to events --- .../strapi-generate-new/json/package.json.js | 4 ++-- packages/strapi-generate-new/lib/after.js | 17 ++++++++++++++++- packages/strapi-generate-new/lib/before.js | 2 ++ packages/strapi-generate-new/package.json | 1 + .../controllers/Auth.js | 5 +++++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/packages/strapi-generate-new/json/package.json.js b/packages/strapi-generate-new/json/package.json.js index 2a2e0c2cf6..85376c2872 100644 --- a/packages/strapi-generate-new/json/package.json.js +++ b/packages/strapi-generate-new/json/package.json.js @@ -6,7 +6,7 @@ // Public node modules. const _ = require('lodash'); -const uuid = require('uuid/v4'); + const { packageManager } = require('strapi-utils'); /** @@ -72,7 +72,7 @@ module.exports = scope => { }], 'strapi': { 'packageManager': pkgManager, - 'uuid': uuid() + 'uuid': scope.uuid }, 'engines': { "node": ">= 10.0.0", diff --git a/packages/strapi-generate-new/lib/after.js b/packages/strapi-generate-new/lib/after.js index 82ee83968f..1e7853c2f2 100644 --- a/packages/strapi-generate-new/lib/after.js +++ b/packages/strapi-generate-new/lib/after.js @@ -5,8 +5,8 @@ */ // Node.js core. -const path = require('path'); const { exec, execSync } = require('child_process'); +const path = require('path'); // Public node modules. const _ = require('lodash'); @@ -15,6 +15,7 @@ const fs = require('fs-extra'); const npm = require('enpeem'); const ora = require('ora'); const shell = require('shelljs'); +const request = require('request'); // Logger. const { packageManager } = require('strapi-utils'); @@ -32,6 +33,8 @@ module.exports = (scope, cb) => { console.log(`The app has been connected to the database ${green('successfully')}!`); console.log(); + trackSuccess('didConnectDatabase', scope); + console.log('🏗 Application generation:'); let loader = ora('Copy dashboard').start(); @@ -193,7 +196,19 @@ module.exports = (scope, cb) => { console.log('⚡️ Start application:'); console.log(`$ ${green('strapi start')}`); + trackSuccess('didCreateProject', scope); + cb(); }); } }; + +function trackSuccess(event, scope) { + request + .post('https://analytics.strapi.io/track') + .form({ + event, + uuid: scope.uuid + }) + .on('error', () => {}); +} diff --git a/packages/strapi-generate-new/lib/before.js b/packages/strapi-generate-new/lib/before.js index f8cc961ac8..e71301fa13 100644 --- a/packages/strapi-generate-new/lib/before.js +++ b/packages/strapi-generate-new/lib/before.js @@ -17,6 +17,7 @@ const {cyan} = require('chalk'); const fs = require('fs-extra'); const inquirer = require('inquirer'); const shell = require('shelljs'); +const uuid = require('uuid/v4'); // Logger. const { packageManager } = require('strapi-utils'); @@ -46,6 +47,7 @@ module.exports = (scope, cb) => { // Make changes to the rootPath where the Strapi project will be created. scope.rootPath = path.resolve(process.cwd(), scope.name || ''); scope.tmpPath = path.resolve(os.tmpdir(), `strapi${ crypto.randomBytes(6).toString('hex') }`); + scope.uuid = uuid(); // Ensure we aren't going to inadvertently delete any files. try { diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index 9b9f1ec706..09457e33a1 100644 --- a/packages/strapi-generate-new/package.json +++ b/packages/strapi-generate-new/package.json @@ -19,6 +19,7 @@ "listr": "^0.14.1", "lodash": "^4.17.5", "ora": "^2.1.0", + "request": "^2.88.0", "strapi-utils": "3.0.0-alpha.19", "uuid": "^3.1.0" }, diff --git a/packages/strapi-plugin-users-permissions/controllers/Auth.js b/packages/strapi-plugin-users-permissions/controllers/Auth.js index d4c86ad8a0..b51bf8e652 100644 --- a/packages/strapi-plugin-users-permissions/controllers/Auth.js +++ b/packages/strapi-plugin-users-permissions/controllers/Auth.js @@ -9,6 +9,7 @@ /* eslint-disable no-useless-escape */ const crypto = require('crypto'); const _ = require('lodash'); + const emailRegExp = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; module.exports = { @@ -326,6 +327,10 @@ module.exports = { } } + if (!hasAdmin) { + strapi.emit('didCreateFirstAdmin'); + } + ctx.send({ jwt, user: _.omit(user.toJSON ? user.toJSON() : user, ['password', 'resetPasswordToken']) From 632814caa4ad1e0327ca189476bf492757cfee12 Mon Sep 17 00:00:00 2001 From: Ahmed El Sayegh Date: Mon, 21 Jan 2019 01:12:05 +0200 Subject: [PATCH 63/66] Add public/uploads folder to generated gitignore --- packages/strapi-generate-new/templates/gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/strapi-generate-new/templates/gitignore b/packages/strapi-generate-new/templates/gitignore index bbc04469ce..934cdb00d9 100644 --- a/packages/strapi-generate-new/templates/gitignore +++ b/packages/strapi-generate-new/templates/gitignore @@ -80,6 +80,7 @@ $RECYCLE.BIN/ ssl .idea nbproject +public/uploads ############################ From bb585f4df2ca0595b05d5c8ef9a4fac7ea60a6ec Mon Sep 17 00:00:00 2001 From: Ahmed El Sayegh Date: Tue, 22 Jan 2019 12:19:42 +0200 Subject: [PATCH 64/66] Add gitkeep to public/uploads folder --- packages/strapi-generate-new/templates/gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-generate-new/templates/gitignore b/packages/strapi-generate-new/templates/gitignore index 934cdb00d9..e008e5bfed 100644 --- a/packages/strapi-generate-new/templates/gitignore +++ b/packages/strapi-generate-new/templates/gitignore @@ -80,8 +80,8 @@ $RECYCLE.BIN/ ssl .idea nbproject -public/uploads - +public/uploads/* +!public/uploads/.gitkeep ############################ # Node.js From 54f70da36657b20c1f48a47c8f0ddd93341bf846 Mon Sep 17 00:00:00 2001 From: Ahmed El Sayegh Date: Tue, 22 Jan 2019 12:31:49 +0200 Subject: [PATCH 65/66] Add gitkeep template and target --- packages/strapi-generate-new/lib/index.js | 5 ++++- packages/strapi-generate-new/templates/gitkeep | 0 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 packages/strapi-generate-new/templates/gitkeep diff --git a/packages/strapi-generate-new/lib/index.js b/packages/strapi-generate-new/lib/index.js index 6bfd73646c..7aacf6329b 100644 --- a/packages/strapi-generate-new/lib/index.js +++ b/packages/strapi-generate-new/lib/index.js @@ -66,7 +66,10 @@ module.exports = { 'public/uploads': { folder: {} }, - + // Copy gitkeep into uploads directory. + 'public/uploads/.gitkeep': { + copy: 'gitkeep' + }, // Empty node_modules directory. 'node_modules': { folder: {} diff --git a/packages/strapi-generate-new/templates/gitkeep b/packages/strapi-generate-new/templates/gitkeep new file mode 100644 index 0000000000..e69de29bb2 From b4968697a0b70e5b7c2162efceaf7b5151c4080d Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Tue, 22 Jan 2019 11:41:49 +0100 Subject: [PATCH 66/66] Fix update user email --- packages/strapi-plugin-users-permissions/controllers/User.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-plugin-users-permissions/controllers/User.js b/packages/strapi-plugin-users-permissions/controllers/User.js index 7e496e724d..8f1d9d695a 100644 --- a/packages/strapi-plugin-users-permissions/controllers/User.js +++ b/packages/strapi-plugin-users-permissions/controllers/User.js @@ -120,7 +120,7 @@ module.exports = { if (advancedConfigs.unique_email && ctx.request.body.email) { const users = await strapi.plugins['users-permissions'].services.user.fetchAll({ email: ctx.request.body.email }); - if (users && _.find(users, user => (user.id || user._id).toString() !== ctx.params._id)) { + if (users && _.find(users, user => (user.id || user._id).toString() !== (ctx.params.id || ctx.params._id))) { return ctx.badRequest(null, ctx.request.admin ? [{ messages: [{ id: 'Auth.form.error.email.taken', field: ['email'] }] }] : 'Email is already taken.'); } } @@ -140,7 +140,7 @@ module.exports = { email: ctx.request.body.email }); - if (user !== null && (user.id || user._id).toString() !== ctx.params._id) { + if (user !== null && (user.id || user._id).toString() !== (ctx.params.id || ctx.params._id)) { return ctx.badRequest(null, ctx.request.admin ? [{ messages: [{ id: 'Auth.form.error.email.taken', field: ['email'] }] }] : 'Email is already taken.'); } }