From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [WIP]: localize guix.texi Date: Fri, 02 Mar 2018 14:31:31 +0100 Message-ID: <87h8pyfvt8.fsf@gnu.org> References: <20180219233437.4d709181@lepiller.eu> <20180219234503.4091f68f@lepiller.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erkmh-00067E-PS for guix-devel@gnu.org; Fri, 02 Mar 2018 08:31:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erkme-0001Ax-5a for guix-devel@gnu.org; Fri, 02 Mar 2018 08:31:39 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:53434) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erkmd-0001AP-UM for guix-devel@gnu.org; Fri, 02 Mar 2018 08:31:36 -0500 In-Reply-To: <20180219234503.4091f68f@lepiller.eu> (Julien Lepiller's message of "Mon, 19 Feb 2018 23:45:03 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Julien Lepiller Cc: guix-devel@gnu.org Hi Julien, Thanks a lot for taking this initiative. To me localization is super important if we are to make free software a viable option for everyone. Julien Lepiller skribis: >> here is my first attempt at localizing guix.texi. This patch adds >> guix.fr.texi, a localized version of the manual. It uses po4a to >> generate the .po file and use that same file to generate the localized >> manual. >From the patch I can=E2=80=99t really see how translation works. Do transl= ators get a list of msgids to translate? >> I had to include the guix.fr.texi in the commit because it is >> necessary that it exists in order to add it to info_TEXINFOS. This >> means that this version of guix now requires po4a and will always >> build the localized manuals in every available language. I don't >> really like that though. What about doing what we do for man pages? We include generated man pages in the distributed tarball (that=E2=80=99s what the =E2=80=98dist_=E2= =80=99 prefix in =E2=80=98dist_man1_MANS=E2=80=99 means, in doc/local.mk). Thus help2man is= needed only if you=E2=80=99re building from a checkout. Furthermore, we use AM_MISSING= _PROG so that users get a helpful message if they end up in a situation where they would need help2man. > From 7443ce7407a7194a9d9487f95f940b4b9adf5d82 Mon Sep 17 00:00:00 2001 > From: Julien Lepiller > Date: Mon, 19 Feb 2018 23:24:30 +0100 > Subject: [PATCH] doc: Allow documentation to be translated. > > po/doc/local.mk: New file. > Makefile.am: Include it. > doc/local.mk (info_TEXINFOS, BUILT_SOURCES, EXTRA_DIST, MAINTAINERCLEANFI= LES): > Add guix.fr.texi > (rules): New rule to build localized texi files > .gitignore: Ignore doc/version.*.texi You=E2=80=99re missing bullets for each item here. :-) > +PO4A_PARAMS:=3D-M UTF-8 -L UTF-8 #master and localized encoding > +PO4A_PARAMS+=3D-k 0 # produce an output even if the translation is not c= omplete > +PO4A_PARAMS+=3D-f texinfo # texinfo format Nitpick: leave spaces around assignment operators. > +$(srcdir)/%D%/guix.%.texi: %D%/guix.texi po/doc/%.po > + po4a-translate $(PO4A_PARAMS) -m $< -p $(word 2,$^) -l $@.tmp > + sed -i 's|guix\.info|guix.fr.info|' $@.tmp > + mv $@.tmp $@ [...] > +$(srcdir)/po/doc/%.po: doc/guix.texi > + po4a-updatepo -M UTF-8 -f texinfo -m $< -p $@ If you use AM_MISSING_PROG, then you can use $(PO4A_TRANSLATE) and $(PO4A_UPDATEPO) instead of directly using the program names here. Last thing: please enclose file names in double quotes: "$@", "$<", etc. With these changes, I=E2=80=99m all for applying the patch to master. Thank you! Ludo=E2=80=99.