Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2006:
[Freeciv-Dev] Re: (PR#15751) Original string bugs/typos, batch
Home

[Freeciv-Dev] Re: (PR#15751) Original string bugs/typos, batch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sini.ruohomaa@xxxxxx
Subject: [Freeciv-Dev] Re: (PR#15751) Original string bugs/typos, batch
From: "Sini Ruohomaa" <sini.ruohomaa@xxxxxxxxxxxxxx>
Date: Mon, 6 Mar 2006 06:31:36 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15751 >

Hi,

Thanks for the reply, Daniel!

On Sun, 2006-03-05 at 15:15 -0800, Daniel Markstedt wrote:
> On 2006-03-03, at 06.53, sini.ruohomaa@xxxxxx wrote:
> > server/cityhand.c:387 and others suggest translating string
> > "%s". 
> I just suppose these kind of strings never have to be altered by 
> translators. Such as the name of a nation etc.

Hmm. I had a warning light on but was confused about what it warned
about. The important point I was missing is that a lone %s shouldn't
just blindly be marked untranslateable again. Check if it's used wrong
first.

If the %s is used only for escaping a message string not under our
control at all, like in Jason's example, I think it can't and should not
be touched by translators - any repetitive markup for "incoming message"
and so on should be in different translateable strings. It just looks
like a new string, but isn't.

However, the fact that the string was marked translateable may mean that
a string translated for one context is used in a new context, which is
worse. The helpful coder may think: "If it's different for some
language, they can modify the surrounding string." Of course oftentimes
that's not enough to make "I had a thought" and "I thought" to work with
the same "thought". Or fix the problem with "the English" used both as a
nation name and an adjective. ;) 

> > server/citytools.c:894 seems to have unnecessary indenting left over
> > from having "Game: " in the start. Looks funky.
> The indenting is AFAICT intentional. Also for example:
> #: server/plrhand.c:1684
> #, c-format
> msgid ""
> "The capture of %s's capital and the destruction of the empire's "
> "administrative\n"
> "      structures have sparked a civil war.  Opportunists have flocked 
> to the "
> "rebel cause,\n"
> "      and the upstart %s now holds power in %d rebel provinces."

I'm not sure if it's consistent in any way. To me it would be
considerably nicer if cosmetic indentations and linebreaking were done
by code instead of people, and if there's some silly reason that we need
to get something to fit a tight space, it should be commented. I can't
see from all server strings if they're supposed to be indented the same
way, if the English version fits on a single line. (The Finnish often
ends up longer, and if the English uses 80% of the first line I won't
see if it has its second line indented. ;))

> > server/citytools.c:1017 string should probably end in "."
> >
> > server/citytools.c:1854 Don't put the space in the translateable
> > substring, put it between the %s%s so we can do punctuation where it
> > should be.
> I didn't follow you here. :-)

I assume the first one is clear?
In that particular case I think the string was 
"Cannot complete <building>< from the worklist>"
If the option for < from the worklist> is another explanation, it's
nicer to have the space in the complete sentence:
"Cannot complete <building> <from the worklist>"
However, if you presume to put the empty string <> as the latter %s
sometimes, I can see why you'd put them together that way (to avoid the
extra space). In that case it's unfortunate but fine. ;)

This kind of funky spacing and other places where there are no hint
words between different strings like in "%s of the %s" are that
magically lovely place for translator comments. Translating 3000 strings
makes you very soon prefer those ones which won't force you to go check
in code what each %s really stands for. We can't rely on the
translateable sub-message being next to the full message either in the
po file to give the context, as sometimes the strings get rather mixed
for reasons I don't quite understand yet.

Cheers,

--Sini





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