word/edit: chinese language (and pinyin transliteration)
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 11 Jul 2021 03:32:51 +0000 (05:32 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 21 Jul 2021 01:42:52 +0000 (03:42 +0200)
Propose <pronunciation> syntax to append alternate scripts in multiple
columns.

writer.plp

index 39a373bdc1f9dd7207d02370980753662522f012..6177fcd2d8cf1be026112f7d1a1a4e80ba83ebcc 100644 (file)
@@ -72,6 +72,7 @@ my %lang = (
        en => ["\N{REGIONAL INDICATOR SYMBOL LETTER G}\N{REGIONAL INDICATOR SYMBOL LETTER B}", 'english'],
        eo => ['<span style="color:green">★</span>', 'esperanto'],
        ru => ["\N{REGIONAL INDICATOR SYMBOL LETTER R}\N{REGIONAL INDICATOR SYMBOL LETTER U}", 'русский'],
+       zh => ["\N{REGIONAL INDICATOR SYMBOL LETTER C}\N{REGIONAL INDICATOR SYMBOL LETTER N}", '中文'],
        la => ["\N{PUSHPIN}", 'latin'],
 );
 my @wordcols = pairkeys
@@ -390,7 +391,7 @@ my $parents = $db->select(word => '*', [{id => $row->{cat}}, {id => $row->{ref}}
 while (my $ref = $parents->hash) {
        printf '<li><a href="/writer/%d">%s</a></li>', $ref->{id}, Entity($ref->{form});
 }
-say "<li><strong>$row->{form}</strong></li>";
+say "<li><strong>$_</strong></li>" for Entity($row->{form});
 my $children = $db->select(word => '*', {cat => $row->{id}, ref => undef}, 'grade, id');
 while (my $ref = $children->hash) {
        printf '<li><a href="/writer/%d">%s</a></li>', $ref->{id}, Entity($ref->{form});