aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/initializers/fast_gettext.rb4
-rw-r--r--config/test.yml2
-rw-r--r--config/varnish-alaveteli.vcl5
3 files changed, 10 insertions, 1 deletions
diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb
index 9049fd8ed..721c49cd0 100644
--- a/config/initializers/fast_gettext.rb
+++ b/config/initializers/fast_gettext.rb
@@ -1,3 +1,7 @@
Encoding.default_external = 'UTF-8' if RUBY_VERSION.to_f >= 1.9
FastGettext.add_text_domain 'app', :path => File.join(Rails.root, 'locale'), :type => :po
FastGettext.default_text_domain = 'app'
+
+I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
+
+
diff --git a/config/test.yml b/config/test.yml
index 460d7c6c1..6e34340ff 100644
--- a/config/test.yml
+++ b/config/test.yml
@@ -22,7 +22,7 @@ BLOG_FEED: 'http://www.mysociety.org/category/projects/whatdotheyknow/feed/'
TWITTER_USERNAME: 'alaveteli_foi'
# Locales we wish to support in this app, space-delimited
-AVAILABLE_LOCALES: 'en es'
+AVAILABLE_LOCALES: 'en es en_GB'
DEFAULT_LOCALE: 'en'
# if 'true', respect the user's choice of language in the browser
diff --git a/config/varnish-alaveteli.vcl b/config/varnish-alaveteli.vcl
index 452a956da..77350a8c8 100644
--- a/config/varnish-alaveteli.vcl
+++ b/config/varnish-alaveteli.vcl
@@ -87,6 +87,11 @@ sub vcl_recv {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
+
+ # For an explanation of the followng roundabout way of defining
+ # ban lists, see
+ # http://kristianlyng.wordpress.com/2010/07/28/smart-bans-with-varnish/
+
# XXX in Varnish 2.x, the following would be
# purge("obj.http.x-url ~ " req.url);
ban("obj.http.x-url ~ " + req.url);