Feature #38492 » 38492.patch
app/models/mailer.rb | ||
---|---|---|
70 | 70 |
end |
71 | 71 | |
72 | 72 |
# Builds a mail for notifying user about a new issue |
73 |
def issue_add(user, issue) |
|
73 |
def issue_add(user, issue, **options)
|
|
74 | 74 |
redmine_headers 'Project' => issue.project.identifier, |
75 | 75 |
'Issue-Tracker' => issue.tracker.name, |
76 | 76 |
'Issue-Id' => issue.id, |
... | ... | |
82 | 82 |
@issue = issue |
83 | 83 |
@user = user |
84 | 84 |
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue) |
85 |
subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]" |
|
85 |
subject = +"" |
|
86 |
subject += "[#{l(:mail_subject_mention)}]" if options[:mention] |
|
87 |
subject += "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]" |
|
86 | 88 |
subject += " (#{issue.status.name})" if Setting.show_status_changes_in_mail_subject? |
87 | 89 |
subject += " #{issue.subject}" |
88 | 90 |
mail :to => user, |
... | ... | |
96 | 98 |
def self.deliver_issue_add(issue) |
97 | 99 |
users = issue.notified_users | issue.notified_watchers | issue.notified_mentions |
98 | 100 |
users.each do |user| |
99 |
issue_add(user, issue).deliver_later |
|
101 |
mention = issue.notified_mentions.include?(user) |
|
102 |
issue_add(user, issue, mention: mention).deliver_later |
|
100 | 103 |
end |
101 | 104 |
end |
102 | 105 | |
103 | 106 |
# Builds a mail for notifying user about an issue update |
104 |
def issue_edit(user, journal) |
|
107 |
def issue_edit(user, journal, **options)
|
|
105 | 108 |
issue = journal.journalized |
106 | 109 |
redmine_headers 'Project' => issue.project.identifier, |
107 | 110 |
'Issue-Tracker' => issue.tracker.name, |
... | ... | |
111 | 114 |
message_id journal |
112 | 115 |
references issue |
113 | 116 |
@author = journal.user |
114 |
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] " |
|
117 |
s = +"" |
|
118 |
s += "[#{l(:mail_subject_mention)}]" if options[:mention] |
|
119 |
s += "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] " |
|
115 | 120 |
s += "(#{issue.status.name}) " if journal.new_value_for('status_id') && Setting.show_status_changes_in_mail_subject? |
116 | 121 |
s += issue.subject |
117 | 122 |
@issue = issue |
... | ... | |
134 | 139 |
journal.notes? || journal.visible_details(user).any? |
135 | 140 |
end |
136 | 141 |
users.each do |user| |
137 |
issue_edit(user, journal).deliver_later |
|
142 |
mention = (journal.notified_mentions | journal.journalized.notified_mentions).include?(user) |
|
143 |
issue_edit(user, journal, mention: mention).deliver_later |
|
138 | 144 |
end |
139 | 145 |
end |
140 | 146 | |
... | ... | |
284 | 290 |
end |
285 | 291 | |
286 | 292 |
# Builds a mail to user about a new wiki content. |
287 |
def wiki_content_added(user, wiki_content) |
|
293 |
def wiki_content_added(user, wiki_content, **options)
|
|
288 | 294 |
redmine_headers 'Project' => wiki_content.project.identifier, |
289 | 295 |
'Wiki-Page-Id' => wiki_content.page.id |
290 | 296 |
@author = wiki_content.author |
... | ... | |
294 | 300 |
@wiki_content_url = url_for(:controller => 'wiki', :action => 'show', |
295 | 301 |
:project_id => wiki_content.project, |
296 | 302 |
:id => wiki_content.page.title) |
303 |
subject = +"" |
|
304 |
subject << "[#{l(:mail_subject_mention)}]" if options[:mention] |
|
305 |
subject << "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_added, :id => wiki_content.page.pretty_title)}" |
|
297 | 306 |
mail( |
298 | 307 |
:to => user, |
299 |
:subject => |
|
300 |
"[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_added, :id => wiki_content.page.pretty_title)}" |
|
308 |
:subject => subject |
|
301 | 309 |
) |
302 | 310 |
end |
303 | 311 | |
... | ... | |
308 | 316 |
def self.deliver_wiki_content_added(wiki_content) |
309 | 317 |
users = wiki_content.notified_users | wiki_content.page.wiki.notified_watchers | wiki_content.notified_mentions |
310 | 318 |
users.each do |user| |
311 |
wiki_content_added(user, wiki_content).deliver_later |
|
319 |
mention = wiki_content.notified_mentions.include?(user) |
|
320 |
wiki_content_added(user, wiki_content, mention: mention).deliver_later |
|
312 | 321 |
end |
313 | 322 |
end |
314 | 323 | |
315 | 324 |
# Builds a mail to user about an update of the specified wiki content. |
316 |
def wiki_content_updated(user, wiki_content) |
|
325 |
def wiki_content_updated(user, wiki_content, **options)
|
|
317 | 326 |
redmine_headers 'Project' => wiki_content.project.identifier, |
318 | 327 |
'Wiki-Page-Id' => wiki_content.page.id |
319 | 328 |
@author = wiki_content.author |
... | ... | |
328 | 337 |
url_for(:controller => 'wiki', :action => 'diff', |
329 | 338 |
:project_id => wiki_content.project, :id => wiki_content.page.title, |
330 | 339 |
:version => wiki_content.version) |
340 | ||
341 |
subject = +"" |
|
342 |
subject << "[#{l(:mail_subject_mention)}]" if options[:mention] |
|
343 |
subject << "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_updated, :id => wiki_content.page.pretty_title)}" |
|
344 | ||
331 | 345 |
mail( |
332 | 346 |
:to => user, |
333 |
:subject => |
|
334 |
"[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_updated, :id => wiki_content.page.pretty_title)}" |
|
347 |
:subject => subject |
|
335 | 348 |
) |
336 | 349 |
end |
337 | 350 | |
... | ... | |
346 | 359 |
users |= wiki_content.notified_mentions |
347 | 360 | |
348 | 361 |
users.each do |user| |
349 |
wiki_content_updated(user, wiki_content).deliver_later |
|
362 |
mention = wiki_content.notified_mentions.include?(user) |
|
363 |
wiki_content_updated(user, wiki_content, mention: mention).deliver_later |
|
350 | 364 |
end |
351 | 365 |
end |
352 | 366 |
config/locales/ar.yml | ||
---|---|---|
204 | 204 |
warning_attachments_not_saved: "%{count}تعذر حفظ الملف" |
205 | 205 | |
206 | 206 |
mail_subject_lost_password: " %{value}كلمة المرور الخاصة بك " |
207 |
mail_subject_mention: "Mention" |
|
207 | 208 |
mail_body_lost_password: 'لتغير كلمة المرور، انقر على الروابط التالية:' |
208 | 209 |
mail_subject_register: " %{value}تفعيل حسابك " |
209 | 210 |
mail_body_register: 'لتفعيل حسابك، انقر على الروابط التالية:' |
config/locales/az.yml | ||
---|---|---|
725 | 725 |
mail_body_reminder: "növbəti %{days} gün üçün Sizə təyin olunan %{count}:" |
726 | 726 |
mail_subject_account_activation_request: "Sistemdə istifadəçinin aktivləşdirilməsi üçün sorğu %{value}" |
727 | 727 |
mail_subject_lost_password: "Sizin %{value} parolunuz" |
728 |
mail_subject_mention: "Mention" |
|
728 | 729 |
mail_subject_register: "Uçot qeydinin aktivləşdirilməsi %{value}" |
729 | 730 |
mail_subject_reminder: "yaxın %{days} gün üçün Sizə təyin olunan %{count}" |
730 | 731 |
config/locales/bg.yml | ||
---|---|---|
251 | 251 |
error_query_statement_invalid: Изпълнението на заявката завърши с грешка и тя беше записана. Моля докладвайте тази грешка на администратора на Redmine. |
252 | 252 | |
253 | 253 |
mail_subject_lost_password: "Вашата парола (%{value})" |
254 |
mail_subject_mention: "Mention" |
|
254 | 255 |
mail_body_lost_password: 'За да смените паролата си, използвайте следния линк:' |
255 | 256 |
mail_body_lost_password_validity: Моля имайте предвид, че можете да използвате тази връзка само един път, за да промените паролата. |
256 | 257 |
mail_subject_register: "Активация на профил (%{value})" |
config/locales/bs.yml | ||
---|---|---|
195 | 195 |
warning_attachments_not_saved: "%{count} fajl(ovi) ne mogu biti snimljen(i)." |
196 | 196 | |
197 | 197 |
mail_subject_lost_password: "Vaša %{value} lozinka" |
198 |
mail_subject_mention: "Mention" |
|
198 | 199 |
mail_body_lost_password: 'Za promjenu lozinke, kliknite na sljedeći link:' |
199 | 200 |
mail_subject_register: "Aktivirajte %{value} vaš korisnički račun" |
200 | 201 |
mail_body_register: 'Za aktivaciju vašeg korisničkog računa, kliknite na sljedeći link:' |
config/locales/ca.yml | ||
---|---|---|
204 | 204 |
error_ldap_bind_credentials: "Compte/Contrasenya LDAP incorrecte" |
205 | 205 | |
206 | 206 |
mail_subject_lost_password: "Contrasenya de %{value}" |
207 |
mail_subject_mention: "Mention" |
|
207 | 208 |
mail_body_lost_password: "Per a canviar la contrasenya, feu clic en l'enllaç següent:" |
208 | 209 |
mail_subject_register: "Activació del compte de %{value}" |
209 | 210 |
mail_body_register: "Per a activar el compte, feu clic en l'enllaç següent:" |
config/locales/cs.yml | ||
---|---|---|
205 | 205 |
warning_attachments_not_saved: "%{count} soubor(ů) nebylo možné uložit." |
206 | 206 | |
207 | 207 |
mail_subject_lost_password: "Vaše heslo (%{value})" |
208 |
mail_subject_mention: "Mention" |
|
208 | 209 |
mail_body_lost_password: 'Pro změnu vašeho hesla klikněte na následující odkaz:' |
209 | 210 |
mail_subject_register: "Aktivace účtu (%{value})" |
210 | 211 |
mail_body_register: 'Pro aktivaci vašeho účtu klikněte na následující odkaz:' |
config/locales/da.yml | ||
---|---|---|
196 | 196 |
error_scm_command_failed: "En fejl opstod under forbindelsen til det valgte repository: %{value}" |
197 | 197 | |
198 | 198 |
mail_subject_lost_password: "Dit %{value} kodeord" |
199 |
mail_subject_mention: "Mention" |
|
199 | 200 |
mail_body_lost_password: 'Klik på dette link for at ændre dit kodeord:' |
200 | 201 |
mail_subject_register: "%{value} kontoaktivering" |
201 | 202 |
mail_body_register: 'Klik på dette link for at aktivere din konto:' |
config/locales/de.yml | ||
---|---|---|
854 | 854 |
mail_body_wiki_content_updated: "Die Wiki-Seite '%{id}' wurde von %{author} aktualisiert." |
855 | 855 |
mail_subject_account_activation_request: "Antrag auf %{value} Kontoaktivierung" |
856 | 856 |
mail_subject_lost_password: "Ihr %{value} Passwort" |
857 |
mail_subject_mention: "Mention" |
|
857 | 858 |
mail_subject_register: "%{value} Kontoaktivierung" |
858 | 859 |
mail_subject_reminder: "%{count} Tickets müssen in den nächsten %{days} Tagen abgegeben werden" |
859 | 860 |
mail_subject_wiki_content_added: "Wiki-Seite '%{id}' hinzugefügt" |
config/locales/el.yml | ||
---|---|---|
187 | 187 |
warning_attachments_not_saved: "%{count} αρχείο(α) δε μπορούν να αποθηκευτούν." |
188 | 188 | |
189 | 189 |
mail_subject_lost_password: "Ο κωδικός σας %{value}" |
190 |
mail_subject_mention: "Mention" |
|
190 | 191 |
mail_body_lost_password: 'Για να αλλάξετε τον κωδικό πρόσβασης, πατήστε τον ακόλουθο σύνδεσμο:' |
191 | 192 |
mail_subject_register: "Ενεργοποίηση του λογαριασμού χρήστη %{value} " |
192 | 193 |
mail_body_register: 'Για να ενεργοποιήσετε το λογαριασμό σας, επιλέξτε τον ακόλουθο σύνδεσμο:' |
config/locales/en-GB.yml | ||
---|---|---|
206 | 206 |
warning_attachments_not_saved: "%{count} file(s) could not be saved." |
207 | 207 | |
208 | 208 |
mail_subject_lost_password: "Your %{value} password" |
209 |
mail_subject_mention: "Mention" |
|
209 | 210 |
mail_body_lost_password: 'To change your password, click on the following link:' |
210 | 211 |
mail_subject_register: "Your %{value} account activation" |
211 | 212 |
mail_body_register: 'To activate your account, click on the following link:' |
config/locales/en.yml | ||
---|---|---|
247 | 247 |
error_query_statement_invalid: "An error occurred while executing the query and has been logged. Please report this error to your Redmine administrator." |
248 | 248 | |
249 | 249 |
mail_subject_lost_password: "Your %{value} password" |
250 |
mail_subject_mention: "Mention" |
|
250 | 251 |
mail_body_lost_password: 'To change your password, click on the following link:' |
251 | 252 |
mail_body_lost_password_validity: 'Please be aware that you may change the password only once using this link.' |
252 | 253 |
mail_subject_register: "Your %{value} account activation" |
config/locales/es-PA.yml | ||
---|---|---|
656 | 656 |
mail_body_reminder: "%{count} incidencia(s) asignadas a ti finalizan en los próximos %{days} días:" |
657 | 657 |
mail_subject_account_activation_request: "Incidencia de activación de cuenta %{value}" |
658 | 658 |
mail_subject_lost_password: "Tu contraseña del %{value}" |
659 |
mail_subject_mention: "Mention" |
|
659 | 660 |
mail_subject_register: "Activación de la cuenta del %{value}" |
660 | 661 |
mail_subject_reminder: "%{count} incidencia(s) finalizan en los próximos %{days} días" |
661 | 662 |
notice_account_activated: Su cuenta ha sido activada. Ya puede conectarse. |
config/locales/es.yml | ||
---|---|---|
654 | 654 |
mail_body_reminder: "%{count} peticion(es) asignadas a ti finalizan en los próximos %{days} días:" |
655 | 655 |
mail_subject_account_activation_request: "Petición de activación de cuenta %{value}" |
656 | 656 |
mail_subject_lost_password: "Tu contraseña del %{value}" |
657 |
mail_subject_mention: "Mention" |
|
657 | 658 |
mail_subject_register: "Activación de la cuenta del %{value}" |
658 | 659 |
mail_subject_reminder: "%{count} peticion(es) finalizan en los próximos %{days} días" |
659 | 660 |
notice_account_activated: Su cuenta ha sido activada. Ya puede conectarse. |
config/locales/et.yml | ||
---|---|---|
224 | 224 |
warning_attachments_not_saved: "%{count} faili salvestamine ei õnnestunud." |
225 | 225 | |
226 | 226 |
mail_subject_lost_password: "Sinu %{value} parool" |
227 |
mail_subject_mention: "Mention" |
|
227 | 228 |
mail_body_lost_password: "Parooli vahetamiseks vajuta järgmisele lingile:" |
228 | 229 |
mail_subject_register: "Sinu %{value} konto aktiveerimine" |
229 | 230 |
mail_body_register: "Konto aktiveerimiseks vajuta järgmisele lingile:" |
config/locales/eu.yml | ||
---|---|---|
195 | 195 |
warning_attachments_not_saved: "%{count} fitxategi ezin izan d(ir)a gorde." |
196 | 196 | |
197 | 197 |
mail_subject_lost_password: "Zure %{value} pasahitza" |
198 |
mail_subject_mention: "Mention" |
|
198 | 199 |
mail_body_lost_password: 'Zure pasahitza aldatzeko hurrengo estekan klikatu:' |
199 | 200 |
mail_subject_register: "Zure %{value} kontuaren gaitzea" |
200 | 201 |
mail_body_register: 'Zure kontua gaitzeko hurrengo estekan klikatu:' |
config/locales/fa.yml | ||
---|---|---|
250 | 250 |
error_query_statement_invalid: هنگام اجرای جستار خطایی رخ داده و ثبت شده است. لطفاً این خطا را به راهبر پیگیر گزارش دهید. |
251 | 251 | |
252 | 252 |
mail_subject_lost_password: "گذرواژه حساب %{value} شما" |
253 |
mail_subject_mention: "Mention" |
|
253 | 254 |
mail_body_lost_password: 'برای تغییر گذرواژه خود، بر روی پیوند زیر کلیک کنید:' |
254 | 255 |
mail_body_lost_password_validity: 'توجه داشته باشید که شما فقط یکبار بوسیله این پیوند میتوانند گذرواژه خود را تغییر دهید.' |
255 | 256 |
mail_subject_register: "فعالسازی حساب %{value} شما" |
config/locales/fi.yml | ||
---|---|---|
204 | 204 |
error_scm_command_failed: "Tietovarastoon pääsyssä tapahtui virhe: %{value}" |
205 | 205 | |
206 | 206 |
mail_subject_lost_password: "Sinun %{value} salasanasi" |
207 |
mail_subject_mention: "Mention" |
|
207 | 208 |
mail_body_lost_password: 'Vaihtaaksesi salasanasi, napsauta seuraavaa linkkiä:' |
208 | 209 |
mail_subject_register: "%{value} tilin aktivointi" |
209 | 210 |
mail_body_register: 'Aktivoidaksesi tilisi, napsauta seuraavaa linkkiä:' |
config/locales/fr.yml | ||
---|---|---|
246 | 246 |
error_exceeds_maximum_hours_per_day: "Impossible de saisir plus de %{max_hours} heures pour le même jour (%{logged_hours} heures ont déjà été saisies)" |
247 | 247 | |
248 | 248 |
mail_subject_lost_password: "Votre mot de passe %{value}" |
249 |
mail_subject_mention: "Mention" |
|
249 | 250 |
mail_body_lost_password: 'Pour changer votre mot de passe, cliquez sur le lien suivant :' |
250 | 251 |
mail_subject_register: "Activation de votre compte %{value}" |
251 | 252 |
mail_body_register: 'Pour activer votre compte, cliquez sur le lien suivant :' |
config/locales/gl.yml | ||
---|---|---|
629 | 629 |
mail_body_reminder: "%{count} petición(s) asignadas a ti rematan nos próximos %{days} días:" |
630 | 630 |
mail_subject_account_activation_request: "Petición de activación de conta %{value}" |
631 | 631 |
mail_subject_lost_password: "O teu contrasinal de %{value}" |
632 |
mail_subject_mention: "Mention" |
|
632 | 633 |
mail_subject_register: "Activación da conta de %{value}" |
633 | 634 |
mail_subject_reminder: "%{count} petición(s) rematarán nos próximos %{days} días" |
634 | 635 |
notice_account_activated: A súa conta foi activada. Xa pode conectarse. |
config/locales/he.yml | ||
---|---|---|
205 | 205 |
warning_attachments_not_saved: "כשלון בשמירת %{count} קבצים." |
206 | 206 | |
207 | 207 |
mail_subject_lost_password: "סיסמת ה־%{value} שלך" |
208 |
mail_subject_mention: "Mention" |
|
208 | 209 |
mail_body_lost_password: 'לשינו סיסמת ה־Redmine שלך, לחץ על הקישור הבא:' |
209 | 210 |
mail_subject_register: "הפעלת חשבון %{value}" |
210 | 211 |
mail_body_register: 'להפעלת חשבון ה־Redmine שלך, לחץ על הקישור הבא:' |
config/locales/hr.yml | ||
---|---|---|
188 | 188 |
warning_attachments_not_saved: "%{count} Datoteka/e nije mogla biti spremljena." |
189 | 189 | |
190 | 190 |
mail_subject_lost_password: "Vaša %{value} zaporka" |
191 |
mail_subject_mention: "Mention" |
|
191 | 192 |
mail_body_lost_password: 'Kako biste promijenili Vašu zaporku slijedite poveznicu:' |
192 | 193 |
mail_subject_register: "Aktivacija korisničog računa %{value}" |
193 | 194 |
mail_body_register: 'Da biste aktivirali svoj račun, kliknite na sljedeci link:' |
config/locales/hu.yml | ||
---|---|---|
202 | 202 |
error_issue_not_found_in_project: 'A feladat nem található, vagy nem ehhez a projekthez tartozik' |
203 | 203 | |
204 | 204 |
mail_subject_lost_password: Az Ön Redmine jelszava |
205 |
mail_subject_mention: "Mention" |
|
205 | 206 |
mail_body_lost_password: 'A Redmine jelszó megváltoztatásához, kattintson a következő linkre:' |
206 | 207 |
mail_subject_register: Redmine azonosító aktiválása |
207 | 208 |
mail_body_register: 'A Redmine azonosítója aktiválásához, kattintson a következő linkre:' |
config/locales/id.yml | ||
---|---|---|
188 | 188 |
warning_attachments_not_saved: "%{count} berkas tidak bisa disimpan." |
189 | 189 | |
190 | 190 |
mail_subject_lost_password: "Kata sandi %{value} anda" |
191 |
mail_subject_mention: "Mention" |
|
191 | 192 |
mail_body_lost_password: 'Untuk mengubah kata sandi anda, klik tautan berikut::' |
192 | 193 |
mail_subject_register: "Aktivasi akun %{value} anda" |
193 | 194 |
mail_body_register: 'Untuk mengaktifkan akun anda, klik tautan berikut:' |
config/locales/it.yml | ||
---|---|---|
179 | 179 |
error_scm_command_failed: "Si è verificato un errore durante l'accesso al repository: %{value}" |
180 | 180 | |
181 | 181 |
mail_subject_lost_password: "Password %{value}" |
182 |
mail_subject_mention: "Mention" |
|
182 | 183 |
mail_body_lost_password: 'Per cambiare la password, usa il seguente collegamento:' |
183 | 184 |
mail_subject_register: "Attivazione utente %{value}" |
184 | 185 |
mail_body_register: "Per attivare l'utente, usa il seguente collegamento:" |
config/locales/ja.yml | ||
---|---|---|
223 | 223 |
warning_attachments_not_saved: "%{count}個の添付ファイルが保存できませんでした。" |
224 | 224 | |
225 | 225 |
mail_subject_lost_password: "%{value} パスワード再設定" |
226 |
mail_subject_mention: "Mention" |
|
226 | 227 |
mail_body_lost_password: 'パスワードを変更するには、以下のリンクをクリックしてください:' |
227 | 228 |
mail_body_lost_password_validity: 'このリンクでパスワードを再設定できるのは1回だけです。ご注意ください。' |
228 | 229 |
mail_subject_register: "%{value} アカウント登録の確認" |
config/locales/ko.yml | ||
---|---|---|
231 | 231 |
warning_attachments_not_saved: "%{count}개 파일을 저장할 수 없습니다." |
232 | 232 | |
233 | 233 |
mail_subject_lost_password: "%{value} 비밀번호" |
234 |
mail_subject_mention: "Mention" |
|
234 | 235 |
mail_body_lost_password: '비밀번호를 변경하려면 다음 링크를 클릭하세요.' |
235 | 236 |
mail_subject_register: "%{value} 계정 활성화" |
236 | 237 |
mail_body_register: '계정을 활성화하려면 링크를 클릭하세요.:' |
config/locales/lt.yml | ||
---|---|---|
224 | 224 |
error_ldap_bind_credentials: "Netinkamas LDAP Vartotojo vardas/Slaptažodis" |
225 | 225 | |
226 | 226 |
mail_subject_lost_password: "Jūsų %{value} slaptažodis" |
227 |
mail_subject_mention: "Mention" |
|
227 | 228 |
mail_body_lost_password: 'Norėdami pakeisti slaptažodį, spauskite nuorodą:' |
228 | 229 |
mail_subject_register: "Jūsų %{value} paskyros aktyvavimas" |
229 | 230 |
mail_body_register: 'Norėdami aktyvuoti paskyrą, spauskite nuorodą:' |
config/locales/lv.yml | ||
---|---|---|
187 | 187 |
warning_attachments_not_saved: "%{count} datnes netika saglabātas." |
188 | 188 | |
189 | 189 |
mail_subject_lost_password: "Jūsu %{value} parole" |
190 |
mail_subject_mention: "Mention" |
|
190 | 191 |
mail_body_lost_password: 'Lai mainītu paroli, spiediet uz šīs saites:' |
191 | 192 |
mail_subject_register: "Jūsu %{value} konta aktivizācija" |
192 | 193 |
mail_body_register: 'Lai izveidotu kontu, spiediet uz šīs saites:' |
config/locales/mk.yml | ||
---|---|---|
200 | 200 |
warning_attachments_not_saved: "%{count} file(s) could not be saved." |
201 | 201 | |
202 | 202 |
mail_subject_lost_password: "Вашата %{value} лозинка" |
203 |
mail_subject_mention: "Mention" |
|
203 | 204 |
mail_body_lost_password: 'To change your password, click on the following link:' |
204 | 205 |
mail_subject_register: "Your %{value} account activation" |
205 | 206 |
mail_body_register: 'To activate your account, click on the following link:' |
config/locales/mn.yml | ||
---|---|---|
193 | 193 |
warning_attachments_not_saved: "%{count} file(s) файлыг хадгалж чадсангүй." |
194 | 194 | |
195 | 195 |
mail_subject_lost_password: "Таны %{value} нууц үг" |
196 |
mail_subject_mention: "Mention" |
|
196 | 197 |
mail_body_lost_password: 'Нууц үгээ өөрчлөхийн тулд доорх холбоос дээр дарна уу:' |
197 | 198 |
mail_subject_register: "Таны %{value} дансыг идэвхжүүлэх" |
198 | 199 |
mail_body_register: 'Дансаа идэвхжүүлэхийн тулд доорх холбоос дээр дарна уу:' |
config/locales/nl.yml | ||
---|---|---|
598 | 598 |
mail_body_reminder: "%{count} issue(s) die aan u toegewezen zijn en voldaan moeten zijn in de komende %{days} dagen:" |
599 | 599 |
mail_subject_account_activation_request: "%{value} account activeringsverzoek" |
600 | 600 |
mail_subject_lost_password: "uw %{value} wachtwoord" |
601 |
mail_subject_mention: "Mention" |
|
601 | 602 |
mail_subject_register: "uw %{value} accountactivering" |
602 | 603 |
mail_subject_reminder: "%{count} issue(s) die voldaan moeten zijn in de komende %{days} dagen." |
603 | 604 |
notice_account_activated: Uw account is geactiveerd. U kunt nu inloggen. |
config/locales/no.yml | ||
---|---|---|
171 | 171 |
error_issue_not_found_in_project: 'Saken eksisterer ikke, eller hører ikke til dette prosjektet' |
172 | 172 | |
173 | 173 |
mail_subject_lost_password: "Ditt %{value} passord" |
174 |
mail_subject_mention: "Mention" |
|
174 | 175 |
mail_body_lost_password: 'Klikk følgende lenke for å endre ditt passord:' |
175 | 176 |
mail_subject_register: "%{value} kontoaktivering" |
176 | 177 |
mail_body_register: 'Klikk følgende lenke for å aktivere din konto:' |
config/locales/pl.yml | ||
---|---|---|
259 | 259 |
error_query_statement_invalid: "Wystąpił błąd podczas wykonywania tej kwerendy i został on zapisany w dzienniku. Poinformuj o tym błędzie administratora Redmine." |
260 | 260 | |
261 | 261 |
mail_subject_lost_password: "Twoje hasło do %{value}" |
262 |
mail_subject_mention: "Mention" |
|
262 | 263 |
mail_body_lost_password: "W celu zmiany swojego hasła użyj poniższego odnośnika:" |
263 | 264 |
mail_body_lost_password_validity: Pamiętaj o tym, że korzystając z tego linku możesz zmienić hasło tylko raz. |
264 | 265 |
mail_subject_register: "Aktywacja konta w %{value}" |
config/locales/pt-BR.yml | ||
---|---|---|
204 | 204 |
error_ldap_bind_credentials: "Conta/Palavra-chave do LDAP não é válida" |
205 | 205 | |
206 | 206 |
mail_subject_lost_password: "Sua senha do %{value}." |
207 |
mail_subject_mention: "Mention" |
|
207 | 208 |
mail_body_lost_password: 'Para mudar sua senha, clique no link abaixo:' |
208 | 209 |
mail_subject_register: "Ativação de conta do %{value}." |
209 | 210 |
mail_body_register: 'Para ativar sua conta, clique no link abaixo:' |
config/locales/pt.yml | ||
---|---|---|
191 | 191 |
error_ldap_bind_credentials: "Conta/Palavra-chave do LDAP não é válida" |
192 | 192 | |
193 | 193 |
mail_subject_lost_password: "Palavra-chave de %{value}" |
194 |
mail_subject_mention: "Mention" |
|
194 | 195 |
mail_body_lost_password: 'Para mudar a sua palavra-chave, clique na ligação abaixo:' |
195 | 196 |
mail_subject_register: "Ativação de conta de %{value}" |
196 | 197 |
mail_body_register: 'Para ativar a sua conta, clique na ligação abaixo:' |
config/locales/ro.yml | ||
---|---|---|
179 | 179 |
warning_attachments_not_saved: "Nu s-au putut salva %{count} fișiere." |
180 | 180 | |
181 | 181 |
mail_subject_lost_password: "Parola dumneavoastră: %{value}" |
182 |
mail_subject_mention: "Mention" |
|
182 | 183 |
mail_body_lost_password: 'Pentru a schimba parola, accesați:' |
183 | 184 |
mail_subject_register: "Activarea contului %{value}" |
184 | 185 |
mail_body_register: 'Pentru activarea contului, accesați:' |
config/locales/ru.yml | ||
---|---|---|
735 | 735 |
mail_body_reminder: "%{count} назначенных на Вас задач на следующие %{days} дней:" |
736 | 736 |
mail_subject_account_activation_request: "Запрос на активацию пользователя в системе %{value}" |
737 | 737 |
mail_subject_lost_password: "Ваш %{value} пароль" |
738 |
mail_subject_mention: "Упоминание" |
|
738 | 739 |
mail_subject_register: "Активация учётной записи %{value}" |
739 | 740 |
mail_subject_reminder: "%{count} назначенных на Вас задач в ближайшие %{days} дней" |
740 | 741 |
config/locales/sk.yml | ||
---|---|---|
179 | 179 |
error_issue_not_found_in_project: 'Úloha nebola nájdená, alebo nepatrí k tomuto projektu' |
180 | 180 | |
181 | 181 |
mail_subject_lost_password: "Vaše heslo %{value}" |
182 |
mail_subject_mention: "Mention" |
|
182 | 183 |
mail_body_lost_password: 'Na zmenu hesla kliknite na nasledujúci odkaz:' |
183 | 184 |
mail_subject_register: "Aktivácia vášho účtu %{value}" |
184 | 185 |
mail_body_register: 'Ak si želáte aktivovať váš účet, kliknite na nasledujúci odkaz:' |
config/locales/sl.yml | ||
---|---|---|
181 | 181 |
error_issue_not_found_in_project: 'Zahtevek ni bil najden ali pa ne pripada temu projektu' |
182 | 182 | |
183 | 183 |
mail_subject_lost_password: "Vaše %{value} geslo" |
184 |
mail_subject_mention: "Mention" |
|
184 | 185 |
mail_body_lost_password: 'Za spremembo glesla kliknite na naslednjo povezavo:' |
185 | 186 |
mail_subject_register: "Aktivacija %{value} vašega računa" |
186 | 187 |
mail_body_register: 'Za aktivacijo vašega računa kliknite na naslednjo povezavo:' |
config/locales/sq.yml | ||
---|---|---|
243 | 243 |
error_attachment_not_found: "S’u gjet bashkëngjitja %{name}" |
244 | 244 | |
245 | 245 |
mail_subject_lost_password: "Fjalëkalimi juaj %{value}" |
246 |
mail_subject_mention: "Mention" |
|
246 | 247 |
mail_body_lost_password: 'Që të ndryshoni fjalëkalimin, klikoni mbi lidhjen vijuese:' |
247 | 248 |
mail_body_lost_password_validity: 'Ju lutemi, mbani parasysh se fjalëkalimin mundeni ta ndryshoni vetëm një herë duke përdorur këtë lidhje.' |
248 | 249 |
mail_subject_register: "Aktivizim i llogarisë tuaj %{value}" |
config/locales/sr-YU.yml | ||
---|---|---|
202 | 202 |
warning_attachments_not_saved: "%{count} datoteka ne može biti snimljena." |
203 | 203 | |
204 | 204 |
mail_subject_lost_password: "Vaša %{value} lozinka" |
205 |
mail_subject_mention: "Mention" |
|
205 | 206 |
mail_body_lost_password: 'Za promenu vaše lozinke, kliknite na sledeći link:' |
206 | 207 |
mail_subject_register: "Aktivacija vašeg %{value} naloga" |
207 | 208 |
mail_body_register: 'Za aktivaciju vašeg naloga, kliknite na sledeći link:' |
config/locales/sr.yml | ||
---|---|---|
200 | 200 |
warning_attachments_not_saved: "%{count} датотека не може бити снимљена." |
201 | 201 | |
202 | 202 |
mail_subject_lost_password: "Ваша %{value} лозинка" |
203 |
mail_subject_mention: "Mention" |
|
203 | 204 |
mail_body_lost_password: 'За промену ваше лозинке, кликните на следећи линк:' |
204 | 205 |
mail_subject_register: "Активација вашег %{value} налога" |
205 | 206 |
mail_body_register: 'За активацију вашег налога, кликните на следећи линк:' |
config/locales/sv.yml | ||
---|---|---|
251 | 251 |
warning_attachments_not_saved: "%{count} fil(er) kunde inte sparas." |
252 | 252 | |
253 | 253 |
mail_subject_lost_password: "Ditt %{value} lösenord" |
254 |
mail_subject_mention: "Mention" |
|
254 | 255 |
mail_body_lost_password: 'För att ändra ditt lösenord, klicka på följande länk:' |
255 | 256 |
mail_subject_register: "Din %{value} kontoaktivering" |
256 | 257 |
mail_body_register: 'För att aktivera ditt konto, klicka på följande länk:' |
config/locales/th.yml | ||
---|---|---|
179 | 179 |
error_issue_not_found_in_project: 'ไม่พบปัญหานี้ หรือปัญหาไม่ได้อยู่ในโครงการนี้' |
180 | 180 | |
181 | 181 |
mail_subject_lost_password: "รหัสผ่าน %{value} ของคุณ" |
182 |
mail_subject_mention: "Mention" |
|
182 | 183 |
mail_body_lost_password: 'คลิ๊กที่ลิงค์ต่อไปนี้เพื่อเปลี่ยนรหัสผ่าน:' |
183 | 184 |
mail_subject_register: "เปิดบัญชี %{value} ของคุณ" |
184 | 185 |
mail_body_register: 'คลิ๊กที่ลิงค์ต่อไปนี้เพื่อเปลี่ยนรหัสผ่าน:' |
config/locales/tr.yml | ||
---|---|---|
195 | 195 |
error_issue_not_found_in_project: 'İş bilgisi bulunamadı veya bu projeye ait değil' |
196 | 196 | |
197 | 197 |
mail_subject_lost_password: "Parolanız %{value}" |
198 |
mail_subject_mention: "Mention" |
|
198 | 199 |
mail_body_lost_password: 'Parolanızı değiştirmek için, aşağıdaki bağlantıya tıklayın:' |
199 | 200 |
mail_subject_register: "%{value} hesap aktivasyonu" |
200 | 201 |
mail_body_register: 'Hesabınızı etkinleştirmek için, aşağıdaki bağlantıya tıklayın:' |
config/locales/uk.yml | ||
---|---|---|
188 | 188 |
notice_account_pending: "Ваш обліковий запис створено і він чекає на підтвердження адміністратором." |
189 | 189 | |
190 | 190 |
mail_subject_lost_password: "Ваш %{value} пароль" |
191 |
mail_subject_mention: "Mention" |
|
191 | 192 |
mail_body_lost_password: 'Для зміни пароля, зайдіть за наступним посиланням:' |
192 | 193 |
mail_subject_register: "Активація облікового запису %{value}" |
193 | 194 |
mail_body_register: 'Для активації облікового запису, зайдіть за наступним посиланням:' |
config/locales/vi.yml | ||
---|---|---|
235 | 235 |
error_issue_not_found_in_project: 'Vấn đề không tồn tại hoặc không thuộc dự án' |
236 | 236 | |
237 | 237 |
mail_subject_lost_password: "%{value}: mật mã của bạn" |
238 |
mail_subject_mention: "Mention" |
|
238 | 239 |
mail_body_lost_password: "Để đổi mật mã, hãy click chuột vào liên kết sau:" |
239 | 240 |
mail_subject_register: "%{value}: kích hoạt tài khoản" |
240 | 241 |
mail_body_register: "Để kích hoạt tài khoản, hãy click chuột vào liên kết sau:" |
config/locales/zh-TW.yml | ||
---|---|---|
310 | 310 |
error_exceeds_maximum_hours_per_day: "工時記錄單日不能超過 %{max_hours} 小時 (目前已登錄 %{logged_hours} 小時)" |
311 | 311 | |
312 | 312 |
mail_subject_lost_password: 您的 Redmine 網站密碼 |
313 |
mail_subject_mention: "Mention" |
|
313 | 314 |
mail_body_lost_password: '欲變更您的 Redmine 網站密碼, 請點選以下鏈結:' |
314 | 315 |
mail_subject_register: 啟用您的 Redmine 帳號 |
315 | 316 |
mail_body_register: '欲啟用您的 Redmine 帳號, 請點選以下鏈結:' |
config/locales/zh.yml | ||
---|---|---|
205 | 205 |
warning_attachments_not_saved: "%{count} 个文件保存失败" |
206 | 206 | |
207 | 207 |
mail_subject_lost_password: "您的 %{value} 密码" |
208 |
mail_subject_mention: "Mention" |
|
208 | 209 |
mail_body_lost_password: '请点击以下链接来修改您的密码:' |
209 | 210 |
mail_subject_register: "%{value}帐号激活" |
210 | 211 |
mail_body_register: '请点击以下链接来激活您的帐号:' |
test/unit/mailer_test.rb | ||
---|---|---|
475 | 475 |
# @dlopper won't receive duplicated notifications |
476 | 476 |
assert_equal 3, ActionMailer::Base.deliveries.size |
477 | 477 |
assert_include User.find(1).mail, recipients |
478 |
# Emails that were sent to the mentioned users should have a [Mention] label |
|
479 |
emails_by_recipients("dlopper@somenet.foo", "admin@somenet.foo").each do |m| |
|
480 |
assert_match "[#{l(:mail_subject_mention)}]", m.subject |
|
481 |
end |
|
478 | 482 |
end |
479 | 483 | |
480 | 484 |
def test_issue_add_should_include_enabled_fields |
... | ... | |
637 | 641 |
# @dlopper won't receive duplicated notifications |
638 | 642 |
assert_equal 3, ActionMailer::Base.deliveries.size |
639 | 643 |
assert_include User.find(1).mail, recipients |
644 | ||
645 |
# Emails that were sent to the mentioned users should have a [Mention] label |
|
646 |
assert_match "[#{l(:mail_subject_mention)}]", emails_by_recipients("admin@somenet.foo").first.subject |
|
640 | 647 |
end |
641 | 648 | |
642 | 649 |
def test_issue_edit_should_notify_mentioned_users_in_notes |
... | ... | |
652 | 659 |
# @dlopper won't receive duplicated notifications |
653 | 660 |
assert_equal 3, ActionMailer::Base.deliveries.size |
654 | 661 |
assert_include User.find(1).mail, recipients |
662 | ||
663 |
# Emails that were sent to the mentioned users should have a [Mention] label |
|
664 |
assert_match "[#{l(:mail_subject_mention)}]", emails_by_recipients("admin@somenet.foo").first.subject |
|
655 | 665 |
end |
656 | 666 | |
657 | 667 |
def test_issue_should_send_email_notification_with_suppress_empty_fields |
... | ... | |
762 | 772 |
# @dlopper won't receive duplicated notifications |
763 | 773 |
assert_equal 3, ActionMailer::Base.deliveries.size |
764 | 774 |
assert_include User.find(1).mail, recipients |
775 |
# Emails that were sent to the mentioned users should have a [Mention] label |
|
776 |
assert_match "[#{l(:mail_subject_mention)}]", emails_by_recipients("admin@somenet.foo").first.subject |
|
765 | 777 |
end |
766 | 778 | |
767 | 779 |
def test_wiki_content_updated |
... | ... | |
787 | 799 |
# @dlopper won't receive duplicated notifications |
788 | 800 |
assert_equal 3, ActionMailer::Base.deliveries.size |
789 | 801 |
assert_include User.find(1).mail, recipients |
802 |
# Emails that were sent to the mentioned users should have a [Mention] label |
|
803 |
assert_match "[#{l(:mail_subject_mention)}]", emails_by_recipients("admin@somenet.foo").first.subject |
|
790 | 804 |
end |
791 | 805 | |
792 | 806 |
def test_register |
... | ... | |
1221 | 1235 |
def destination_user(mail) |
1222 | 1236 |
EmailAddress.where(:address => [mail.to, mail.cc].flatten).map(&:user).first |
1223 | 1237 |
end |
1238 | ||
1239 |
def emails_by_recipients(*recipients) |
|
1240 |
ActionMailer::Base.deliveries.select{ |m| (recipients & m.to).present? } |
|
1241 |
end |
|
1224 | 1242 |
end |