Complete.Org: Mailing Lists: Archives: freeciv-dev: September 1999:
[Freeciv-Dev] Re: I18n problems
Home

[Freeciv-Dev] Re: I18n problems

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: I18n problems
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Mon, 27 Sep 1999 18:20:10 -0400

I was just asking...  I don't have much of a preference, myself.  (Perhaps,
a slight preference for your first macro -- it's simpler, and, you're
right, we can't avoid translator stupidity.)

At 1999/09/27 18:02 , Zbigniew Chyla wrote:
>
>On Mon, 27 Sep 1999, Jeff Mallatt wrote:
>
>> My only other question is whether or not to make the macro more robust.
>> What happens if _() returns something that doesn't contain a colon?
>
>Similar question: what happens if translator uses "%s" instead of "%d"?
>You can't avoid translator's stupidity ;)
>
>If you really want to be safe:
>
> #define __(s) ( i18n_tmp = strchr(_(s), ':') ? i18n_tmp + 1 : _(s) )
> (using global variable "char *i18n_tmp")
>
>alternatively (calling strchr() twice):
>
> #define __(s) ( strchr(_(s), ':') ? strchr(_(s), ':') + 1 : _(s) )
>
>
>Zbigniew Chyla
> 
jjm


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