[sword-svn] r238 - in trunk/source/data/translit/crosswire: . cldr
chrislit at crosswire.org
chrislit at crosswire.org
Fri Nov 8 22:58:04 MST 2013
Author: chrislit
Date: 2013-11-08 22:58:04 -0700 (Fri, 08 Nov 2013)
New Revision: 238
Modified:
trunk/source/data/translit/crosswire/cldr/cldr2icu.pl
trunk/source/data/translit/crosswire/icu2cldr.pl
Log:
refinements to ICU to/from CLDR XML converters
Modified: trunk/source/data/translit/crosswire/cldr/cldr2icu.pl
===================================================================
--- trunk/source/data/translit/crosswire/cldr/cldr2icu.pl 2013-11-08 09:08:47 UTC (rev 237)
+++ trunk/source/data/translit/crosswire/cldr/cldr2icu.pl 2013-11-09 05:58:04 UTC (rev 238)
@@ -14,9 +14,9 @@
open (OUTF, ">:encoding(UTF-8)", "../$file");
$file =~ /^(.+?)\_(.+?)(\_(.+?))?\./;
- $source = $1;
- $target = $2;
- $variant = $4;
+ my $source = $1;
+ my $target = $2;
+ my $variant = $4;
print "Creating $source-$target";
if ($variant ne "") {
@@ -27,10 +27,18 @@
print OUTF chr(0xFEFF);
- $doc = "#--------------------------------------------------------------------\n";
+ my $doc = "# ***************************************************************************\n";
+ $doc .= "# *\n";
+ $doc .= "# * Copyright (C) 2002-2013, CrossWire Bible Society\n";
+ $doc .= "# * All Rights Reserved.\n";
+ $doc .= "# *\n";
+ $doc .= "# ***************************************************************************\n";
+ $doc .= "# File: " . $file . "\n";
+ $doc .= "# Generated from CLDR \n";
+ $doc .= "#\n";
while (<INF>) {
- $line = $_;
+ my $line = $_;
$line =~ s/^\x{FEFF}//;
$line =~ s/[\t\r\n ]*$//;
$line =~ s/^[\t\r\n ]*//;
Modified: trunk/source/data/translit/crosswire/icu2cldr.pl
===================================================================
--- trunk/source/data/translit/crosswire/icu2cldr.pl 2013-11-08 09:08:47 UTC (rev 237)
+++ trunk/source/data/translit/crosswire/icu2cldr.pl 2013-11-09 05:58:04 UTC (rev 238)
@@ -50,12 +50,12 @@
$line = NFD($line);
if ($line =~ /^\#/) {
+ if ($barCount > 1) {
+ print OUTF " <comment>$line<\/comment>\n";
+ }
if ($line =~ /^#-------------------+/) {
$barCount += 1;
}
- if ($barCount > 1) {
- print OUTF " <comment>$line<\/comment>\n";
- }
}
else {
$line =~ s/\\u([0-9A-Fa-f]{1,6})/chr(hex($1))/eg;
More information about the sword-cvs
mailing list