polish - from PR comments
MODIFY
src/assets/i18n/en.json
src/assets/i18n/en.json
"generatedUser": "Generated user for '{{email}}'",
"chargingAtSiteArea": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {startTime} - Energy Consumption: {{totalConsumption}} kWh at {{siteAreaName}}",
"chargingAtChargeBox": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} - Energy Consumption: {{totalConsumption}} kWh at charging station {{chargeBoxID}}",
-
"flatFee-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Flat Fee",
"energy-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Energy Consumption: {{quantity}} kWh",
"chargingTime-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Charging Time: {{duration}}",
"parkingTime-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Parking Time: {{duration}}",
-
"header-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}}",
"flatFee-shortItemDescription": "Flat Fee",
"energy-shortItemDescription": "Energy Consumption: {{quantity}} kWh",

MODIFY
src/assets/i18n/it.json
src/assets/i18n/it.json
"generatedUser": "Utenza generata per '{{email}}'",
"chargingAtSiteArea": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {startTime} - Energy Consumption: {{totalConsumption}} kWh at {{siteAreaName}}",
"chargingAtChargeBox": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} - Energy Consumption: {{totalConsumption}} kWh at charging station {{chargeBoxID}}",
-
"flatFee-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Flat Fee",
"energy-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Energy Consumption: {{quantity}} kWh",
"chargingTime-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Charging Time: {{duration}}",
"parkingTime-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Parking Time: {{duration}}",
-
"header-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}}",
"flatFee-shortItemDescription": "Flat Fee",
"energy-shortItemDescription": "Energy Consumption: {{quantity}} kWh",

MODIFY
src/assets/i18n/pt.json
src/assets/i18n/pt.json
"generatedUser": "Utilizador criado para '{{email}}'",
"chargingAtSiteArea": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {startTime} - Energy Consumption: {{totalConsumption}} kWh at {{siteAreaName}}",
"chargingAtChargeBox": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} - Energy Consumption: {{totalConsumption}} kWh at charging station {{chargeBoxID}}",
-
"flatFee-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Flat Fee",
"energy-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Energy Consumption: {{quantity}} kWh",
"chargingTime-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Charging Time: {{duration}}",
"parkingTime-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}} - Parking Time: {{duration}}",
-
"header-itemDescription": "Session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} at charging station {{chargeBoxID}}",
"flatFee-shortItemDescription": "Flat Fee",
"energy-shortItemDescription": "Energy Consumption: {{quantity}} kWh",

MODIFY
src/integration/billing/stripe/StripeBillingIntegration.ts
src/integration/billing/stripe/StripeBillingIntegration.ts
@@ -920,7 +920,7 @@ export default class StripeBillingIntegration extends BillingIntegration {
action: ServerAction.BILLING_TRANSACTION,
module: MODULE_NAME, method: 'stopTransaction',
message: `Transaction data is suspicious - billing operation has been aborted - transaction ID: ${transaction.id}`,
- ...LoggingHelper.getSessionProperties(transaction)
+ ...LoggingHelper.getTransactionProperties(transaction)
});
return {
status: BillingStatus.UNBILLED
@@ -962,7 +962,7 @@ export default class StripeBillingIntegration extends BillingIntegration {
action: ServerAction.BILLING_TRANSACTION,
module: MODULE_NAME, method: 'billTransaction',
message: `Billing process is about to start - transaction ID: ${transaction.id}`,
- ...LoggingHelper.getSessionProperties(transaction)
+ ...LoggingHelper.getTransactionProperties(transaction)
});
const billingDataTransactionStop: BillingDataTransactionStop = await this._billTransaction(transaction);
return billingDataTransactionStop;
@@ -975,7 +975,7 @@ export default class StripeBillingIntegration extends BillingIntegration {
module: MODULE_NAME, method: 'billTransaction',
message: `Failed to bill the transaction - Transaction ID '${transaction.id}'`,
detailedMessages: { error: error.stack },
- ...LoggingHelper.getSessionProperties(transaction)
+ ...LoggingHelper.getTransactionProperties(transaction)
});
}
return {
@@ -1076,7 +1076,7 @@ export default class StripeBillingIntegration extends BillingIntegration {
method: 'extractTransactionPricingData',
message: `Final pricing - Transaction: ${transaction.id}`,
detailedMessages: pricingData,
- ...LoggingHelper.getSessionProperties(transaction)
+ ...LoggingHelper.getTransactionProperties(transaction)
});
return pricingData;
}

MODIFY
src/integration/pricing/PricingEngine.ts
src/integration/pricing/PricingEngine.ts
@@ -47,7 +47,7 @@ export default class PricingEngine {
method: 'resolvePricingContext',
message: `Pricing context has been resolved - ${pricingDefinitions.length} pricing definitions have been found`,
detailedMessages: { resolvedPricingModel },
- ...LoggingHelper.getSessionProperties(transaction)
+ ...LoggingHelper.getTransactionProperties(transaction)
});
return Promise.resolve(resolvedPricingModel);
}
@@ -82,7 +82,7 @@ export default class PricingEngine {
action: ServerAction.PRICING,
method: 'getPricingDefinitions4Entity',
message: `Pricing context resolution - ${actualPricingDefinitions.length || 0} pricing definitions found for ${entityType}: '${entityID}'`,
- ...LoggingHelper.getSessionProperties(transaction)
+ ...LoggingHelper.getTransactionProperties(transaction)
});
return actualPricingDefinitions || [];
}

MODIFY
src/integration/pricing/simple-pricing/BuiltInPricingIntegration.ts
src/integration/pricing/simple-pricing/BuiltInPricingIntegration.ts
@@ -30,7 +30,7 @@ export default class BuiltInPricingIntegration extends PricingIntegration<Simple
action: ServerAction.PRICING,
method: 'startSession',
message: `Session START - Transaction: ${transaction.id} - Accumulated amount: ${pricedConsumption.cumulatedRoundedAmount} ${pricedConsumption.currencyCode}`,
- ...LoggingHelper.getSessionProperties(transaction)
+ ...LoggingHelper.getTransactionProperties(transaction)
});
return pricedConsumption;
}
@@ -49,7 +49,7 @@ export default class BuiltInPricingIntegration extends PricingIntegration<Simple
method: 'stopSession',
message: `Session STOP - Transaction: ${transaction.id} - Accumulated amount: ${pricedConsumption.cumulatedRoundedAmount} ${pricedConsumption.currencyCode}`,
detailedMessages: { pricedConsumption },
- ...LoggingHelper.getSessionProperties(transaction)
+ ...LoggingHelper.getTransactionProperties(transaction)
});
return pricedConsumption;
}
@@ -107,7 +107,7 @@ export default class BuiltInPricingIntegration extends PricingIntegration<Simple
method: 'resolvePricingContext',
message: 'No pricing definition found - Simple Pricing logic will be used as a fallback',
detailedMessages: { resolvedPricingModel },
- ...LoggingHelper.getSessionProperties(transaction)
+ ...LoggingHelper.getTransactionProperties(transaction)
});
}
return resolvedPricingModel;

MODIFY
src/utils/LoggingHelper.ts
src/utils/LoggingHelper.ts
@@ -3,7 +3,7 @@ import Transaction from '../types/Transaction';
export default class LoggingHelper {
- public static getSessionProperties(transaction: Transaction): Partial<Log> {
+ public static getTransactionProperties(transaction: Transaction): Partial<Log> {
return {
siteID: transaction.siteID,
siteAreaID: transaction.siteAreaID,

polish - from PR comments