cross-solution / YAWIK

YAWIK is a web application. It can be used as an ATS applicant tracking system or as a jobboard.
https://yawik.org
MIT License
124 stars 67 forks source link

Translated mail templates in module/jobs do not work correctly #193

Closed utrenkner closed 8 years ago

utrenkner commented 8 years ago

For us, the new possibility of having separate mail templates for different languages, works great in Auth but not in Jobs.

In our own custom module we have mapped in module.config.php e.g.

'mail/register' =>  __DIR__ . '/../view/auth/mail/register.phtml',

When a user registers, the email is sent either in our local language (using the path above), or in English, using our own English template at module/OURMODULE/view/auth/mail/register.en.phtml',

Similarly, we have mapped

'mail/job-created' => __DIR__ . '/../view/jobs/mails/job-created.phtml',

This works well for the local language. But for English the standard English template from YAWIK is used; and not our own English template at module/OURMODULE/view/jobs/mails/job-created.en.phtml'

Furthermore, this code in the job mail templates does not do what it is supposed to do: <?php echo $info->getDisplayName(/*emailIfEmpty*/ false); ?>

From the naming it seems that it would include the DisplayName or else the Email-Adress. However, in our tests, it always remains empty.

cbleek commented 8 years ago

Am 16.03.2016 um 12:19 schrieb Uwe Trenkner:

Furthermore, this code in the job mail templates does not do what it is supposed to do: |<?php echo $info->getDisplayName(/emailIfEmpty/ false); ?>|

From the naming it seems that it would include the DisplayName or else the Email-Adress. However, in our tests, it always remains empty.

<?php echo $info->getDisplayName(/emailIfEmpty/ false); ?>

getDisplayName() shows the full name of a user. It can take a boolean parameter which is default true - means: use the email, if no name is given.

Setting the parameter to false, disables the feature.

cbleek commented 8 years ago

Hi Uwe,

you have to define the key "mail/job-created.en" if the mail should be send in english. YAWIK only checks the existence of the keys in the array , and relies on that template will also exist .

'mail/job-created.en' => DIR . '/../view/jobs/mails/job-created.en.phtml',

see: http://yawik.readthedocs.org/en/latest/configuration.html#mail

Regards

Carsten