Skip to content
Browse files

Fixed download locale

  • Loading branch information...
1 parent 96a69ca commit dc8cb2290e58dce04587b3bd01dc71a0bb2de2e1 @fcsonline fcsonline committed Mar 14, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 app/controllers/tolk/locales_controller.rb
View
8 app/controllers/tolk/locales_controller.rb
@@ -12,8 +12,14 @@ def show
format.html do
@phrases = @locale.phrases_without_translation(params[:page])
end
+
format.atom { @phrases = @locale.phrases_without_translation(params[:page], :per_page => 50) }
- format.yaml { render :text => @locale.to_hash.ya2yaml(:syck_compatible => true) }
+
+ format.yaml do
+ data = @locale.to_hash
+ render :text => data.respond_to?(:ya2yaml) ? data.ya2yaml(:syck_compatible => true) : YAML.dump(data).force_encoding("UTF-8")
+ end
+
end
end

0 comments on commit dc8cb22

Please sign in to comment.
Something went wrong with that request. Please try again.