Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2000:
[Freeciv-Dev] Re: untranslated strings
Home

[Freeciv-Dev] Re: untranslated strings

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Thue Janus Kristensen <thue@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: untranslated strings
From: Robert Brady <rwb197@xxxxxxxxxxxxxxx>
Date: Sun, 30 Apr 2000 20:01:34 +0100 (BST)

On Sun, 30 Apr 2000, Thue Janus Kristensen wrote:

> static char *greatness[] = {
> N_("Magnificent"),  N_("Glorious"), N_("Great"), N_("Decent"),
> N_("Mediocre"), N_("Hilarious"), N_("Worthless"), N_("Pathetic"),
> N_("Useless"), "Useless", "Useless", "Useless", "Useless", "Useless"
> 
> Won't that mean the last 5 strings go untranslated?

No. N_() just means "mark this string for translation". This is needed for
static initialisers. There is no need to mark the last 5 "Useless" as this
string is already marked for translation...

The actual translation happens here later down the file, like so :

  for (i=0;i<j;i++) {
    cat_snprintf(buffer, sizeof(buffer),
                 _("%2d: The %s %s\n"), i+1, _(greatness[i]),
                 get_nation_name_plural(game.players[size[i].idx].nation));
  }

-- 
Robert




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