Skip to content

Commit

Permalink
Translate email (Fixes #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Sep 27, 2017
1 parent ab00afb commit 15d4ff5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
Empty file added lang/_manifest_exclude
Empty file.
10 changes: 10 additions & 0 deletions lang/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
en:
SilverStripe\CommentNotifications\CommentEmail:
APPRPOVE: 'Approve:'
DELETE: 'Delete:'
DETECTED_AS_SPAM: 'This comment was automatically detected as spam'
MARK_AS_NOT_SPAM: 'Mark as not spam:'
MARK_AS_SPAM: 'Mark as spam:'
MODERATE_THIS_COMMENT: 'You can view or moderate this comment at'
NEW_COMMENT_TEXT: 'There is a new comment on'
PLEASE_REVIEW_FOR_APPROVAL: 'Please review the comment for approval'
16 changes: 8 additions & 8 deletions templates/SilverStripe/CommentNotifications/CommentEmail.ss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<p>
There is a new comment on the <a href="{$Comment.Link}">{$Parent.Title}</a> page.
<%t SilverStripe\\CommentNotifications\\CommentEmail.NEW_COMMENT_TEXT 'There is a new comment on' %> <a href="{$Comment.Link}">{$Parent.Title}</a>.
</p>

<p>
<strong>Please review the comment for approval.</strong>
<strong><%t SilverStripe\\CommentNotifications\\CommentEmail.PLEASE_REVIEW_FOR_APPROVAL 'Please review the comment for approval' %>.</strong>
</p>

<ul>
Expand All @@ -15,7 +15,7 @@
<li>{$Comment.Email}</li>
<% end_if %>
<% if $IsSpam %>
<li><em>This comment was automatically detected as spam</em></li>
<li><em><%t SilverStripe\\CommentNotifications\\CommentEmail.DETECTED_AS_SPAM 'This comment was automatically detected as spam' %></em></li>
<% end_if %>
</ul>

Expand All @@ -24,18 +24,18 @@
<% if $ApproveLink || $HamLink || $SpamLink || $DeleteLink %>
<ul>
<% if $ApproveLink %>
<li><strong>Approve it: </strong><a href="$ApproveLink.ATT">$ApproveLink.XML</a></li>
<li><strong><%t SilverStripe\\CommentNotifications\\CommentEmail.APPRPOVE 'Approve:' %></strong> <a href="$ApproveLink.ATT">$ApproveLink.XML</a></li>
<% end_if %>
<% if $SpamLink %>
<li><strong>Mark as Spam: </strong><a href="$SpamLink.ATT">$SpamLink.XML</a></li>
<li><strong><%t SilverStripe\\CommentNotifications\\CommentEmail.MARK_AS_SPAM 'Mark as spam:' %></strong> <a href="$SpamLink.ATT">$SpamLink.XML</a></li>
<% end_if %>
<% if $HamLink %>
<li><strong>Mark as not Spam: </strong><a href="$HamLink.ATT">$HamLink.XML</a></li>
<li><strong><%t SilverStripe\\CommentNotifications\\CommentEmail.MARK_AS_NOT_SPAM 'Mark as not spam:' %></strong> <a href="$HamLink.ATT">$HamLink.XML</a></li>
<% end_if %>
<% if $DeleteLink %>
<li><strong>Delete it: </strong><a href="$DeleteLink.ATT">$DeleteLink.XML</a></li>
<li><strong><%t SilverStripe\\CommentNotifications\\CommentEmail.DELETE 'Delete:' %></strong> <a href="$DeleteLink.ATT">$DeleteLink.XML</a></li>
<% end_if %>
</ul>
<% else %>
You can view or moderate this comment at <a href="{$Comment.Link}">{$Parent.Title}</a>
<%t SilverStripe\\CommentNotifications\\CommentEmail.MODERATE_THIS_COMMENT 'You can view or moderate this comment at' %> <a href="{$Comment.Link}">{$Parent.Title}</a>
<% end_if %>

0 comments on commit 15d4ff5

Please sign in to comment.