Permalink
Browse files

Fixing I18n errors related to html_safe. There is already a bug repor…

…t for this problem here: svenfuchs/i18n#107 but no fix released yet, so going to workaround as it has no side effect.
  • Loading branch information...
brodock committed Dec 22, 2011
1 parent 79e2263 commit c8962707d55eeab06602bc88a618cafc39496ae2
@@ -77,7 +77,7 @@
<td class="lp">
<abbr class="updated" title="<%= topic.last_updated_at.xmlschema %>"><%= I18n.t 'txt.post_age', :when => time_ago_in_words(topic.last_updated_at), :default => "posted %{when} ago" %></abbr>
<% if topic.last_user %>
- <%= I18n.t 'txt.by_user_html', :default => 'by %{user}'.html_safe, :user => "<span class=\"author\"><strong class=\"fn\">#{h(topic.last_user.display_name)}</strong></span>" %>
+ <%= I18n.t('txt.by_user_html', :default => 'by %{user}', :user => "<span class=\"author\"><strong class=\"fn\">#{h(topic.last_user.display_name)}</strong></span>").html_safe %>
<% end %>
<span><%= link_to I18n.t('txt.view', :default => 'view'), forum_topic_path(@forum, topic, :page => topic.last_page, :anchor => dom_id(topic.recent_post)) %></span>
</td>
@@ -45,7 +45,7 @@
<%= @topic.title %>
<% if @topic.locked? %>
- <span>(<%= t 'txt.topic', :default => 'Topic' %> <%= t 'txt.locked', :default => 'locked' %>)</span>
+ <span>(<%= I18n.t 'txt.topic', :default => 'Topic' %> <%= t 'txt.locked', :default => 'locked' %>)</span>
<% end %>
<% if logged_in? %>
<span style="display:none;" id="topic_mod">
@@ -59,8 +59,8 @@
<p class="subtitle">
<%= feed_icon_tag @topic.title, forum_topic_posts_path(@forum, @topic, :format => 'atom') %>
- <%= t 'txt.count_posts', :count => @topic.posts.size, :num => number_with_delimiter(@topic.posts.size) %>,
- <%= t 'txt.count_voices', :count => @topic.voices.size, :num => number_with_delimiter(@topic.voices.size) %>
+ <%= I18n.t 'txt.count_posts', :count => @topic.posts.size, :num => number_with_delimiter(@topic.posts.size) %>,
+ <%= I18n.t 'txt.count_voices', :count => @topic.voices.size, :num => number_with_delimiter(@topic.voices.size) %>
</p>
<% unless @posts.empty? %>
@@ -1,7 +1,7 @@
<% content_for :right do %>
<h5><%= I18n.t 'txt.views_users.avatars_title', :default => 'Avatars' %></h5>
- <p><%= I18n.t 'txt.views_users.gravatar_notice_html', :default => 'To have your very own avatar displayed on this forum visit %{gravatar} and sign up for a free gravatar.'.html_safe, :gravatar => '<a href="http://www.gravatar.com/" title="Gravatar - Globally Recognized Avatars">Gravatar</a>' %></p>
+ <p><%= I18n.t('txt.views_users.gravatar_notice_html', :default => 'To have your very own avatar displayed on this forum visit %{gravatar} and sign up for a free gravatar.', :gravatar => '<a href="http://www.gravatar.com/" title="Gravatar - Globally Recognized Avatars">Gravatar</a>').html_safe %></p>
<% if current_user.admin? %>
<%= form_for @user, :url => make_admin_user_path(@user) do |f| %>
@@ -47,9 +47,9 @@
<p class="subtitle">
<%= feed_icon_tag @user.display_name, user_posts_path(:user_id => @user, :format => :rss) %>
<span>
- <%= t 'txt.count_topics', :count => @user.topics.size, :num => number_with_delimiter(@user.topics.size) %>,
- <%= t 'txt.count_posts', :count => @user.posts.size, :num => number_with_delimiter(@user.posts.size) %>
- <%= t 'txt.views_users.view_all_monitored_posts_html', :default => "(view %{all_link} | %{monitored_link} posts)".html_safe, :all_link => link_to(t('txt.all', :default => 'all'), user_posts_path(@user)), :monitored_link => link_to(t('txt.monitored', :default => 'monitored'), "#") %><br />
+ <%= I18n.t 'txt.count_topics', :count => @user.topics.size, :num => number_with_delimiter(@user.topics.size) %>,
+ <%= I18n.t 'txt.count_posts', :count => @user.posts.size, :num => number_with_delimiter(@user.posts.size) %>
+ <%= I18n.t('txt.views_users.view_all_monitored_posts_html', :default => "(view %{all_link} | %{monitored_link} posts)", :all_link => link_to(t('txt.all', :default => 'all'), user_posts_path(@user)), :monitored_link => link_to(t('txt.monitored', :default => 'monitored'), "#")).html_safe %><br />
</span>
</p>

0 comments on commit c896270

Please sign in to comment.