email - code formatting
MODIFY
src/assets/email/mjml-components/text1.mjml
src/assets/email/mjml-components/text1.mjml
<mj-section padding-top="20px">
<mj-column>
<mj-text>
- <p>{{i18n:common.username}},</p>
+ <p>{{i18n:common.greetings}},</p>
<p>{{i18n:text}}</p>
</mj-text>
</mj-column>

MODIFY
src/assets/i18n/en.json
src/assets/i18n/en.json
"userID": "User ID"
},
"email": {
- "username": "Hello {{recipientName}}",
+ "greetings": "Hello {{recipientName}}",
"footerText": "This message has been sent by an automated email service to {{recipientEmail}}. Please do not reply. You may unsubscribe by changing your notification settings.",
"new-registered-user": {
"title": "User Account Created",
"title": "User Account Status Changed",
"buttonText": "Navigate to Open E-Mobility",
"text": [
- "Your account has been {{accountStatus}} by an administrator"
+ "Your account has been {{accountStatus}} by an administrator."
]
},
"unknown-user-badged": {

MODIFY
src/integration/smart-charging/SmartChargingIntegration.ts
src/integration/smart-charging/SmartChargingIntegration.ts
@@ -140,7 +140,7 @@ export default abstract class SmartChargingIntegration<T extends SmartChargingSe
siteAreaID: chargingProfile.chargingStation?.siteAreaID,
companyID: chargingProfile.chargingStation?.companyID,
siteAreaName: siteAreaName,
- evseDashboardURL: Utils.buildEvseURL(tenant.subdomain);
+ evseDashboardURL: Utils.buildEvseURL(tenant.subdomain)
});
return false;
}

MODIFY
src/notification/email/email-component-manager/EmailComponentManager.ts
src/notification/email/email-component-manager/EmailComponentManager.ts
@@ -23,7 +23,6 @@ export default class EmailComponentManager {
cachedComponent = await EmailComponentManager.loadComponent(componentName);
EmailComponentManager.components.set(componentName, cachedComponent);
}
-
return cachedComponent;
}

MODIFY
src/notification/email/mjml-builder/MjmlBuilder.ts
src/notification/email/mjml-builder/MjmlBuilder.ts
@@ -20,7 +20,6 @@ export default class MjmlBuilder {
instance.addConfig(await EmailComponentManager.getComponent(EmailComponent.CONFIG))
.addHeader(await EmailComponentManager.getComponent(EmailComponent.HEADER))
.addFooter(await EmailComponentManager.getComponent(EmailComponent.FOOTER));
-
return instance;
}

MODIFY
src/notification/email/mjml-template/MjmlTemplate.ts
src/notification/email/mjml-template/MjmlTemplate.ts
import I18nManager from '../../../utils/I18nManager';
-import Utils from '../../../utils/Utils';
import mjml2html from 'mjml';
export default class MjmlTemplate {
@@ -19,8 +18,8 @@ export default class MjmlTemplate {
public resolve(i18nManager: I18nManager, context: any, prefix: string): void {
this.buildComponents(i18nManager, context, prefix);
- this.preparei18nSelectors(prefix);
- const i18nSelectors = this.geti18nSelectors();
+ this.prepareI18nSelectors(prefix);
+ const i18nSelectors = this.getI18nSelectors();
for (const selector of i18nSelectors) {
let value = i18nManager.translate(selector, context);
if (Array.isArray(value)) {
@@ -73,7 +72,7 @@ export default class MjmlTemplate {
return selectors;
}
- private geti18nSelectors(): string[] {
+ private getI18nSelectors(): string[] {
const regex = new RegExp(/\{\{(email..*)\}\}/, 'g');
const matches = this.template.matchAll(regex);
const selectors = [];
@@ -83,7 +82,7 @@ export default class MjmlTemplate {
return selectors;
}
- private preparei18nSelectors(prefix:string): void {
+ private prepareI18nSelectors(prefix: string): void {
const i18nRegexCommon = new RegExp(/\{\{i18n:common.(.*)\}\}/, 'g');
this.template = this.template.replace(i18nRegexCommon, '{{email.$1}}');

email - code formatting