Re: N_() and _()



Pablo Saratxaga <pablo@mandrakesoft.com> wrote:
> On 27 October, 1999 - Andreas Buesching sent me these 0.8K bytes:
>  
> > > Please I need help with the i18n-things.
> > > 
> > > I do not know really much about this things. I tried to add some new
> > > string to the .po files but it does not work.
> > > 
> > > gchar *tooltip_types[] = { N_("x/y mailboxes contain new mail"), 
> > > 
> > > Why does a make update-po not include these strings?
> 
> you mean they don't show on *.pot file ?

No, I mean they are not shown in the .po files.

> That is probably because the file you edited is not listed in po/POTFILES.in
> (whihc holds the list of files to scan for translatable strings)

I have listed it in this file
 
> Note also that N_() in fact does nothing (it is just a tag so the
> translatable string is found by xgettext to create the *.pot file);
> you need to call the real _() somewhere; eg:
> 
> gchar *tooltip_types[] = { N_("x/y mailboxes contain new mail"), ... }
> 
> .....
> 
> #ifdef ENABLE_NLS
> 	{
> 		int i;
> 		for (i=0;i<n;i++) /* n depending on size of the array */
> 			tooltip_type[i]=_(tooltip_types[i]);
> 	}
> #endif
> > #include "config.h"  before gnome*.h ?
> 
> and yes, that too.

Yes exactly this way I have done it. What I think is wrong is the
following:

If I add an string to this file e.g. _("foo bla fasel"), then I just
type 'make update-po' and this string is inserted into the .po files
like that

#: src/foo.c:863
msgid "foo bla fasel"
msgstr ""

Exactly that is what I want to get with the strings in my array. How
shall this work??? I'm getting crazy.

PLEASE HELP

crunchy

-- 
__________________________________________________________
\ Andreas Buesching <crunchy@tzi.de> <andreas@netz.nsp.de>
\\ WWW: http://www.linuxfreak.com/~crunchy/ 



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