Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2000:
[Freeciv-Dev] Re: Multiple patches
Home

[Freeciv-Dev] Re: Multiple patches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: Thue <thue@xxxxxxx>
Subject: [Freeciv-Dev] Re: Multiple patches
From: Jed Davis <jldavis@xxxxxxxxxxxxxx>
Date: Thu, 27 Jul 2000 20:28:50 -0400

--On Friday, 28 July 2000 1:47 +0200 Thue <thue@xxxxxxx> wrote:
Den fre, 28 jul 2000 skrev Jed Davis:
--On Thursday, 27 July 2000 22:56 +0200 Thue <thue@xxxxxxx> wrote:
> Den tor, 27 jul 2000 skrev Jeff Mallatt:
>> At 2000/07/27 11:45 , Thue wrote:
>> > Den fre, 26 maj 2000 skrev Robert Rendell:
>> >> wonders.diff
>> >>
>> >>       * Wonders that are currently under construction come up in the
>> >>               wonders display (F7)
>> >
>> > Why the use of "Q_", and not just "_"?
>>
>> I took a _very_ quick look at the patch.  It seems Robert has chopped
>> the strings up into small bits, and is using Q_("?wonder:...") to try
>> to glue them back together.  This is probably a bad idea.  Each
>> concept should be embodied in a single, complete sentence, so that
>> the translators are given some idea as to what the program is trying
>> to say.  Also, the translators may need to alter word order, which is
>> impossible if the program glues strings together in a pre-determined
>> order.  I know that some existing code is full of sentence fragments,
>> but new code should be written with the translators in mind.  Also,
>> if complete sentences are used, there will likely be no need for Q_().
>>
> But there seems to be no way to put a variable length list into a
> single sentence - I can't think of it anyway!
> I like the patch, so I think I would like to apply it anyway unless
> someone tell me a way to do it nicer. (you are hereby warned)
>
Maybe put a %s where the list goes (I guess you'd need separate forms of
the sentence for 0 items, 1 item, and >1 items), then use strcat or
something to concatenate the list together, internationalizing the "and"
or  ", and" or even plain commas, then sprintf or whatever it into the
%s.  I  haven't seen the patch, so this might be either irrelevant or
what the  patch already does for all I know...

But internationalizing the "and" or "," would be the same as is done in
the patch.


Okay then... maybe some kind of recursive specification of the list syntax, like Q_("?list_box:%s, %s") with the current item as the first argument and the sprintf'ed rest of the list as the second argument, and then Q_("?list_end:%s, and %s") for the last two (and enough comments in the source to make these vaguely understandable). Or would that not be general enough? I'm pretty sure it'd work for French and Japanese...

--Jed, finding consboxes everywhere





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