Re: [PATCH 1/3] gnu: doc: Alloc documentation to be translated.

2018-03-31 Thread Ludovic Courtès
Hi Julien,

Julien Lepiller  skribis:

> Le Mon, 05 Mar 2018 10:10:19 +0100,
> l...@gnu.org (Ludovic Courtès) a écrit :

[...]

>> For good measure, please check whether “make distcheck” doesn’t show
>> any regression (I haven’t checked in recent master though, it could
>> be that there are currently unrelated issues.)
>> 
>> Thanks,
>> Ludo’.
>
> Here is a newer version of the patches. I "fixed" the issue with
> translated references, but a change in the English manual will still
> create a change in the translated manuals and po files.
>
> I tried to run make distcheck, but even on master, I get this error
> message:
>
> make[2]: ***  Aucune règle pour fabriquer la cible « bin/guix.in »,
> nécessaire pour « distdir-am ». Arrêt.

Fixed in c92e5612996e98cde005a572b83fc66aae32bcd7.

Could you try again and commit if it works?

Thanks,
Ludo’.



Re: [PATCH 1/3] gnu: doc: Alloc documentation to be translated.

2018-03-28 Thread Julien Lepiller
Le Mon, 05 Mar 2018 10:10:19 +0100,
l...@gnu.org (Ludovic Courtès) a écrit :

> Julien Lepiller <jul...@lepiller.eu> skribis:
> 
> > * po/doc/local.mk: New file.
> > * Makefile.am: Include it. Add silent rules for po4a.
> > * configure.ac: Look for po4a-translate and po4a-updatepo.
> > * doc/local.mk: Add rules to generate gettext files.
> > (TRANSLATED_INFO): New variable.
> > (BUILT_SOURCES, EXTRA_DIST, MAINTAINERCLEANFILES): Add it.
> > * .gitignore: Add generated files.  
> 
> LGTM!
> 
> For good measure, please check whether “make distcheck” doesn’t show
> any regression (I haven’t checked in recent master though, it could
> be that there are currently unrelated issues.)
> 
> Thanks,
> Ludo’.

Here is a newer version of the patches. I "fixed" the issue with
translated references, but a change in the English manual will still
create a change in the translated manuals and po files.

I tried to run make distcheck, but even on master, I get this error
message:

make[2]: ***  Aucune règle pour fabriquer la cible « bin/guix.in »,
nécessaire pour « distdir-am ». Arrêt.
From bbad37ae7ca918c894f4aa4d46f6694991a97f29 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <jul...@lepiller.eu>
Date: Fri, 2 Mar 2018 23:05:28 +0100
Subject: [PATCH 1/3] gnu: doc: Alloc documentation to be translated.

* po/doc/local.mk: New file.
* Makefile.am: Include it. Add silent rules for po4a.
* configure.ac: Look for po4a-translate and po4a-updatepo.
* doc/local.mk: Add rules to generate gettext files.
(TRANSLATED_INFO): New variable.
(BUILT_SOURCES, EXTRA_DIST, MAINTAINERCLEANFILES): Add it.
* .gitignore: Add generated files.
---
 .gitignore  | 17 +
 Makefile.am |  8 +++-
 configure.ac|  4 
 doc/local.mk| 48 +---
 po/doc/local.mk | 27 +++
 5 files changed, 100 insertions(+), 4 deletions(-)
 create mode 100644 po/doc/local.mk

diff --git a/.gitignore b/.gitignore
index 4a110fb1f..38a55a3b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,21 @@
 /configure
 /doc/*.1
 /doc/.dirstamp
+/doc/guix.*.aux
+/doc/guix.*.cp
+/doc/guix.*.cps
+/doc/guix.*.fn
+/doc/guix.*.fns
+/doc/guix.*.html
+/doc/guix.*.info
+/doc/guix.*.info-[0-9]
+/doc/guix.*.ky
+/doc/guix.*.pg
+/doc/guix.*.toc
+/doc/guix.*.t2p
+/doc/guix.*.tp
+/doc/guix.*.vr
+/doc/guix.*.vrs
 /doc/guix.aux
 /doc/guix.cp
 /doc/guix.cps
@@ -47,6 +62,7 @@
 /doc/os-config-desktop.texi
 /doc/stamp-vti
 /doc/version.texi
+/doc/version-*.texi
 /etc/guix-daemon.cil
 /etc/guix-daemon.conf
 /etc/guix-daemon.service
@@ -79,6 +95,7 @@
 /nix/scripts/list-runtime-roots
 /nix/scripts/offload
 /nix/scripts/substitute
+/po/doc/*.mo
 /po/guix/*.gmo
 /po/guix/*.insert-header
 /po/guix/*.mo
diff --git a/Makefile.am b/Makefile.am
index feb99490d..36f5856b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,6 +10,7 @@
 # Copyright © 2017 Jan Nieuwenhuizen <jann...@gnu.org>
 # Copyright © 2017 Arun Isaac <arunis...@systemreboot.net>
 # Copyright © 2018 Nils Gillmann <n...@n0.is>
+# Copyright © 2018 Julien Lepiller <jul...@lepiller.eu>
 #
 # This file is part of GNU Guix.
 #
@@ -51,6 +52,7 @@ MODULES_NOT_COMPILED =\
   guix/man-db.scm
 
 include gnu/local.mk
+include po/doc/local.mk
 
 MODULES =	\
   guix/base16.scm\
@@ -452,7 +454,7 @@ dist_fishcompletion_DATA = etc/completion/fish/guix.fish
 # SELinux policy
 dist_selinux_policy_DATA = etc/guix-daemon.cil
 
-EXTRA_DIST =		\
+EXTRA_DIST +=		\
   HACKING		\
   ROADMAP		\
   TODO			\
@@ -779,3 +781,7 @@ AM_V_DOT_0 = @echo "  DOT " $@;
 AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
 AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
 AM_V_HELP2MAN_0 = @echo "  HELP2MAN" $@;
+
+AM_V_PO4A = $(AM_V_PO4A_$(V))
+AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY))
+AM_V_PO4A_0 = @echo "  PO4A" $@;
diff --git a/configure.ac b/configure.ac
index 5872a8482..557da6318 100644
--- a/configure.ac
+++ b/configure.ac
@@ -263,6 +263,10 @@ AM_MISSING_PROG([DOT], [dot])
 dnl Manual pages.
 AM_MISSING_PROG([HELP2MAN], [help2man])
 
+dnl Documentation translation.
+AM_MISSING_PROG([PO4A_TRANSLATE], [po4a-translate])
+AM_MISSING_PROG([PO4A_UPDATEPO], [po4a-updatepo])
+
 dnl Emacs (optional), for 'etc/indent-package.el'.
 AC_PATH_PROG([EMACS], [emacs], [/usr/bin/emacs])
 AC_SUBST([EMACS])
diff --git a/doc/local.mk b/doc/local.mk
index 397ade050..922d7581a 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -4,6 +4,7 @@
 # Copyright © 2013 Andreas Enge <andr...@enge.fr>
 # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayi...@gmail.com>
 # Copyright © 2016, 2018 Mathieu Lirzin <m...@gnu.org>
+# Copyright © 2018 Julien Lepiller <jul...@lepiller.eu>
 #
 # This file is part of GNU Guix.
 #
@@ -51,10 +52,51 @@ OS_CONFIG_EXAMPLES_TEXI =			\
   %D%/os-conf

Re: [PATCH 1/3] gnu: doc: Alloc documentation to be translated.

2018-03-05 Thread Ludovic Courtès
Julien Lepiller  skribis:

> * po/doc/local.mk: New file.
> * Makefile.am: Include it. Add silent rules for po4a.
> * configure.ac: Look for po4a-translate and po4a-updatepo.
> * doc/local.mk: Add rules to generate gettext files.
> (TRANSLATED_INFO): New variable.
> (BUILT_SOURCES, EXTRA_DIST, MAINTAINERCLEANFILES): Add it.
> * .gitignore: Add generated files.

LGTM!

For good measure, please check whether “make distcheck” doesn’t show any
regression (I haven’t checked in recent master though, it could be that
there are currently unrelated issues.)

Thanks,
Ludo’.



[PATCH 1/3] gnu: doc: Alloc documentation to be translated.

2018-03-02 Thread Julien Lepiller
* po/doc/local.mk: New file.
* Makefile.am: Include it. Add silent rules for po4a.
* configure.ac: Look for po4a-translate and po4a-updatepo.
* doc/local.mk: Add rules to generate gettext files.
(TRANSLATED_INFO): New variable.
(BUILT_SOURCES, EXTRA_DIST, MAINTAINERCLEANFILES): Add it.
* .gitignore: Add generated files.
---
 .gitignore  | 17 +
 Makefile.am |  8 +++-
 configure.ac|  4 
 doc/local.mk| 22 +++---
 po/doc/local.mk | 27 +++
 5 files changed, 74 insertions(+), 4 deletions(-)
 create mode 100644 po/doc/local.mk

diff --git a/.gitignore b/.gitignore
index 4a110fb1f..0145a7d86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,21 @@
 /configure
 /doc/*.1
 /doc/.dirstamp
+/doc/guix.*.aux
+/doc/guix.*.cp
+/doc/guix.*.cps
+/doc/guix.*.fn
+/doc/guix.*.fns
+/doc/guix.*.html
+/doc/guix.*.info
+/doc/guix.*.info-[0-9]
+/doc/guix.*.ky
+/doc/guix.*.pg
+/doc/guix.*.toc
+/doc/guix.*.t2p
+/doc/guix.*.tp
+/doc/guix.*.vr
+/doc/guix.*.vrs
 /doc/guix.aux
 /doc/guix.cp
 /doc/guix.cps
@@ -47,6 +62,7 @@
 /doc/os-config-desktop.texi
 /doc/stamp-vti
 /doc/version.texi
+/doc/version.*.texi
 /etc/guix-daemon.cil
 /etc/guix-daemon.conf
 /etc/guix-daemon.service
@@ -79,6 +95,7 @@
 /nix/scripts/list-runtime-roots
 /nix/scripts/offload
 /nix/scripts/substitute
+/po/doc/*.mo
 /po/guix/*.gmo
 /po/guix/*.insert-header
 /po/guix/*.mo
diff --git a/Makefile.am b/Makefile.am
index 6556799e6..757ca9b2f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,6 +10,7 @@
 # Copyright © 2017 Jan Nieuwenhuizen 
 # Copyright © 2017 Arun Isaac 
 # Copyright © 2018 ng0 
+# Copyright © 2018 Julien Lepiller 
 #
 # This file is part of GNU Guix.
 #
@@ -51,6 +52,7 @@ MODULES_NOT_COMPILED =\
   guix/man-db.scm
 
 include gnu/local.mk
+include po/doc/local.mk
 
 MODULES =  \
   guix/base16.scm  \
@@ -451,7 +453,7 @@ dist_fishcompletion_DATA = etc/completion/fish/guix.fish
 # SELinux policy
 dist_selinux_policy_DATA = etc/guix-daemon.cil
 
-EXTRA_DIST =   \
+EXTRA_DIST +=  \
   HACKING  \
   ROADMAP  \
   TODO \
@@ -778,3 +780,7 @@ AM_V_DOT_0 = @echo "  DOT " $@;
 AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
 AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
 AM_V_HELP2MAN_0 = @echo "  HELP2MAN" $@;
+
+AM_V_PO4A = $(AM_V_PO4A_$(V))
+AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY))
+AM_V_PO4A_0 = @echo "  PO4A" $@;
diff --git a/configure.ac b/configure.ac
index 5872a8482..557da6318 100644
--- a/configure.ac
+++ b/configure.ac
@@ -263,6 +263,10 @@ AM_MISSING_PROG([DOT], [dot])
 dnl Manual pages.
 AM_MISSING_PROG([HELP2MAN], [help2man])
 
+dnl Documentation translation.
+AM_MISSING_PROG([PO4A_TRANSLATE], [po4a-translate])
+AM_MISSING_PROG([PO4A_UPDATEPO], [po4a-updatepo])
+
 dnl Emacs (optional), for 'etc/indent-package.el'.
 AC_PATH_PROG([EMACS], [emacs], [/usr/bin/emacs])
 AC_SUBST([EMACS])
diff --git a/doc/local.mk b/doc/local.mk
index 397ade050..f8cf969aa 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -4,6 +4,7 @@
 # Copyright © 2013 Andreas Enge 
 # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer 
 # Copyright © 2016, 2018 Mathieu Lirzin 
+# Copyright © 2018 Julien Lepiller 
 #
 # This file is part of GNU Guix.
 #
@@ -51,10 +52,25 @@ OS_CONFIG_EXAMPLES_TEXI =   \
   %D%/os-config-desktop.texi   \
   %D%/os-config-lightweight-desktop.texi
 
+TRANSLATED_INFO =
+
 # Bundle this file so that makeinfo finds it in out-of-source-tree builds.
-BUILT_SOURCES+= $(OS_CONFIG_EXAMPLES_TEXI)
-EXTRA_DIST   += $(OS_CONFIG_EXAMPLES_TEXI)
-MAINTAINERCLEANFILES  = $(OS_CONFIG_EXAMPLES_TEXI)
+BUILT_SOURCES+= $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
+EXTRA_DIST   += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
+MAINTAINERCLEANFILES  = $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
+
+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
+
+$(srcdir)/%D%/guix.%.texi: %D%/guix.texi po/doc/guix.%.po
+   -$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "$<" -p "$(word 2,$^)" 
-l "$@.tmp"
+   sed -i "s|guix\.info|$$(basename $@ | sed 's|texi$$|info|')|" "$@.tmp"
+   mv "$@.tmp" "$@"
+
+$(srcdir)/%D%/contributing.%.texi: %D%/contributing.texi 
po/doc/contributing.%.po
+   -$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "$<" -p "$(word 2,$^)" 
-l "$@"
+   -touch "$@"
 
 %D%/os-config-%.texi: