Skip to content

Commit

Permalink
Add missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Sep 29, 2024
1 parent b3bc9de commit c114322
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/elements/ContactElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,12 @@ protected function attributeHtml(string $attribute): string
{
if ($attribute == 'subscriptionStatus') {
if ($this->subscriptionStatus) {
return Template::raw('<label class="subscriptionStatus ' . $this->subscriptionStatus . '">' . $this->subscriptionStatus . '</label>');
return Template::raw(
Html::tag('label',
Craft::t('campaign', ucfirst($this->subscriptionStatus)),
['class' => 'subscriptionStatus ' . $this->subscriptionStatus]
)
);
}
}

Expand Down
6 changes: 6 additions & 0 deletions src/templates/contacts/view/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
{% set canHaveDrafts = true %}
{% set title = 'Contacts'|t('campaign') %}
{% set showSiteMenu = true %}

{% do view.registerTranslations('campaign', [
'New contact',
'Subscribed',
'Unubscribed',
]) %}
6 changes: 6 additions & 0 deletions src/translations/de/campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
'Click Rate is calculated by dividing the number of contacts that clicked on a link in an email by the number of contacts that opened the email.' => 'Die Klickrate ist die Division der Anzahl der Kontakte, die auf einen Link in einer E-Mail geklickt haben, durch die Anzahl der Kontakte, die die E-Mail geöffnet haben.',
'Click Rate' => 'Klickrate',
'Clicked' => 'Geklickt',
'clicked a link in any campaign' => '',
'clicked a link in the campaign' => '',
'Clicks' => 'Klicks',
'Client' => 'Client',
'Close campaign' => 'Kampagne schließen',
Expand Down Expand Up @@ -373,6 +375,8 @@
'month(s)' => 'Monat(e)',
'Months' => 'Monate',
'Name' => 'Name',
'never opened any campaign' => '',
'never opened the campaign' => '',
'New {campaignType} campaign' => 'Neue {campaignType}-Kampagne',
'New {mailingListType} mailing list' => 'Neue {mailingListType}-Mailing-Liste',
'New {sendoutType} sendout' => 'Neue {sendoutType}-Sendung',
Expand Down Expand Up @@ -418,6 +422,8 @@
'Open Rate' => 'Öffnungsrate',
'Open Rate is calculated by dividing the number of contacts that opened an email by the number of contacts that received the email.' => 'Die Öffnungsrate wird berechnet, indem die Anzahl der Kontakte, die eine E-Mail geöffnet haben, durch die Anzahl der Kontakte, die die E-Mail erhalten haben, geteilt wird.',
'Opened' => 'Geöffnet',
'opened any campaign' => '',
'opened the campaign' => '',
'Opens' => 'Öffnungen',
'OR' => 'OR',
'OS' => 'OS',
Expand Down
6 changes: 6 additions & 0 deletions src/translations/en/campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
'Click Rate is calculated by dividing the number of contacts that clicked on a link in an email by the number of contacts that opened the email.' => '',
'Click Rate' => '',
'Clicked' => '',
'clicked a link in any campaign' => '',
'clicked a link in the campaign' => '',
'Clicks' => '',
'Client' => '',
'Close campaign' => '',
Expand Down Expand Up @@ -372,6 +374,8 @@
'month(s)' => '',
'Months' => '',
'Name' => '',
'never opened any campaign' => '',
'never opened the campaign' => '',
'New {campaignType} campaign' => '',
'New {mailingListType} mailing list' => '',
'New {sendoutType} sendout' => '',
Expand Down Expand Up @@ -417,6 +421,8 @@
'Open Rate' => '',
'Open Rate is calculated by dividing the number of contacts that opened an email by the number of contacts that received the email.' => '',
'Opened' => '',
'opened any campaign' => '',
'opened the campaign' => '',
'Opens' => '',
'OR' => '',
'OS' => '',
Expand Down
6 changes: 6 additions & 0 deletions src/translations/fr/campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
'Click Rate is calculated by dividing the number of contacts that clicked on a link in an email by the number of contacts that opened the email.' => 'Le taux de clics est calculé en divisant le nombre de contacts qui ont cliqué sur le lien dans un email et le nombre de contacts qui ont ouvert cet email.',
'Click Rate' => 'Taux de clics',
'Clicked' => 'Cliqué',
'clicked a link in any campaign' => '',
'clicked a link in the campaign' => '',
'Clicks' => 'Clics',
'Client' => 'Client',
'Close campaign' => 'Fermer campagne',
Expand Down Expand Up @@ -373,6 +375,8 @@
'month(s)' => 'mois',
'Months' => 'Mois',
'Name' => 'Nom',
'never opened any campaign' => '',
'never opened the campaign' => '',
'New {campaignType} campaign' => 'Nouvelle newsletter {campaignType}',
'New {mailingListType} mailing list' => 'Nouvelle liste de diffusion {mailingListType}',
'New {sendoutType} sendout' => 'Nouvelle campagne {sendoutType}',
Expand Down Expand Up @@ -418,6 +422,8 @@
'Open Rate' => 'Taux d’ouverture',
'Open Rate is calculated by dividing the number of contacts that opened an email by the number of contacts that received the email.' => 'Le taux d’ouverture est calculé en divisant le nombre de contacts qui ont ouvert un courriel par le nombre de contacts qui ont reçu le courriel.',
'Opened' => 'Lus',
'opened any campaign' => '',
'opened the campaign' => '',
'Opens' => 'Ouvre',
'OR' => 'TO',
'OS' => 'OS',
Expand Down

0 comments on commit c114322

Please sign in to comment.