From a2e3ae59842bd9ea82d2b4bf2f3fc5228422b28d Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 7 Dec 2018 15:21:35 +0000 Subject: Make sure locale path specified in JS controller. This doesn't appear to cause any issues on Linux, but on Mac it fails to find the translation file without this. Matches the code in App.pm. --- perllib/FixMyStreet/App/Controller/JS.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/JS.pm') diff --git a/perllib/FixMyStreet/App/Controller/JS.pm b/perllib/FixMyStreet/App/Controller/JS.pm index 1ced9d43b..f430ce672 100755 --- a/perllib/FixMyStreet/App/Controller/JS.pm +++ b/perllib/FixMyStreet/App/Controller/JS.pm @@ -20,7 +20,9 @@ of translation strings. sub translation_strings : LocalRegex('^translation_strings\.(.*?)\.js$') : Args(0) { my ( $self, $c ) = @_; my $lang = $c->req->captures->[0]; - $c->cobrand->set_lang_and_domain( $lang, 1 ); + $c->cobrand->set_lang_and_domain( $lang, 1, + FixMyStreet->path_to('locale')->stringify + ); $c->res->content_type( 'application/javascript' ); } -- cgit v1.2.3