Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2000:
[Freeciv-Dev] Re: Improved grammatic handling of nation names.
Home

[Freeciv-Dev] Re: Improved grammatic handling of nation names.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Improved grammatic handling of nation names.
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sun, 3 Sep 2000 15:33:39 +1100 (EST)

Erik Sigra <freeciv@xxxxxxx> wrote:
> Jeff Mallatt wrote:
> > 
> > At 2000/08/21 10:05 , you wrote:
> > >This patch (2000-08-21) improves the grammatic handling of nation names.
> > 
> > This look like a great improvement.

Agreed.

> >  The patch is now out of date, so I
> > couldn't really test it.  Just reading the patch, however, brought a couple
> > of issues to mind.
> 
> Here is an updated patch. It should apply, compile and run.
> 
> > First, there needs to be a capability defined and used to allow old and new
> > clients and servers to talk to each other.
> 
> I haven't done anything about this yet (I have never looked at the
> capability string code).

Time to learn ;-)

> > Second, I'm quite concerned about the ramifications of redefining
> > MAX_LEN_NAME from 32 to 128.

I agree, I'm concerned about this too.

> >  I think the best way would be to leave
> > MAX_LEN_NAME as is, and change the nation ruleset reader to use a large
> > buffer, then immediately apply Q_() to get the name, and apply a new macro,
> > S_(), which would simply strip the qualifier, to get the original name.
> > This would require changing several references to name into references to
> > name_orig.  (This all in terms of existing code, not in terms of new code.)

But the server has to keep the original fully qualified name to send
to clients, so that each client can translate on the fully qualified
names (ie, into possibly different locale, in principle).  Or do you
mean for clients to add the qualifier themselves (in a bigger buffer)
before translating?  That seems a bit fragile, but if everything is
consistent I guess it should work...

Other suggestions:

1. #define MAX_LEN_NAME_LONG, and use for these only these cases - not
ideal, but at least it doesn't affect ("infect"?) other names.

  1b.  Could maybe get away with only using MAX_LEN_NAME_LONG on the
  _orig fields, and in packets and maybe a few other places, using
  method similar to described above.

2. Abbreviate the qualifiers, possibly fairly aggressively; this may
make it slightly less obvious for translators, but we could probably
arrange to have C-style comments in the right places so that the
unabbreviated description appears in the *.po files above each entry.

> I know that this patch does not solve every grammatic problem for every
> language. I just hope it helps a little and doesn't make things worse. I
> know that German needs accustativ, but I choose to add a small set of
> cases. (If this patch is committed (with modifications of course, see
> above) and it is possible to add accustativ I (or someone else) will do
> it.) I was afraid of getting problems with different languages using
> different cases in the same place.
> 
> I would like someone to make a more general solution, but I think that
> is going to take a long time. Until then we could use this.

Actually, its not clear to me that you've chosen a "small" set of
cases, in that quite a few of them I can't imagine Freeciv currently
using or ever using in future.  I realise you're probably trying to be
reasonably general, but it seems rather unnecessary to me to have some
of these cases, and if they are never used they just lead to more
code, more packet data, more strings to translate, etc.

In particular:

+  /* A Swede, En svensk */
+  char name_noun_indefinite_singular_capitalized[MAX_LEN_NAME];
+  /* a Swede,  en svensk */
+  char name_noun_indefinite_singular[MAX_LEN_NAME];
+
+  /* A Swede's, En svensks */
+  char name_noun_indefinite_singular_genitive_capitalized[MAX_LEN_NAME];
+  /* a Swede's, en svensks */
+  char name_noun_indefinite_singular_genitive[MAX_LEN_NAME];

Since individual persons (other than the ruler) are well below the
Freeciv "scale", I don't think Freeciv ever refers to one.  Actually,
this applies to the other "singular" cases too, namely: (out of order)

+  /* The Swede, Svensken */
+  char name_noun_definite_singular_capitalized[MAX_LEN_NAME];
+  /* the Swede, svensken */
+  char name_noun_definite_singular[MAX_LEN_NAME];
+
+  /* The Swede's, Svenskens */
+  char name_noun_definite_singular_genitive_capitalized[MAX_LEN_NAME];
+  /* the Swede's, svenskens */
+  char name_noun_definite_singular_genitive[MAX_LEN_NAME];


+  /* Swedes, Svenskar */
+  char name_noun_indefinite_plural_capitalized[MAX_LEN_NAME];
+  /* Swedes, svenskar */
+  char name_noun_indefinite_plural[MAX_LEN_NAME];

I was wondering about this, since for most cases it seems to me that
the definite_plural ("the Swedes") would apply just as well or better,
but on closer inspection there may be some valid instances, such as
"The Magnificient <Swedes>".  Incidently some instances of this in the
patch _should_ I think better use definite_plural instead, eg:

>   my_snprintf (civbuf, sizeof(civbuf), _("The %s of the %s"),
>               get_government_name (pplayer->government),
> -              get_nation_name_plural (pplayer->nation));
> +              get_nation_name_noun_indefinite_plural(pplayer->nation));
?

+  /* Swedes', Svenskars */
+  char name_noun_indefinite_plural_genitive_capitalized[MAX_LEN_NAME];
+  /* Swedes', svenskars */
+  char name_noun_indefinite_plural_genitive[MAX_LEN_NAME];

+  /* The Swedes', Svenskarnas */
+  char name_noun_definite_plural_genitive_capitalized[MAX_LEN_NAME];
+  /* the Swedes', svenskarnas */
+  char name_noun_definite_plural_genitive[MAX_LEN_NAME];

I guess we might find a use for these, though not sure.  If we do,
again the definite case would seem better generally, since in practice
want to refer the _the_ Swedes - that is, the specific player/nation
in the game - rather than some random group of Swedes...

-- David



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