aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/make_emptyhomes_welsh_po5
-rw-r--r--perllib/Page.pm3
2 files changed, 5 insertions, 3 deletions
diff --git a/bin/make_emptyhomes_welsh_po b/bin/make_emptyhomes_welsh_po
index 725dea487..8fbce24c6 100755
--- a/bin/make_emptyhomes_welsh_po
+++ b/bin/make_emptyhomes_welsh_po
@@ -9,8 +9,10 @@ use FindBin;
use lib "$FindBin::Bin/../perllib";
use PoChange;
+chdir("$FindBin::Bin/../../locale");
+
# First read in translation and match up.
-open(INPO, shift) or die $!;
+open(INPO, 'cy_GB.UTF-8/LC_MESSAGES/EmptyHomes.po') or die $!;
my $state = 'start';
my $msgid = '';
@@ -41,7 +43,6 @@ while (<INPO>) {
$lookup{$msgid} = [ $msgstr, $fuzzy ];
close INPO;
-chdir("$FindBin::Bin/../../locale");
mkdir("en_GB.UTF-8");
mkdir("en_GB.UTF-8/LC_MESSAGES");
mkdir("cy_GB.UTF-8");
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 932126c70..8953810e3 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.151 2009-07-10 17:36:49 matthew Exp $
+# $Id: Page.pm,v 1.152 2009-07-23 09:59:53 matthew Exp $
#
package Page;
@@ -105,6 +105,7 @@ sub microsite {
if ($q->{site} eq 'emptyhomes') {
my $lang;
$lang = 'cy' if $host =~ /cy/;
+ $lang = 'en-gb' if $host =~ /^en\./;
mySociety::Locale::negotiate_language('en-gb,English,en_GB|cy,Cymraeg,cy_GB', $lang);
mySociety::Locale::gettext_domain('FixMyStreet-EmptyHomes');
mySociety::Locale::change();