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 list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Multiple patches
From: Robert Rendell <rob@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Jul 2000 11:25:20 +1000 (EST)

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.

Not exactly... I use Q_() twice in that patch.  First, I changed an
existing string from _() to Q_():

    _("%s in %s (%s)\n")
        became
    Q_("?wonder:%s in %s (%s)\n")

This is the string that is used to produce the strings in the wonders
summary, eg "Great Library in Alexandria (Greek)".  I put in the
Q_("?wonder:...:) because I felt that the original was rather cryptic for
the translators.

[snip discussion of building many sub-strings which are catenated together
being bad for the translators, and suggestions for general ways to build a
variable-length list]

The second place I used Q_("?wonder:...") was in building up the list of
cities currently building an unfinished wonder (which was the main thrust
of that patch).  I have three strings that are concatinated:

    "(building %s in %s (%s)"
    ", %s (%s)"
        and
    ")"

In other words, you might be catting together the strings

    (building Pyramids in Capua (Roman)
    , Utrecht (Dutch)
    , Big Mound (Sioux)
    ...
    )

Again, I used Q_ because the strings ", %s (%s)" and ")" in isolation were
too cryptic for the translators to realistically work from; the string
"building %s in %s (%s)" was marked with a "?wonder:" for consistancy.  I
couldn't have them all in a single string, because the number of cities
racing to finish a wonder first is variable.

While I agree that in general, catting lots of little strings together
limits the freedom of the translators, in this case I don't think that
applies, since each string above is fairly atomic.  I'm trying to build a
string that lists the cities/nations who are building the same wonder, and
I'm not even trying to be particularly grammatical; I don't try to have
"(building blah in x, y and z)", but rather "(building blah in x, y, z)".
As such, my belief was that what I was doing would be generally
translatable.

BTW, surely a bigger word-order problem for translators is the %s's
embedded in the strings, which get replaced by the parameters to the
*printf() in the order they're given?

                                                        Have fun,
                                                         Rob R.
                                                          \((/
                                                          ~oo~
                                                          /))\



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