diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-02-24 15:27:23 +0000 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-02-24 15:27:23 +0000 |
commit | 7c9a89eedb17bdafbc171bba5de21cdd5725acd7 (patch) | |
tree | 3603445333afb5821ef568711b66d274fac067b6 /perllib/FixMyStreet/App.pm | |
parent | b327a36371ea3c0151452ae5e516e63c5fc53b54 (diff) |
Explicitly set gettext_dir so that it does not matter where calling script file is located
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r-- | perllib/FixMyStreet/App.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 825a9f3b3..929889fbd 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -46,6 +46,9 @@ __PACKAGE__->config( # Start the application __PACKAGE__->setup(); +# disable debug logging unless in debaug mode +__PACKAGE__->log->disable('debug') unless __PACKAGE__->debug; + =head1 NAME FixMyStreet::App - Catalyst based application @@ -106,9 +109,17 @@ sub setup_cobrand { : undef; # set the language and the translation file to use - store it on stash - my $set_lang = $cobrand->set_lang_and_domain( $lang, 1 ); + my $set_lang = $cobrand->set_lang_and_domain( + $lang, # language + 1, # return unicode + FixMyStreet->path_to('locale')->stringify # use locale directory + ); $c->stash->{lang_code} = $set_lang; + # debug + $c->log->debug( sprintf "Set lang to '%s' and cobrand to '%s'", + $set_lang, $cobrand->moniker ); + Problems::set_site_restriction_with_cobrand_object($cobrand); Memcached::set_namespace( FixMyStreet->config('BCI_DB_NAME') . ":" ); |