Gettextize, with GNU Gettext 0.18.1.

* Makefile.am (EXTRA_DIST): Add `build-aux/config.rpath'.
  (SUBDIRS, ACLOCAL_AMFLAGS): New variables.

* configure.ac: Use `AM_GNU_GETTEXT'.  Emit `po/Makefile.in'.

* po/Makevars, po/POTFILES.in: New files.
This commit is contained in:
Ludovic Courtès 2012-06-29 22:22:48 +02:00
parent 64fddd74f0
commit f68b089361
5 changed files with 50 additions and 2 deletions

22
.gitignore vendored
View File

@ -12,3 +12,25 @@ Makefile
config.cache config.cache
/aclocal.m4 /aclocal.m4
/config.status /config.status
/ABOUT-NLS
/m4/ChangeLog
/m4/gettext.m4
/m4/iconv.m4
/m4/lib-ld.m4
/m4/lib-link.m4
/m4/lib-prefix.m4
/m4/nls.m4
/m4/po.m4
/m4/progtest.m4
/po/ChangeLog
/po/Makefile.in.in
/po/POTFILES
/po/Rules-quot
/po/boldquot.sed
/po/en@boldquot.header
/po/en@quot.header
/po/insert-header.sin
/po/quot.sed
/po/remove-potcdate.sin
/po/stamp-po
/po/guix.pot

View File

@ -46,7 +46,7 @@ TESTS_ENVIRONMENT = \
GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \ GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
$(GUILE) -L "$(top_srcdir)" $(GUILE) -L "$(top_srcdir)"
EXTRA_DIST = $(TESTS) EXTRA_DIST = build-aux/config.rpath $(TESTS)
CLEANFILES = $(GOBJECTS) *.log CLEANFILES = $(GOBJECTS) *.log
.scm.go: .scm.go:
@ -68,3 +68,7 @@ SUFFIXES = .go
# for details. # for details.
guix_install_go_files = install-nobase_nodist_guilemoduleDATA guix_install_go_files = install-nobase_nodist_guilemoduleDATA
$(guix_install_go_files): install-nobase_dist_guilemoduleDATA $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
SUBDIRS = po
ACLOCAL_AMFLAGS = -I m4

View File

@ -11,6 +11,8 @@ AM_INIT_AUTOMAKE([1.11 foreign silent-rules subdir-objects \
AC_CONFIG_SRCDIR([guix.scm]) AC_CONFIG_SRCDIR([guix.scm])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AM_GNU_GETTEXT([external])
guilemoduledir="${datarootdir}/guile/site/2.0" guilemoduledir="${datarootdir}/guile/site/2.0"
AC_SUBST([guilemoduledir]) AC_SUBST([guilemoduledir])
@ -51,6 +53,6 @@ else
AC_MSG_WARN([Please use `--with-nixpkgs'.]) AC_MSG_WARN([Please use `--with-nixpkgs'.])
fi fi
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile po/Makefile.in])
AC_OUTPUT AC_OUTPUT

18
po/Makevars Normal file
View File

@ -0,0 +1,18 @@
# Makefile variables for PO directory in any package using GNU gettext.
DOMAIN = $(PACKAGE)
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = \
--language=Scheme \
--keyword=_ --keyword=N_ \
--keyword=description --keyword=long-description
COPYRIGHT_HOLDER = Ludovic Courtès
MSGID_BUGS_ADDRESS = ludo@gnu.org
EXTRA_LOCALE_CATEGORIES =

2
po/POTFILES.in Normal file
View File

@ -0,0 +1,2 @@
# List of source files which contain translatable strings.
distro/base.scm