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