diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-10-03 17:47:25 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-10-03 17:47:25 +0100 |
commit | 272dba7ce6d59d81b52579dd4c5fc7d65e9bec20 (patch) | |
tree | cabbefec7823061781050ffb002a38ce53d68f56 /perllib/PoChange.pm | |
parent | 39c1b648b30e67ceb8912a35b386eb4ee23857b8 (diff) | |
parent | f16a3e96b65394089d10c46c1d67cf82c67e72dd (diff) |
Merge branch 'fmb-read-only'
Conflicts:
db/schema.sql
perllib/FixMyStreet/DB/Result/Contact.pm
perllib/FixMyStreet/DB/Result/Problem.pm
Diffstat (limited to 'perllib/PoChange.pm')
-rw-r--r-- | perllib/PoChange.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/perllib/PoChange.pm b/perllib/PoChange.pm index deecd3b00..06b78fa3f 100644 --- a/perllib/PoChange.pm +++ b/perllib/PoChange.pm @@ -3,6 +3,19 @@ use strict; package PoChange; +sub translate($$) { + my $file = shift; + my $s = shift; + + if ( $file eq 'FixMyStreet-EmptyHomes' ) { + return fixmystreet_to_reportemptyhomes( $s ); + } elsif ( $file eq 'FixMyBarangay' ) { + return fixmystreet_to_fixmybarangay( $s ); + } + + return $s; +} + # Takes a msgid from the main FixMyStreet .po file and # converts it to a msgid for the ReportEmptyHomes .po file sub fixmystreet_to_reportemptyhomes($) { @@ -35,4 +48,16 @@ sub fixmystreet_to_reportemptyhomes($) { return $s; } +sub fixmystreet_to_fixmybarangay($) { + my $s = shift; + + $s =~ s/FixMyStreet/FixMyBarangay/g; + $s =~ s/\bcouncil\b/barangay/g; + $s =~ s/\bCouncil\b/Barangay/g; + $s =~ s/\bcouncils\b/barangays/g; + $s =~ s/\bCouncils\b/Barangays/g; + + return $s; +} + 1; |