From owner-svn-src-user@FreeBSD.ORG Thu Aug 6 09:04:21 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C7BD1065672; Thu, 6 Aug 2009 09:04:20 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C8478FC0A; Thu, 6 Aug 2009 09:04:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7694Kd2049150; Thu, 6 Aug 2009 09:04:20 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7694KW0049148; Thu, 6 Aug 2009 09:04:20 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200908060904.n7694KW0049148@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 6 Aug 2009 09:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196080 - user/edwin/locale/tools X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2009 09:04:21 -0000 Author: edwin Date: Thu Aug 6 09:04:19 2009 New Revision: 196080 URL: http://svn.freebsd.org/changeset/base/196080 Log: Be able to link (old/obsolete/duplicate) encodings Modified: user/edwin/locale/tools/charmaps.pm user/edwin/locale/tools/charmaps.xml user/edwin/locale/tools/cldr2def.pl Modified: user/edwin/locale/tools/charmaps.pm ============================================================================== --- user/edwin/locale/tools/charmaps.pm Thu Aug 6 08:55:54 2009 (r196079) +++ user/edwin/locale/tools/charmaps.pm Thu Aug 6 09:04:19 2009 (r196080) @@ -52,11 +52,13 @@ sub h_start { my $encoding = $attrs{encoding}; my $family = $attrs{family}; my $f = defined $attrs{family} ? $attrs{family} : "x"; - my $link = $attrs{link}; + my $nc_link = $attrs{namecountry_link}; + my $e_link = $attrs{encoding_link}; my $fallback = $attrs{fallback}; $d{L}{$name}{$f}{fallback} = $fallback; - $d{L}{$name}{$f}{link} = $link; + $d{L}{$name}{$f}{e_link} = $e_link; + $d{L}{$name}{$f}{nc_link} = $nc_link; $d{L}{$name}{$f}{family} = $family; $d{L}{$name}{$f}{encoding} = $encoding; $d{L}{$name}{$f}{countries} = $countries; Modified: user/edwin/locale/tools/charmaps.xml ============================================================================== --- user/edwin/locale/tools/charmaps.xml Thu Aug 6 08:55:54 2009 (r196079) +++ user/edwin/locale/tools/charmaps.xml Thu Aug 6 09:04:19 2009 (r196080) @@ -6,8 +6,10 @@ encoding = encodings to be done - seperated by space countries = countries to create - seperated by space family = which font family - only one - link = only with family, create this original file too - \ - only one + countryname_link = only with family, link this original file \ + too - only one + encoding_link = link this original encoding too - seperated \ + by space fallback = read this file if name_countries doesn't exist - \ only one @@ -91,16 +93,17 @@ encoding="ISO8859-1 ISO8859-15" countries="CH IT" /> Modified: user/edwin/locale/tools/cldr2def.pl ============================================================================== --- user/edwin/locale/tools/cldr2def.pl Thu Aug 6 08:55:54 2009 (r196079) +++ user/edwin/locale/tools/cldr2def.pl Thu Aug 6 09:04:19 2009 (r196080) @@ -642,15 +642,23 @@ EOF print FOUT "LOCALES+=\t$file.$e\n"; } - if (defined $languages{$l}{$f}{link}) { + if (defined $languages{$l}{$f}{nc_link}) { foreach my $e (sort keys(%{$languages{$l}{$f}{data}{$c}})) { my $file = $l . "_"; $file .= $f . "_" if ($f ne "x"); $file .= $c; - print FOUT "SAME+=\t\t$file.$e:$languages{$l}{$f}{link}.$e\t# legacy\n"; - + print FOUT "SAME+=\t\t$file.$e:$languages{$l}{$f}{nc_link}.$e\t# legacy (lang/country change)\n"; + } + } + + if (defined $languages{$l}{$f}{e_link}) { + foreach my $el (split(" ", $languages{$l}{$f}{e_link})) { + my @a = split(/:/, $el); + my $file = $l . "_"; + $file .= $f . "_" if ($f ne "x"); + $file .= $c; + print FOUT "SAME+=\t\t$file.$a[0]:$file.$a[1]\t# legacy (same charset)\n"; } - } }