[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.7.1-20110619-245-g8d4c574)



The branch, master has been updated
       via  8d4c574efc3a081324ef92d16e6feb6720c86c33 (commit)
      from  c5b473354b2340b42d1a48436fb4da113b34657f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gnetlist/tests/common/inputs/gafrc                 |    1 +
 gnetlist/tests/common/run_backend_tests.sh         |    3 +++
 gschem/po/POTFILES.in                              |    6 ++++++
 gschem/scheme/Makefile.am                          |    1 +
 .../scheme/gschem/{util.scm => core/gettext.scm}   |   12 ++++++------
 gschem/scheme/gschem/deprecated.scm                |    4 +++-
 gschem/scheme/gschem/gschemdoc.scm                 |    3 ++-
 gschem/scheme/gschem/keymap.scm                    |    6 ++++--
 libgeda/po/POTFILES.in                             |    2 ++
 libgeda/scheme/Makefile.am                         |   17 ++++++++++++++---
 libgeda/scheme/geda/attrib.scm                     |    5 ++++-
 libgeda/scheme/geda/core/.gitignore                |    1 +
 .../scheme/geda/core/gettext.scm.in                |   16 ++++++++--------
 13 files changed, 55 insertions(+), 22 deletions(-)
 copy gschem/scheme/gschem/{util.scm => core/gettext.scm} (80%)
 create mode 100644 libgeda/scheme/geda/core/.gitignore
 copy gschem/scheme/gschem/util.scm => libgeda/scheme/geda/core/gettext.scm.in (69%)


=================
 Commit Messages
=================

commit 8d4c574efc3a081324ef92d16e6feb6720c86c33
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    scheme-api: Translate strings.
    
    Makes the messages emitted by Scheme API functions
    internationalizable.  This required an update to the gnetlist
    testsuite to set the library path for built-but-not-installed Scheme
    modules.
    
    Closes-bug: lp-901013

:100644 100644 0f99185... 3b6a62e... M	gnetlist/tests/common/inputs/gafrc
:100755 100755 54caa88... 7397820... M	gnetlist/tests/common/run_backend_tests.sh
:100644 100644 f24e2e3... 011c893... M	gschem/po/POTFILES.in
:100644 100644 54d5a52... 8fe88f8... M	gschem/scheme/Makefile.am
:000000 100644 0000000... bbd6e06... A	gschem/scheme/gschem/core/gettext.scm
:100644 100644 802513c... bb69407... M	gschem/scheme/gschem/deprecated.scm
:100644 100644 e441dc3... 7e13a6c... M	gschem/scheme/gschem/gschemdoc.scm
:100644 100644 db17842... 120ddf6... M	gschem/scheme/gschem/keymap.scm
:100644 100644 5a34ae5... 68ea34c... M	libgeda/po/POTFILES.in
:100644 100644 40368c3... 9195ef3... M	libgeda/scheme/Makefile.am
:100644 100644 5b57736... 00e0deb... M	libgeda/scheme/geda/attrib.scm
:000000 100644 0000000... d2ce896... A	libgeda/scheme/geda/core/.gitignore
:000000 100644 0000000... c29b2ba... A	libgeda/scheme/geda/core/gettext.scm.in

=========
 Changes
=========

commit 8d4c574efc3a081324ef92d16e6feb6720c86c33
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    scheme-api: Translate strings.
    
    Makes the messages emitted by Scheme API functions
    internationalizable.  This required an update to the gnetlist
    testsuite to set the library path for built-but-not-installed Scheme
    modules.
    
    Closes-bug: lp-901013

diff --git a/gnetlist/tests/common/inputs/gafrc b/gnetlist/tests/common/inputs/gafrc
index 0f99185..3b6a62e 100644
--- a/gnetlist/tests/common/inputs/gafrc
+++ b/gnetlist/tests/common/inputs/gafrc
@@ -2,6 +2,7 @@
 ;; 'make check' during development can work correctly.
 (scheme-directory "${SCMDIR}")
 (scheme-directory "${GEDASCMDIR}")
