diff options
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyBarangay.pm | 2 | ||||
-rw-r--r-- | perllib/PoChange.pm | 23 |
2 files changed, 25 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm index 9c102872f..e2a8e9f87 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm @@ -16,6 +16,8 @@ sub country { return 'PH'; } +sub language_domain { 'FixMyBarangay' } + sub area_types { return [ 'BGY' ]; } diff --git a/perllib/PoChange.pm b/perllib/PoChange.pm index deecd3b00..9bf18ae27 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,14 @@ 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; + + return $s; +} + 1; |