From de239fcc678296e2b820d4753b62b7841bcd085b Mon Sep 17 00:00:00 2001 From: Pablo Saratxaga Date: Mon, 26 Aug 2002 08:57:49 +0000 Subject: Changed the way the pot file is built --- po/fake_c.pl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 po/fake_c.pl (limited to 'po/fake_c.pl') diff --git a/po/fake_c.pl b/po/fake_c.pl new file mode 100755 index 00000000..21cf25b0 --- /dev/null +++ b/po/fake_c.pl @@ -0,0 +1,22 @@ +#!/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; + $_; +} -- cgit v1.2.1