On 1/22/09, Sini Ruohomaa <[email protected]> wrote:
> to, 2009-01-22 kello 19:37 -0500, Madeline Book kirjoitti:
> [nation adjective vs. plural in main window]
>> Actually I checked in trunk and it would appear this has been fixed
>> already. The frame label uses the nation plural name and so also
>> has the first letter capitalized (at least that is the case in English).
>
> Excellent! Alas, there can be no such easy capitalization in the Finnish
> translation,
What I could do is add code that would capitalize the first letter
of the frame label; I think this is safe to do, i.e. it won't inadvertently
corrupt some utf8, but I will of course check this when making the
patch.
> ... but this is a problem everywhere in strings where I have to
> start any sentence with a %s so it's nothing new. What I'd really need
> gettext to support is automatic language-aware capitalization in
> localization macros, but I'm not holding my breath on that.
I have often wondered how translators deal with %s in format strings.
Besides the capitalization thing you mention (which I suppose could
in theory always be avoided by re-phrasing, though I wonder how
awkward and loose the translation would become ;)), what about
cases (no pun intended) where the noun or adjective in a %s has
to be made to agree with another noun, adjective or verb in the
sentence? I suppose for some languages it is harder than others...
I would think that %s use should be strictly limited to "sentences"
of the form "blah blah: %s" or "blah blah (%s)", i.e. where there
should not be any possibilty of grammar contraints.
> Anyways, based on the S2_1 version that I've been working on (pot file
> from December's release), below's a couple of typos I've spotted. They
> may well be different in trunk;
I'll check trunk too when I make patches to fix the issues mentioned below.
> server/plrhand.c:1686
> "Your nation is thrust into civil war, %s is declared the leader of the
> "
> "rebel states."
> Double space after comma, and grammatically there should probably be an
> 'and' or other binding word after the comma too.
Ok, I will change it to:
"Your nation is thrust into civil war! %s is declared the leader of
the rebel states."
> server/report.c:748
> "The %s of the %s (%s)"
> Might this be another case of using the painful "X of the Poles"
> structure rather than "The Polish X"?
A rather funny sentence to expect to be translated. ;)
The meaning of the %s's are:
1st %s = government_name_for_player(pplayer)
2nd %s = nation_plural_for_player(pplayer)
3rd %s = textyear(game.info.year)
so an example would be
"The Despotism of the Poles (200 AD)"
I will add a TRANS comment for the above, or try to think
of a more translator friendly way this information could be
conveyed to the user.
> server/unittools.c:297
> "Not enough gold. %s disbanded"
> Should the latter sentence have a period?
Yes. I also change it to
_("Not enough gold to pay upkeep. "
"Your %s unit was disbanded.")
to avoid missing capitalization of the %s and verb agreement
with "was" (does this strategy work in other languages I wonder?).
Maybe the event message is too long though, I'll have to check.
> There's kind of many like it
> in Freeciv; sometimes I wonder if I should just scatter random periods
> around everything that looks like a full sentence and trust that there's
> always a translator command around if it's meant to not have one...
I suppose sometimes the programmer really does want to omit the
period, so it will be better for the translator to follow the punctuation
of the original string. That said, I too have seen the many sentences
missing the period at the end; if you find more report them and I will
check them out and fix them.
> server/unittools.c:616
> "And, became more experienced!"
> Grammar.
Looking at the code design hurts as much as looking at the grammar. :(
I'm not even sure why this splitting of the "became more experienced"
part was included in the patch in r14200; it is not mentioned in 39971
or 39973. I suppose it was to reduce the number of translatable
strings...
At this point it is probably just easiest to remove this "linking" case
from the event messages and just have the "became more experienced"
event as its own individual event. The one drawback is that users
will have to know that when this event occurs it is due to the event
that immediately preceeded it in the event list, e.g.:
"Your diplomat succeeded in bribing the musketeer."
"Your diplomat became more experienced!"
Certainly the duplicated unit name is less ugly than the "And," thing,
in my opinion.
> client/cityrepdata.c:465 client/gui-xaw/citydlg.c:2401
> data/default/units.ruleset:238
> "Workers"
> Must separate between "Workers" as the new unit and "Workers" as in the
> citizens of the city; units.ruleset should have "?unit:Workers" or
> something for this purpose.
Ok.
> client/text.c:1127
> "%s of the %s"
> Plz: Polish Republic ("?nationgovernment:%s %s"), not Republic of the
> Poles? kthxbye. :)
I change it to
/* TRANS: <nation adjective> <government name>. E.g. "Polish Republic" */
astr_add_line(&str, _("%s %s"),
nation_adjective_for_player(pplayer),
government_name_for_player(pplayer));
is that alright? Is it even necessary to have "%s %s" as a translated
string? Since if you need to change the form of the "Polish Republic"
you can't change the form of the nation adjective or the government
name anyway...
> Similarly,
> server/savegame.c:4073
> #. TRANS: ... <Danish> alliance to <Poles>....
> "Illegal alliance structure detected: %s alliance to %s reduced to peace
> "
> "treaty."
> It's not always straightforward to combine the two different classes of
> nation words (adjective and the plural) in a same sentence. The meaning
> is really alliance between Danes and Poles, it's just expressed in a
> special way which is technically more painful to localize.
The i18n guide says not to translate LOG_ERROR messages in
this case, so I will remove the TRANS comment, the _() and the
use of translated nation name functions.
http://freeciv.wikia.com/wiki/Internationalization#LOG_ERROR
> client/text.c:1279
> "Martial law in effect ("
> and
> client/text.c:1294
> "%d per unit). "
> Should be combined to "Martial law in effect (%s%d per unit)." Splitting
> sentences is baaad, mmmkay. :)
After much thought here is what I came up with:
_("Unlimited martial law in effect."))
PL_("%d military unit may impose martial law.",
"Up to %d military units may impose martial law.", mlmax)
PL_("Each military unit makes %d unhappy citizen content.",
"Each military unit makes %d unhappy citizens content.", mleach)
> client/gui-sdl/graphics.c:1021
> "Unable to initialize SDL_ttf library: %s"
> Note double space.
Fixed. I'm not sure whether it makes sense to translate this message
though. The i18n guide would appear to be in favour of translation
since this error could be installation related, though I doubt the
returned reason from SDL_GetError() will be translated.
> client/gui-sdl/gui_string.c:608
> "Couldn't find stdfont.ttf file. Please link/copy/move anyunicode ttf
> font to "
> "data dir as stdfont.ttf"
> Note lack of space ("anyunicode").
This string is in an unused (#if 0) code block. I will remove the code.
> data/helpdata.txt:781
> " To have a diplomatic relationship with another player, you must
> fist "
> "establish (...)"
> fist -> first
Fixed. Though the "you must first establish first contact" sounds kind
of funny. Perhaps the "first" from "first contact" should be dropped.
> Best regards,
>
> --Sini, the drive-by translator
>
> PS. I'm hoping to have something commitworthy for the S2_1 branch in a
> couple of days. Mysteriously enough there seems to be only 53
> untranslated messages left (some nation descriptions and end of the
> tutorial); the translation hasn't been this close to 100% in over half a
> decade. Yay for pre-birth maternity leave! X-)
Great work. If you find more obvious string errors or have some ideas
about how to make life easier for translators post to this list or send it
directly to the bug tracker.
-----------------------------------------------------------------------
すべての村人の中で、翻訳者の仕事は最も難しかった。
_______________________________________________
Freeciv-i18n mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-i18n