
On Thu, Apr 28, 2005 at 09:45:43PM -0700, Bryce Harrington wrote:
Btw, another file that could benefit from translation is the man page. This is the inkscape.pod file, that gets converted into a man page by the installation system. You can see the syntax of the pod file is very simple. I don't know how man page translations are handled but perhaps someone could research that. It's handled via our install system so I'm sure there's probably a couple ways it could be added in.
The correct destination directory for fr_FR is is either ${mandir}/fr/man1 or ${mandir}/fr_FR/man1 (man looks in both directories). (Presumably we'd use `fr' but `es_MX' etc.)
Automake documentation claims that it chooses the right directory based on extension, but I don't know whether it handles language extensions correctly. I've just had a look at /usr/share/automake-1.8/am/mans.am, and it seems language extensions aren't handled.
So try the following in the top-level Makefile.am:
EXTRA_DIST = ... inkscape.fr.pod inkscape.fr.1 ...
install-data-local: $(mkinstalldirs) $(DESTDIR)$(mandir)/fr/man1 $(INSTALL_DATA) $(srcdir)/inkscape.fr.1 $(DESTDIR)$(mandir)/fr/man1/inkscape.1
(We choose to include the automatically-generated inkscape.fr.1 in the tarball so that users don't need to have perl to be able to read the manpage.)
Using the name inkscape.LANG.pod rather than inkscape.pod.LANG (and similarly for .1) makes it easier to write the rule for converting from pod to roff, and may also help text editors, file managers etc. to get the file type right -- especially for language codes like `pl'.
For converting inkscape.fr.pod to inkscape.fr.1: I suggest changing our existing rule to:
SUFFIXES = .pod .1
inkscape.1 inkscape.fr.1 inkscape.it.1: fix-roff-punct Makefile.am .pod.1: set -e; \ d=`sed -n 's,/,-,g;s,.*$$[D]ate: (..........).*,\1,p' $<`; \ pod2man $< \ | sed 's/^.TH .*/.TH INKSCAPE 1 "'"$$d"'" "Inkscape-$(VERSION)" "Inkscape"/' \ | perl -pe 'if (/^[% .*INCLUDE.*AUTHORS.* %]/) { open(FOO, "$(srcdir)/AUTHORS");$$_ = join(",\n", map { chomp; $$_ } <FOO>) . "\n"; }' \ | perl $(srcdir)/fix-roff-punct \ > tmp.$$$$ \ && mv tmp.$$$$ $@
(Some syntax notes: .IN.OUT rules can't list dependencies on the `.IN.OUT:' line (*see (make) Suffix Rules), but OTOH they're allowed to use the variables $< and $@ without requiring Gnu make. The `SUFFIXES = ...' line is documented in *see (automake-1)Suffixes.)
The above changes the existing "User Commands" title to the language-neutral "Inkscape". (A common alternative is to leave it blank.)
pjrm.