1# en_GB.pl - Generate en_GB messages from en_US 2# Copyright (c) 2000, 2003 Kriang Lerdsuwanakij 3# email: lerdsuwa@users.sourceforge.net 4# 5# This program is free software; you can redistribute it and/or modify 6# it under the terms of the GNU General Public License as published by 7# the Free Software Foundation; either version 2 of the License, or 8# (at your option) any later version. 9# 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# GNU General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with this program; if not, write to the Free Software 17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 19 20print "# Automatically generated by en_GB.pl\n"; 21 22$translate = 0; 23while (<STDIN>) { 24 $line = $_; 25 $done = ""; 26 if ($line =~ /^\s*msgid/) { 27 $translate = 0; 28 } 29 elsif ($line =~ /^\s*msgstr/) { 30 $translate = 1; 31 } 32 33 if ($translate == 1 && $line !~ /^\#/) { 34 35 # English words 36 s/(c|C)olor/$1olour/g; 37 s/(p|P)rogram/$1rogramme/g; 38 39 s/(i|I)nitializ/$1nitialis/g; 40 s/(o|O)ptimiz/$1ptimis/g; 41 s/(r|R)ecogniz/$1ecognis/g; 42 s/(s|S)pecializ/$1pecialis/g; 43 44 # Date/time formats 45 s/\%b \%d, \%Y/\%d \%b \%Y/g; 46 s/\%b \%d/\%d \%b/g; 47 s/\%b \%e, \%Y/\%e \%b \%Y/g; 48 s/\%b \%e/\%e \%b/g; 49 50 $done = $_; 51 } 52 else { 53 $done = $_; 54 } 55 print $done; 56} 57