2018-03-02 14:31 GMT+01:00 Ludovic Courtès <l...@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 <jul...@lepiller.eu> 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’t really see how translation works. 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 > >> 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’s what the ‘dist_’ prefix in > ‘dist_man1_MANS’ means, in doc/local.mk). Thus help2man is needed only > if you’re 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 <jul...@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/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’re missing bullets for each item here. :-) > > > +PO4A_PARAMS:=-M UTF-8 -L UTF-8 #master and localized encoding > > +PO4A_PARAMS+=-k 0 # produce an output even if the translation is not > complete > > +PO4A_PARAMS+=-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’m 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’. > >