[Top][All Lists]
[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: |
Wed, 9 Mar 2011 12:32:24 +0100 (CET) |
Hello,
in fact the answer I would like was :
$ xgettext hello.c --keyword=_ -o messages.po
When I do this, I got a not empty 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-03-09 12:30+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"
#: hello.c:100
#, c-format
msgid "%s: extra operand: %s\n"
msgstr ""
#: hello.c:102
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr ""
#: hello.c:109
#, c-format
msgid "hello, world\n"
msgstr ""
#: hello.c:118
#, c-format
msgid ""
"+---------------+\n"
"| Hello, world! |\n"
"+---------------+\n"
msgstr ""
#: hello.c:128
msgid "Hello, world!"
msgstr ""
#: hello.c:150
#, c-format
msgid "Usage: %s [OPTION]...\n"
msgstr ""
#: hello.c:155
msgid "Print a friendly, customizable greeting.\n"
msgstr ""
#: hello.c:161
msgid ""
" -h, --help display this help and exit\n"
" -v, --version display version information and exit\n"
msgstr ""
#: hello.c:168
msgid ""
" -t, --traditional use traditional greeting format\n"
" -n, --next-generation use next-generation greeting format\n"
" -g, --greeting=TEXT use TEXT as the greeting message\n"
msgstr ""
#: hello.c:179
#, c-format
msgid "Report bugs to: %s\n"
msgstr ""
#: hello.c:182
#, c-format
msgid "Report %s bugs to: %s\n"
msgstr ""
#: hello.c:186
#, c-format
msgid "%s home page: <%s>\n"
msgstr ""
#: hello.c:188
#, c-format
msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
msgstr ""
#: hello.c:191
msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
msgstr ""
#: hello.c:209
#, c-format
msgid ""
"Copyright (C) %s Free Software Foundation, Inc.\n"
"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
"html>\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
msgstr ""
Is it a correct way to use xgettext like this ?
(I am a beginner in using xgettext)
----- Mail d'origine -----
De: spam spam spam spam <address@hidden>
À: address@hidden
Envoyé: Tue, 15 Feb 2011 10:11:50 +0100 (CET)
Objet: Re: xgettext output nothing
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>
- Re: xgettext output nothing,
spam . spam . spam . spam <=