gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Translation of tla


From: Jan Hudec
Subject: Re: [Gnu-arch-users] Translation of tla
Date: Mon, 7 Jun 2004 09:05:49 +0200
User-agent: Mutt/1.5.6i

On Mon, Jun 07, 2004 at 11:52:47 +0900, Tez Kamihira wrote:
> Hi,
> 
> On Sun, 6 Jun 2004 21:30:46 -0400, Yannick Gingras <address@hidden> said:
> >
> >   I was wondering how hard it would be to translate tla. I've already
> > used gettext to translate a Python program but I've never done it
> > in C.  Are there any ongoing effort to do the translation of tla ?  If
> > not, can anyone suggest a road-map ?
> > 
> > Something in 10 easy steps would be nice...
> 
> I'm quite interested in this work too. :)
> 
> IMO, the most difficult part comes from many static help messages in
> tla.  Let me introduce an example.
> 
> ./src/tla/libarch/cmd-my-id.c :
> 
>     t_uchar arch_cmd_my_id_help[] = ("print or change your id\n"
>                                      "With no argument print your arch id.\n"
>                                      "\n"
>                                               [...]
>                                      "to be printed.\n");
> 
> You know, this message is _global_, not _local_. Thus, we can't write
> the following statement:

That's what N_() is for. You just need to add gettext to the
opt_standard routine.

Bigger problem is, that just above this message is another:

static t_uchar * version_string = (cfg__std__package " from regexps.com\n"
                                   "\n"
                                   "Copyright 2003 Tom Lord\n"
                                   "\n"
                                   "This is free software; see the source for 
copying conditions.\n"
                                   "There is NO warranty; not even for 
MERCHANTABILITY or FITNESS FOR A\n"
                                   "PARTICULAR PURPOSE.\n"
                                   "\n"
                                   "Report bugs to " cfg__tla_bug_mail ".\n"
                                   "\n"
                                   cfg__std__release_id_string
                                   "\n");

And xgettext simply won't understand this. You would need to make the
cfg__* things arguments to printf format for gettext to work. Again,
that can be done in opt_standard, since the same parts are substituted
in version string everywhere.

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec 
<address@hidden>

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]