aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/send-reports14
-rw-r--r--locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po45
-rw-r--r--perllib/FixMyStreet/Alert.pm4
-rw-r--r--perllib/Page.pm12
-rwxr-xr-xweb-admin/index.cgi4
-rwxr-xr-xweb/contact.cgi3
-rwxr-xr-xweb/index.cgi72
7 files changed, 76 insertions, 78 deletions
diff --git a/bin/send-reports b/bin/send-reports
index 7f9454685..429eb5cea 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -174,22 +174,22 @@ foreach my $row (@$unsent) {
$template = File::Slurp::read_file("$FindBin::Bin/../templates/emails/$template");
if ($h{category} eq 'Other') {
- $h{category_footer} = 'this type of local problem';
+ $h{category_footer} = _('this type of local problem');
$h{category_line} = '';
} else {
$h{category_footer} = "'" . $h{category} . "'";
- $h{category_line} = "Category: $h{category}\n\n";
+ $h{category_line} = sprintf(_("Category: %s"), $h{category}) . "\n\n";
}
- $h{councils_name} = join(' and ', @dear);
- $h{multiple} = @dear>1 ? "[ This email has been sent to both councils covering the location of the problem, as the user did not categorise it; please ignore it if you're not the correct council to deal with the issue, or let us know what category of problem this is so we can add it to our system. ]\n\n"
+ $h{councils_name} = join(_(' and '), @dear);
+ $h{multiple} = @dear>1 ? "[ " . _("This email has been sent to both councils covering the location of the problem, as the user did not categorise it; please ignore it if you're not the correct council to deal with the issue, or let us know what category of problem this is so we can add it to our system.") . " ]\n\n"
: '';
$h{missing} = '';
if ($missing) {
my $name = encode_utf8($areas_info->{$missing}->{name});
- $h{missing} = '[ We realise this problem might be the responsibility of ' . $name
- . "; however, we don't currently have any contact details for them.
-If you know of an appropriate contact address, please do get in touch. ]\n\n";
+ $h{missing} = '[ '
+ . sprintf(_('We realise this problem might be the responsibility of %s; however, we don't currently have any contact details for them. If you know of an appropriate contact address, please do get in touch.'), $name)
+ . ' ]\n\n";
}
}
diff --git a/locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po b/locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po
index 40d5ea87c..3d63e18f4 100644
--- a/locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po
+++ b/locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: FixMyStreet\n"
"Report-Msgid-Bugs-To: matthew@mysociety.org\n"
"POT-Creation-Date: 2011-02-14 13:35+0000\n"
-"PO-Revision-Date: 2011-02-15 14:46MET\n"
+"PO-Revision-Date: 2011-02-16 12:25MET\n"
"Last-Translator: Petter Reinholdtsen <pere@hungry.com>\n"
"Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n"
"MIME-Version: 1.0\n"
@@ -118,7 +118,7 @@ msgid ""
"\"logoie\"></span></a>"
msgstr ""
"<div id=\"logo\" align=\"center\"><a href=\"http://www.nuug.no/\">NUUG</a> "
-"and<br><a href=\"http://www.mysociety.org/\"><img width=\"133\" "
+"and<br><a href=\"http://www.mysociety.org/\"><img id=\"logo\" width=\"133\" "
"height=\"26\" border=0 src=\"/i/mysociety-dark.png\" alt=\"mySociety\"><span "
"id=\"logoie\"></span></a></div>"
@@ -200,52 +200,52 @@ msgstr "minutt"
#: perllib/Page.pm:531
#, perl-format
msgid "%s, reported anonymously at %s"
-msgstr "%s, rapportert anonymt den %s"
+msgstr "%s, rapportert anonymt %s"
#: perllib/Page.pm:533
#, perl-format
msgid "%s, reported by %s at %s"
-msgstr "%s, rapportert av %s den %s"
+msgstr "%s, rapportert av %s %s"
#: perllib/Page.pm:537
#, perl-format
msgid "Reported by %s in the %s category anonymously at %s"
-msgstr "Rapportert av %s i kategorien %s anonnymt den %s"
+msgstr "Rapportert av %s i kategorien %s anonnymt %s"
#: perllib/Page.pm:539
#, perl-format
msgid "Reported by %s in the %s category by %s at %s"
-msgstr "Rapportert av %s i kategorien %s av %s den %s"
+msgstr "Rapportert av %s i kategorien %s av %s %s"
#: perllib/Page.pm:541
#, perl-format
msgid "Reported by %s anonymously at %s"
-msgstr "Publisert av %s anonymt den %s"
+msgstr "Publisert av %s anonymt %s"
#: perllib/Page.pm:543
#, perl-format
msgid "Reported by %s by %s at %s"
-msgstr "Rapporter av %s av %s den %s"
+msgstr "Rapporter av %s av %s %s"
#: perllib/Page.pm:545
#, perl-format
msgid "Reported in the %s category anonymously at %s"
-msgstr "Rapportert i kategorien %s anonymt den %s"
+msgstr "Rapportert i kategorien %s anonymt %s"
#: perllib/Page.pm:547
#, perl-format
msgid "Reported in the %s category by %s at %s"
-msgstr "Rapportert i kategorien %s av %s den %s"
+msgstr "Rapportert i kategorien %s av %s %s"
#: perllib/Page.pm:549
#, perl-format
msgid "Reported anonymously at %s"
-msgstr "Rapportert anonymt den %s"
+msgstr "Rapportert anonymt %s"
#: perllib/Page.pm:551
#, perl-format
msgid "Reported by %s at %s"
-msgstr "Publisert av %s den %s"
+msgstr "Publisert av %s %s"
#: perllib/Page.pm:556
msgid "the map was not used so pin location may be inaccurate"
@@ -267,12 +267,12 @@ msgstr "Oppdateringer"
#: perllib/Page.pm:623
#, perl-format
msgid "Posted by %s at %s"
-msgstr "Sendt inn av %s den %s"
+msgstr "Sendt inn av %s %s"
#: perllib/Page.pm:625
#, perl-format
msgid "Posted anonymously at %s"
-msgstr "Publisert anonymt den %s"
+msgstr "Publisert anonymt %s"
#: perllib/Page.pm:628
msgid "marked as fixed"
@@ -1064,7 +1064,7 @@ msgstr "Du har ikke spesifisert koordinater, vennligst prøv på nytt"
#: web/index.cgi:389 web/index.cgi:550 web/index.cgi:557
msgid "Other"
-msgstr "Andre"
+msgstr "Annet"
#: web/index.cgi:406
#, perl-format
@@ -1346,7 +1346,7 @@ msgstr "RSS-strøm med oppdateringer for dette problemet"
#: web/index.cgi:1065
msgid "Provide an update"
-msgstr "Send en oppdatering"
+msgstr "Bidra med oppdatering"
#: web/index.cgi:1071
msgid "Update:"
@@ -1362,9 +1362,10 @@ msgid ""
"it will be public. Your information will only be used in accordance with our "
"<a href=\"/faq#privacy\">privacy policy</a>"
msgstr ""
-"Vennligst merk at oppdateringer er ikke sendt til kommunen. Hvis du legger "
-"igjen ditt navn så vil det være offentlig. Din informasjon vil kun bli brukt "
-"i henhold til våre <a href=\"/faq#privacy\">personvernpolicy</a>"
+"Vennligst merk at oppdateringer ikke blir sendt til kommunen. Hvis du "
+"legger igjen navnet ditt så vil det være offentlig tilgjengelig. Din "
+"informasjon vil kun bli brukt i henhold til våre <a href=\"/faq#privacy"
+"\">personvernpolicy</a>"
#: web/index.cgi:1099
msgid "Updates to this problem, FixMyStreet"
@@ -1451,7 +1452,7 @@ msgstr ""
"forslag: hva med å forsøke\n"
"<a href=\"%s\">å skrive direkte til din kommune</a>, eller hvis det er et "
"problem som kan fikses\n"
-"av folk lokalt som jobber sammen, hva med å <a href=\"http://www.pledgebank."
+"av befolkningen som jobber sammen, hva med å <a href=\"http://www.pledgebank."
"com/new\">lage\n"
"en \"pledge\" og publiser den</a>?</p>\n"
@@ -2366,7 +2367,7 @@ msgstr ""
"Hvis det er en mer passende epostadresse for meldinger om\n"
"<?=$values['category_footer']?>, vær så snill å gi oss beskjed ved å besøke\n"
"<http://www.fiksgatami.no/contact>.\n"
-"Dette vil bidra til å forbedre tjenesten for de lokale folkene. Vi\n"
+"Dette vil bidra til å forbedre tjenesten for befolkningen. Vi\n"
"tar også gjerne imot andre tilbakemeldinger som du har noen. ]\n"
"\n"
@@ -2422,7 +2423,7 @@ msgstr ""
"Kjære <?=$values['councils_name']?>,\n"
"\n"
"<?=$values['missing']?><?=$values['multiple']?>En bruker av\n"
-"FiksGataMi har sendt inn følgende rapport om et localt\n"
+"FiksGataMi har sendt inn følgende rapport om et lokalt\n"
"problem som vi tror trenger deres oppmerksomhet.\n"
"\n"
"<?=$values['fuzzy']?>, eller for å bidra med en oppdatering om problemet,\n"
diff --git a/perllib/FixMyStreet/Alert.pm b/perllib/FixMyStreet/Alert.pm
index cdc070290..4a6e63564 100644
--- a/perllib/FixMyStreet/Alert.pm
+++ b/perllib/FixMyStreet/Alert.pm
@@ -306,7 +306,9 @@ sub generate_rss ($$$;$$$$) {
if ($display_photos && $row->{photo}) {
$item{description} .= ent("\n<br><img src=\"". Cobrand::url($cobrand, $url, $http_q) . "/photo?id=$row->{id}\">");
}
- $item{description} .= ent("\n<br><a href='$cobrand_url'>Report on FixMyStreet</a>");
+ my $recipient_name = Cobrand::contact_name($cobrand);
+ $item{description} .= ent("\n<br><a href='$cobrand_url'>" .
+ sprintf(_("Report on %s"), $recipient_name) . "</a>");
if ($row->{latitude} || $row->{longitude}) {
$item{georss} = { point => "$row->{latitude} $row->{longitude}" };
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 308d2a5c6..6acf53c14 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -507,17 +507,17 @@ sub prettify_duration {
return _('less than a minute') if $s == 0;
}
my @out = ();
- _part(\$s, 60*60*24*7, _('week'), \@out);
- _part(\$s, 60*60*24, _('day'), \@out);
- _part(\$s, 60*60, _('hour'), \@out);
- _part(\$s, 60, _('minute'), \@out);
+ _part(\$s, 60*60*24*7, _('%d week'), _('%d weeks'), \@out);
+ _part(\$s, 60*60*24, _('%d day'), _('%d days'), \@out);
+ _part(\$s, 60*60, _('%d hour'), _('%d hours'), \@out);
+ _part(\$s, 60, _('%d minute'), _('%d minutes'), \@out);
return join(', ', @out);
}
sub _part {
- my ($s, $m, $w, $o) = @_;
+ my ($s, $m, $w1, $w2, $o) = @_;
if ($$s >= $m) {
my $i = int($$s / $m);
- push @$o, "$i $w" . ($i != 1 ? 's' : '');
+ push @$o, sprintf(mySociety::Locale::nget($w1, $w2, $i), $i);
$$s -= $i * $m;
}
}
diff --git a/web-admin/index.cgi b/web-admin/index.cgi
index 72bcead6f..abcf58a8c 100755
--- a/web-admin/index.cgi
+++ b/web-admin/index.cgi
@@ -119,8 +119,8 @@ sub fetch_data {
sub admin_summary ($) {
my ($q) = @_;
my $cobrand = Page::get_cobrand($q);
- print html_head($q, "Summary");
- print $q->h1("Summary");
+ print html_head($q, _("Summary"));
+ print $q->h1(_("Summary"));
my $contacts = Problems::contact_counts($cobrand);
my %contacts = @$contacts;
diff --git a/web/contact.cgi b/web/contact.cgi
index fd0043d94..a2196e765 100755
--- a/web/contact.cgi
+++ b/web/contact.cgi
@@ -106,6 +106,8 @@ sub contact_details {
my $out = '';
my $sitename = _('FixMyStreet');
my $contact_info = '';
+ if ( mySociety::Config::get('COUNTRY') eq 'GB' ) {
+ # XXX Rewrite to make brandable?
$contact_info .= <<EOF;
<div class="contact-details">
<p>$sitename is a service provided by mySociety, which is the project of a
@@ -120,6 +122,7 @@ UK</p>
</div>
EOF
$out .= $contact_info unless $q->{site} eq 'emptyhomes';
+ }
return $out;
}
diff --git a/web/index.cgi b/web/index.cgi
index ded2583ea..f92f282d8 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -657,15 +657,17 @@ name if you give us permission.'), $council_list);
push @missing, $_ unless $councils{$_};
}
my $n = @missing;
- my $list = join(' or ', map { encode_utf8($all_councils->{$_}->{name}) } @missing);
- $vars{text_help} = '<p>All the information you provide here will be sent to <strong>'
- . join('</strong> or <strong>', map { encode_utf8($all_councils->{$_}->{name}) } @councils)
- . '</strong>. The subject and details of the problem will be public, plus your
-name if you give us permission.';
- $vars{text_help} .= ' We do <strong>not</strong> yet have details for the other council';
- $vars{text_help} .= ($n>1) ? 's that cover' : ' that covers';
- $vars{text_help} .= " this location. You can help us by finding a contact email address for local
-problems for $list and emailing it to us at <a href='mailto:$e'>$e</a>.";
+ my $list = join(_(' or '), map { encode_utf8($all_councils->{$_}->{name}) } @missing);
+ $vars{text_help} = '<p>' . _('All the information you provide here will be sent to') . '<strong>'
+ . join('</strong>' . _(' or ') . '<strong>', map { encode_utf8($all_councils->{$_}->{name}) } @councils)
+ . '</strong>. ';
+ $vars{text_help} .= _('The subject and details of the problem will be public, plus your name if you give us permission.');
+ $vars{text_help} .= mySociety::Locale::nget(
+ _('We do <strong>not</strong> yet have details for the other council that covers this location.'),
+ _('We do <strong>not</strong> yet have details for the other councils that cover this location.'),
+ $n
+ );
+ $vars{text_help} .= ' ' . sprintf(_("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."), $list, $e, $e);
$vars{text_help} .= '<input type="hidden" name="council" value="' . join(',', @councils)
. '|' . join(',', @missing) . '">';
} else {
@@ -673,17 +675,16 @@ problems for $list and emailing it to us at <a href='mailto:$e'>$e</a>.";
my $list = join(' or ', map { encode_utf8($_->{name}) } values %$all_councils);
my $n = scalar keys %$all_councils;
if ($q->{site} ne 'emptyhomes') {
- $vars{text_help} = '<p>We do not yet have details for the council';
- $vars{text_help} .= ($n>1) ? 's that cover' : ' that covers';
- $vars{text_help} .= " this location. If you submit a problem here the subject and details
-of the problem will be public, but the problem will <strong>not</strong> be reported to the council.
-You can help us by finding a contact email address for local
-problems for $list and emailing it to us at <a href='mailto:$e'>$e</a>.";
+ $vars{text_help} = '<p>';
+ $vars{text_help} .= mySociety::Locale::nget(
+ _('We do not yet have details for the council that covers this location.'),
+ _('We do not yet have details for the councils that cover this location.'),
+ $n
+ );
+ $vars{text_help} .= _("If you submit a problem here the subject and details of the problem will be public, but the problem will <strong>not</strong> be reported to the council.");
+ $vars{text_help} .= sprintf(_("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%se'>%s</a>."), $list, $e, $e;
} else {
- $vars{text_help} = _("<p>We do not yet have details for the council that covers
-this location. If you submit a report here it will be left on the site, but
-not reported to the council &ndash; please still leave your report, so that
-we can show to the council the activity in their area.");
+ $vars{text_help} = _("<p>We do not yet have details for the council that covers this location. If you submit a report here it will be left on the site, but not reported to the council &ndash; please still leave your report, so that we can show to the council the activity in their area.");
}
$vars{text_help} .= '<input type="hidden" name="council" value="-1">';
}
@@ -763,27 +764,18 @@ EOF
}
if ($q->{site} ne 'emptyhomes') {
- $vars{text_notes} = <<EOF;
-<p>Please note:</p>
-<ul>
-<li>We will only use your personal
-information in accordance with our <a href="/faq#privacy">privacy policy.</a></li>
-<li>Please be polite, concise and to the point.</li>
-<li>Please do not be abusive &mdash; abusing your council devalues the service for all users.</li>
-<li>Writing your message entirely in block capitals makes it hard to read,
-as does a lack of punctuation.</li>
-<li>Remember that FixMyStreet is primarily for reporting physical
-problems that can be fixed. If your problem is not appropriate for
-submission via this site remember that you can contact your council
-directly using their own website.</li>
-<li>
-FixMyStreet and the Guardian are providing this service in
-partnership in <a href="/faq#privacy">certain cities</a>. In those cities, both have access to
-any information submitted, including names and email addresses, and will use it only to ensure the
-smooth running of the service, in accordance with their privacy policies.
-</li>
-</ul>
-EOF
+ $vars{text_notes} =
+ $q->p(_("Please note:")) .
+ "<ul>" .
+ $q->li(_("We will only use your personal information in accordance with our <a href=\"/faq#privacy\">privacy policy.</a>")) .
+ $q->li(_("Please be polite, concise and to the point.")) .
+ $q->li(_("Please do not be abusive &mdash; abusing your council devalues the service for all users.")) .
+ $q->li(_("Writing your message entirely in block capitals makes it hard to read, as does a lack of punctuation.")) .
+ $q->li(_("Remember that FixMyStreet is primarily for reporting physical problems that can be fixed. If your problem is not appropriate for submission via this site remember that you can contact your council directly using their own website."));
+ $vars{text_notes} .=
+ $q->li(_("FixMyStreet and the Guardian are providing this service in partnership in <a href=\"/faq#privacy\">certain cities</a>. In those cities, both have access to any information submitted, including names and email addresses, and will use it only to ensure the smooth running of the service, in accordance with their privacy policies."))
+ if mySociety::Config::get('COUNTRY') eq 'GB';
+ $vars{text_notes} .= "</ul>\n";
}
%vars = (%vars,