Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2006:
[Freeciv-Dev] Re: (PR#19049) Problematic/buggy strings.
Home

[Freeciv-Dev] Re: (PR#19049) Problematic/buggy strings.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sini.ruohomaa@xxxxxx
Subject: [Freeciv-Dev] Re: (PR#19049) Problematic/buggy strings.
From: "Jason Dorje Short" <jdorje@xxxxxxxxx>
Date: Mon, 31 Jul 2006 10:57:14 -0700
Reply-to: bugs@xxxxxxxxxxx

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

sini.ruohomaa@xxxxxx wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=19049 >
> 
> Hi,
> 
> I've a bunch of problematic/buggy strings for you, all reports based on
> ftp://ftp.freeciv.org/pub/freeciv/latest/freeciv.pot.bz2 which is as far
> as I understand from the trunk. 
> 
> #: client/text.c:176 client/gui-sdl/mapview.c:626
> msgid " with "
> 
> This string needs a translator comment at the least, but it is also
> buggy: sentences of any sort should not be split up like this, they
> should be produced with e.g. "%s with %s" (and translator-commented) so
> that we can move the with to be somewhere else as well if needed.

It is a problem.  Building sentences using code is quite problematic. 
But the alternative is a switch statement with a potentially infinite 
number of cases.  In the above case we should probably just have a 
switch with a max amount and a default case that gives some sensible 
fallback (plus an error message).

> ------------------------------------------------------------
> 
> #: client/helpdata.c:1310
> #, c-format
> msgid "* Each of your cities will avoid paying %d %s towards unit
> upkeep.\n"
> 
> The above string seems to be buggy as well, if it can be filled with 1
> Gold, it should be possible to translate separately for singular. But
> the confusing bit is what is %s?

%s is the output type, like 'shields'.  There are currently no different 
forms of this.  I honestly don't know much about linguistics or 
translation so I don't know if a different form is needed here.  In 
particular, since there is no singular/plural/dual forms available it 
isn't really possible to use PL_ here.

In most cases this won't matter since for the default ruleset I believe 
%d is always 3.

> ------------------------------------------------------------
> 
> #: client/helpdata.c:678
> #, c-format
> msgid "* Allows all players with knowledge of %s to build %s units.\n"
> 
> What can the latter %s be? These kinds of strings are in a few places in
> the helpdata stuff, please add a translator comment to at least this
> one.

In the default ruleset this will always come out as '* Allows all 
players with knowledge of atomic power to build nuclear units.\n'.  I'll 
add a TRANS comment.

> ------------------------------------------------------------
> 
> #: client/helpdata.c:170
> #, c-format
> msgid ""
> "Requires the %s government.\n"
> "\n"
> 
> Please don't make us translate linebreaks, unless you are completely
> utterly certain the formatting around this string will never change.
> Translators should not be made to translate formatting:
> <b>Does %s and %s</b>
> Does %s and %s
> * Does %s and %s
> Does %s and %s\n\n
> should be replaced with one "Does %s and %s" and possibly separate
> strings for "<b>%s</b>" (some may want to translate bold as something
> else, although stuff like this is luckily rare in Freeciv), and a
> translator-commented "* %s" and "%s\n\n". But for now, I figure it's
> best not to touch them, but if you touch them, make them be just the
> string and push the formatting out.

That is a problem in a LOT of places.  The same issue crops up with 
prefixes like the old 'Game: ' but also like '* ' from the previous 
example you gave.  Fixing these isn't that easy though - I won't be 
making major changes to translatable strings for the 2.1 release, since 
that would break a lot of translations.  But we should try to clean all 
these up for 2.2.

Maybe I'll do what Red Hat did and create my own translation so that I 
can work through the problems.  All I can really do now is go through 
the po files and look for bad strings, or find particular instances and 
search the code for them.

> ------------------------------------------------------------
> 
> #: client/gui-gtk-2.0/gui_main.c:197 client/gui-gtk-2.0/gui_main.c:202
> #: client/gui-gtk-2.0/gui_main.c:207 client/gui-gtk-2.0/gui_main.c:212
> #: client/gui-gtk-2.0/gui_main.c:217 client/gui-gtk-2.0/gui_main.c:222
> #: client/gui-gtk-2.0/gui_main.c:227 client/gui-gtk-2.0/gui_main.c:232
> #: client/gui-gtk-2.0/gui_main.c:237 client/gui-gtk-2.0/gui_main.c:242
> #: client/gui-gtk-2.0/gui_main.c:247 client/gui-gtk-2.0/gui_main.c:252
> msgid "FIXME"
> 
> Should things like this really be translated?

No.  But this is a string that is translated by default - what we need 
to do is get someone to write something here.  This is the help text for 
the GTK2 options.  It needs to be written ASAP.  But some of the 
options, I don't even know what they do.  The original author (vasco) 
was quite lazy in adding obscure options without any explanation of what 
they do.

> ------------------------------------------------------------
> 
> #: client/gui-gtk-2.0/gui_main.c:201
> msgid "Notify Label"
> 
> All these labels are unclear. Could you add translator comments to
> gui-gtk-2.0/gui_main around lines 196-241?

Same problem as above.  Notify Label is one of the FIXME options.  But I 
don't know what it does so I can't write a full help message or a TRANS 
comment.

> ------------------------------------------------------------
> 
> #: server/diplhand.c:392
> #, fuzzy, c-format
> msgid "You receive %s's worldmap."
> 
> These kinds of nightmares make me wish I could inflict words with a
> simple 's too (mind that there's still people who think e.g. "fox's" and
> "Giles's" is bad English as well). Since we have a genetive defined
> ("The Finnish People", hence "The Finnish map"), please use it instead
> of using whatever "MyLeaderName's worldmap" or "sini's worldmap" or
> "Finland's worldmap". 
> 
> It would be nice to have TRANS-marked all exceptional uses of
> usernames/connection names/leader names in the various "You steal tech
> from %s" or "The %s unit-of %s does this and that" contexts where the
> nation genetive or plural are most often used. It's often rather
> troublesome to try to figure out what the different parameter names mean
> exactly from the code.

I find it easiest just to add a sample text into the TRANS comment.  In 
the above case this would probably be "You receive Giles's worldmap.", 
since I assume it is the leader name not the nation name that is used. 
Use of the leader name throughout is a major usability issue - but not 
something that will be fixed for 2.1.0.

> ------------------------------------------------------------
> 
> #: server/diplomats.c:714
> #, c-format
> msgid "You caught %s %s attempting to incite a revolt in %s!"
> 
> This is a very generic example of a sentence which will need to be
> translated starting with %s %s for reasons of general Freeciv
> untranslateability to a non-analythical language. In addition, %s is
> e.g. "Finnish", which in Finnish is translated as
> 'suomalaisten' (of-the-Finnish-people). I'm suspecting the sentence will
> begin with a non-capital letter as a result. What can be done about it?
> It's bad form to cap all genetives in Finnish.
> 
> The general problem of untranslateability is that a language like
> Finnish would need separate translateable strings to e.g.
> "your %s" (unit)
> "object?%s" (as an object of a sentence, like you caught %s)
> to make sentences really work.
> 
> In addition, all town names really need separate translations for "in %
> s", "near %s" and "to %s". And town names are untranslateable to begin
> with. But I'll have to write about this more after I consult the Gnome
> Finnish team for more wisdom. Basically, the Finnish translation sounds
> like a mechanized horror because all these need to be tweaked around:
> "You caught the %s unit of %s attempting to incite a revolt in the town
> of %s!" is an example of the more sensible adjustments I've made. It
> causes me motivational problems to translate something that sounds so
> horrible I wouldn't use it myself, but working with Freeciv seldom
> enough is good for forgetting such misthoughts and getting some work
> done instead. ;)

I don't see that anything can reasonably be done for this.

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#19049) Problematic/buggy strings., Jason Dorje Short <=