aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/PoChange.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/PoChange.pm')
-rw-r--r--perllib/PoChange.pm26
1 files changed, 25 insertions, 1 deletions
diff --git a/perllib/PoChange.pm b/perllib/PoChange.pm
index deecd3b00..f26161889 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($) {
@@ -28,11 +41,22 @@ sub fixmystreet_to_reportemptyhomes($) {
$s =~ 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/;
$s =~ 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/;
$s =~ s/Local alerts/Get local reports/;
- $s =~ s/All reports/Reports/;
$s =~ s/Report an empty property/Report a property/;
$s =~ s/Help/FAQs/;
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;