From 19fe5331d22c4257bf9f4dbd928945711694f5a7 Mon Sep 17 00:00:00 2001 From: Tomas Bures Date: Sun, 23 Dec 2018 19:46:49 +0000 Subject: [PATCH] Localized strings --- client/src/campaigns/Statistics.js | 16 ++--- client/src/campaigns/StatisticsLinkClicks.js | 8 +-- client/src/campaigns/StatisticsOpened.js | 44 ++++++------ client/src/campaigns/StatisticsSubsList.js | 2 +- client/src/campaigns/Status.js | 6 +- client/src/campaigns/root.js | 24 +++---- client/src/lists/CUD.js | 2 +- client/src/lists/forms/CUD.js | 4 +- client/src/reports/ViewAndOutput.js | 4 +- client/src/reports/templates/List.js | 6 +- client/src/send-configurations/helpers.js | 10 +-- client/src/settings/Update.js | 2 +- locales/en-US/common.json | 75 +++++++++++++++----- 13 files changed, 123 insertions(+), 80 deletions(-) diff --git a/client/src/campaigns/Statistics.js b/client/src/campaigns/Statistics.js index eea2a3ac..45302092 100644 --- a/client/src/campaigns/Statistics.js +++ b/client/src/campaigns/Statistics.js @@ -117,14 +117,14 @@ export default class Statistics extends Component {
{t('campaignStatistics')} - {renderMetrics('total', t('Total'), false)} - {renderMetrics('delivered', t('Delivered'))} - {renderMetrics('blacklisted', t('Blacklisted'), false)} - {renderMetricsWithProgress('bounced', t('Bounced'), 'info')} - {renderMetricsWithProgress('complained', t('Complaints'), 'danger')} - {renderMetricsWithProgress('unsubscribed', t('Unsubscribed'), 'warning')} - {!entity.open_tracking_disabled && renderMetricsWithProgress('opened', t('Opened'), 'success')} - {!entity.click_tracking_disabled && renderMetricsWithProgress('clicks', t('Clicked'), 'success')} + {renderMetrics('total', t('total'), false)} + {renderMetrics('delivered', t('delivered'))} + {renderMetrics('blacklisted', t('blacklisted'), false)} + {renderMetricsWithProgress('bounced', t('bounced'), 'info')} + {renderMetricsWithProgress('complained', t('complaints'), 'danger')} + {renderMetricsWithProgress('unsubscribed', t('unsubscribed'), 'warning')} + {!entity.open_tracking_disabled && renderMetricsWithProgress('opened', t('opened'), 'success')} + {!entity.click_tracking_disabled && renderMetricsWithProgress('clicks', t('clicked'), 'success')}
); } diff --git a/client/src/campaigns/StatisticsLinkClicks.js b/client/src/campaigns/StatisticsLinkClicks.js index a81eac15..6e6df92a 100644 --- a/client/src/campaigns/StatisticsLinkClicks.js +++ b/client/src/campaigns/StatisticsLinkClicks.js @@ -36,14 +36,14 @@ export default class StatisticsLinkClicks extends Component { const t = this.props.t; const linksColumns = [ - { data: 0, title: t('URL'), render: data => {data} }, - { data: 1, title: t('Unique visitors') }, - { data: 2, title: t('Total clicks') } + { data: 0, title: t('url'), render: data => {data} }, + { data: 1, title: t('uniqueVisitors') }, + { data: 2, title: t('totalClicks') } ]; return (
- {t('Campaign links')} + {t('campaignLinks')} this.table = node} withHeader dataUrl={`rest/campaigns-link-clicks-table/${this.props.entity.id}`} columns={linksColumns} /> diff --git a/client/src/campaigns/StatisticsOpened.js b/client/src/campaigns/StatisticsOpened.js index 4fe5a27d..5274e7d3 100644 --- a/client/src/campaigns/StatisticsOpened.js +++ b/client/src/campaigns/StatisticsOpened.js @@ -99,12 +99,12 @@ export default class StatisticsOpened extends Component { const stats = this.state.statisticsOpened; const subscribersColumns = [ - { data: 0, title: t('Email') }, + { data: 0, title: t('email') }, { data: 1, title: t('subscriptionId'), render: data => {data} }, { data: 2, title: t('listId'), render: data => {data} }, { data: 3, title: t('list') }, { data: 4, title: t('listNamespace') }, - { data: 5, title: t('Opens count') } + { data: 5, title: t('opensCount') } ]; console.log(this.state.statisticsOpened); @@ -117,8 +117,8 @@ export default class StatisticsOpened extends Component { const navPills = ( ); @@ -126,28 +126,28 @@ export default class StatisticsOpened extends Component { let charts = null; const deviceTypes = { - desktop: t('Desktop'), - tv: t('TV'), - tablet: t('Tablet'), - phone: t('Phone'), - bot: t('Bot'), - car: t('Car'), - console: t('Console') + desktop: t('desktop'), + tv: t('tv'), + tablet: t('tablet'), + phone: t('phone'), + bot: t('bot'), + car: t('car'), + console: t('console') }; if (agg === 'devices') { charts = (
{navPills} -

{t('Distribution by device type')}

+

{t('distributionByDeviceType')}

{t('Loading chart')}
} + loader={
{t('loadingChart')}
} data={[ - [t('Device type'), t('Count')], - ...stats.devices.map(entry => [deviceTypes[entry.key] || t('Unknown'), entry.count]) + [t('deviceType'), t('count')], + ...stats.devices.map(entry => [deviceTypes[entry.key] || t('unknown'), entry.count]) ]} options={{ chartArea: { @@ -174,17 +174,17 @@ export default class StatisticsOpened extends Component { charts = (
{navPills} -

{t('Distribution by country')}

+

{t('distributionByCountry')}

{t('Loading chart')}
} + loader={
{t('loadingChart')}
} data={[ - [t('Country'), t('Count')], - ...stats.countries.map(entry => [entry.key || t('Unknown'), entry.count]) + [t('country'), t('count')], + ...stats.countries.map(entry => [entry.key || t('unknown'), entry.count]) ]} options={{ chartArea: { @@ -213,7 +213,7 @@ export default class StatisticsOpened extends Component { chartType="GeoChart" data={[ ['Country', 'Count'], - ...stats.countries.map(entry => [entry.key || t('Unknown'), entry.count]) + ...stats.countries.map(entry => [entry.key || t('unknown'), entry.count]) ]} mapsApiKey={mailtrainConfig.mapsApiKey} /> @@ -227,13 +227,13 @@ export default class StatisticsOpened extends Component { return (
- {t('Detailed Statistics')} + {t('detailedStatistics')} {charts}
-

{t('List of subscribers that opened the campaign')}

+

{t('listOfSubscribersThatOpenedTheCampaign')}

this.table = node} withHeader dataUrl={`rest/campaigns-opens-table/${entity.id}`} columns={subscribersColumns} /> ); diff --git a/client/src/campaigns/StatisticsSubsList.js b/client/src/campaigns/StatisticsSubsList.js index c31a2264..1f9a1fde 100644 --- a/client/src/campaigns/StatisticsSubsList.js +++ b/client/src/campaigns/StatisticsSubsList.js @@ -37,7 +37,7 @@ export default class StatisticsSubsList extends Component { const t = this.props.t; const subscribersColumns = [ - { data: 0, title: t('Email') }, + { data: 0, title: t('email') }, { data: 1, title: t('subscriptionId'), render: data => {data} }, { data: 2, title: t('listId'), render: data => {data} }, { data: 3, title: t('list') }, diff --git a/client/src/campaigns/Status.js b/client/src/campaigns/Status.js index 5142f3bd..db139ddf 100644 --- a/client/src/campaigns/Status.js +++ b/client/src/campaigns/Status.js @@ -217,8 +217,8 @@ class SendControls extends Component { async resetAsync() { const t = this.props.t; this.actionDialog( - t('Confirm reset'), - t('Do you want to reset the campaign? All statistics and the track of delivered messages will be lost.'), + t('confirmReset'), + t('doYouWantToResetTheCampaign?All'), async () => { await this.postAndMaskStateError(`rest/campaign-reset/${this.props.entity.id}`); await this.refreshEntity(); @@ -479,7 +479,7 @@ export default class Status extends Component { {t('campaignStatus')}{entity.name} - {entity.delivered} + {entity.delivered}{this.campaignStatusLabels[entity.status]} {sendSettings} diff --git a/client/src/campaigns/root.js b/client/src/campaigns/root.js index 2e8b8543..cb43170b 100644 --- a/client/src/campaigns/root.js +++ b/client/src/campaigns/root.js @@ -37,8 +37,8 @@ import StatisticsLinkClicks function getMenus(t) { const aggLabels = { - 'countries': t('Countries'), - 'devices': t('Devices') + 'countries': t('countries'), + 'devices': t('devices') }; return { @@ -67,27 +67,27 @@ function getMenus(t) { panelRender: props => , children: { delivered: { - title: t('Delivered'), + title: t('delivered'), link: params => `/campaigns/${params.campaignId}/statistics/delivered`, - panelRender: props => + panelRender: props => }, complained: { - title: t('Complained'), + title: t('complained'), link: params => `/campaigns/${params.campaignId}/statistics/complained`, - panelRender: props => + panelRender: props => }, bounced: { - title: t('Bounced'), + title: t('bounced'), link: params => `/campaigns/${params.campaignId}/statistics/bounced`, - panelRender: props => + panelRender: props => }, unsubscribed: { - title: t('Unsubscribed'), + title: t('unsubscribed'), link: params => `/campaigns/${params.campaignId}/statistics/unsubscribed`, - panelRender: props => + panelRender: props => }, 'opened': { - title: t('Opened'), + title: t('opened'), resolve: { statisticsOpened: params => `rest/campaign-statistics/${params.campaignId}/opened` }, @@ -101,7 +101,7 @@ function getMenus(t) { } }, 'clicks': { - title: t('Clicks'), + title: t('clicks'), link: params => `/campaigns/${params.campaignId}/statistics/clicks`, panelRender: props => } diff --git a/client/src/lists/CUD.js b/client/src/lists/CUD.js index 8f68ea8c..4a9f7885 100644 --- a/client/src/lists/CUD.js +++ b/client/src/lists/CUD.js @@ -216,7 +216,7 @@ export default class CUD extends Component {