[Freeciv-Dev] Re: I18n problems
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
|
|