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 11:44:35 -0400

At 1999/09/27 07:48 , Zbigniew Chyla wrote:
>Why don't you just define simple macro somewhere: (common/fcintl.h ?)
>
> #define __(s) (strchr(_(s), ':') + 1)
>
>Modifications in code are minimal:
>
> puts(__("1:Name"))
> ...
> puts(__("2:Name"))
>
>In this case you need neither english translation nor NLS.

This (or something similar) was going to be my suggestion.  The only
substantive difference is a usage convention: rather than "1:", "2:", &c...
(what does "1" mean?), I thought it would be more in the spirit of gettext
to use textual discriminants.  E.g., using your macro:

  puts(__("as a person:Name"));
  ...
  puts(__("as a thing:Name"));

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?

jjm


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