+(scheme-directory "${GEDABUILTSCMDIR}")
 
 ;; We want to use the symbols that haven't been installed yet
 (map (lambda (x) (component-library (string-join (list "${SYMDIR}/" x) "")))
diff --git a/gnetlist/tests/common/run_backend_tests.sh b/gnetlist/tests/common/run_backend_tests.sh
index 54caa88..7397820 100755
--- a/gnetlist/tests/common/run_backend_tests.sh
+++ b/gnetlist/tests/common/run_backend_tests.sh
@@ -94,11 +94,13 @@ GEDADATA="${srcdir}/../.." # HACKHACKHACK
 GEDADATARC="${builddir}/../../lib"
 SCMDIR="${builddir}/../../scheme"
 GEDASCMDIR="${srcdir}/../../../libgeda/scheme"
+GEDABUILTSCMDIR="${builddir}/../../../libgeda/scheme"
 SYMDIR="${srcdir}/../../../symbols"
 export GEDADATA
 export GEDADATARC
 export SCMDIR
 export GEDASCMDIR
+export GEDABUILTSCMDIR
 export SYMDIR
 
 rundir=${here}/run
@@ -144,6 +146,7 @@ GEDADATA:   ${GEDATADA}
 GEDADATARC: ${GEDATADARC}
 SCMDIR:     ${SCMDIR}
 GEDASCMDIR: ${GEDASCMDIR}
+GEDABUILTSCMDIR: ${GEDABUILTSCMDIR}
 SYMDIR:     ${SYMDIR}
 all_tests:
 
diff --git a/gschem/po/POTFILES.in b/gschem/po/POTFILES.in
index f24e2e3..011c893 100644
--- a/gschem/po/POTFILES.in
+++ b/gschem/po/POTFILES.in
@@ -1,10 +1,12 @@
 gschem/src/a_pan.c
 gschem/src/a_zoom.c
+gschem/src/g_attrib.c
 gschem/src/g_funcs.c
 gschem/src/g_hook.c
 gschem/src/g_keys.c
 gschem/src/g_rc.c
 gschem/src/g_register.c
+gschem/src/g_select.c
 gschem/src/g_util.c
 gschem/src/g_window.c
 gschem/src/globals.c
@@ -63,3 +65,7 @@ gschem/src/x_window.c
 gschem/data/geda-gschem.desktop.in
 
 gschem/lib/system-gschemrc.scm
+
+gschem/scheme/gschem/deprecated.scm
+gschem/scheme/gschem/gschemdoc.scm
+gschem/scheme/gschem/keymap.scm
diff --git a/gschem/scheme/Makefile.am b/gschem/scheme/Makefile.am
index 54d5a52..8fe88f8 100644
--- a/gschem/scheme/Makefile.am
+++ b/gschem/scheme/Makefile.am
@@ -10,6 +10,7 @@ nobase_dist_scmdata_DATA = \
 	auto-place-attribs.scm \
 	pcb.scm \
 	default-attrib-positions.scm \
+	gschem/core/gettext.scm \
 	gschem/gschemdoc.scm \
 	gschem/window.scm \
 	gschem/selection.scm \
diff --git a/gschem/scheme/gschem/core/gettext.scm b/gschem/scheme/gschem/core/gettext.scm
new file mode 100644
index 0000000..bbd6e06
--- /dev/null
+++ b/gschem/scheme/gschem/core/gettext.scm
@@ -0,0 +1,27 @@
+;; gEDA - GPL Electronic Design Automation
+;; gschem - gEDA Schematic Capture - Scheme API
+;; Copyright (C) 2011 Peter Brett <peter@xxxxxxxxxxxxx>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
+;;
+
+;; I18n for libgeda Scheme API.
+;;
+;; This module is for internal use only.
+
+(define-module (geda core gschem))
+
+(define %gschem-gettext-domain "gschem")
+(define-public (_ msg) (gettext msg %gschem-gettext-domain))
diff --git a/gschem/scheme/gschem/deprecated.scm b/gschem/scheme/gschem/deprecated.scm
index 802513c..bb69407 100644
--- a/gschem/scheme/gschem/deprecated.scm
+++ b/gschem/scheme/gschem/deprecated.scm
@@ -22,6 +22,8 @@
 
 (define-module (gschem deprecated)
 
+  #:use-module (gschem core gettext)
+
   #:use-module (geda page)
   #:use-module (geda object)
   #:use-module (geda attrib)
@@ -97,7 +99,7 @@
                  ("Upper Right" . upper-right))
                alignment)
               (and (string=? "" alignment) (text-align attrib))
