aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2014-12-30 16:21:32 +0100
committerMarius Halden <marius.h@lden.org>2014-12-30 16:21:32 +0100
commit85c39b5d0ecf4ef07707a78a4e2d6c0eb312b9e3 (patch)
tree28b3f377957b3363c37ec125a9786c580ad26858
parentea829cf5596513bbeb6868f652ae11324439ee82 (diff)
Fix to get time/date in Norwegian.
-rw-r--r--perllib/FixMyStreet/App.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/FiksGataMi.pm7
-rw-r--r--perllib/FixMyStreet/Cobrand/FixaMinGata.pm7
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm6
4 files changed, 18 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 7922dfea1..bec03095d 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -207,9 +207,6 @@ sub setup_request {
# XXX Put in cobrand / do properly
if ($c->cobrand->moniker eq 'zurich') {
FixMyStreet::DB::Result::Problem->visible_states_add_unconfirmed();
- DateTime->DefaultLocale( 'de_CH' );
- } else {
- DateTime->DefaultLocale( 'en_US' );
}
if (FixMyStreet->test_mode) {
diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
index 822a0c43b..75d567fee 100644
--- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
+++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
@@ -7,6 +7,13 @@ use warnings;
use Carp;
use mySociety::MaPit;
use FixMyStreet::Geocode::OSM;
+use DateTime;
+
+sub set_lang_and_domain {
+ my $self = shift;
+ DateTime->DefaultLocale( 'nb_NO' );
+ return $self->SUPER::set_lang_and_domain(@_);
+}
sub country {
return 'NO';
diff --git a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
index dc4b15ed0..c58cb5aa0 100644
--- a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
+++ b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
@@ -9,8 +9,11 @@ use mySociety::MaPit;
use FixMyStreet::Geocode::FixaMinGata;
use DateTime;
-
-DateTime->DefaultLocale('sv_SE');
+sub set_lang_and_domain {
+ my $self = shift;
+ DateTime->DefaultLocale('sv_SE');
+ return $self->SUPER::set_lang_and_domain(@_);
+}
sub site_title {
my ($self) = @_;
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index 087d9046b..e7f13a0c7 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -50,6 +50,12 @@ you already have, and the countres set so that they shouldn't in future.
=cut
+sub set_lang_and_domain {
+ my $self = shift;
+ DateTime->DefaultLocale( 'de_CH' );
+ return $self->SUPER::set_lang_and_domain(@_);
+}
+
sub shorten_recency_if_new_greater_than_fixed {
return 0;
}