From e85b1fcfff64caefb299092993b9ac7a929b4e0c Mon Sep 17 00:00:00 2001 From: Frode Jensen Date: Fri, 27 Sep 2019 10:38:59 +0200 Subject: [PATCH 01/21] fix(aws-ses): Add label for Aws ses secret --- client/src/send-configurations/helpers.js | 2 +- locales/en-US-last-run/common.json | 1 + locales/en-US/common.json | 1 + locales/es-ES/common.json | 1 + locales/pt-BR/common.json | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/send-configurations/helpers.js b/client/src/send-configurations/helpers.js index e78ccfbf..f1ec76ee 100644 --- a/client/src/send-configurations/helpers.js +++ b/client/src/send-configurations/helpers.js @@ -291,7 +291,7 @@ export function getMailerTypes(t) {
- +
diff --git a/locales/en-US-last-run/common.json b/locales/en-US-last-run/common.json index dce14596..1522ede8 100644 --- a/locales/en-US-last-run/common.json +++ b/locales/en-US-last-run/common.json @@ -864,6 +864,7 @@ "beginsWithBeginRsaPrivateKey": "Begins with \"-----BEGIN RSA PRIVATE KEY-----\"", "signingIsDisabledWithoutAValidPrivateKey": "Signing is disabled without a valid private key.", "accessKey": "Access key", + "accessSecret": "Access Secret", "awsAccessKeyId": "AWS access key ID", "awsSecretAccessKey": "AWS secret access key", "region": "Region", diff --git a/locales/en-US/common.json b/locales/en-US/common.json index fa23af49..df93763b 100644 --- a/locales/en-US/common.json +++ b/locales/en-US/common.json @@ -864,6 +864,7 @@ "beginsWithBeginRsaPrivateKey": "Begins with \"-----BEGIN RSA PRIVATE KEY-----\"", "signingIsDisabledWithoutAValidPrivateKey": "Signing is disabled without a valid private key.", "accessKey": "Access key", + "accessSecret": "Access Secret", "awsAccessKeyId": "AWS access key ID", "awsSecretAccessKey": "AWS secret access key", "region": "Region", diff --git a/locales/es-ES/common.json b/locales/es-ES/common.json index 905d9d41..8f61521d 100644 --- a/locales/es-ES/common.json +++ b/locales/es-ES/common.json @@ -915,6 +915,7 @@ "beginsWithBeginRsaPrivateKey": "Begins with \"-----BEGIN RSA PRIVATE KEY-----\"", "signingIsDisabledWithoutAValidPrivateKey": "Signing is disabled without a valid private key.", "accessKey": "Access key", + "accessSecret": "Access Secret", "awsAccessKeyId": "AWS access key ID", "awsSecretAccessKey": "AWS secret access key", "region": "Region", diff --git a/locales/pt-BR/common.json b/locales/pt-BR/common.json index 43da6868..587c2602 100644 --- a/locales/pt-BR/common.json +++ b/locales/pt-BR/common.json @@ -916,6 +916,7 @@ "beginsWithBeginRsaPrivateKey": "Começa com \"----- INICIO DA CHAVE PRIVADA RSA ----- \"", "signingIsDisabledWithoutAValidPrivateKey": "A assinatura está desativada sem uma chave privada válida.", "accessKey": "Chave de acesso", + "accessSecret": "Acesso secreto", "awsAccessKeyId": "ID da chave de acesso da AWS", "awsSecretAccessKey": "Chave de acesso secreto da AWS", "region": "Região", From 9914fa33d8400d761aa05558221a8769dbf85e8c Mon Sep 17 00:00:00 2001 From: Frode Jensen Date: Fri, 27 Sep 2019 10:39:39 +0200 Subject: [PATCH 02/21] fix(aws-ses): Make AWS SES secret a password field --- client/src/send-configurations/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/send-configurations/helpers.js b/client/src/send-configurations/helpers.js index f1ec76ee..9329edd3 100644 --- a/client/src/send-configurations/helpers.js +++ b/client/src/send-configurations/helpers.js @@ -291,7 +291,7 @@ export function getMailerTypes(t) {
- +
From 7620e1564d8fb46b5ca5a7e1f7c7416c5d08d06c Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Wed, 2 Oct 2019 09:48:27 +0200 Subject: [PATCH 03/21] Extend .dockerignore file to make image smaller --- .dockerignore | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index b512c09d..c81bbd22 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,9 @@ -node_modules \ No newline at end of file +node_modules/ +docs/ +Dockerfile +*.md +.git +.gitignore +.gitmodules +docker-compose.yml +docker-compose-local.yml \ No newline at end of file From 77e7df7b83fb73a31b8263887fc1a2baa2a0d1ae Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Wed, 2 Oct 2019 10:56:50 +0200 Subject: [PATCH 04/21] Add more mysql database parameters to entrypoint --- docker-entrypoint.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 52c6ff1e..17d361de 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -12,6 +12,9 @@ Optional parameters: --mongoHost XXX - sets mongo host (default: mongo) --redisHost XXX - sets redis host (default: redis) --mySqlHost XXX - sets mysql host (default: mysql) + --mySqlDatabase XXX - sets mysql database (default: mailtrain) + --mySqlUser XXX - sets mysql user (default: mailtrain) + --mySqlPassword XXX - sets mysql password (default: mailtrain) --withLdap - use if you want to enable LDAP authentication --ldapHost XXX - LDAP Host for authentication (default: ldap) --ldapPort XXX - LDAP port (default: 389) @@ -43,6 +46,9 @@ ldapUidTag="" mongoHost=mongo redisHost=redis mySqlHost=mysql +mySqlDatabase=mailtrain +mySqlUser=mailtrain +mySqlPassword=mailtrain while [ $# -gt 0 ]; do case "$1" in @@ -77,6 +83,18 @@ while [ $# -gt 0 ]; do mySqlHost="$2" shift 2 ;; + --mySqlDatabase) + mySqlDatabase="$2" + shift 2 + ;; + --mySqlUser) + mySqlUser="$2" + shift 2 + ;; + --mySqlPassword) + mySqlPassword="$2" + shift 2 + ;; --withLdap) withLdap=true shift 1 @@ -156,6 +174,9 @@ www: mysql: host: $mySqlHost + database: $mySqlDatabase + user: $mySqlUser + password: $mySqlPassword redis: enabled: true @@ -198,4 +219,5 @@ while ! nc -z $redisHost 6379; do sleep 1; done while ! nc -z $mongoHost 27017; do sleep 1; done cd server -NODE_ENV=production node index.js \ No newline at end of file +NODE_ENV=production node index.js + From 12210a1bf514d138d5371033bec207a859007f1d Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Wed, 2 Oct 2019 12:02:24 +0200 Subject: [PATCH 05/21] Update Dockerfile to make image smaller - Added multistaged build - Moved production depedencies to final stage - Added more verbose output during build --- Dockerfile | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 337be331..ecaf69d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ -FROM node:10.14-alpine +# Mutistaged Node.js Build +FROM node:10-alpine as builder -RUN apk add --update pwgen netcat-openbsd python make gcc git g++ bash imagemagick +# Install system dependencies +RUN set -ex; \ + apk add --update --no-cache \ + make gcc g++ git -# First install dependencies +# Copy package.json dependencies COPY server/package.json /app/server/package.json COPY server/package-lock.json /app/server/package-lock.json COPY client/package.json /app/client/package.json @@ -14,13 +18,29 @@ COPY zone-mta/package-lock.json /app/zone-mta/package-lock.json WORKDIR /app/ -RUN for idx in client shared server zone-mta; do (cd $idx && npm install); done +# Install dependencies in each directory +RUN set -ex; \ + for idx in client shared server zone-mta; do (cd $idx && npm install); done # Later, copy the app files. That improves development speed as buiding the Docker image will not have # to download and install all the NPM dependencies every time there's a change in the source code COPY . /app -RUN cd client && npm run build +RUN set -ex; \ + cd client && \ + npm run build + +# Final Image +FROM node:10-alpine + +WORKDIR /app/ + +# Install system dependencies +RUN set -ex; \ + apk add --update --no-cache \ + pwgen netcat-openbsd bash imagemagick + +COPY --from=builder /app/ /app/ EXPOSE 3000 3003 3004 ENTRYPOINT ["bash", "/app/docker-entrypoint.sh"] From c9563ede6a8e627efe99cc5c9eb35a219ce8519a Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Sat, 19 Oct 2019 13:21:01 +0200 Subject: [PATCH 06/21] Add python to Dockerfile - This ensures that the posix pid/gid resolve features are working --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ecaf69d2..25010c2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM node:10-alpine as builder # Install system dependencies RUN set -ex; \ apk add --update --no-cache \ - make gcc g++ git + make gcc g++ git python # Copy package.json dependencies COPY server/package.json /app/server/package.json From 436e8b069d75292aba68fa9e71b29a59deaba1bb Mon Sep 17 00:00:00 2001 From: sedrubal Date: Sun, 10 Nov 2019 00:23:18 +0100 Subject: [PATCH 07/21] Fix rendering of access token in API docs --- client/src/account/API.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/account/API.js b/client/src/account/API.js index ad9706d2..144835dd 100644 --- a/client/src/account/API.js +++ b/client/src/account/API.js @@ -292,7 +292,7 @@ export default class API extends Component { {t('example')}

-
curl -XPOST '{getUrl(`api/blacklist/add?access_token={accessToken}`)}' \
+
curl -XPOST '{getUrl(`api/blacklist/add?access_token=${accessToken}`)}' \
--data 'EMAIL=test@example.com&'

POST /api/blacklist/delete – {t('deleteEmailFromBlacklist')}

From 81fb4be4af03d8dfa243d48e9fd3d675c1fe4d96 Mon Sep 17 00:00:00 2001 From: sedrubal Date: Sun, 10 Nov 2019 00:28:29 +0100 Subject: [PATCH 08/21] Delete trailing &s in API docs --- client/src/account/API.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/account/API.js b/client/src/account/API.js index 144835dd..c1198755 100644 --- a/client/src/account/API.js +++ b/client/src/account/API.js @@ -293,7 +293,7 @@ export default class API extends Component {

curl -XPOST '{getUrl(`api/blacklist/add?access_token=${accessToken}`)}' \
---data 'EMAIL=test@example.com&'
+--data 'EMAIL=test@example.com'

POST /api/blacklist/delete – {t('deleteEmailFromBlacklist')}

@@ -320,7 +320,7 @@ export default class API extends Component {

curl -XPOST '{getUrl(`api/blacklist/delete?access_token=${accessToken}`)}' \
---data 'EMAIL=test@example.com&'
+--data 'EMAIL=test@example.com'

GET /api/lists/:email – {t('getTheListsAUserHasSubscribedTo')}

From 082901e4e7f9402b56933321fc6099298c781333 Mon Sep 17 00:00:00 2001 From: sedrubal Date: Sun, 10 Nov 2019 00:43:41 +0100 Subject: [PATCH 09/21] Add Field `cid` to `/api/lists/:email` With this `cid` you are able to do further API calls like unsubscribing the user from all mailing lists. --- server/models/subscriptions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models/subscriptions.js b/server/models/subscriptions.js index dd99841d..06450f0c 100644 --- a/server/models/subscriptions.js +++ b/server/models/subscriptions.js @@ -863,7 +863,7 @@ async function getListsWithEmail(context, email) { // FIXME - this methods is rather suboptimal if there are many lists. It quite needs permission caching in shares.js return await knex.transaction(async tx => { - const lsts = await tx('lists').select(['id', 'name']); + const lsts = await tx('lists').select(['id', 'cid', 'name']); const result = []; for (const list of lsts) { From b2bb0b642f70ba746045e6c52b765146e11a633e Mon Sep 17 00:00:00 2001 From: Eric Uldall Date: Tue, 12 Nov 2019 13:27:46 -0800 Subject: [PATCH 10/21] added campaignId to query for campaign_messages --- server/services/sender-master.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/services/sender-master.js b/server/services/sender-master.js index 8ac5c06c..deae9e51 100644 --- a/server/services/sender-master.js +++ b/server/services/sender-master.js @@ -361,7 +361,7 @@ async function processCampaign(campaignId) { } const subs = await knex('campaign_messages') - .where({status: CampaignMessageStatus.SCHEDULED}) + .where({status: CampaignMessageStatus.SCHEDULED, campaign: campaignId}) .whereNotIn('hash_email', messagesInProcessing.map(x => x.hash_email)) .limit(retrieveBatchSize); From 73b49e79227fdac899823ac37adb42327c34c17f Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Sun, 10 Nov 2019 09:24:21 +0100 Subject: [PATCH 11/21] Fix minor typo in english translation --- client/src/lists/fields/CUD.js | 4 ++-- locales/en-US-last-run/common.json | 4 ++-- locales/en-US/common.json | 4 ++-- locales/es-ES/common.json | 4 ++-- locales/pt-BR/common.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/src/lists/fields/CUD.js b/client/src/lists/fields/CUD.js index 84b40bd5..3891fe91 100644 --- a/client/src/lists/fields/CUD.js +++ b/client/src/lists/fields/CUD.js @@ -277,7 +277,7 @@ export default class CUD extends Component { const label = matches[2].trim(); options.push({ key, label }); } else { - errors.push(t('errrorOnLineLine', { line: lineIdx + 1})); + errors.push(t('errorOnLineLine', { line: lineIdx + 1})); } } } @@ -532,4 +532,4 @@ export default class CUD extends Component { ); } -} \ No newline at end of file +} diff --git a/locales/en-US-last-run/common.json b/locales/en-US-last-run/common.json index 1522ede8..6434bc93 100644 --- a/locales/en-US-last-run/common.json +++ b/locales/en-US-last-run/common.json @@ -398,7 +398,7 @@ "defaultValueIsNotAProperlyFormattedDate": "Default value is not a properly formatted date", "defaultValueIsNotAProperlyFormatted": "Default value is not a properly formatted birthday date", "defaultValueIsNotOneOfTheAllowedOptions": "Default value is not one of the allowed options", - "errrorOnLineLine": "Errror on line {{ line }}", + "errorOnLineLine": "Error on line {{ line }}", "fieldUpdated": "Field updated", "fieldCreated": "Field created", "notVisible": "Not visible", @@ -1026,4 +1026,4 @@ "thePasswordMustContainAtLeastOne-1": "The password must contain at least one uppercase letter", "thePasswordMustContainAtLeastOneNumber": "The password must contain at least one number", "thePasswordMustContainAtLeastOneSpecial": "The password must contain at least one special character" -} \ No newline at end of file +} diff --git a/locales/en-US/common.json b/locales/en-US/common.json index df93763b..eac3a7b8 100644 --- a/locales/en-US/common.json +++ b/locales/en-US/common.json @@ -398,7 +398,7 @@ "defaultValueIsNotAProperlyFormattedDate": "Default value is not a properly formatted date", "defaultValueIsNotAProperlyFormatted": "Default value is not a properly formatted birthday date", "defaultValueIsNotOneOfTheAllowedOptions": "Default value is not one of the allowed options", - "errrorOnLineLine": "Errror on line {{ line }}", + "errorOnLineLine": "Error on line {{ line }}", "fieldUpdated": "Field updated", "fieldCreated": "Field created", "notVisible": "Not visible", @@ -1026,4 +1026,4 @@ "thePasswordMustContainAtLeastOne-1": "The password must contain at least one uppercase letter", "thePasswordMustContainAtLeastOneNumber": "The password must contain at least one number", "thePasswordMustContainAtLeastOneSpecial": "The password must contain at least one special character" -} \ No newline at end of file +} diff --git a/locales/es-ES/common.json b/locales/es-ES/common.json index 8f61521d..90b3d941 100644 --- a/locales/es-ES/common.json +++ b/locales/es-ES/common.json @@ -425,7 +425,7 @@ "defaultValueIsNotAProperlyFormattedDate": "Default value is not a properly formatted date", "defaultValueIsNotAProperlyFormatted": "Default value is not a properly formatted birthday date", "defaultValueIsNotOneOfTheAllowedOptions": "Default value is not one of the allowed options", - "errrorOnLineLine": "Errror on line {{ line }}", + "errorOnLineLine": "Error on line {{ line }}", "fieldUpdated": "Field updated", "fieldUpdated - TODO: update line above and then delete this line to mark that the translation has been fixed": "Field updated", "fieldCreated": "Field created", @@ -1105,4 +1105,4 @@ "thePasswordMustContainAtLeastOne-1": "The password must contain at least one uppercase letter", "thePasswordMustContainAtLeastOneNumber": "The password must contain at least one number", "thePasswordMustContainAtLeastOneSpecial": "The password must contain at least one special character" -} \ No newline at end of file +} diff --git a/locales/pt-BR/common.json b/locales/pt-BR/common.json index 587c2602..5d92ba58 100644 --- a/locales/pt-BR/common.json +++ b/locales/pt-BR/common.json @@ -426,7 +426,7 @@ "defaultValueIsNotAProperlyFormattedDate": "O valor padrão não é uma data formatada corretamente", "defaultValueIsNotAProperlyFormatted": "O valor padrão não é uma data de aniversário formatada corretamente", "defaultValueIsNotOneOfTheAllowedOptions": "O valor padrão não é uma das opções permitidas", - "errrorOnLineLine": "Errror on line {{line}}", + "errorOnLineLine": "Error on line {{line}}", "fieldUpdated": "Field updated", "fieldUpdated - TODO: update line above and then delete this line to mark that the translation has been fixed": "Field updated", "fieldCreated": "Field created", @@ -1108,4 +1108,4 @@ "thePasswordMustContainAtLeastOne-1": "A senha deve conter pelo menos uma letra maiúscula", "thePasswordMustContainAtLeastOneNumber": "A senha deve conter pelo menos um número", "thePasswordMustContainAtLeastOneSpecial": "A senha deve conter pelo menos um caractere especial" -} \ No newline at end of file +} From adbee1cc22dda8bd4a2e6e58717e1919f51e72a7 Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Sun, 10 Nov 2019 17:03:12 +0100 Subject: [PATCH 12/21] Fix minor typo in english translation --- locales/en-US-last-run/common.json | 2 +- locales/en-US/common.json | 2 +- locales/es-ES/common.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locales/en-US-last-run/common.json b/locales/en-US-last-run/common.json index 6434bc93..d0895587 100644 --- a/locales/en-US-last-run/common.json +++ b/locales/en-US-last-run/common.json @@ -267,7 +267,7 @@ "viewStatistics": "View statistics", "campaignIsBeingSentOut": "Campaign is being sent out.", "stop": "Stop", - "allMessagesSent!HitContinueIfYouYouWant": "All messages sent! Hit \"Continue\" if you you want to send this campaign to new subscribers.", + "allMessagesSent!HitContinueIfYouYouWant": "All messages sent! Hit \"Continue\" if you want to send this campaign to new subscribers.", "continue": "Continue", "reset": "Reset", "yourCampaignIsCurrentlyDisabledClick": "Your campaign is currently disabled. Click Enable button to start enable it.", diff --git a/locales/en-US/common.json b/locales/en-US/common.json index eac3a7b8..c9a917ee 100644 --- a/locales/en-US/common.json +++ b/locales/en-US/common.json @@ -267,7 +267,7 @@ "viewStatistics": "View statistics", "campaignIsBeingSentOut": "Campaign is being sent out.", "stop": "Stop", - "allMessagesSent!HitContinueIfYouYouWant": "All messages sent! Hit \"Continue\" if you you want to send this campaign to new subscribers.", + "allMessagesSent!HitContinueIfYouYouWant": "All messages sent! Hit \"Continue\" if you want to send this campaign to new subscribers.", "continue": "Continue", "reset": "Reset", "yourCampaignIsCurrentlyDisabledClick": "Your campaign is currently disabled. Click Enable button to start enable it.", diff --git a/locales/es-ES/common.json b/locales/es-ES/common.json index 90b3d941..a91274be 100644 --- a/locales/es-ES/common.json +++ b/locales/es-ES/common.json @@ -277,7 +277,7 @@ "viewStatistics": "View statistics", "campaignIsBeingSentOut": "Campaign is being sent out.", "stop": "Stop", - "allMessagesSent!HitContinueIfYouYouWant": "All messages sent! Hit \"Continue\" if you you want to send this campaign to new subscribers.", + "allMessagesSent!HitContinueIfYouYouWant": "All messages sent! Hit \"Continue\" if you want to send this campaign to new subscribers.", "continue": "Continue", "reset": "Reset", "yourCampaignIsCurrentlyDisabledClick": "Your campaign is currently disabled. Click Enable button to start enable it.", From 1ed90941a7f9c3cae27f7db116b01c5bb2a722eb Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Mon, 11 Nov 2019 10:58:57 +0100 Subject: [PATCH 13/21] Add locales key for 'Tag language' --- client/src/campaigns/CUD.js | 4 ++-- client/src/campaigns/Content.js | 4 ++-- client/src/templates/CUD.js | 6 +++--- client/src/templates/List.js | 2 +- client/src/templates/mosaico/CUD.js | 4 ++-- client/src/templates/mosaico/List.js | 2 +- locales/en-US/common.json | 4 +++- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/client/src/campaigns/CUD.js b/client/src/campaigns/CUD.js index bc0fb9d7..97ee8e50 100644 --- a/client/src/campaigns/CUD.js +++ b/client/src/campaigns/CUD.js @@ -401,7 +401,7 @@ export default class CUD extends Component { } if (!state.getIn(['data_sourceCustom_tag_language', 'value'])) { - state.setIn(['data_sourceCustom_tag_language', 'error'], t('Tag language must be selected')); + state.setIn(['data_sourceCustom_tag_language', 'error'], t('tagLanguageMustBeSelected')); } if (customTemplateTypeKey) { @@ -732,7 +732,7 @@ export default class CUD extends Component { templateEdit =
- + {customTemplateTypeForm}
; diff --git a/client/src/campaigns/Content.js b/client/src/campaigns/Content.js index 3b654ce6..3f48ad91 100644 --- a/client/src/campaigns/Content.js +++ b/client/src/campaigns/Content.js @@ -131,7 +131,7 @@ export default class CustomContent extends Component { const t = this.props.t; if (!state.getIn(['data_sourceCustom_tag_language', 'value'])) { - state.setIn(['data_sourceCustom_tag_language', 'error'], t('Tag language must be selected')); + state.setIn(['data_sourceCustom_tag_language', 'error'], t('tagLanguageMustBeSelected')); } else { state.setIn(['data_sourceCustom_tag_language', 'error'], null); } @@ -277,7 +277,7 @@ export default class CustomContent extends Component { {customTemplateTypeKey && this.templateTypes[customTemplateTypeKey].typeName} - + {customTemplateTypeKey && getTypeForm(this, customTemplateTypeKey, true)} diff --git a/client/src/templates/CUD.js b/client/src/templates/CUD.js index 59dcb1f9..2ffe6f7d 100644 --- a/client/src/templates/CUD.js +++ b/client/src/templates/CUD.js @@ -171,7 +171,7 @@ export default class CUD extends Component { } if (!state.getIn(['tag_language', 'value'])) { - state.setIn(['tag_language', 'error'], t('Tag language must be selected')); + state.setIn(['tag_language', 'error'], t('tagLanguageMustBeSelected')); } if (typeKey) { @@ -320,7 +320,7 @@ export default class CUD extends Component { { data: 1, title: t('name') }, { data: 2, title: t('description') }, { data: 3, title: t('type'), render: data => this.templateTypes[data].typeName }, - { data: 4, title: t('Tag language'), render: data => this.tagLanguages[data].name }, + { data: 4, title: t('tagLanguage'), render: data => this.tagLanguages[data].name }, { data: 5, title: t('created'), render: data => moment(data).fromNow() }, { data: 6, title: t('namespace') }, ]; @@ -376,7 +376,7 @@ export default class CUD extends Component { {typeForm} - + } diff --git a/client/src/templates/List.js b/client/src/templates/List.js index 0aec8123..dc010900 100644 --- a/client/src/templates/List.js +++ b/client/src/templates/List.js @@ -45,7 +45,7 @@ export default class List extends Component { { data: 1, title: t('name') }, { data: 2, title: t('description') }, { data: 3, title: t('type'), render: data => this.templateTypes[data].typeName }, - { data: 4, title: t('Tag language'), render: data => this.tagLanguages[data].name }, + { data: 4, title: t('tagLanguage'), render: data => this.tagLanguages[data].name }, { data: 5, title: t('created'), render: data => moment(data).fromNow() }, { data: 6, title: t('namespace') }, { diff --git a/client/src/templates/mosaico/CUD.js b/client/src/templates/mosaico/CUD.js index 9e387bba..1d761cb1 100644 --- a/client/src/templates/mosaico/CUD.js +++ b/client/src/templates/mosaico/CUD.js @@ -132,7 +132,7 @@ export default class CUD extends Component { } if (!state.getIn(['tag_language', 'value'])) { - state.setIn(['tag_language', 'error'], t('Tag language must be selected')); + state.setIn(['tag_language', 'error'], t('tagLanguageMustBeSelected')); } else { state.setIn(['tag_language', 'error'], null); } @@ -218,7 +218,7 @@ export default class CUD extends Component { } - + diff --git a/client/src/templates/mosaico/List.js b/client/src/templates/mosaico/List.js index b3faae6a..9efa2c75 100644 --- a/client/src/templates/mosaico/List.js +++ b/client/src/templates/mosaico/List.js @@ -45,7 +45,7 @@ export default class List extends Component { { data: 1, title: t('name') }, { data: 2, title: t('description') }, { data: 3, title: t('type'), render: data => this.templateTypes[data].typeName }, - { data: 4, title: t('Tag language'), render: data => this.tagLanguages[data].name }, + { data: 4, title: t('tagLanguage'), render: data => this.tagLanguages[data].name }, { data: 5, title: t('created'), render: data => moment(data).fromNow() }, { data: 6, title: t('namespace') }, { diff --git a/locales/en-US/common.json b/locales/en-US/common.json index c9a917ee..9c710969 100644 --- a/locales/en-US/common.json +++ b/locales/en-US/common.json @@ -1025,5 +1025,7 @@ "thePasswordMustContainAtLeastOne": "The password must contain at least one lowercase letter", "thePasswordMustContainAtLeastOne-1": "The password must contain at least one uppercase letter", "thePasswordMustContainAtLeastOneNumber": "The password must contain at least one number", - "thePasswordMustContainAtLeastOneSpecial": "The password must contain at least one special character" + "thePasswordMustContainAtLeastOneSpecial": "The password must contain at least one special character", + "tagLanguage": "Tag language", + "tagLanguageMustBeSelected": "Tag language must be selected" } From 10dcfeb74942eddbc2ee2787a09fb78b511c16b8 Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Mon, 11 Nov 2019 11:03:58 +0100 Subject: [PATCH 14/21] Add locales key for 'Help text' --- client/src/lists/fields/CUD.js | 2 +- locales/en-US/common.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/lists/fields/CUD.js b/client/src/lists/fields/CUD.js index 3891fe91..727f0575 100644 --- a/client/src/lists/fields/CUD.js +++ b/client/src/lists/fields/CUD.js @@ -511,7 +511,7 @@ export default class CUD extends Component { -