writing: script name outside of table include
[sheet.git] / latin.plp
index 24c74c61d7dc7e33ecd823d6a18c3c0aa90b283f..162a0b6d69e14cec796da85b9772a4b53af5b1f4 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -28,13 +28,21 @@ unless (exists $get{v}) {
        $glyphs->{digraph}--;
 }
 
+my %scriptname = (
+       latn     => 'Latin',
+       brai     => 'Braille',
+       morse    => 'Morse',
+);
+
 my @table = do 'writing-latn.inc.pl';
 if ($! or $@) {
        printf "<p>Table data not found: <em>%s</em>.</p>\n", $! || $@;
 }
 else {
-       my @az = map { @$_ } grep { ref $_ eq 'ARRAY' } @table;
-       print $glyphs->table(exists $get{uc} ? [map {s/\s.//; uc} @az] : \@az);
+       print $glyphs->table([map {
+               ref $_ ne 'ARRAY' ? ".>$scriptname{$_}"
+                       : exists $get{uc} ? map {uc} @$_ : @$_
+       } @table]);
 }
 
 print "</div>\n";