1
0
Fork 0
mirror of synced 2024-07-09 00:16:13 +12:00

fix locale

This commit is contained in:
Damodar Lohani 2023-04-18 05:31:18 +00:00
parent 53a9de477b
commit 4719970c93

View file

@ -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', '')
];