On Tue, Jan 20, 2004 at 02:14:51AM -0500, Joey Hess wrote:
[...]
> 2. Add the strings from the regionmap to the po files.
>    Until this is done, they are not translated, and so po-debconf
>    does not translate the choices lists at all.
>
> I can do 1. (eventually), but don't know how to deal with 2.

To add strings to the PO files, you can mark these strings as if
regionmap was a C file, ie
    ML      gettext("Africa")
    AO      gettext("Africa")
    ...
Then add
    ../regionmap
to debian/po/POTFILES.in and run debconf-updatepo, these strings are now
written into PO files.
Here is a patch and an updated regionmap file.

Denis
Index: countrylist
===================================================================
RCS file: /cvsroot/d-i/debian-installer/tools/countrychooser/countrylist,v
retrieving revision 1.1
diff -u -r1.1 countrylist
--- countrylist 20 Jan 2004 07:07:07 -0000      1.1
+++ countrylist 20 Jan 2004 22:01:12 -0000
@@ -22,6 +22,7 @@
 while (<R>) {
        chomp;
        my ($code, $region) = split(' ', $_, 2);
+       $region =~ s/gettext\("(.*)"\)/$1/;
        if (exists $code2country{$code}) {
                push @{$regions{$region}}, $code2country{$code};
                $codes_listed{$code}++;
@@ -35,7 +36,7 @@
 # Add any unlisted countries to "other".
 foreach my $code (keys %codes_listed) {
        if ($codes_listed{$code} == 0) {
-               push @{$regions{unknown}}, $code2country{$code};
+               push @{$regions{other}}, $code2country{$code};
                print STDERR "unknown region for country $code, not in $regionmap\n";
        }
 }
Index: mktemplates
===================================================================
RCS file: /cvsroot/d-i/debian-installer/tools/countrychooser/mktemplates,v
retrieving revision 1.6
diff -u -r1.6 mktemplates
--- mktemplates 20 Jan 2004 07:07:07 -0000      1.6
+++ mktemplates 20 Jan 2004 22:01:12 -0000
@@ -42,6 +42,7 @@
 # Create the appropriate POTFILES.in file there
 cat >debian/pobuild/POTFILES.in <<EOF
 [type: gettext/rfc822deb] templates.tmp
+../regionmap
 EOF
 
 # Create the appropriate output file also
Index: debian/po/POTFILES.in
===================================================================
RCS file: /cvsroot/d-i/debian-installer/tools/countrychooser/debian/po/POTFILES.in,v
retrieving revision 1.1
diff -u -r1.1 POTFILES.in
--- debian/po/POTFILES.in       15 Jan 2004 15:44:55 -0000      1.1
+++ debian/po/POTFILES.in       20 Jan 2004 22:01:12 -0000
@@ -1 +1,2 @@
 [type: gettext/rfc822deb] templates-in
+../regionmap
ML      gettext("Africa")
AO      gettext("Africa")
BF      gettext("Africa")
BI      gettext("Africa")
BJ      gettext("Africa")
BW      gettext("Africa")
CD      gettext("Africa")
CF      gettext("Africa")
CG      gettext("Africa")
CI      gettext("Africa")
CM      gettext("Africa")
CV      gettext("Africa")
DJ      gettext("Africa")
DZ      gettext("Africa")
EG      gettext("Africa")
EG      gettext("Africa")
EH      gettext("Africa")
ER      gettext("Africa")
ET      gettext("Africa")
GA      gettext("Africa")
GH      gettext("Africa")
GM      gettext("Africa")
GN      gettext("Africa")
GQ      gettext("Africa")
GW      gettext("Africa")
KE      gettext("Africa")
LR      gettext("Africa")
LS      gettext("Africa")
LY      gettext("Africa")
MA      gettext("Africa")
MU      gettext("Africa")
MW      gettext("Africa")
MZ      gettext("Africa")
NA      gettext("Africa")
NE      gettext("Africa")
NG      gettext("Africa")
RW      gettext("Africa")
SD      gettext("Africa")
SH      gettext("Africa")
SL      gettext("Africa")
SN      gettext("Africa")
SO      gettext("Africa")
ST      gettext("Africa")
SZ      gettext("Africa")
TD      gettext("Africa")
TG      gettext("Africa")
TN      gettext("Africa")
TZ      gettext("Africa")
UG      gettext("Africa")
ZA      gettext("Africa")
ZM      gettext("Africa")
ZW      gettext("Africa")
AQ      gettext("Antarctica")
GS      gettext("Antarctica")
TF      gettext("Antarctica")
AE      gettext("Asia")
AF      gettext("Asia")
BD      gettext("Asia")
BH      gettext("Asia")
BN      gettext("Asia")
BT      gettext("Asia")
CN      gettext("Asia")
HK      gettext("Asia")
ID      gettext("Asia")
IL      gettext("Asia")
IN      gettext("Asia")
IQ      gettext("Asia")
IR      gettext("Asia")
JO      gettext("Asia")
JP      gettext("Asia")
KG      gettext("Asia")
KH      gettext("Asia")
KP      gettext("Asia")
KR      gettext("Asia")
KW      gettext("Asia")
KZ      gettext("Asia")
LA      gettext("Asia")
LB      gettext("Asia")
LK      gettext("Asia")
MM      gettext("Asia")
MN      gettext("Asia")
MO      gettext("Asia")
MY      gettext("Asia")
NP      gettext("Asia")
OM      gettext("Asia")
PH      gettext("Asia")
PK      gettext("Asia")
PS      gettext("Asia")
QA      gettext("Asia")
SA      gettext("Asia")
SG      gettext("Asia")
SY      gettext("Asia")
TH      gettext("Asia")
TJ      gettext("Asia")
TM      gettext("Asia")
TR      gettext("Asia")
TW      gettext("Asia")
UZ      gettext("Asia")
VN      gettext("Asia")
YE      gettext("Asia")
AG      gettext("Central America")
AI      gettext("Central America")
AN      gettext("Central America")
BB      gettext("Central America")
BM      gettext("Central America")
BS      gettext("Central America")
BZ      gettext("Central America")
CR      gettext("Central America")
CU      gettext("Central America")
DM      gettext("Central America")
DO      gettext("Central America")
GD      gettext("Central America")
GP      gettext("Central America")
GT      gettext("Central America")
HN      gettext("Central America")
HT      gettext("Central America")
JM      gettext("Central America")
KN      gettext("Central America")
LC      gettext("Central America")
MQ      gettext("Central America")
MS      gettext("Central America")
NI      gettext("Central America")
PA      gettext("Central America")
PR      gettext("Central America")
SV      gettext("Central America")
TT      gettext("Central America")
VC      gettext("Central America")
AD      gettext("Europe")
AL      gettext("Europe")
AM      gettext("Europe")
AT      gettext("Europe")
AZ      gettext("Europe")
BA      gettext("Europe")
BE      gettext("Europe")
BG      gettext("Europe")
BY      gettext("Europe")
CH      gettext("Europe")
CY      gettext("Europe")
CZ      gettext("Europe")
DE      gettext("Europe")
DK      gettext("Europe")
EE      gettext("Europe")
ES      gettext("Europe")
FI      gettext("Europe")
FO      gettext("Europe")
FR      gettext("Europe")
GB      gettext("Europe")
GE      gettext("Europe")
GI      gettext("Europe")
GL      gettext("Europe")
GR      gettext("Europe")
HR      gettext("Europe")
HU      gettext("Europe")
IE      gettext("Europe")
IS      gettext("Europe")
IT      gettext("Europe")
LI      gettext("Europe")
LT      gettext("Europe")
LU      gettext("Europe")
LV      gettext("Europe")
MC      gettext("Europe")
MD      gettext("Europe")
MK      gettext("Europe")
MT      gettext("Europe")
NL      gettext("Europe")
NO      gettext("Europe")
PL      gettext("Europe")
PT      gettext("Europe")
RO      gettext("Europe")
RU      gettext("Europe")
SE      gettext("Europe")
SI      gettext("Europe")
SJ      gettext("Europe")
SK      gettext("Europe")
SM      gettext("Europe")
UA      gettext("Europe")
VA      gettext("Europe")
YU      gettext("Europe")
IO      gettext("Indian Ocean")
KM      gettext("Indian Ocean")
MG      gettext("Indian Ocean")
MR      gettext("Indian Ocean")
MV      gettext("Indian Ocean")
RE      gettext("Indian Ocean")
SC      gettext("Indian Ocean")
YT      gettext("Indian Ocean")
CA      gettext("North America")
MX      gettext("North America")
PM      gettext("North America")
US      gettext("North America")
AS      gettext("Oceania")
AU      gettext("Oceania")
CK      gettext("Oceania")
FJ      gettext("Oceania")
FM      gettext("Oceania")
GU      gettext("Oceania")
KI      gettext("Oceania")
KY      gettext("Oceania")
MH      gettext("Oceania")
MP      gettext("Oceania")
NC      gettext("Oceania")
NR      gettext("Oceania")
NU      gettext("Oceania")
NZ      gettext("Oceania")
PF      gettext("Oceania")
PG      gettext("Oceania")
PN      gettext("Oceania")
SB      gettext("Oceania")
TL      gettext("Oceania")
TO      gettext("Oceania")
TV      gettext("Oceania")
VG      gettext("Oceania")
VI      gettext("Oceania")
VU      gettext("Oceania")
WF      gettext("Oceania")
WS      gettext("Oceania")
AR      gettext("South America")
BO      gettext("South America")
BR      gettext("South America")
CL      gettext("South America")
CO      gettext("South America")
EC      gettext("South America")
FK      gettext("South America")
GF      gettext("South America")
GY      gettext("South America")
PE      gettext("South America")
PY      gettext("South America")
SR      gettext("South America")
UY      gettext("South America")
VE      gettext("South America")
unlisted        gettext("other")

Reply via email to