diff options
author | Ludovic Courtès | 2016-01-13 10:00:58 +0100 |
---|---|---|
committer | Ludovic Courtès | 2016-01-13 10:09:25 +0100 |
commit | b1612cf3f3673f43e798a39e30ed47bf9053ab01 (patch) | |
tree | 04dad7d55fbdb127860c2506fefb1e938720dcee | |
parent | adf9689073b77119846cd7f22840af1111d7ceda (diff) | |
download | skribilo-b1612cf3f3673f43e798a39e30ed47bf9053ab01.tar.gz skribilo-b1612cf3f3673f43e798a39e30ed47bf9053ab01.tar.lz skribilo-b1612cf3f3673f43e798a39e30ed47bf9053ab01.zip |
Set the text domain and the location of message catalogs.v0.9.3
* src/guile/skribilo/config.in (skribilo-locale-directory): New
procedure.
* src/guile/skribilo/utils/syntax.scm (%skribilo-text-domain): Export.
* src/guile/skribilo.scm (skribilo): Add calls to 'bindtextdomain' and
'textdomain'.
* substitute.am (substitute): Add 'localedir'.
-rw-r--r-- | src/guile/skribilo.scm | 6 | ||||
-rw-r--r-- | src/guile/skribilo/config.in | 5 | ||||
-rw-r--r-- | src/guile/skribilo/utils/syntax.scm | 14 | ||||
-rw-r--r-- | substitute.am | 1 |
4 files changed, 17 insertions, 9 deletions
diff --git a/src/guile/skribilo.scm b/src/guile/skribilo.scm index 0c45b92..1014d8d 100644 --- a/src/guile/skribilo.scm +++ b/src/guile/skribilo.scm @@ -1,7 +1,7 @@ ;;; skribilo.scm -- The Skribilo document processor. ;;; ;;; Copyright 2005, 2006, 2007, 2008, 2009, 2011, 2012, 2013, -;;; 2015 Ludovic Courtès <ludo@gnu.org> +;;; 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr> ;;; ;;; @@ -321,6 +321,10 @@ options." (_ "warning: failed to install locale: ~a~%") (strerror (system-error-errno args))))) + ;; Tell gettext where to look for message catalogs. + (bindtextdomain %skribilo-text-domain (skribilo-locale-directory)) + (textdomain %skribilo-text-domain) + (let* ((options (parse-args args)) (reader-name (string->symbol (assoc-ref options :reader))) diff --git a/src/guile/skribilo/config.in b/src/guile/skribilo/config.in index dcbf245..238266b 100644 --- a/src/guile/skribilo/config.in +++ b/src/guile/skribilo/config.in @@ -1,7 +1,7 @@ ;;; config.scm -- Skribilo configuration. ;;; -*- coding: iso-8859-1 -*- ;;; -;;; Copyright 2005, 2006, 2007, 2009, 2012 Ludovic Courtès <ludo@gnu.org> +;;; Copyright 2005, 2006, 2007, 2009, 2012, 2016 Ludovic Courtès <ludo@gnu.org> ;;; ;;; ;;; This file is part of Skribilo. @@ -22,6 +22,7 @@ (define-module (skribilo config) :export (skribilo-version skribilo-url skribilo-bug-report-address skribilo-module-directory skribilo-doc-directory + skribilo-locale-directory skribilo-scheme)) (define (skribilo-version) "@PACKAGE_VERSION@") @@ -30,7 +31,7 @@ (define (skribilo-module-directory) "@guilemoduledir@") (define (skribilo-scheme) "@GUILE@") (define (skribilo-doc-directory) "@docdir@") - +(define (skribilo-locale-directory) "@localedir@") ;;; Local Variables: ;;; mode: scheme diff --git a/src/guile/skribilo/utils/syntax.scm b/src/guile/skribilo/utils/syntax.scm index 7e32c2e..9477095 100644 --- a/src/guile/skribilo/utils/syntax.scm +++ b/src/guile/skribilo/utils/syntax.scm @@ -1,7 +1,7 @@ ;;; syntax.scm -- Syntactic candy for Skribilo modules. -*- coding: utf-8 -*- ;;; ;;; Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, -;;; 2012 Ludovic Courtès <ludo@gnu.org> +;;; 2012, 2016 Ludovic Courtès <ludo@gnu.org> ;;; ;;; ;;; This file is part of Skribilo. @@ -23,11 +23,13 @@ :use-module (system reader library) :use-module (system reader compat) ;; make sure `current-reader' exists :use-module (system reader confinement) - :export (%skribilo-module-reader skribilo-module-syntax - set-correct-file-encoding! - default-to-utf-8 - _ N_ - unwind-protect)) + :export (%skribilo-module-reader + skribilo-module-syntax + set-correct-file-encoding! + default-to-utf-8 + %skribilo-text-domain + _ N_ + unwind-protect)) ;;; Author: Ludovic Courtès ;;; diff --git a/substitute.am b/substitute.am index 80953bc..004e7c3 100644 --- a/substitute.am +++ b/substitute.am @@ -10,6 +10,7 @@ substitute = sed -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \ -e 's,[@]prefix[@],$(prefix),g' \ -e 's,[@]docdir[@],$(docdir),g' \ -e 's,[@]lispdir[@],$(lispdir),g' \ + -e 's,[@]localedir[@],$(localedir),g' \ -e 's,[@]GUILE[@],$(GUILE),g' \ -e 's,[@]PACKAGE_STRING[@],$(PACKAGE_STRING),g' \ -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \ |