Re: i8n problems
- From: Havoc Pennington <hp redhat com>
- To: Chris Jones <chris black-sun co uk>
- cc: gnome-devel-list gnome org
- Subject: Re: i8n problems
- Date: Thu, 18 Nov 1999 12:12:58 -0500 (EST)
On Thu, 18 Nov 1999, Chris Jones wrote:
> I was following the tutorial on developer.gnome.org and read some of
> GGAD to figure out how to make my application capable of being
> translated easily. I got everything setup properly and created the
> intl/ and po/ directories and filled them with the correct files.
> Everything compiles and works, so I'm happy with that, but I have an
> annoying problem, I'm keeping my source in a CVS tree and when I added
> the new files to it, it created the files in /intl (all symlinks to
> the GNU gettextize stuff), they were created as 0 byte files and as a
> result I can't do CVS commits anymore because it is moaning about the
> intl/ drawer being wrong. I know this isn't strictly relevant here,
> but I'm wondering if anyone with more CVS experience has come across
> this problem before and if so, how do I fix it?
>
I think what we finally decided is that "intl" shouldn't go in CVS; the
current GNOME autogen.sh automatically runs "gettextize" to create it.
> Also, I have some strings that are in arrays:
>
> gchar *message_list_titles[] = {
> N_("Status"),
> N_("From"),
> N_("Subject"),
> N_("Received"),
> N_("mId")
> };
>
> >From reading the i8n tutorial, I put N_() around them, but it then
> says that when the string is later used to put _() around it. How can
> I do that here? This array is passed whole to a GtkCList so I can't
> _() the individual strings.
>
Unfortunately I think you have to call the _() function, probably means
copying the strings into another array. You might do this:
static const gchar**
get_titles()
{
static const gchar* titles[5] = { NULL, NULL, NULL, NULL, NULL};
if (*titles == NULL)
{
titles[0] = _("Blah");
titles[1] = _("Foo");
}
return titles;
}
Which isn't all that bad.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]