diff options
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 6 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/State.pm | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 99c5b6dab..bac183271 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -278,7 +278,11 @@ sub problem_state_display { return '' unless $state; my $cobrand_name = $c->cobrand->moniker; - $cobrand_name = 'bromley' if $self->problem->to_body_named('Bromley'); + my $names = join(',,', @{$self->problem->body_names}); + if ($names =~ /(Bromley|Isle of Wight|TfL)/) { + ($cobrand_name = lc $1) =~ s/ //g; + } + return FixMyStreet::DB->resultset("State")->display($state, 1, $cobrand_name); } diff --git a/perllib/FixMyStreet/DB/ResultSet/State.pm b/perllib/FixMyStreet/DB/ResultSet/State.pm index cb894005f..4f98efbf2 100644 --- a/perllib/FixMyStreet/DB/ResultSet/State.pm +++ b/perllib/FixMyStreet/DB/ResultSet/State.pm @@ -1,6 +1,7 @@ package FixMyStreet::DB::ResultSet::State; use base 'DBIx::Class::ResultSet'; +use utf8; use strict; use warnings; use Memcached; @@ -74,7 +75,8 @@ sub display { return $unchanging->{$label} if $unchanging->{$label}; if ($cobrand && $label eq 'not responsible') { return 'third party responsibility' if $cobrand eq 'bromley'; - return "not Island Roads' responsibility" if $cobrand eq 'isleofwight'; + return "not Island Roads’ responsibility" if $cobrand eq 'isleofwight'; + return "not TfL’s responsibility" if $cobrand eq 'tfl'; return _("not the council's responsibility"); } if ($cobrand && $cobrand eq 'oxfordshire' && $label eq 'unable to fix') { |