Re: [Freeciv-Dev] I18n patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Artur Biesiadowski wrote:
> Here is a patch that marks a lot of strings in gtk client. It was
> created by my friend Zbigniew and he asked me to forward it to this
> list.
> Content-Disposition: attachment;
> filename="freeciv-i18n.diff.bz2"
Thanks; I have checked in this patch, after updating to cvs
and minor fix.
There is one problem I'm not sure how best to fix:
This patch included in various places things like:
- char *titles[6]= {"Server Name", "Port", "Version", "Status", "Players",
- "Comment"};
+ char *titles[6]= {_("Server Name"), _("Port"), _("Version"), _("Status"),
_("Players"),
+ _("Comment")};
This may work with gcc, but its not acceptable in general
(because initialiser must be constant, and result of _() is not).
A partial fix is to use N_() instead of _(), which is what
I've done. However then one must use _() somewhere else in
the code, and I'm not sure how, because this is used by, eg:
list=gtk_clist_new_with_titles(6, titles);
Note cannot just do eg:
list=gtk_clist_new_with_titles(6, _(titles));
Because need to call _() on individual elements instead.
Any ideas?
(So currently such strings are marked by N_(), but any
translations will not be used.)
-- David
|
|