tis 2009-01-27 klockan 00:03 -0500 skrev Madeline Book: > 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. >
As long as languages that do not have such a things as capitalization (like the Asian languages) do not get broken that would be very nice indeed. Please also take into account that there might be strings existing right now that only differ on the case of the initial, and that it might in fact be individual translations that have translated the uc inital version but not the other. Simply removing the upper case initial versions would then mean that we would in fact lose some translations. If there are a lot of strings affected, then it might be nice towards the translators to in case the msgstr is empty for the "old" lower case initial version, move the msgstr from the "old" upper case initial version, of course with a #fuzzy added, so that the translators only need to verify the string, not retranslate it. If however it is only a case of one or two strings, this is probably more work than it is worth. > > > ... 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... Don't forget to take definiteness into account, not all languages have a nice neat "the" to tack onto any noun that should have definite reference. Swedish f ex uses an ending, which is dependent on the gender of the noun, meaning that in many cases I have had to resort to "meta nouns" such as "the unit xxx" where the original only said "the xxx" in order to express definite reference, i.e. in effect transforming the sentence into one where the original noun (the %s) is in a way quoted. Sometimes you just have to focus on getting the relevant information across in an easily readable format, rather than adhering too closely to the original - though of course the desire is always to keep it as close as possible. > > 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. > As always this is a question of balance between getting the translations as good as theoretically possible (NEVER use %s) and making the translation effort as easy as theoretically possible (use %s whenever a word is reused). <snip> > > 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. When I was working on translating wesnoth, which also use gettext, a tweak was made to allow full variable names instead of simple placeholders, cf http://svn.gna.org/viewcvs/wesnoth/trunk/po/wesnoth/wesnoth.pot?view=markup so that a msgid could be f ex msgid "(press $hotkey to keep moving)", which then would be translated as f ex msgstr "(tryck $hotkey för att fortsätta)". Variable name from $ until white space (or non-letter??) or | iirc. I really liked this way of conveying to the translators (and to later coders!) what the intent of the message was. I THINK the relevant pieces of code are vgettext/vngettext; which wraps around gettext and interpolate_variables_into_string (cf. http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula_string_utils.cpp) if you are interested in how they did it. I have no idea how complex integrating such a system in Freeciv would be... Anyway, more TRANS comments are more than welcome! *smile* <snip> > > > 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. Furthermore, in my experience, there are numerous cases where this "And,..." gets written out WITHOUT there being a previous sentence telling you which unit is referred to - I at one time thought I was starting to discern a pattern (primarily when the unit was attacked and possibly more often after you yourself had completed your turn), but I am not sure about it. I am all for having it stated twice in some cases rather than not at all. > > > 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. Another one of my long-to-be-submitted bug reports, thanks Sini for finally getting this to the attention of the devs! <snip> /Sanna
_______________________________________________ Freeciv-i18n mailing list [email protected] https://mail.gna.org/listinfo/freeciv-i18n
