aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/JS.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-12-07 15:21:35 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-12-08 09:29:58 +0000
commita2e3ae59842bd9ea82d2b4bf2f3fc5228422b28d (patch)
tree6e25994e0631d76986210de97feb8053632a661b /perllib/FixMyStreet/App/Controller/JS.pm
parent24226966c3796cf0fad8b26ae2d067bb4aab4748 (diff)
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.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/JS.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/JS.pm4
1 files changed, 3 insertions, 1 deletions
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' );
}