Complete.Org: Mailing Lists: Archives: freeciv-i18n: August 2006:
[freeciv-i18n] Re: (PR#19049) Problematic/buggy strings.
Home

[freeciv-i18n] Re: (PR#19049) Problematic/buggy strings.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bugs@xxxxxxxxxxx
Cc: freeciv-i18n@xxxxxxxxxxx
Subject: [freeciv-i18n] Re: (PR#19049) Problematic/buggy strings.
From: Sini Ruohomaa <sini.ruohomaa@xxxxxx>
Date: Tue, 01 Aug 2006 19:55:08 +0300

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

On Tue, 2006-08-01 at 08:36 -0700, Jason Dorje Short wrote:
> >>From a quick look, you're building a structure like, e.g.
> > "City: Helsinki (Finland(?), Friendly) with Aqueduct" or
> > "City: Helsinki (Finland(?), Friendly), Aqueduct". 
> > (not sure what the difference here is, but I'm not a Freeciv coder :=
))
> 
> No, the text is something like
> 
>    "City: Helsinki (Finland, Friendly) with City Walls" or
>    "City: Helsinki (Finland, Friendly) with City Walls, Coastal Defens=
e" or
>    "City: Helsinki (Finland, Friendly) with City Walls, Coastal Defens=
e,
> SDI Defense"
> 
> and so on.  You can see there are a potentially unlimited number of
> cases.  However for the default ruleset the number of cases is clearly
> very limited as only certain buildings are "visible from outside the
> city".  And if we had too long a list, then a list isn't the right way
> to store it anyway.

That does not seem to affect the result - in both cases, "City Walls,
Coastal Defense" or "City Walls, Coastal Defense" or other possibilities
can be built separately and stored to a string, and the start can be
stored to another string, and 
_("%s with %s"), string1, string2 can be translateable. 

In addition, either _("%s, %s"), list_so_far, new_addition_to_list or
_(", ") can be translated if marked as such. (A context indicator for
list separator is appreciated. :))

> >>> --------------------------------------
> >>> #: client/helpdata.c:1310
> >>> #, c-format
> >>> msgid "* Each of your cities will avoid paying %d %s towards unit
> >>> upkeep.\n"
> >> %s is the output type, like 'shields'.  
> > Hmmm. So the ruleset generally is only 3, but is user-modifiable to
> > anything, while there's always only three options for the output typ=
e
> > (shields, trade, food)? You can use PL_ if you split it into "avoid
> > paying %d food", "avoid paying %d shields" and "avoid paying %d trad=
e",
> > right?
> 
> No, not really.  THe problem is the output type names are (potentially=
)
> modifyable in the ruleset, and it can (potentially) be any output type
> that is used here (gold is certainly possible, if you have gold upkeep
> for units).  Thus you would need a full PL_ translation of those, at t=
he
> ruleset level.

Hmm, let's see in that case... If a fixed ruleset can modify the
production "shields" to be "flowers", surely "flowers" will be
marked/markable as translateable? (If a user builds their own vigorously
modified ruleset for non-distribution, they probably won't care about
translations anyway, so I'm assuming this theoretical ruleset is a part
of the Freeciv distribution which we're translating.)

In connection to that mark, we should also (automatically) mark as
PL-translateable "%d flowers" (%d flower and %d flowers for English),
and make the above kind of message be

msgid "* Each of your cities will avoid paying %s towards unit
upkeep.\n"
(with %s replaced by the output of "%d flowers" in this case, and with 
output of "%d shields" in the default ruleset).

(Good call that shields ~ production, I managed to overlook that one. No
surprises on quick grepping there either though.)

> Sure, patch wanted. 

(Just in case someone misunderstands this bit, don't hold your breath on
me submitting patches - I can sort of read Freeciv code and I've now
even managed to mail bugs a handful of times after several years of
translating, I'm not fantasising about writing patches any time soon.
Gotta focus on what I do best (complain? no, translate, I think). :))

> >>> ------------------------------------------------------------
> > [We can't follow these kinds of inflictions, and why's %s not e.g.
> > "(the) Finnish"?]
> 
> I don't follow.

Abbreviated to the point of mangling, it just repeats that we were
talking about how "%s's" can't be translated, and that %s is suddenly a
person's name instead of the people's name, which you caught up on on an
earlier round already. Just to remind, the message was:

>> msgid "You receive %s's worldmap."

And if it were e.g. "You recieve the %s worldmap.", filled with
"Finnish" (instead of e.g. "Tarja Halonen" or "sini"), we can use a word
that's already been modified to fit that kind of role in a sentence.

"You recieve the Finnish worldmap." 
  ~> Vastaanotat suomalaisten maailmankartan. 
"The Finnish Pikemen attacks." 
  ~> Suomalaisten yksikk=F6 Keih=E4smiehet hy=F6kk=E4=E4.
  <~ Finnish unit (to force the sentence into singular) Pikemen attacks.
Basically the same 'suomalaisten' works here (there's the capitalization
challenge, but I think that was a in a different mail).

If the original message uses name-genetive:
"You recieve Tarja's worldmap."
  Literal translation:
  ~> Vastaanotat Tarjan maailmankartan. 
     Won't work: if name ends in a consonant like 'John', genetive
     should be +in (JohnIN) not +n (TarjaN)) - Vastaanotat Johnn
     maailmankartan is just plain wrong.
  Avoid the problem by dropping the genetive:
  ~> Vastaanotat maailmankartan jonka Tarja n=E4kee. (cludgy)
     You-recieve world-map      which Tarja sees. (sounds as bad in
     English as it does in Finnish)

> Too bad it isn't easy to fix more of these issues.  Most translation
> issues are just a simple fix, but you bring up some complex problems..=
.

No biggie, it took me quite a while lurking on the gnome-i18n and the
Finnish Gnome translation team lists to even get the idea that it's a
good idea to bring problems up also when they're more complex than typos
and also when you can't guarantee they affect anyone else but
yourself. :) When I started translating things back in 2001 or so, I had
this strange fixation that coders know all about i18n and the gazillion
languages that localization is done in, and if the message is weird it's
weird for a reason and it's just our task to force it to work in our
language. 

Then I coded an app myself and decided that gettext is infinitely
smarter than the hacks we did in Java. It still took me a couple of
years of occasionally burning my energy into trying to get my
translation and freeciv.pot in or out of version control systems,
boggling at what branch I had a translation in last and where I should
go next, before I realized I could be a lazy bugger with these (thanks
to the constantly improving translation support pages and helpful
co-translators), and spend the energy saved in a) translating and b)
suggesting string changes instead. And wow, this is so much more
gratifying, I feel like I could do *another* round with my fi.po and it
hasn't even been a week! Maybe a quickie tonight. Maybe.

--Sini




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