From f1f6d1b78b4d3aebb9e11bdad9f6c8635f570844 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Sun, 22 Jan 2012 22:17:55 +0600 Subject: [PATCH] [refs #114] email i18n --- .../user_mailer/new_comment_notification.en.haml | 14 ++++++++++++++ .../user_mailer/new_comment_notification.haml | 7 ------- .../user_mailer/new_comment_notification.ru.haml | 14 ++++++++++++++ .../new_commit_comment_notification.haml | 9 --------- 4 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 app/views/user_mailer/new_comment_notification.en.haml delete mode 100644 app/views/user_mailer/new_comment_notification.haml create mode 100644 app/views/user_mailer/new_comment_notification.ru.haml delete mode 100644 app/views/user_mailer/new_commit_comment_notification.haml diff --git a/app/views/user_mailer/new_comment_notification.en.haml b/app/views/user_mailer/new_comment_notification.en.haml new file mode 100644 index 000000000..e7e70e53e --- /dev/null +++ b/app/views/user_mailer/new_comment_notification.en.haml @@ -0,0 +1,14 @@ +%p== Hello, #{@user.name}. + +- if @comment.commentable.class == Issue + - link = link_to @comment.commentable.title, [@comment.commentable.project, @comment.commentable] + - object = 'issue' +- elsif @comment.commentable.class == Grit::Commit + - link = link_to @comment.commentable.message, commit_path(@comment.project, @comment.commentable_id) + - object = 'commit' +%p User #{ link_to @comment.user.uname, user_path(@comment.user)} added new comment to #{object} #{link}. + +%p "#{ @comment.body }" + + +%p== Support Team «ROSA Build System» diff --git a/app/views/user_mailer/new_comment_notification.haml b/app/views/user_mailer/new_comment_notification.haml deleted file mode 100644 index 15b4e6a6f..000000000 --- a/app/views/user_mailer/new_comment_notification.haml +++ /dev/null @@ -1,7 +0,0 @@ -%p== Здравствуйте, #{@user.name}. - -%p К коммиту был добавлен новый комментарий. -%p "#{ @comment.body }" - - -%p== Команда поддержки «ROSA Build System» diff --git a/app/views/user_mailer/new_comment_notification.ru.haml b/app/views/user_mailer/new_comment_notification.ru.haml new file mode 100644 index 000000000..c0f4e27e3 --- /dev/null +++ b/app/views/user_mailer/new_comment_notification.ru.haml @@ -0,0 +1,14 @@ +%p== Hello, #{@user.name}. + +- if @comment.commentable.class == Issue + - link = link_to @comment.commentable.title, [@comment.commentable.project, @comment.commentable] + - object = 'issue' +- elsif @comment.commentable.class == Grit::Commit + - link = link_to @comment.commentable.message, commit_path(@comment.project, @comment.commentable_id]) + - object = 'commit' +%p User #{ link_to @comment.user.uname, user_path(@comment.user)} added new comment to #{object} #{link}. + +%p "#{ @comment.body }" + + +%p== Support Team «ROSA Build System» diff --git a/app/views/user_mailer/new_commit_comment_notification.haml b/app/views/user_mailer/new_commit_comment_notification.haml deleted file mode 100644 index 48885d8c9..000000000 --- a/app/views/user_mailer/new_commit_comment_notification.haml +++ /dev/null @@ -1,9 +0,0 @@ -%p== Здравствуйте, #{@user.name}. - - -%p На Ваш комментарий в коммите #{ link_to @comment.commentable.message, commit_path(@comment.project, @comment.commentable_id]) } был дан ответ. - -%p "#{ @comment.body }" - - -%p== Команда поддержки «ROSA Build System»