aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/PoChange.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/PoChange.pm')
-rw-r--r--perllib/PoChange.pm25
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;