-              (error "Invalid text alignment ~A." alignment))
+              (error (_ "Invalid text alignment ~A.") alignment))
              ;; angle
              (if (= rotation -1) (text-angle attrib) rotation)
              ;; string
diff --git a/gschem/scheme/gschem/gschemdoc.scm b/gschem/scheme/gschem/gschemdoc.scm
index e441dc3..7e13a6c 100644
--- a/gschem/scheme/gschem/gschemdoc.scm
+++ b/gschem/scheme/gschem/gschemdoc.scm
@@ -18,6 +18,7 @@
 ;;
 
 (define-module (gschem gschemdoc)
+  #:use-module (gschem core gettext)
   #:use-module (geda os)
   #:use-module (geda object)
   #:use-module (geda attrib)
@@ -221,4 +222,4 @@ system associated viewer application."
          (directory-doc-search (sys-doc-dir) name ".pdf"))))
 
      ;; 4) Fail miserably
-     (error "No documentation found"))))
+     (error (_ "No documentation found")))))
diff --git a/gschem/scheme/gschem/keymap.scm b/gschem/scheme/gschem/keymap.scm
index db17842..120ddf6 100644
--- a/gschem/scheme/gschem/keymap.scm
+++ b/gschem/scheme/gschem/keymap.scm
@@ -19,6 +19,7 @@
 
 (define-module (gschem keymap)
   #:use-module (gschem core keymap)
+  #:use-module (gschem core gettext)
   #:use-module (ice-9 optargs)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
@@ -35,7 +36,8 @@
 (define-public (string->key str)
   (or (%string->key str)
       (scm-error 'key-format #f
-                 "~S is not a valid key combination." (list str) #f)))
+                 (_ "~S is not a valid key combination.")
+                 (list str) #f)))
 
 ;; -------------------- Key sequences --------------------
 
@@ -149,7 +151,7 @@
            ((keymap? binding) (lookup binding keys (1+ ofs)))
 
            ;; Otherwise, generate an error.
-           (else (error "~S is not a prefix key sequence."
+           (else (error (_ "~S is not a prefix key sequence.")
                         (keys->display-string (prefix-keys keys))))))))
 
   (lookup keymap keys 0))
diff --git a/libgeda/po/POTFILES.in b/libgeda/po/POTFILES.in
index 5a34ae5..68ea34c 100644
--- a/libgeda/po/POTFILES.in
+++ b/libgeda/po/POTFILES.in
@@ -32,5 +32,7 @@ libgeda/src/scheme_complex.c
 libgeda/src/scheme_object.c
 libgeda/src/scheme_page.c
 
+libgeda/scheme/geda/attrib.scm
+
 intl/plural.c
 
diff --git a/libgeda/scheme/Makefile.am b/libgeda/scheme/Makefile.am
index 40368c3..9195ef3 100644
--- a/libgeda/scheme/Makefile.am
+++ b/libgeda/scheme/Makefile.am
@@ -3,11 +3,12 @@ scmdatadir = $(GEDADATADIR)/scheme
 nobase_dist_scmdata_DATA = geda.scm color-map.scm \
 	geda/object.scm geda/page.scm geda/attrib.scm geda/deprecated.scm \
 	geda/os.scm
+nobase_scmdata_DATA = geda/core/gettext.scm
 
 # Unit test support.  The unit tests are run using the geda-batch
 # program, with config loading disabled (-q) so that user config
 # already on the system can't interfere with the test process.
-TESTS_ENVIRONMENT = $(builddir)/../shell/geda-shell -q -L $(srcdir) \
+TESTS_ENVIRONMENT = $(builddir)/../shell/geda-shell -q -L $(srcdir) -L $(builddir) \
 	-c '(use-modules (unit-test)) (load (list-ref (command-line) 1)) (exit (if (tests-passed?) 0 1))'
 
 TESTS = unit-tests/t0001-geda-conf-lib.scm \
@@ -37,9 +38,19 @@ XFAIL_TESTS = \
 	unit-tests/t0203-page-string-syntax.scm \
 	unit-tests/t0301-promotable-attributes.scm
 
-dist_noinst_DATA = unit-test.scm $(TESTS)
+dist_noinst_DATA = geda/core/gettext.scm.in unit-test.scm $(TESTS)
+
+geda/core/gettext.scm: $(srcdir)/geda/core/gettext.scm.in Makefile
+	@domain=$(LIBGEDA_GETTEXT_DOMAIN); \
+	$(MKDIR_P) geda/core; \
+	sed -e"s:[@]LIBGEDA_GETTEXT_DOMAIN@:$$domain:" < $< > $@.new; \
+	if cmp $@ $@.new > /dev/null 2>&1; then \
+	  rm $@.new; echo "$@ is unchanged"; \
+	else \
+	  echo "Recreating $@"; mv $@.new $@; \
+	fi
 
 MOSTLYCLEANFILES = *.log *~
-CLEANFILES = *.log *~
+CLEANFILES = *.log *~ geda/core/gettext.scm
 DISTCLEANFILES = *.log core FILE *~
 MAINTAINERCLEANFILES = *.log *~ Makefile.in
diff --git a/libgeda/scheme/geda/attrib.scm b/libgeda/scheme/geda/attrib.scm
index 5b57736..00e0deb 100644
--- a/libgeda/scheme/geda/attrib.scm
+++ b/libgeda/scheme/geda/attrib.scm
@@ -22,6 +22,8 @@
   ; Import C procedures
   #:use-module (geda core attrib)
 
+  #:use-module (geda core gettext)
+
   #:use-module (geda object)
   #:use-module (geda page))
 
@@ -54,7 +56,8 @@
 (define-public (promote-attribs! object)
   (let ((p (or (object-page object)
                (scm-error 'object-state #f
-                          "Object ~A is not part of a page" (list object) #f))))
+                          (_ "Object ~A is not part of a page")
+                          (list object) #f))))
     (if (component? object)
         (map (lambda (x)
                (let ((y (copy-object x)))
diff --git a/libgeda/scheme/geda/core/.gitignore b/libgeda/scheme/geda/core/.gitignore
new file mode 100644
index 0000000..d2ce896
--- /dev/null
+++ b/libgeda/scheme/geda/core/.gitignore
@@ -0,0 +1 @@
+gettext.scm
diff --git a/libgeda/scheme/geda/core/gettext.scm.in b/libgeda/scheme/geda/core/gettext.scm.in
new file mode 100644
index 0000000..c29b2ba
--- /dev/null
+++ b/libgeda/scheme/geda/core/gettext.scm.in
@@ -0,0 +1,27 @@
+;; gEDA - GPL Electronic Design Automation
+;; libgeda - gEDA's library - Scheme API
+;; Copyright (C) 2010-2011 Peter Brett <peter@xxxxxxxxxxxxx>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
+;;
+
+;; I18n for libgeda Scheme API.
+;;
+;; This module is for internal use only.
+
+(define-module (geda core gettext))
+
+(define %libgeda-gettext-domain "@LIBGEDA_GETTEXT_DOMAIN@")
+(define (_ msg) (gettext msg %libgeda-gettext-domain))




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs