Package: gettext
Version: 0.18.1.1-4
Severity: important

Dear Maintainer,

As I was trying to use xgettext on my own scheme files, it always
failed. So I decided to try to run it on the example that comes with
gettext-doc and it worked like a charm. 

Digging into what could cause this strange 'working on the distro
scheme example file but not on any of my scheme files', I found that
xgettext will properly work until it reaches a block-comment inside a
scheme function [as opposed to a toplevel block-comment which xgettext
appears to propely manage.

On the modified hello.scm below, if you run:

   xgettext -k_ -o hello.pot hello.scm

and cat hello.pot, you'll see that xgettext 'stopped' working properly
after extracting "let's see: xgettext 1". In case you could not
reproduce exactly, I'll also attach the hello.pot I got here.

;; hello.scm [modified] starts here
#!@GUILE@ -s
!#
;;; Example for use of GNU gettext.
;;; This file is in the public domain.

;;; Source code of the GNU guile program.

(use-modules (ice-9 format))

(catch #t (lambda () (setlocale LC_ALL "")) (lambda args #f))
(textdomain "hello-guile")
(bindtextdomain "hello-guile" "@localedir@")
(define _ gettext)

(display (_ "Hello, world!"))
(newline)
(format #t (_ "This program is running as process number ~D.") (getpid))
(newline)

#!
this toplevel block-comment does seem to confuse ngettext
(_ "this first string should not be extracted")
!#

(define (further-testing-xgettext)
  (_ "let's see: xgettext 1")
  #!
  then for some reason, i'v noticed that xgettext gets confused if
  block-comment is used inside a function, unlike @ toplevel
  (_ "this second string should not be extracted")
  !#
  (_ "let's see: xgettext 2"))

(display (_ "let's see: xgettext 3"))
;; hello.scm [modified] ends here


;; hello.pot starts here
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-09-12 20:42-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <l...@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: hello.scm:15
msgid "Hello, world!"
msgstr ""

#: hello.scm:17
#, scheme-format
msgid "This program is running as process number ~D."
msgstr ""

#: hello.scm:26
msgid "let's see: xgettext 1"
msgstr ""
;; hello.pot ends here


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.0.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gettext depends on:
ii  dpkg           1.16.0.3      
ii  gettext-base   0.18.1.1-4    
ii  install-info   4.13a.dfsg.1-8
ii  libc6          2.13-18       
ii  libcroco3      0.6.2-1       
ii  libglib2.0-0   2.28.6-1      
ii  libgomp1       4.6.1-4       
ii  libncurses5    5.9-1         
ii  libunistring0  0.9.3-4       
ii  libxml2        2.7.8.dfsg-4  

Versions of packages gettext recommends:
ii  autopoint  0.18.1.1-4
ii  curl       7.21.7-1  
ii  wget       1.13-1    

Versions of packages gettext suggests:
ii  gettext-doc  0.18.1.1-4

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to