From: Jean-Philippe Lang Date: Tue, 7 Dec 2010 22:05:20 +0000 (+0000) Subject: Fixed: error when sending notification on wiki edit for bg, es, zh-TW locales (#7024). X-Git-Tag: 1.0.5~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bd8e8bc71b717d94134cacdad9b48795341c4056;p=redmine.git Fixed: error when sending notification on wiki edit for bg, es, zh-TW locales (#7024). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4478 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/config/locales/bg.yml b/config/locales/bg.yml index a1eb8aad3..f4e3e32f2 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -808,12 +808,12 @@ bg: text_wiki_page_destroy_children: Изтриване на страниците деца и всички техни descendants setting_password_min_length: Минимална дължина на парола field_group_by: Групиране на резултатите по - mail_subject_wiki_content_updated: "Wiki страницата '{{id}}' не беше обновена" + mail_subject_wiki_content_updated: "Wiki страницата '{{page}}' не беше обновена" label_wiki_content_added: Wiki страница беше добавена - mail_subject_wiki_content_added: "Wiki страницата '{{id}}' беше добавена" - mail_body_wiki_content_added: Wiki страницата '{{id}}' беше добавена от {{author}}. + mail_subject_wiki_content_added: "Wiki страницата '{{page}}' беше добавена" + mail_body_wiki_content_added: Wiki страницата '{{page}}' беше добавена от {{author}}. label_wiki_content_updated: Wiki страница беше обновена - mail_body_wiki_content_updated: Wiki страницата '{{id}}' беше обновена от {{author}}. + mail_body_wiki_content_updated: Wiki страницата '{{page}}' беше обновена от {{author}}. permission_add_project: Създаване на проект setting_new_project_user_role_id: Роля, давана на потребител, създаващ проекти, който не е администратор label_view_all_revisions: Разглеждане на всички ревизии diff --git a/config/locales/es.yml b/config/locales/es.yml index f29d96f1e..34e19b158 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -853,12 +853,12 @@ es: text_wiki_page_destroy_children: Eliminar páginas hijas y todos sus descendientes setting_password_min_length: Longitud mínima de la contraseña field_group_by: Agrupar resultados por - mail_subject_wiki_content_updated: "La página wiki '{{id}}' ha sido actualizada" + mail_subject_wiki_content_updated: "La página wiki '{{page}}' ha sido actualizada" label_wiki_content_added: Página wiki añadida - mail_subject_wiki_content_added: "Se ha añadido la página wiki '{{id}}'." - mail_body_wiki_content_added: "{{author}} ha añadido la página wiki '{{id}}'." + mail_subject_wiki_content_added: "Se ha añadido la página wiki '{{page}}'." + mail_body_wiki_content_added: "{{author}} ha añadido la página wiki '{{page}}'." label_wiki_content_updated: Página wiki actualizada - mail_body_wiki_content_updated: La página wiki '{{id}}' ha sido actualizada por {{author}}. + mail_body_wiki_content_updated: La página wiki '{{page}}' ha sido actualizada por {{author}}. permission_add_project: Crear proyecto setting_new_project_user_role_id: Permiso asignado a un usuario no-administrador para crear proyectos label_view_all_revisions: Ver todas las revisiones diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 3c4672d96..a219ae120 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -278,10 +278,10 @@ mail_body_account_activation_request: "有位新用戶 ({{value}}) 已經完成註冊,正等候您的審核:" mail_subject_reminder: "您有 {{count}} 個項目即將到期 ({{days}})" mail_body_reminder: "{{count}} 個指派給您的項目,將於 {{days}} 天之內到期:" - mail_subject_wiki_content_added: "'{{id}}' wiki 頁面已被新增" - mail_body_wiki_content_added: "The '{{id}}' wiki 頁面已被 {{author}} 新增。" - mail_subject_wiki_content_updated: "'{{id}}' wiki 頁面已被更新" - mail_body_wiki_content_updated: "The '{{id}}' wiki 頁面已被 {{author}} 更新。" + mail_subject_wiki_content_added: "'{{page}}' wiki 頁面已被新增" + mail_body_wiki_content_added: "The '{{page}}' wiki 頁面已被 {{author}} 新增。" + mail_subject_wiki_content_updated: "'{{page}}' wiki 頁面已被更新" + mail_body_wiki_content_updated: "The '{{page}}' wiki 頁面已被 {{author}} 更新。" gui_validation_error: 1 個錯誤 gui_validation_error_plural: "{{count}} 個錯誤" diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 77bcb36f6..aec35a411 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -305,6 +305,26 @@ class MailerTest < ActiveSupport::TestCase end end + def test_wiki_content_added + content = WikiContent.find(:first) + valid_languages.each do |lang| + Setting.default_language = lang.to_s + assert_difference 'ActionMailer::Base.deliveries.size' do + assert Mailer.deliver_wiki_content_added(content) + end + end + end + + def test_wiki_content_updated + content = WikiContent.find(:first) + valid_languages.each do |lang| + Setting.default_language = lang.to_s + assert_difference 'ActionMailer::Base.deliveries.size' do + assert Mailer.deliver_wiki_content_updated(content) + end + end + end + def test_account_information user = User.find(2) valid_languages.each do |lang|