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 {
-
+