#!/usr/bin/perl -lp
s|^(__?\()| $1|; # add a blank at the beginning (?!)
s|_\(\[(.*),\s*(.*),\s*(.*)\]|ngettext($2,$3,$1)|; # special plural form handling
s,\Qs/#.*//,,; # ugly special case
s,(^|[^\$])#([^+].*),"$1/*" . simpl($2) . "*/",e;
# rewrite comments to C format except for:
# - ``#+ xxx'' comments which are kept
# - ``$#xxx'' which are not comments
s|//|/""/|g; # ensure // or not understood as comments
s|$|\\n\\|; # multi-line strings not handled in C
sub simpl {
local $_ = $_[0];
s,\*/,,g;
$_;
}
repository'/>
blob: 025feae2db7bfdc5755b3d957ea702bfa09cf045 (
plain)