diff options
author | Ludovic Court`es | 2007-02-02 17:17:30 +0000 |
---|---|---|
committer | Ludovic Court`es | 2007-02-02 17:17:30 +0000 |
commit | 0745bd2fa5d7b7246861fcafa9fda2d9c920ccda (patch) | |
tree | cbe534e61f8eef3131e877def6c090baceceeda8 /src | |
parent | f64342046c558768f42f409c938d427b925a2332 (diff) | |
parent | 147a7fa8376429e78fe17f4a199c2394149c33a9 (diff) | |
download | skribilo-0745bd2fa5d7b7246861fcafa9fda2d9c920ccda.tar.gz skribilo-0745bd2fa5d7b7246861fcafa9fda2d9c920ccda.tar.lz skribilo-0745bd2fa5d7b7246861fcafa9fda2d9c920ccda.zip |
Added basic GNU Gettext support.
* .arch-inventory: Mark `ABOUT-NLS' as precious.
* Makefile.am (SUBDIRS): Added `po'.
(ACLOCAL_AMFLAGS): New.
(EXTRA_DIST): New.
* configure.ac: Look for `gettext', output `po/Makefile.in'.
* src/guile/skribilo/biblio/template.scm
(make-bib-entry-template/default): Internationalized a bit.
(make-bib-entry-template/skribe): Likewise.
* src/guile/skribilo/utils/syntax.scm (%skribilo-module-reader): I18ned.
(_): New.
(N_): New.
git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-48
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/biblio/template.scm | 6 | ||||
-rw-r--r-- | src/guile/skribilo/utils/syntax.scm | 23 |
2 files changed, 23 insertions, 6 deletions
diff --git a/src/guile/skribilo/biblio/template.scm b/src/guile/skribilo/biblio/template.scm index 5a82e26..30a6512 100644 --- a/src/guile/skribilo/biblio/template.scm +++ b/src/guile/skribilo/biblio/template.scm @@ -1,7 +1,7 @@ ;;; template.scm -- Template system for bibliography entries. ;;; ;;; Copyright 2003, 2004 Manuel Serrano -;;; Copyright 2006 Ludovic Courtès <ludovic.courtes@laas.fr> +;;; Copyright 2006, 2007 Ludovic Courtès <ludovic.courtes@laas.fr> ;;; ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -115,7 +115,7 @@ (case kind ((techreport) `(author ". " (or title url documenturl) ". " - number ", " institution ", " + ,(_ "Technical Report") " " number ", " institution ", " address ", " month " " year ", " ("pp. " pages) ".")) ((article) @@ -159,7 +159,7 @@ (case kind ((techreport) `(author " -- " (or title url documenturl) " -- " - number ", " institution ", " + ,(_ "Technical Report") " " number ", " institution ", " address ", " month ", " year ", " ("pp. " pages) ".")) ((article) diff --git a/src/guile/skribilo/utils/syntax.scm b/src/guile/skribilo/utils/syntax.scm index 44bff09..6a99771 100644 --- a/src/guile/skribilo/utils/syntax.scm +++ b/src/guile/skribilo/utils/syntax.scm @@ -1,6 +1,6 @@ ;;; syntax.scm -- Syntactic candy for Skribilo modules. ;;; -;;; Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr> +;;; Copyright 2005, 2006, 2007 Ludovic Courtès <ludovic.courtes@laas.fr> ;;; ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -23,7 +23,8 @@ :use-module (system reader library) :use-module (system reader compat) ;; make sure `current-reader' exists :use-module (system reader confinement) - :export (%skribe-reader %skribilo-module-reader) + :export (%skribe-reader %skribilo-module-reader + _ N_) :export-syntax (unwind-protect unless when)) ;;; Author: Ludovic Courtès @@ -49,7 +50,7 @@ (if (string? file) (format #f "~a:~a:~a: " file line column) "") - "unexpected character in Skribilo module") + (_ "unexpected character in Skribilo module")) chr))) ;; By default, don't record positions: this yields a nice read @@ -76,6 +77,22 @@ (define-macro (when condition . exprs) `(if ,condition (begin ,@exprs))) + +;;; +;;; Gettext support. +;;; + +(define %skribilo-text-domain "skribilo") + +(textdomain %skribilo-text-domain) + +(define (_ msg) + (gettext msg %skribilo-text-domain)) + +(define (N_ msg msgplural n) + (ngettext msg msg plural n %skribilo-text-domain)) + + ;;; arch-tag: 9a0e0638-64f0-480a-ab19-49e8bfcbcd9b ;;; syntax.scm ends here |