bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] Bug#641371: xgettext -k_ hello.scm fails if block-comment


From: Santiago Vila
Subject: [bug-gettext] Bug#641371: xgettext -k_ hello.scm fails if block-comment are used inside a function (fwd)
Date: Tue, 4 Oct 2011 18:32:51 +0200 (CEST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

Hello.

I received this report from the Debian BTS.
Please keep the Cc: lines when replying (you can omit the -forwarded address).

Thanks.

---------- Forwarded message ----------
From: David Pirotte <address@hidden>
To: Debian Bug Tracking System <address@hidden>
Date: Mon, 12 Sep 2011 20:52:32 -0300
Subject: Bug#641371: xgettext -k_ hello.scm fails if block-comment are used
    inside a function

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
address@hidden@ -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 <address@hidden>, 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 <address@hidden>\n"
"Language-Team: LANGUAGE <address@hidden>\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

[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]