fix locale
This commit is contained in:
parent
53a9de477b
commit
4719970c93
|
@ -1802,10 +1802,9 @@ App::get('/v1/projects/:projectId/templates/email/:type/:locale')
|
|||
$template = $templates['email.' . $type . '-' . $locale] ?? null;
|
||||
|
||||
if (is_null($template)) {
|
||||
$localeFormated = substr($locale, 0, 2);
|
||||
$template = [
|
||||
'message' => Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl')->render(),
|
||||
'subject' => (new Locale($localeFormated))->getText('emails.' . $type . '.subject'),
|
||||
'subject' => (new Locale($locale))->getText('emails.' . $type . '.subject'),
|
||||
'senderEmail' => App::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', ''),
|
||||
'senderName' => App::getEnv('_APP_SYSTEM_EMAIL_NAME', '')
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue