e9b1fd15f1183662b97cb1ea0b7e5dcc060f7223
2 /*=====================================================================*\
3 || ###################################################################
5 || # Copyright ©2002-2007 Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version 2 of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 * Returns an email's translated text, for use in sprintf(), given a variable
26 * @param string Name of the email
28 * @return array Array of translated items (subject, bodyText, bodyHtml)
30 function get_email_text($name)
34 // vars: username, trackertitle
36 'subject' => sprintf(T('Welcome to %1$s'), bugdar
::$options['trackertitle']),
37 'bodyText' => T('Hi %1$s,
39 Thank you for taking the time to register at %2$s. We look forward to your contributations to making our products better.
41 If you have any questions, please don\'t hesitate to contact the webmaster.')
45 // vars: username, trackertitle, trackerurl, activation id
46 'password_reset' => array(
47 'subject' => sprintf(T('%1$s Password Reset'), bugdar
::$options['trackertitle']),
48 'bodyText' => T('Hi %1$s,
50 You requested this lost password email at the %2$s bug tracker. To reset your password, simply click the link below (or paste it into your browser window exactly) and enter a new password.
52 %3$s/login.php?do=recoverpw&activator=%4$s
54 If you did not request this, do not worry as this notice will expire in 24 hours.')
57 // account approved and active
58 // vars: username, trackertitle
59 'account_approved' => array(
60 'subject' => sprintf(T('Account Approved at %1$s'), bugdar
::$options['trackertitle']),
61 'bodyText' => T('Hi %1$s,
63 Your account was awaiting moderation at %2$s. Today, an administrator approved your registration and you are now able to use the bug tracker fully.
65 If you have any questions, please don\'t hesitate to contact the webmaster.')
69 // vars: username, trackertitle, trackerurl, userid, activationid
70 'activate_account' => array(
71 'subject' => sprintf(T('Welcome to %1$s'), bugdar
::$options['trackertitle']),
72 'bodyText' => T('Hi %1$s,
74 Welcome to the %2$s tracker. Before you can begin posting bug reports, you\'ll need to activate your account. To do this, please click this link:
76 %3$s/register.php?do=activate&userid=%4$d&activator=%5$s')
80 // vars: trackertitle, bug.summary
81 // vars: username, trackertitle, bug.summary, bug.id, trackerurl, parts
82 'notification' => array(
83 'subject' => T('%1$s Bug Notification - %2$s'),
84 'bodyText' => T('Hi %1$s,
86 You are receiving this email because you have opted to get notifications for the %2$s bug tracker.
88 The bug is "%3$s" (id: %4$d) located at %5$s/showreport.php?bugid=%4$d
91 ###################################################################
95 ###################################################################
96 If you no longer want to receive email from us, please log into your account and click the "My Controls" tab at the top of the screen to change email preferences.
102 if (!isset($_emails[$name]))
104 throw new Exception('Unknown email template "' . $name . '"');
106 return $_emails[$name];