Use the _html suffix to mark that we expect the translations to contain links.
Unfortunately, we can't use the _html keys for the plain text emails, since the input options (e.g. username, url) will be html-escaped,
before it is passed to the view. So we need to use non-html-suffix keys for the plaintext views, in most cases. Only when the translation
options (e.g. url) are guaranteed to not contain any escapable characters can the same translation key be shared.
</p>
<p>
<% if @owner %>
- <%= raw t ".commented.your_changeset", :commenter => link_to_user(@commenter), :time => @time %>
+ <%= t ".commented.your_changeset_html", :commenter => link_to_user(@commenter), :time => @time %>
<% else %>
- <%= raw t ".commented.commented_changeset", :commenter => link_to_user(@commenter), :time => @time, :changeset_author => @changeset_author %>
+ <%= t ".commented.commented_changeset_html", :commenter => link_to_user(@commenter), :time => @time, :changeset_author => @changeset_author %>
<% end %>
<% if @changeset_comment %>
- <%= raw t ".commented.partial_changeset_with_comment", :changeset_comment => tag.em(@changeset_comment) %>
+ <%= t ".commented.partial_changeset_with_comment_html", :changeset_comment => tag.em(@changeset_comment) %>
<% else %>
<%= t ".commented.partial_changeset_without_comment" %>
<% end %>
<% end %>
<p>
- <%= raw t ".details", :url => link_to(@changeset_url, @changeset_url) %>
+ <%= t ".details_html", :url => link_to(@changeset_url, @changeset_url) %>
</p>
<% content_for :footer do %>
<p>
- <%= raw t ".unsubscribe", :url => link_to(@changeset_url, @changeset_url, :style => "color: #222") %>
+ <%= t ".unsubscribe_html", :url => link_to(@changeset_url, @changeset_url, :style => "color: #222") %>
</p>
<% end %>
<%= t ".hi", :to_user => @to_user %>
</p>
<p>
- <%= raw t ".header", :from_user => link_to_user(@from_user), :subject => tag.em(@title) %>
+ <%= t ".header_html", :from_user => link_to_user(@from_user), :subject => tag.em(@title) %>
</p>
<%= message_body do %>
<% end %>
<% content_for :footer do %>
- <p><%= raw t ".footer",
- :readurl => link_to(@readurl, @readurl) + tag(:br),
- :commenturl => link_to(@commenturl, @commenturl) + tag(:br),
- :replyurl => link_to(@replyurl, @replyurl) %>
+ <p><%= t ".footer_html",
+ :readurl => link_to(@readurl, @readurl) + tag(:br),
+ :commenturl => link_to(@commenturl, @commenturl) + tag(:br),
+ :replyurl => link_to(@replyurl, @replyurl) %>
</p>
<% end %>
<p><%= t ".had_added_you", :user => @friendship.befriender.display_name %></p>
<%= message_body do %>
- <p><%= raw t ".see_their_profile", :userurl => link_to(@viewurl, @viewurl) %></p>
+ <p><%= t ".see_their_profile_html", :userurl => link_to(@viewurl, @viewurl) %></p>
<% unless @friendship.befriendee.is_friends_with?(@friendship.befriender) -%>
- <p><%= raw t ".befriend_them", :befriendurl => link_to(@friendurl, @friendurl) %></p>
+ <p><%= t ".befriend_them_html", :befriendurl => link_to(@friendurl, @friendurl) %></p>
<% end -%>
<% end %>
<%= t ".hi", :to_user => @to_user %>
</p>
<p>
- <%= raw t ".header",
- :from_user => link_to_user(@from_user),
- :subject => tag.em(@title) %>
+ <%= t ".header",
+ :from_user => link_to_user(@from_user),
+ :subject => tag.em(@title) %>
</p>
<%= message_body do %>
<%= @text.to_text %>
==
-<%= word_wrap(t '.footer_html', :readurl => @readurl, :replyurl => @replyurl) %>
+<%= word_wrap(t '.footer', :readurl => @readurl, :replyurl => @replyurl) %>
<p><%= t ".greeting" %></p>
<% if @owner %>
- <p><%= raw t ".#{@event}.your_note", :commenter => link_to_user(@commenter), :place => @place %></p>
+ <p><%= t ".#{@event}.your_note_html", :commenter => link_to_user(@commenter), :place => @place %></p>
<% else %>
- <p><%= raw t ".#{@event}.commented_note", :commenter => link_to_user(@commenter), :place => @place %></p>
+ <p><%= t ".#{@event}.commented_note_html", :commenter => link_to_user(@commenter), :place => @place %></p>
<% end %>
<% unless @comment.empty? %>
<% end %>
<% end %>
-<p><%= raw t ".details", :url => link_to(@noteurl, @noteurl) %></p>
+<p><%= t ".details_html", :url => link_to(@noteurl, @noteurl) %></p>
subject: "[OpenStreetMap] %{user} commented on a diary entry"
hi: "Hi %{to_user},"
header: "%{from_user} has commented on the OpenStreetMap diary entry with the subject %{subject}:"
+ header_html: "%{from_user} has commented on the OpenStreetMap diary entry with the subject %{subject}:"
footer: "You can also read the comment at %{readurl} and you can comment at %{commenturl} or send a message to the author at %{replyurl}"
+ footer_html: "You can also read the comment at %{readurl} and you can comment at %{commenturl} or send a message to the author at %{replyurl}"
message_notification:
subject: "[OpenStreetMap] %{message_title}"
hi: "Hi %{to_user},"
header: "%{from_user} has sent you a message through OpenStreetMap with the subject %{subject}:"
+ header_html: "%{from_user} has sent you a message through OpenStreetMap with the subject %{subject}:"
+ footer: "You can also read the message at %{readurl} and you can send a message to the author at %{replyurl}"
footer_html: "You can also read the message at %{readurl} and you can send a message to the author at %{replyurl}"
friendship_notification:
hi: "Hi %{to_user},"
subject: "[OpenStreetMap] %{user} added you as a friend"
had_added_you: "%{user} has added you as a friend on OpenStreetMap."
see_their_profile: "You can see their profile at %{userurl}."
+ see_their_profile_html: "You can see their profile at %{userurl}."
befriend_them: "You can also add them as a friend at %{befriendurl}."
+ befriend_them_html: "You can also add them as a friend at %{befriendurl}."
gpx_description:
description_with_tags_html: "It looks like your GPX file %{trace_name} with the description %{trace_description} and the following tags: %{tags}"
description_with_no_tags_html: "It looks like your GPX file %{trace_name} with the description %{trace_description} and no tags"
subject_own: "[OpenStreetMap] %{commenter} has commented on one of your notes"
subject_other: "[OpenStreetMap] %{commenter} has commented on a note you are interested in"
your_note: "%{commenter} has left a comment on one of your map notes near %{place}."
+ your_note_html: "%{commenter} has left a comment on one of your map notes near %{place}."
commented_note: "%{commenter} has left a comment on a map note you have commented on. The note is near %{place}."
+ commented_note_html: "%{commenter} has left a comment on a map note you have commented on. The note is near %{place}."
closed:
subject_own: "[OpenStreetMap] %{commenter} has resolved one of your notes"
subject_other: "[OpenStreetMap] %{commenter} has resolved a note you are interested in"
your_note: "%{commenter} has resolved one of your map notes near %{place}."
+ your_note_html: "%{commenter} has resolved one of your map notes near %{place}."
commented_note: "%{commenter} has resolved a map note you have commented on. The note is near %{place}."
+ commented_note_html: "%{commenter} has resolved a map note you have commented on. The note is near %{place}."
reopened:
subject_own: "[OpenStreetMap] %{commenter} has reactivated one of your notes"
subject_other: "[OpenStreetMap] %{commenter} has reactivated a note you are interested in"
your_note: "%{commenter} has reactivated one of your map notes near %{place}."
+ your_note_html: "%{commenter} has reactivated one of your map notes near %{place}."
commented_note: "%{commenter} has reactivated a map note you have commented on. The note is near %{place}."
+ commented_note_html: "%{commenter} has reactivated a map note you have commented on. The note is near %{place}."
details: "More details about the note can be found at %{url}."
+ details_html: "More details about the note can be found at %{url}."
changeset_comment_notification:
hi: "Hi %{to_user},"
greeting: "Hi,"
subject_own: "[OpenStreetMap] %{commenter} has commented on one of your changesets"
subject_other: "[OpenStreetMap] %{commenter} has commented on a changeset you are interested in"
your_changeset: "%{commenter} left a comment at %{time} on one of your changesets"
+ your_changeset_html: "%{commenter} left a comment at %{time} on one of your changesets"
commented_changeset: "%{commenter} left a comment at %{time} on a changeset you are watching created by %{changeset_author}"
+ commented_changeset_html: "%{commenter} left a comment at %{time} on a changeset you are watching created by %{changeset_author}"
partial_changeset_with_comment: "with comment '%{changeset_comment}'"
+ partial_changeset_with_comment_html: "with comment '%{changeset_comment}'"
partial_changeset_without_comment: "without comment"
details: "More details about the changeset can be found at %{url}."
+ details_html: "More details about the changeset can be found at %{url}."
unsubscribe: 'To unsubscribe from updates to this changeset, visit %{url} and click "Unsubscribe".'
+ unsubscribe_html: 'To unsubscribe from updates to this changeset, visit %{url} and click "Unsubscribe".'
messages:
inbox:
title: "Inbox"