Skip to content

Commit

Permalink
YAML converts true / false into actual true / false, so we must strin…
Browse files Browse the repository at this point in the history
…gify keys if we want to use them
  • Loading branch information
radar committed Jun 26, 2011
1 parent 8342d7d commit 1d3e23a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/controllers/forem/admin/topics_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def destroy

def toggle_hide
@topic.toggle!(:hidden)
i18n_string = @topic.hidden? ? "hidden" : "visible"
flash[:notice] = t("forem.topic.#{i18n_string}")
flash[:notice] = t("forem.topic.hidden.#{@topic.hidden?}")
redirect_to forum_topic_path(@topic.forum, @topic)
end

Expand Down
10 changes: 8 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,19 @@ en:
back_to_topics: Back to topics
edit: Edit topic
not_found: The topic you are looking for could not be found.
hidden: This topic is now hidden.
visible: This topic is now visible.
hidden:
'true': This topic is now hidden.
'false': This topic is now visible.
topics:
show:
reply: 'Reply'
delete: 'Delete'
reply_to_topic: 'Reply to Topic'
hide:
'true': Show this topic
'false': Hide this topic


post:
buttons:
reply: Post Reply
Expand Down

0 comments on commit 1d3e23a

Please sign in to comment.