#! /usr/bin/perl -w use strict; use IO::File; my $locale = $ARGV[0]; my $long_name = `/home/weiv/src/icu/source/extra/colprobe/longname $locale`; print "Long name is $long_name\n"; my $pageTitle = $locale." collation"; my $filename = $locale.".html"; open TABLE, ">$filename"; print TABLE <<"EndOfTemplate";
Collation: $locale ($long_name) Demo, Cover Page, Locale Diffs Index, Collation Diffs Index
COMMON ("; if(-e $nameCommon) { print TABLE "xml "; } print TABLE "UCA) | \n"; my $dirLinux = "linuxcollations"; my $refLinux = $dirLinux."/".$locale.".utf8_default_raw.html"; my $rawLinux = $dirLinux."/".$locale.".utf8_raw.html"; my $defLinux = $dirLinux."/".$locale; my $nameLinux = "$dirLinux/$locale"."_collation.html"; my $colorLinux = "#1191F1"; print TABLE "LINUX"; if (!(-e $nameLinux)) { #try the variant that has @euro stuck in $nameLinux = "$dirLinux/$locale".'.utf8@euro_collation.html'; if(-e $nameLinux) { $refLinux = $dirLinux."/".$locale.'.utf8@euro_default_raw.html'; $rawLinux = $dirLinux."/".$locale.'.utf8@euro_raw.html'; } } if (-e $nameLinux) { print TABLE " (xml"; my $linuxBase = &getBaseLocale("$dirLinux/base", $locale); if($linuxBase ne "") { print TABLE " Base ($linuxBase)"; } print TABLE ")"; } print TABLE " | \n"; my $dirWin = "w2kcollations"; my $refWin = $dirWin."/".$locale."_default_raw.html"; my $rawWin = $dirWin."/".$locale."_raw.html"; my $nameWin = "$dirWin/$locale"."_collation.html"; my $colorWin = "#98FB98"; $loc = $locale; #try fallback for windows print TABLE "WINDOWS"; if(!(-e $nameWin)) { $locale =~ /_/; $loc = $`; $nameWin = "$dirWin/$loc"."_collation.html"; } print "Windows loc is $loc\n"; if (-e $nameWin) { print TABLE " (xml"; my $winBase = &getBaseLocale("$dirWin/base", $locale); if($winBase ne "") { print TABLE "base ($winBase)"; } print TABLE ")"; } print TABLE " | \n"; print TABLE "
---|---|---|