From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor_Boskovits?= Subject: Re: [WIP]: localize guix.texi Date: Fri, 2 Mar 2018 16:57:31 +0100 Message-ID: References: <20180219233437.4d709181@lepiller.eu> <20180219234503.4091f68f@lepiller.eu> <87h8pyfvt8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1144b9dabbfa7305667008b8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ern3z-0002rK-B9 for guix-devel@gnu.org; Fri, 02 Mar 2018 10:57:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ern3y-0003Yu-16 for guix-devel@gnu.org; Fri, 02 Mar 2018 10:57:39 -0500 In-Reply-To: <87h8pyfvt8.fsf@gnu.org> 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: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: Guix-devel --001a1144b9dabbfa7305667008b8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2018-03-02 14:31 GMT+01:00 Ludovic Court=C3=A8s : > 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 tran= slators > 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_MISSI= NG_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, > MAINTAINERCLEANFILES): > > 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 > complete > > +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. > > Once this is in master I'm also willing to do this for my language. I'm waiting for the final style to settle. Thanks for the initiative! > Thank you! > > Ludo=E2=80=99. > > --001a1144b9dabbfa7305667008b8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
2018= -03-02 14:31 GMT+01:00 Ludovic Court=C3=A8s <ludo@gnu.org>:
=
Hi Julien,

Thanks a lot for taking this initiative.=C2=A0 To me localization is super<= br> important if we are to make free software a viable option for everyone.

Julien Lepiller <julien@lepiller.e= u> skribis:

>> here is my first attempt at localizing guix.texi. This patch adds<= br> >> 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 local= ized
>> manual.

From the patch I can=E2=80=99t really see how translation works.=C2= =A0 Do translators
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<= br> >> build the localized manuals in every available language. I don'= ;t
>> really like that though.

What about doing what we do for man pages?=C2=A0 We include generate= d 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).=C2=A0 Thus help2man is = needed only
if you=E2=80=99re building from a checkout.=C2=A0 Furthermore, we use AM_MI= SSING_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 <julien= @lepiller.eu>
> 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/l= ocal.mk (info_TEXINFOS, BUILT_SOURCES, EXTRA_DIST, MAINTAINERCLEANFILES= ):
> 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.=C2=A0 :-)

> +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 no= t complete
> +PO4A_PARAMS+=3D-f texinfo # texinfo format

Nitpick: leave spaces around assignment operators.

> +$(srcdir)/%D%/guix.%.texi: %D%/guix.texi po/doc/%.po
> +=C2=A0 =C2=A0 =C2=A0po4a-translate $(PO4A_PARAMS) -m $< -p $(word = 2,$^) -l $@.tmp
> +=C2=A0 =C2=A0 =C2=A0sed -i 's|guix\.info|guix.fr.info|' $@.tmp<= br> > +=C2=A0 =C2=A0 =C2=A0mv $@.tmp $@

[...]

> +$(srcdir)/po/doc/%.po: doc/guix.texi
> +=C2=A0 =C2=A0 =C2=A0po4a-updatepo -M UTF-8 -f texinfo -m $< -p $@<= br>
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: "$@", &qu= ot;$<", etc.

With these changes, I=E2=80=99m all for applying the patch to master.


Once this is in master I'm also wi= lling to do this for my language. I'm waiting for
the final s= tyle to settle. Thanks for the initiative!
=C2=A0
Thank you!

Ludo=E2=80=99.


--001a1144b9dabbfa7305667008b8--