Skip to content
Snippets Groups Projects
Commit 9e58641c authored by Guillaume Pacilly's avatar Guillaume Pacilly
Browse files

use proper formatting for string translation

parent 35f75006
No related branches found
No related tags found
1 merge request!3use proper formatting for string translation
......@@ -205,11 +205,12 @@ class HootsuitePostManager {
/** @var \Drupal\Core\Entity\Entity $entity */
$assignment->save();
$this->logger->notice(
$this->t('Created post for @profile with id @id.'),
$this->t('Created post for @profile with id @id.',
[
'@profile' => $assignment->field_hs_profile_name->value,
'@id' => $assignment->field_hs_post_id->value,
]
)
);
$this->messenger->addMessage(
$this->t('The post for @profile has been successfully scheduled.',
......@@ -221,11 +222,12 @@ class HootsuitePostManager {
}
else {
$this->logger->notice(
$this->t('Fail creating post for @profile with id @id.'),
$this->t('Fail creating post for @profile with id @id.',
[
'@profile' => $assignment->field_hs_profile_name->value,
'@id' => $assignment->field_hs_post_id->value,
]
)
);
$this->messenger->addWarning(
$this->t('Failed posting for @profile.',
......@@ -256,11 +258,12 @@ class HootsuitePostManager {
$this->hootsuiteClient->connect('delete', $url);
if (!$update) {
$this->logger->notice(
$this->t('Deleted post for @profile with id @id.'),
$this->t('Deleted post for @profile with id @id.',
[
'@profile' => $assignment->field_hs_profile_name->value,
'@id' => $assignment->field_hs_post_id->value,
]
)
);
$this->messenger->addMessage(
$this->t('Deleted post for @profile.',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment