aboutsummaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
authorLudovic Court`es2007-02-02 17:15:33 +0000
committerLudovic Court`es2007-02-02 17:15:33 +0000
commit147a7fa8376429e78fe17f4a199c2394149c33a9 (patch)
treecbe534e61f8eef3131e877def6c090baceceeda8 /src/guile
parent93c5157e92dc3506aa2b8fd1ab7c611a5f14eb6d (diff)
downloadskribilo-147a7fa8376429e78fe17f4a199c2394149c33a9.tar.gz
skribilo-147a7fa8376429e78fe17f4a199c2394149c33a9.tar.lz
skribilo-147a7fa8376429e78fe17f4a199c2394149c33a9.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: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-11
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/biblio/template.scm6
-rw-r--r--src/guile/skribilo/utils/syntax.scm23
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