common: common Alert function to format error messages
[sheet.git] / latin.plp
index 406cfa3de8f6098da9d9323f8e885c085392de2d..529b334574d421c496842bef61a00da396238c60 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -43,18 +43,19 @@ or <span title="fuck yeah!">'mercan</span>) letters A–Z.
 Also see <a href="/writing">related alphabets</a>
 and <a href="/unicode">common chars</a>.</p>
 
 Also see <a href="/writing">related alphabets</a>
 and <a href="/unicode">common chars</a>.</p>
 
-<div class="-diinfo">
+<div>
 
 <:
 my @table = do 'writing-latn.inc.pl';
 if ($! or $@) {
 
 <:
 my @table = do 'writing-latn.inc.pl';
 if ($! or $@) {
-       printf "<p class=error>Table data not found: <em>%s</em>.</p>\n", $@ || $!;
+       Alert("Table data not found", $@ || $!);
 }
 else {
 }
 else {
-       print '<table class="glyphs">';
-       print ref $_ ne 'ARRAY' ? "<tr><th>$_" : map {/^<td/ ? $_ : "<td>$_"} @$_ for @table;
-       print "</table>\n\n";
+       say '<table class="glyphs">';
+       print ref $_ ne 'ARRAY' ? "<tr><th>$_\n" : map {/^<td/ ? $_ : "\t<td>$_\n"} @$_
+               for @table;
+       say "</table>\n";
 }
 
 }
 
-print "</div>\n";
+:></div>