summaryrefslogtreecommitdiffstats
path: root/po/fake_c.pl
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2002-08-24 01:22:19 +0000
committerPablo Saratxaga <pablo@mandriva.com>2002-08-24 01:22:19 +0000
commit675c8475ee4b93d462e758d7e82e9941ed1f782e (patch)
tree25a8c9fa62dd5015507faa45605dec0908ef05be /po/fake_c.pl
parent295d031d89e99fd41f519bbea819eb83df07a480 (diff)
downloadurpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.tar
urpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.tar.gz
urpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.tar.bz2
urpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.tar.xz
urpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.zip
Changed remaining gettext("foo $bar") into _("foo %s", $bar)
Added russian man pages redo the way the *.pot file is created rebuild *.po files
Diffstat (limited to 'po/fake_c.pl')
-rwxr-xr-xpo/fake_c.pl22
1 files changed, 22 insertions, 0 deletions
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;
+ $_;
+}