aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew>2009-02-09 11:29:25 +0000
committermatthew <matthew>2009-02-09 11:29:25 +0000
commit3c4153133eda6f2e13e5ec374c687fb121575105 (patch)
treeeb7a6684965730dd84dc9b782685bcb7c5b5e02e
parent651890682fc2e5b8184f0a71ca0274e947dc5897 (diff)
More i18n tweaks.
-rw-r--r--perllib/Page.pm14
-rwxr-xr-xweb/reports.cgi7
2 files changed, 11 insertions, 10 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 107d5cd0a..fbcbdf25c 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.137 2009-02-02 10:59:15 matthew Exp $
+# $Id: Page.pm,v 1.138 2009-02-09 11:29:25 matthew Exp $
#
package Page;
@@ -74,7 +74,7 @@ sub report_error {
warn "aborting";
ent($msg);
my $contact_email = mySociety::Config::get('CONTACT_EMAIL');
- my $trylater = sprintf(_("Please try again later, or <a href=\"mailto:%s\">email us</a> to let us know."), $contact_email);
+ my $trylater = sprintf(_('Please try again later, or <a href="mailto:%s">email us</a> to let us know.'), $contact_email);
my $somethingwrong = _("Sorry! Something's gone wrong.");
my $errortext = _("The text of the error was:");
print "Status: 500\nContent-Type: text/html; charset=iso-8859-1\n\n",
@@ -608,7 +608,7 @@ sub display_problem_text {
prettify_duration($problem->{whensent}, 'minute') . ' later');
}
} else {
- $out .= $q->br() . $q->small('Not reported to council');
+ $out .= $q->br() . $q->small(_('Not reported to council'));
}
$out .= '</em></p>';
my $detail = $problem->{detail};
@@ -754,7 +754,7 @@ sub geocode_string {
$y -= 1 if ($yy - $y < 0.5);
} catch Error::Simple with {
$error = shift;
- $error = "That location doesn't appear to be in Britain; please try again."
+ $error = _('That location does not appear to be in Britain; please try again.')
if $error =~ /out of the area covered/;
}
}
@@ -766,7 +766,7 @@ sub geocode_string {
# Prints response if there's more than one possible result
sub geocode_choice {
my ($choices, $page) = @_;
- my $out = '<p>We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.</p> <ul>';
+ my $out = '<p>' . _('We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.') . '</p> <ul>';
foreach my $choice (@$choices) {
$choice =~ s/, United Kingdom//;
$choice =~ s/, UK//;
@@ -797,7 +797,7 @@ sub check_photo {
my $cd = $q->uploadInfo($fh)->{'Content-Disposition'};
# Must delete photo param, otherwise display functions get confused
$q->delete('photo');
- return 'Please upload a JPEG image only' unless
+ return _('Please upload a JPEG image only') unless
($ct eq 'image/jpeg' || $ct eq 'image/pjpeg');
return '';
}
@@ -824,7 +824,7 @@ sub process_photo {
close $fh;
my $out = `jhead -se -autorot $filename`;
if ($out) {
- open(FP, $filename) or die $!;
+ open(FP, $filename) or throw Error::Simple($!);
$photo = join('', <FP>);
close FP;
}
diff --git a/web/reports.cgi b/web/reports.cgi
index 0450a4bc0..20c20a45c 100755
--- a/web/reports.cgi
+++ b/web/reports.cgi
@@ -7,7 +7,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: reports.cgi,v 1.24 2008-12-08 10:54:16 matthew Exp $
+# $Id: reports.cgi,v 1.25 2009-02-09 11:29:26 matthew Exp $
use strict;
use Standard;
@@ -159,11 +159,12 @@ sub main {
print $q->p(_('This is a summary of all reports on this site; select a particular council to see the reports sent there.'));
my $c = 0;
print '<table cellpadding="3" cellspacing="1" border="0">';
- print '<tr><th>Name</th><th>' . _('New problems') . '</th><th>' . _('Older problems') . '</th>';
+ print '<tr><th>' . _('Name') . '</th><th>' . _('New problems') . '</th><th>' . _('Older problems') . '</th>';
if ($q->{site} eq 'emptyhomes') {
print '<th>Recently returned to use</th><th>Older returned to use</th></tr>';
} else {
- print '<th>Old problems,<br>state unknown</th><th>Recently fixed</th><th>Old fixed</th></tr>';
+ print '<th>' . _('Old problems,<br>state unknown') . '</th><th>'
+ . _('Recently fixed') . '</th><th>' . _('Old fixed') . '</th></tr>';
}
foreach (sort { $areas_info->{$a}->{name} cmp $areas_info->{$b}->{name} } keys %councils) {
print '<tr align="center"';