[Gnucash-changes] r13291 - gnucash/trunk - * intl-scm/xgettext.scm: remove the absolute path from filenames

Derek Atkins warlord at cvs.gnucash.org
Sat Feb 18 09:39:22 EST 2006


Author: warlord
Date: 2006-02-18 09:39:21 -0500 (Sat, 18 Feb 2006)
New Revision: 13291
Trac: http://svn.gnucash.org/trac/changeset/13291

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/intl-scm/Makefile.am
   gnucash/trunk/intl-scm/xgettext.scm
Log:
	* intl-scm/xgettext.scm: remove the absolute path from filenames
	* intl-scm/Makefile.am: pass the absolute path to xgettext.scm



Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-02-18 10:08:19 UTC (rev 13290)
+++ gnucash/trunk/ChangeLog	2006-02-18 14:39:21 UTC (rev 13291)
@@ -1,3 +1,8 @@
+2006-02-18  Derek Atkins  <derek at ihtfp.com>
+
+	* intl-scm/xgettext.scm: remove the absolute path from filenames
+	* intl-scm/Makefile.am: pass the absolute path to xgettext.scm
+
 2006-02-17  David Hampton  <hampton at employees.org>
 
 	* src/register/register-gnome/gnucash-sheet.c:

Modified: gnucash/trunk/intl-scm/Makefile.am
===================================================================
--- gnucash/trunk/intl-scm/Makefile.am	2006-02-18 10:08:19 UTC (rev 13290)
+++ gnucash/trunk/intl-scm/Makefile.am	2006-02-18 14:39:21 UTC (rev 13291)
@@ -16,5 +16,5 @@
 guile-strings.c: $(SCMFILES)
 	rm -f guile-strings.c
 	cd ${srcdir} && rm -f guile-strings.c \
-	&& ${GUILE} -s ./xgettext.scm $(SCMFILES)
+	&& ${GUILE} -s ./xgettext.scm ${abs_top_srcdir} $(SCMFILES)
 

Modified: gnucash/trunk/intl-scm/xgettext.scm
===================================================================
--- gnucash/trunk/intl-scm/xgettext.scm	2006-02-18 10:08:19 UTC (rev 13290)
+++ gnucash/trunk/intl-scm/xgettext.scm	2006-02-18 14:39:21 UTC (rev 13291)
@@ -1,4 +1,5 @@
 ;; Find translatable strings in guile files
+(define *base-dir-len* 0)
 
 (define (expand-newlines string out-port)
   (define (output-prefix-newlines chars)
@@ -26,7 +27,7 @@
       (loop (cdr chars) (cons (car chars) accum))))))
 
 (define (write-string string out-port filename line-number)
-  (display (string-append "/* " filename) out-port)
+  (display (string-append "/* " (substring filename *base-dir-len*)) out-port)
   ;;(display line-number out-port)
   (display " */\n" out-port)
   (display "_(" out-port)
@@ -66,7 +67,9 @@
     (find-strings-in-item item out-port filename line-no)))
 
 (let ((out-port (open "guile-strings.c" (logior O_WRONLY O_CREAT O_TRUNC)))
-      (in-files (cdr (command-line))))
+      (base-dir (cadr (command-line)))
+      (in-files (cddr (command-line))))
+  (set! *base-dir-len* (+ (string-length base-dir) 1))
   (for-each (lambda (file)
               (call-with-input-file file (lambda (port)
                                            (find-strings port out-port file))))



More information about the gnucash-changes mailing list