diff options
author | matthew <matthew> | 2009-05-27 15:48:38 +0000 |
---|---|---|
committer | matthew <matthew> | 2009-05-27 15:48:38 +0000 |
commit | ef3ec96cbcd0279a5dbf680467fee9c35372e415 (patch) | |
tree | 4d295bc81da5fe2438b1397f7482cd19f5bd02d1 | |
parent | d9294fbfbe7dec3f9866e5da28f795d2616fda7a (diff) |
Fix dupe msgid problem.
-rwxr-xr-x | bin/gettext-extract | 8 | ||||
-rwxr-xr-x | bin/make_emptyhomes_po | 4 | ||||
-rwxr-xr-x | web/reports.cgi | 22 |
3 files changed, 16 insertions, 18 deletions
diff --git a/bin/gettext-extract b/bin/gettext-extract index d6c248fda..60f4d640b 100755 --- a/bin/gettext-extract +++ b/bin/gettext-extract @@ -7,7 +7,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: gettext-extract,v 1.6 2009-05-27 15:27:18 matthew Exp $ +# $Id: gettext-extract,v 1.7 2009-05-27 15:48:38 matthew Exp $ if [ -e ../../locale ] then @@ -62,16 +62,16 @@ mv $TEMP $PO # Extract email templates echo >> $PO echo '#. Please leave the first word "Subject:" untranslated' >> $PO -for X in bci/templates/emails/* +for X in bci/templates/emails/* bci/templates/emails/eha/* do # TODO: Should check for "*~" type filenames too, and do the *-livesimply case # with wildcards rather than checking per template - if [ "$X" != "bci/templates/emails/eha" -a "$X" != "bci/templates/emails/CVS" -a "$X" != "bci/templates/emails/empty property-confirm" -a "$X" != "bci/templates/emails/submit-eha" -a "$X" != "bci/templates/emails/questionnaire-eha-4weeks" -a "$X" != "bci/templates/emails/questionnaire-eha-26weeks" ] + if [ "$X" != "bci/templates/emails/eha" -a "$X" != "bci/templates/emails/CVS" -a "$X" != "bci/templates/emails/eha/CVS" ] then echo >> $PO echo "#: $X" >> $PO echo msgid \"\" >> $PO - cat $X | plain_gettext_escape >> $PO + cat "$X" | plain_gettext_escape >> $PO echo msgstr \"\" >> $PO fi done diff --git a/bin/make_emptyhomes_po b/bin/make_emptyhomes_po index 2c43301fe..4897ba451 100755 --- a/bin/make_emptyhomes_po +++ b/bin/make_emptyhomes_po @@ -25,7 +25,7 @@ my $buffer = ""; my $start = 0; while(<MAINPO>) { if (!$start) { - s/#, fuzzy//; + s/#, fuzzy/#/; } if (m/"Last-Translator: FULL NAME/) { $_ = '"Last-Translator: mysociety/bin/make_emptyhomes_po\\n"'."\n"; @@ -91,9 +91,9 @@ while(<MAINPO>) { } else { # English text print NEWPO $_; + print EHAPO $_ unless $start; $buffer .= $_; } - } diff --git a/web/reports.cgi b/web/reports.cgi index d6bcde6ad..da462b381 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.29 2009-05-27 13:53:53 matthew Exp $ +# $Id: reports.cgi,v 1.30 2009-05-27 15:48:38 matthew Exp $ use strict; use Standard; @@ -163,12 +163,10 @@ sub main { my $c = 0; print '<table cellpadding="3" cellspacing="1" border="0">'; 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>'; + if ($q->{site} ne 'emptyhomes') { + print '<th>' . _('Old problems,<br>state unknown') . '</th>'; } + print '<th>' . _('Recently fixed') . '</th><th>' . _('Older fixed') . '</th></tr>'; foreach (sort { $areas_info->{$a}->{name} cmp $areas_info->{$b}->{name} } keys %councils) { print '<tr align="center"'; ++$c; @@ -213,16 +211,16 @@ sub main { print Page::header($q, title=>sprintf(_('%s - Summary reports'), $name), rss => [ sprintf(_('Problems within %s, FixMyStreet'), $name), $rss_url ]); my $rss_title = _('RSS feed'); my $rss_alt = _('RSS feed of problems in this %s'); - my $summary_line; - if ($all && $q->{site} eq 'scambs') { + my $summary_line; + if ($all && $q->{site} eq 'scambs') { $summary_line = sprintf(_('You can <a href="%s">see less detail</a>.'), NewURL($q)); - } elsif ($q->{site} eq 'scambs') { + } elsif ($q->{site} eq 'scambs') { $summary_line = sprintf(_('You can <a href="%s">see more details</a>.'), NewURL($q, all=>1)); - } elsif ($all) { + } elsif ($all) { $summary_line = sprintf(_('You can <a href="%s">see less detail</a> or go back and <a href="/reports">show all councils</a>.'), NewURL($q)); - } else { + } else { $summary_line = sprintf(_('You can <a href="%s">see more details</a> or go back and <a href="/reports">show all councils</a>.'), NewURL($q, all=>1)); - } + } print $q->p( $q->a({ href => $rss_url }, '<img align="right" src="/i/feed.png" width="16" height="16" title="' . $rss_title . '" alt="' . sprintf($rss_alt, $thing) . '" border="0" hspace="4">'), sprintf(_('This is a summary of all reports for one %s.'), $thing) . ' ' . $summary_line); |