[sword-svn] r248 - in trunk/source/data/translit/crosswire: . cldr
chrislit at crosswire.org
chrislit at crosswire.org
Sun Nov 10 23:55:48 MST 2013
Author: chrislit
Date: 2013-11-10 23:55:48 -0700 (Sun, 10 Nov 2013)
New Revision: 248
Modified:
trunk/source/data/translit/crosswire/cldr/cldr2icu.pl
trunk/source/data/translit/crosswire/icu2cldr.pl
Log:
add newline between header when generating ICU format; remove when generating CLDR format
Modified: trunk/source/data/translit/crosswire/cldr/cldr2icu.pl
===================================================================
--- trunk/source/data/translit/crosswire/cldr/cldr2icu.pl 2013-11-11 06:55:39 UTC (rev 247)
+++ trunk/source/data/translit/crosswire/cldr/cldr2icu.pl 2013-11-11 06:55:48 UTC (rev 248)
@@ -34,7 +34,7 @@
$doc .= "# *\n";
$doc .= "# ***************************************************************************\n";
$doc .= "# File: " . $file . "\n";
- $doc .= "# Generated from CLDR\n";
+ $doc .= "# Generated from CLDR\n\n";
while (<INF>) {
my $line = $_;
Modified: trunk/source/data/translit/crosswire/icu2cldr.pl
===================================================================
--- trunk/source/data/translit/crosswire/icu2cldr.pl 2013-11-11 06:55:39 UTC (rev 247)
+++ trunk/source/data/translit/crosswire/icu2cldr.pl 2013-11-11 06:55:48 UTC (rev 248)
@@ -30,6 +30,8 @@
print OUTF ">\n";
print "\n";
+ my $delNextEmpty = 0;
+
while (<INF>) {
my $line = $_;
$line =~ s/^\x{FEFF}//;
@@ -49,7 +51,7 @@
if ($line =~ /^\#/) {
if ($line =~ /^\# \*/) {} #temporary; remove when CLDR data is in good shape
- elsif ($line =~ /^\# (File:|Generated from CLDR)/) {}
+ elsif ($line =~ /^\# (File:|Generated from CLDR)/) {$delNextEmpty = 1}
elsif ($line =~ /^\#[\s\-]*$/) {} #temporary; remove when CLDR data is in good shape
else {
print OUTF " <comment>$line<\/comment>\n";
@@ -61,7 +63,10 @@
}
}
else {
- print OUTF "\n";
+ if ($delNextEmpty == 0) {
+ print OUTF "\n";
+ }
+ $delNextEmpty = 0;
}
}
More information about the sword-cvs
mailing list