word edit: translation shorthand slash for alternate names
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 16 Oct 2020 06:08:18 +0000 (08:08 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 20 Oct 2020 20:49:11 +0000 (22:49 +0200)
writer.plp

index 05e14659e3fb2769ec44d08a6776f675509e4978..ad46616fb348260530eed9f5f494900b57491cc1 100644 (file)
@@ -172,6 +172,7 @@ elsif (defined $post{form}) {{
                                prio  => undef,
                        );
                        $subrow{wptitle} = $1 if $subrow{form} =~ s/\h*\[(.*)\]$//; # [Link] shorthand
+                       $subrow{alt} = [split m{/}, $1] if $subrow{form} =~ s{/(\S.*)}{}; # /alternates shorthand
                        $db->insert(word => \%subrow);
                        delete $fields{$field};
                }