Send Differential e-mails in user's language
Summary: Works this way: - Select users' language with multiplexing. - Select default language otherwise (it can be different from current user's language). - Build body and subject for each user individually. - Set the original language after sending the mails. Test Plan: - Comment on a diff of user with custom translation. - Set default to a custom translation. Comment on a diff of user with default translation. - Set default to a default translation. Comment on a diff of user with default translation. Repeat with/without multiplexing. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1139 Differential Revision: https://secure.phabricator.com/D2774
This commit is contained in:
@@ -62,9 +62,7 @@ abstract class PhabricatorController extends AphrontController {
|
||||
|
||||
$translation = $user->getTranslation();
|
||||
if ($translation &&
|
||||
$translation != PhabricatorEnv::getEnvConfig('translation.provider') &&
|
||||
class_exists($translation) &&
|
||||
is_subclass_of($translation, 'PhabricatorTranslation')) {
|
||||
$translation != PhabricatorEnv::getEnvConfig('translation.provider')) {
|
||||
$translation = newv($translation, array());
|
||||
PhutilTranslator::getInstance()
|
||||
->setLanguage($translation->getLanguage())
|
||||
|
||||
Reference in New Issue
Block a user