Skip to content
This repository
Browse code

Fixed download locale

  • Loading branch information...
commit dc8cb2290e58dce04587b3bd01dc71a0bb2de2e1 1 parent 96a69ca
Ferran Basora fcsonline authored

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. +7 1 app/controllers/tolk/locales_controller.rb
8 app/controllers/tolk/locales_controller.rb
@@ -12,8 +12,14 @@ def show
12 12 format.html do
13 13 @phrases = @locale.phrases_without_translation(params[:page])
14 14 end
  15 +
15 16 format.atom { @phrases = @locale.phrases_without_translation(params[:page], :per_page => 50) }
16   - format.yaml { render :text => @locale.to_hash.ya2yaml(:syck_compatible => true) }
  17 +
  18 + format.yaml do
  19 + data = @locale.to_hash
  20 + render :text => data.respond_to?(:ya2yaml) ? data.ya2yaml(:syck_compatible => true) : YAML.dump(data).force_encoding("UTF-8")
  21 + end
  22 +
17 23 end
18 24 end
19 25

0 comments on commit dc8cb22

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