[PATCH xrandr 1/3] po4a: handle translated xrandr(1) manpage #37612
Gaetan Nadon
memsize at videotron.ca
Sat May 28 04:27:03 PDT 2011
On Sat, 2011-05-28 at 05:34 -0400, David Prévot wrote:
> Le 27/05/2011 20:28, Gaetan Nadon a écrit :
> > On Fri, 2011-05-27 at 08:24 -0700, Alan Coopersmith wrote:
> >
> >> It seems to be a reasonable approach, my main concern is that
> >> nothing is broken if either the packager or builder doesn't
> >> have it installed.
>
> A safe approach would be to take care of this at dist time, so the
> xrandr.fr.man file could be distributed, without forcing po4a to be
> executed at build time (so the problem would only need to be addressed
> in the packager).
>
I see no issues in creating the translated pages in the regular build.
There are no dedicated build person, so the makefiles have to be simple
and maintainable by any developer. Building during "make dist" is an
order of magnitude more complex and brittle. Developers are invited to
run distcheck on a regular basis to detect problems, so it would not be
any "safer". There is no contradiction here, different groups have
different work habits.
> I wonder if there is a proper way to detect if the po4a command exists,
> and skip this part of the packaging if not. If so, the translation could
Yes, a macro in util-macros can be written to detect the presence of
po4a and skip
the translation if missing. Something like XORG_WITH_XMLTO. We do it all
the time
for the documentation. A message a autoconf time will inform user.
> be part of the same man directory: man/xrandr.man would always be
> distributed, and man/xrandr.fr.man too if it is provided (and lots of
> man/xrandr.*.man in other languages in a near future ;-).
>
> At build time, man/xrandr.1 is created from man/xrandr.man, and
> man/xrandr.*.1 could be created from man/xrandr.*.man if they exist,
> then installed in their proper /usr/share/man/*/man1/ directories the
> same way man/xrandr.1 is installed in /usr/share/man/man1/.
>
> As po4a config doesn't need editing to take care of a new translation,
> if the build process is able to handle man/xrandr.*.man only if it
> exists, the building or packaging shouldn't be broken if there are no
> man/xrandr.*.man files (e.g. if po4a was not present and thus not able
> to build it).
> A safe build process like this would offer the ability to prepare the
> translation handling in other apps, without braking it if there are no
> translations yet, and without further headache to add a new translation
> (only dropping *.po files in man/po4a/po/ would do the trick).
>
You may be accustomed to a centralized "one piece" build process. X.Org
packages are all 100% independent and the build process is "./configure
&& make install". Whatever infrastructure needs to be done in a package,
it needs to be done in all the packages. This is FYI, not to argue that
translation should not be done :-)
> > Unless I misread, po4a uses gettext which isn't initialized in any of
> > the X.Org modules. This may come as a surprise for those who have been
> > routinely working on translation for years.
>
> I'd guess that's why some distributions began to ship their own manpages
> translation at the beginning, but the idea would be to share those pages
> for everyone now they exist.
>
I am not sure I get the answer, are you saying po4a does not invoke
gettext? That would make things simpler.
> > If this man page is the only
> > translatable item we will ever add, then ...
>
> Debian already ships up to date French translation of the following
> manpages:
>
> showrgb.1 xmodmap.1 xrandr.1 xsetmode.1 xsetpointer.1 xvidtune.1
>
> If it's going to be include upstream, I'm pretty sure we would be able
> to provide the French translation of (at least) the following ones
> (either within Debian, or within the FSF team):
>
> iceauth.1 xgamma.1 xrdb.1 xset.1 xstdcmap.1 sessreg.1
> xcmsdb.1 xhost.1 xrefresh.1 xsetroot.1
>
Assuming the translations are moved "upstream" (which is obviously the
right thing to do), would that result in other distros to adopt them
(MAC. Solaris, Fedora, BSD's) or would there be some hurdle for them to
do so? Perhaps po4a availability or what not. It would be sad to do the
work and have it used by Debian only.
There is also the question of on-going maintenance on both the
translated files and the build work. There would be no one appointed to
do so in X.Org. That's why I am always insisting on doing complete, well
tested, bullet proof and simple-to-maintain-by-anybody implementations
right from the get go.
> Once the structure exists, we would be able to contact team of other
> languages team too.
>
> If we manage to prepare a proper structure to include xrandr.1, I'd be
> please to propose the patches for the other pages.
> Regards
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110528/f571d8c4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110528/f571d8c4/attachment.pgp>
More information about the xorg-devel
mailing list