2 /*=====================================================================*\
3 || ###################################################################
5 || # Copyright (c)2004-2009 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.
103 'notice_assigned' => array(
104 'part' => T('You have been assigned to this bug by %1$s.')
107 // unassigned from bug
108 // vars: changer.displayname
109 'notice_unassigned' => array(
110 'part' => T('You are no longer assigned to this bug, per %1$s\'s changes.')
115 'notice_status' => array(
116 'part' => T('The status of the bug is now "%
1$s", from
"%2$s".')
121 'notice_resolution' => array(
122 'part' => T('This bug has been resolved with resolution "%
1$s", from
"%2$s".')
125 // duplicates list change
127 'notice_duplicates' => array(
128 'part' => T('The duplicates list has changed from "%
1$s" to
"%2$s".')
133 'notice_severity' => array(
134 'part' => T('The severity has been elevated from "%
1$s" to
"%2$s".')
139 'notice_priority' => array(
140 'part' => T('The priority has been elevatd from "%
1$s" to
"%2$s".')
145 'notice_product' => array(
146 'part' => T('The product, component, and version combination has changed from "%
1$s" to
"%2$s".')
150 // vars: user, date, comment
151 'notice_comment' => array(
152 'part' => T('The following comment was added by %1$s on %2$s:
153 ============================================
155 ============================================')
159 // vars: field, old, new
160 'notice_other' => array(
161 'part' => T('The %1$s field changed from "%
2$s" to
"%3$s".')
165 // vars: username, filename, description, filesize, obsoletes, trackerurl, attachmentid
166 'notice_attachment' => array(
167 'part' => T('%1$s has uploaded a new attachment:
168 ============================================
171 File size: %4$d Bytes
173 View: %6$s/viewattachment.php?attachmentid=%7$d
174 ============================================')
178 // vars: bugid, summary, reporter, product, initial comment
179 'notice_new_bug' => array(
180 'part' => T('This bug has been added to the database:
181 ============================================
185 Product/Component/Version: %4$s
187 --------------------------------------------
189 --------------------------------------------
190 ============================================')
194 // vars: trackertitle, bug.summary
195 // vars: displayname, trackertitle, bug.summary, bug.id, trackerurl, parts
196 'bug_notification' => array(
197 'subject' => T('%1$s Bug Notification - %2$s'),
198 'bodyText' => T('Hi %1$s,
200 You are receiving this email because you have opted to get notifications for the %2$s bug tracker.
202 The bug is "%
3$s" (id
: %
4$d) located at %
4$s/showreport
.php
?bugid
=%
5$d
204 Here are the notices
:
205 ###################################################################
209 ###################################################################
210 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
.
216 if (!isset($_emails[$name]))
218 throw new Exception('Unknown email template "' . $name . '"');
220 return $_emails[$name];