bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: xgettext output nothing


From: spam . spam . spam . spam
Subject: Re: xgettext output nothing
Date: Tue, 15 Feb 2011 10:11:50 +0100 (CET)

You are right:
$ xgettext hello.c --force-po
generates this empty messages.po file:
---
# 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-02-15 10:02+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <address@hidden>\n"
"Language-Team: LANGUAGE <address@hidden>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
---
The problem is I would like a not empty file :-)
I thought xgettext read the input file and generates the corresponding .po 
output file.
In hello.c (the input file) I have, for exemple, the line 109:
printf (_("hello, world\n"));
So I would like xgettext generates an output file corresponding to this entry.

How to generate a not empty .po file with xgettext?

----- Mail Original -----
De: "Bruno Haible" <address@hidden>
À: "spam spam spam spam" <address@hidden>
Cc: address@hidden
Envoyé: Dimanche 13 Février 2011 21h52:02 GMT +01:00 Amsterdam / Berlin / Berne 
/ Rome / Stockholm / Vienne
Objet: Re: xgettext output nothing

> I try to generate the .po file using 'xgettext' on a source file but nothing 
> in the output:
> 
> $ xgettext hello.c
>
> If I give the output file:
> 
> $ xgettext hello.c -o hello.po
> 
> The hello.po file is not created.

If you want to output a PO file, even when it will be virtually empty, use the
option "--force-po".

> I read the manual and the official documentation, but I don't understand why
> I got nothing at the output when I use 'xgettext'.

The relevant info is in the "xgettext --help"'s output and in this manual page:
<http://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html>

> The source is available here:
> http://ftp.gnu.org/gnu/hello/hello-2.6.tar.xz

I think you should also take a look at the value of XGETTEXT_OPTIONS in the file
po/Makevars in that tarball.

Bruno
-- 
In memoriam Alexander Samoylovich 
<http://en.wikipedia.org/wiki/Alexander_Samoylovich>



reply via email to

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