aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew>2009-07-03 14:00:14 +0000
committermatthew <matthew>2009-07-03 14:00:14 +0000
commitd7bf12139ffb2862e3a4aabfdb692e3e8d0c02b1 (patch)
tree8f887e56464ec1fe2a69f1ba0b22cdd0d5cd8fe7
parentdab600fd2bf74b946a9d262bc093c1a2eb62a7ee (diff)
Fixes now I have a real file.
-rwxr-xr-xbin/make_emptyhomes_welsh_po5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/make_emptyhomes_welsh_po b/bin/make_emptyhomes_welsh_po
index 40f4526cd..e02d9b009 100755
--- a/bin/make_emptyhomes_welsh_po
+++ b/bin/make_emptyhomes_welsh_po
@@ -14,7 +14,7 @@ mkdir("cy_GB.UTF-8");
mkdir("cy_GB.UTF-8/LC_MESSAGES");
# First read in translation and match up.
-open(INPO, shift) or die;
+open(INPO, "$FindBin::Bin/" . shift) or die $!;
my $state = 'start';
my $msgid = '';
@@ -25,6 +25,7 @@ while (<INPO>) {
# comment or blank line
} elsif (m/^\s+$/) {
# blank line separates translations
+ $msgid =~ s/"\n"//g;
$lookup{$msgid} = $msgstr;
$state = 'msgid';
$msgid = "";
@@ -96,9 +97,11 @@ while(<MAINPO>) {
$buffer =~ s/We send it to the council on your behalf/The details will be sent directly to the right person in the local council for them to take action/;
$buffer =~ s/To find out what local alerts we have for you/To find out what local alerts we have in your area, council or ward/;
+ $buffer =~ s/"\n"//g;
if ($lookup{$buffer}) {
print OUTPO $lookup{$buffer};
} else {
+ print __LINE__ . "\n";
die "Failed to find match with buffer: $buffer";
}