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: Erik Sigra <freeciv@xxxxxxx>
Date: Sun, 03 Sep 2000 11:52:40 +0200

David Pfitzner wrote:
> 
> 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 ;-)

Umm. Yeah, I guess so :-|

> > > 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 did it only because I discovered that it didn't work with 32 when I
first tested it. I was concerned too, but didn't know any other way to
do it. So don't interpret it as a vote from my side that it should be
like this.

> > >  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.

Speaking of other names, what would you say about me adding a few cases
for other things than nation names: Granary, granary, A granary, a
granary, Granaries, granaries, The granary, the granary, ... ;-)

>   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.

Depends on what we prioritize. Maintainability or memory optimization.
I'll let someone else make this decision.

> > 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.

I said "small" because there are many cases I didn't add. Accustativ was
mentioned and there are certainly many more (neuter, uter, ...).

> 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)

Maybe they will be used. I'm not a native English speaker, but wouldn't
it be valid to construct sentences like "The first person to travel
around the world was a Swede." or "Never trust a Swede." ("Never trust a
Swede's word.") (for example in discussions between French and Russian
diplomats)? (I read somewhere
(http://www.gamedev.net/reference/articles/article1133.asp) that
computer games must use a richer language to attract a certain
audience.)

I added this many cases for completeness. I thought developers should
have the largest possible freedom to formulate when writing texts.

And I thought that it would be bad to include only the cases that are
currently needed. Then we would have to add new cases/delete cases all
the time to optimize memory use (unless it can be optimized
automatically at compile time). I thought we just leave them all in for
simplicity.

Most people play with only about 7 nations in a game anyway, so nation
names wouldn't be a major memory usage. The other nation names are freed
after the nation select dialog.

> +  /* 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));
> ?

Changed.

> +  /* 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...

I thought there was a difference between the specific player/nation and
a (random) group of Swedes. For example the Government applies to all
Swedes, "The Republic of the Swedes", but units are groups of Swedes,
"Swedes destroyed Miami.", which means that some but not all Swedes did
it.

I'm sure we can agree on a good set of cases (richer than the dual set
used now) eventually.

> -- David

--Erik

Attachment: nation_name_i18n_improvement-4.diff.bz2
Description: Binary data


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