[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Suggestions for po.m4
From: |
Stepan Kasal |
Subject: |
Suggestions for po.m4 |
Date: |
Tue, 22 Feb 2005 15:12:47 +0100 |
User-agent: |
Mutt/1.4.1i |
Hello Bruno,
in po.m4 distributed with GNU gettext 0.14.1, I see the following:
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" |
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," |
sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
I'd say that the command could be cleaned up this way:
sed <"$ac_given_srcdir/$ac_dir/POTFILES.in" \
-e '/^#/d' -e '/^[ ]*$/d' -e "s,^, $top_srcdir/," |
sed -e '$!s/$/ \\/' >"$ac_dir/POTFILES"
My second suggestion concerns the "tags" used by intltool, see:
http://cvs.gnome.org/viewcvs/intltool/intltool.m4?rev=1.82&view=auto
The tags can either be at the beginning:
[type: xyz] src/file.c
or on a separate line:
[encoding: UTF-8]
Couldn't GNU gettext support this notation in POTFILES.in? It would mean
changing the command to:
sed <"$ac_given_srcdir/$ac_dir/POTFILES.in" \
-e '/^#/d' -e 's/^[[].*[]] *//' -e '/^[ ]*$/d' -e "s,^,
$top_srcdir/," |
sed -e '$!s/$/ \\/' >"$ac_dir/POTFILES"
Yes, I understand there is probably no direct application for this atm,
but it's a step towards compatibility with the Gnome tools, which could bring
some fruits later.
This change would introduce incompatibility for projects which use dirs or
files whose names start with '['. But they can be listed as
./[weird]/file.c
and I guess such names are not common.
What do you think?
Stepan
- Suggestions for po.m4,
Stepan Kasal <=