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: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: I18n problems
From: Zbigniew Chyla <cyba@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Sep 1999 00:02:05 +0200 (CEST)

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


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