Merge pull request #8433 from annando/issue-8432-translations
Issue 8432: Make notifications translatable
This commit is contained in:
commit
efb90f5a9c
|
@ -174,39 +174,39 @@ function notification($params)
|
||||||
|
|
||||||
// "George Bull's post"
|
// "George Bull's post"
|
||||||
if ($params['activity']['origin_comment']) {
|
if ($params['activity']['origin_comment']) {
|
||||||
$message = '%1$s replied to you on %2$s\'s %3$s %4$s';
|
$message = $l10n->t('%1$s replied to you on %2$s\'s %3$s %4$s');
|
||||||
} elseif ($params['activity']['explicit_tagged']) {
|
} elseif ($params['activity']['explicit_tagged']) {
|
||||||
$message = '%1$s tagged you on %2$s\'s %3$s %4$s';
|
$message = $l10n->t('$l10n->t(%1$s tagged you on %2$s\'s %3$s %4$s');
|
||||||
} else {
|
} else {
|
||||||
$message = '%1$s commented on %2$s\'s %3$s %4$s';
|
$message = $l10n->t('%1$s commented on %2$s\'s %3$s %4$s');
|
||||||
}
|
}
|
||||||
|
|
||||||
$dest_str = $l10n->t($message, $params['source_name'], $item['author-name'], $item_post_type, $title);
|
$dest_str = sprintf($message, $params['source_name'], $item['author-name'], $item_post_type, $title);
|
||||||
|
|
||||||
// Then look for the special cases
|
// Then look for the special cases
|
||||||
|
|
||||||
// "your post"
|
// "your post"
|
||||||
if ($params['activity']['origin_thread']) {
|
if ($params['activity']['origin_thread']) {
|
||||||
if ($params['activity']['origin_comment']) {
|
if ($params['activity']['origin_comment']) {
|
||||||
$message = '%1$s replied to you on your %2$s %3$s';
|
$message = $l10n->t('%1$s replied to you on your %2$s %3$s');
|
||||||
} elseif ($params['activity']['explicit_tagged']) {
|
} elseif ($params['activity']['explicit_tagged']) {
|
||||||
$message = '%1$s tagged you on your %2$s %3$s';
|
$message = $l10n->t('%1$s tagged you on your %2$s %3$s');
|
||||||
} else {
|
} else {
|
||||||
$message = '%1$s commented on your %2$s %3$s';
|
$message = $l10n->t('%1$s commented on your %2$s %3$s');
|
||||||
}
|
}
|
||||||
|
|
||||||
$dest_str = $l10n->t($message, $params['source_name'], $item_post_type, $title);
|
$dest_str = sprintf($message, $params['source_name'], $item_post_type, $title);
|
||||||
// "their post"
|
// "their post"
|
||||||
} elseif ($item['author-link'] == $params['source_link']) {
|
} elseif ($item['author-link'] == $params['source_link']) {
|
||||||
if ($params['activity']['origin_comment']) {
|
if ($params['activity']['origin_comment']) {
|
||||||
$message = '%1$s replied to you on their %2$s %3$s';
|
$message = $l10n->t('%1$s replied to you on their %2$s %3$s');
|
||||||
} elseif ($params['activity']['explicit_tagged']) {
|
} elseif ($params['activity']['explicit_tagged']) {
|
||||||
$message = '%1$s tagged you on their %2$s %3$s';
|
$message = $l10n->t('%1$s tagged you on their %2$s %3$s');
|
||||||
} else {
|
} else {
|
||||||
$message = '%1$s commented on their %2$s %3$s';
|
$message = $l10n->t('%1$s commented on their %2$s %3$s');
|
||||||
}
|
}
|
||||||
|
|
||||||
$dest_str = $l10n->t($message, $params['source_name'], $item_post_type, $title);
|
$dest_str = sprintf($message, $params['source_name'], $item_post_type, $title);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some mail software relies on subject field for threading.
|
// Some mail software relies on subject field for threading.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user