How to use _() inside an array ?

Colossus colossus73 at gmail.com
Fri Jun 9 15:14:59 CEST 2006


Hi,

I was developing the cmd-line switches for xarchiver, I have something
like this:

static GOptionEntry entries[] =
{
37:	{ "extract-to=FOLDER", 'x', 0, G_OPTION_ARG_FILENAME,
&extract_path, "Extract the archive to the specified folder and
quits.", NULL },
	{ "extract", 'e', 0, G_OPTION_ARG_NONE, &ask_and_extract, "Extract
the archive by asking the destination folder and quits.", NULL },
	{ "add-to=ARCHIVE", 'd', 0, G_OPTION_ARG_FILENAME, &path, "Add files
to the specified archive and quits.", NULL },
	{ "add", 'a', 0, G_OPTION_ARG_NONE, &ask_and_add, "Add files asking
the name of the archive and quits.", NULL },
	{ NULL }
};

But when I put the _() near the "Extract the archive bla bla" to allow
translating I get:
main.c:37: error: initializer element is not constant
main.c:37: error: (near initialization for `entries[0].description')

How can I fix this ?

Thank you,
-- 
Colossus
Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.xfce.org
Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.sourceforge.net
Mizio, a QT proxy hunter scanner tool - http://mizio.sourceforge.net



More information about the Xfce4-dev mailing list