gettext && _()
kratochvil na dbsystem.com
kratochvil na dbsystem.com
Čtvrtek Září 26 17:27:34 CEST 2002
Dobry den,
mam nasledojici problem:
xgettext mi nevytvori zadny soubor s katalogem zprav a to ani prazdny. Coz by podle man page mel.
Mejme nasledujici programek:
<source>
#include <stdio.h>
#include <locale.h>
#include <libintl.h>
#define _(String) gettext (String)
#define PACKAGE "test"
#define LOCALEDIR "/usr/share/locale/"
int main()
{
setlocale(LC_MESSAGES, "");
bindtextdomain(PACKAGE,LOCALEDIR);
textdomain(PACKAGE);
printf("%s\n",_("test string"));
}
</source>
pokud zavolam
$ xgettext file.cc
nevytvori nic. Pokud ovsem prepisu volani makra _() na gettext() tak vse
probehne v poradku. Nejedna se mi pouze o tento program. Mam napsany
vetsi projekt a pri pokusu vytazeni katalogu to dopadne naprosto stejne.
Nejsem nadseny z toho ze bych mel prepisovat vsechny vyskyty makra _()
na volani gettext().
Zkousel jsem i zakomentovat definici makra _(), ale vysledek je porad
stejny.
pro jistotu:
$ xgettext --version
xgettext (GNU gettext) 0.10.38
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Written by Ulrich Drepper.
--
KLoK
Další informace o konferenci Linux