Re: [Freeciv-Dev] (PR#39971) BUG: i18n possessive problems -- eliminated

2007-12-26 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39971 

Committed S2_1 revision 14203 with po massaging and update-po.
Committed S2_2 revision 14204.
Committed trunk revision 14205.

After running update-po (my very first time), there are about 46 of my
hand manufactured fuzzies from this batch of 3 related patches.  As you
can see, I've also managed to consolidate a few more strings.

I'm really not liking the fuzzy matches.  I found existing silly
problems.  There are about 6 translations that show Dead for Ready.

It's safe now for translators to fix the fuzzies, and uncover another
batch of intractable problems

And another month before the next release!



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39971) BUG: i18n possessive problems

2007-12-25 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39971 

Here's the S2_2 patch to convert the 55 remaining %s's to the %s and use
the nation_adjective instead of the player-name.  For 2.1, I'll massage the
po files, too.  It is rather tedious.  Hold off working on translations for
today until I can get this done


Index: server/citytools.c
===
--- server/citytools.c  (revision 14202)
+++ server/citytools.c  (working copy)
@@ -502,8 +502,8 @@
   struct player *to_player = city_owner(tocity);
 
   if (from_player == to_player) {
-freelog(LOG_VERBOSE, Changed homecity of %s's %s to %s,
-   from_player-name,
+freelog(LOG_VERBOSE, Changed homecity of %s %s to %s,
+   nation_rule_name(nation_of_player(from_player)),
unit_rule_name(punit),
tocity-name);
 if (verbose) {
@@ -518,33 +518,40 @@
   freelog(LOG_VERBOSE, Transfered %s in %s from %s to %s,
  unit_rule_name(punit),
  in_city-name,
- from_player-name, to_player-name);
+ nation_rule_name(nation_of_player(from_player)),
+ nation_rule_name(nation_of_player(to_player)));
   if (verbose) {
notify_player(from_player, punit-tile, E_UNIT_RELOCATED,
  _(Transfered %s in %s from %s to %s.),
  unit_name_translation(punit),
  in_city-name,
- from_player-name, to_player-name);
+ nation_adjective_for_player(from_player),
+ nation_adjective_for_player(to_player));
   }
 } else if (can_unit_exist_at_tile(punit, tocity-tile)) {
   freelog(LOG_VERBOSE, Transfered %s from %s to %s,
  unit_rule_name(punit),
- from_player-name, to_player-name);
+ nation_rule_name(nation_of_player(from_player)),
+ nation_rule_name(nation_of_player(to_player)));
   if (verbose) {
notify_player(from_player, punit-tile, E_UNIT_RELOCATED,
  _(Transfered %s from %s to %s.),
  unit_name_translation(punit),
- from_player-name, to_player-name);
+ nation_adjective_for_player(from_player),
+ nation_adjective_for_player(to_player));
   }
 } else {
   freelog(LOG_VERBOSE, Could not transfer %s from %s to %s,
  unit_rule_name(punit),
- from_player-name, to_player-name);
+ nation_rule_name(nation_of_player(from_player)),
+ nation_rule_name(nation_of_player(to_player)));
   if (verbose) {
notify_player(from_player, punit-tile, E_UNIT_LOST,
- _(%s from %s lost in transfer to %s's %s),
+ _(%s %s lost in transfer to %s %s),
+ nation_adjective_for_player(from_player),
  unit_name_translation(punit),
- from_player-name, to_player-name, tocity-name);
+ nation_adjective_for_player(to_player),
+ tocity-name);
   }
   wipe_unit(punit);
   return;
@@ -615,10 +622,11 @@
 } else {
   /* The unit is lost.  Call notify_player (in all other cases it is
* called automatically). */
-  freelog(LOG_VERBOSE, Lost %s's %s at (%d,%d) when %s was lost.,
- unit_owner(vunit)-name,
+  freelog(LOG_VERBOSE, Lost %s %s at (%d,%d) when %s was lost.,
+ nation_rule_name(nation_of_unit(vunit)),
  unit_rule_name(vunit),
- vunit-tile-x, vunit-tile-y, pcity-name);
+ TILE_XY(vunit-tile),
+ pcity-name);
   if (verbose) {
notify_player(unit_owner(vunit), vunit-tile,
 E_UNIT_LOST,
Index: server/settlers.c
===
--- server/settlers.c   (revision 14202)
+++ server/settlers.c   (working copy)
@@ -1263,8 +1263,9 @@
|| unit_has_type_flag(punit, F_CITIES))
 !unit_has_orders(punit)
  punit-moves_left  0) {
-  freelog(LOG_DEBUG, %s's settler at (%d, %d) is ai controlled.,
- pplayer-name, TILE_XY(punit-tile)); 
+  freelog(LOG_DEBUG, %s settler at (%d, %d) is ai controlled.,
+ nation_rule_name(nation_of_player(pplayer)),
+ TILE_XY(punit-tile)); 
   if (punit-activity == ACTIVITY_SENTRY) {
handle_unit_activity_request(punit, ACTIVITY_IDLE);
   }
@@ -1278,8 +1279,9 @@
   } unit_list_iterate_safe_end;
 
   if (timer_in_use(t)) {
-freelog(LOG_VERBOSE, %s's autosettlers consumed %g milliseconds.,
-   pplayer-name, 1000.0*read_timer_seconds(t));
+freelog(LOG_VERBOSE, %s autosettlers consumed %g milliseconds.,
+   nation_rule_name(nation_of_player(pplayer)),
+   1000.0*read_timer_seconds(t));
   }
 }
 
Index: server/cityturn.c

[Freeciv-Dev] (PR#39971) BUG: i18n possessive problems

2007-12-16 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39971 

Most of these are SDL issues, and SDL was only recently added to the
translations and isn't finished.  But a couple things leap to the eye:


 #: client/gui-sdl/spaceshipdlg.c:142
 #, c-format
 msgid %s's SpaceShip
 
This is a continuing problem.  This pattern should never be used!  Many
times, it's not even correct English.  (How do you adjust the ' when the
word ends in s, especially for a proper name?)


#: server/citytools.c:541
#, c-format
msgid %s from %s lost in transfer to %s's %s

#: server/cityturn.c:864
#, c-format
msgid %s's worklist is now empty.

#: server/diplhand.c:407
#, c-format
msgid You receive %s's worldmap.

#: server/diplhand.c:415
#, c-format
msgid You receive %s's seamap.

#: server/diplhand.c:469 server/diplhand.c:478
#, c-format
msgid 
You agree on an armistice with %s. In %d turn it will turn into a peace 
treaty. Move your units out of %s's territory.
msgid_plural 
You agree on an armistice with %s. In %d turns it will turn into a peace 
treaty. Move your units out of %s's territory.

#: server/diplomats.c:332
#, c-format
msgid Your %s could not sabotage %s's %s.

#: server/diplomats.c:354
#, c-format
msgid Your %s succeeded in sabotaging %s's %s.

#: server/diplomats.c:421
#, c-format
msgid You don't have enough gold to bribe %s's %s.

#: server/diplomats.c:457
#, c-format
msgid Your %s succeeded in bribing %s's %s and became more experienced.

#: server/diplomats.c:464
#, c-format
msgid Your %s succeeded in bribing %s's %s.

#: server/diplomats.c:613
#, c-format
msgid %s's %s failed to steal technology from %s.

#: server/diplomats.c:1264
#, c-format
msgid You have caused an incident while bribing %s's %s.

#: server/plrhand.c:1723
#, 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.

#. TRANS: Minor error message.
#: server/savegame.c:4065
#, c-format
msgid 
Illegal alliance structure detected: %s's alliance to %s reduced to peace 
treaty.

#: server/stdinhand.c:2380 server/stdinhand.c:2410
#, c-format
msgid %s's %s no longer debugged.

#: server/stdinhand.c:2385 server/stdinhand.c:2415
#, c-format
msgid %s's %s debugged.

#: server/unithand.c:902
#, c-format
msgid 
Your %s%s survived the pathetic attack from %s's %s and became more 
experienced!

#: server/unithand.c:912
#, c-format
msgid Your %s%s survived the pathetic attack from %s's %s.

#: server/unithand.c:923
#, c-format
msgid Your attacking %s failed against %s's %s%s!

#: server/unittools.c:1608
#, c-format
msgid 
Your attacking %s succeeded against %s's %s%s and became more experienced!

#: server/unittools.c:1617
#, c-format
msgid Your attacking %s succeeded against %s's %s%s!

#: server/unittools.c:1625
#, c-format
msgid %s lost to an attack by %s's %s%s.

#: server/unittools.c:1660
#, c-format
msgid 
Your attacking %s succeeded against %s's %s (and %d other unit)%s and became 
more experienced!
msgid_plural 
Your attacking %s succeeded against %s's %s (and %d other units)%s and 
became more experienced!

#: server/unittools.c:1673
#, c-format
msgid Your attacking %s succeeded against %s's %s (and %d other unit)%s!
msgid_plural 
Your attacking %s succeeded against %s's %s (and %d other units)%s!

#. TRANS: Cannon lost to an attack from John's
#. * Destroyer.
#: server/unittools.c:1698
#, c-format
msgid %s lost to an attack from %s's %s.

#. TRANS: Cannon lost when John's Destroyer
#. * attacked Mark's Musketeers.
#: server/unittools.c:1707
#, c-format
msgid %s lost when %s's %s attacked %s's %s.

#. TRANS: Musketeers (and Cannon) lost to an
#. * attack from John's Destroyer.
#: server/unittools.c:1722
#, c-format
msgid %s (and %s) lost to an attack from %s's %s.

#. TRANS: Musketeers and 3 other units lost to
#. * an attack from John's Destroyer. (only happens
#. * with at least 2 other units)
#: server/unittools.c:1732
#, c-format
msgid %s and %d other unit lost to an attack from %s's %s.
msgid_plural %s and %d other units lost to an attack from %s's %s.

#. TRANS: 2 units lost when John's Destroyer
#. * attacked Mark's Musketeers.  (only happens
#. * with at least 2 other units)
#: server/unittools.c:1746
#, c-format
msgid %d unit lost when %s's %s attacked %s's %s.
msgid_plural %d units lost when %s's %s attacked %s's %s.

#: server/unittools.c:2016
#, c-format
msgid %s's %s was nuked.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39971) BUG: i18n possessive problems

2007-12-16 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39971 

An answer to much of the problem might be to use nation names instead of
player (ruler) names.  That would lose some flavor, but it's better to use
something that's uniform.

That would easily change:
   You receive %s's worldmap.

to
   You receive the %s worldmap.

This would better match elsewhere in the client:

 my_snprintf(buf, bufsiz, _(The %s give their worldmap),
nation_plural_translation(pclause-from-nation));


But this already seems to be abused.  For example,

 notify_conn(NULL, NULL, E_NATION_SELECTED,
_(%s is the %s ruler %s.),
pplayer-username,
nation_name_translation(new_nation),
pplayer-name);

That's not really a noun use, that's an adjective.  We really need to
ensure and document that the nation name is adjectival, and then ensure
that all uses are consistent.

We really have singular adjective, and plural noun.  That's not documented.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39971) BUG: i18n possessive problems

2007-12-16 Thread Daniel Markstedt

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39971 

On Dec 17, 2007 7:15 AM, William Allen Simpson
[EMAIL PROTECTED] wrote:

 URL: http://bugs.freeciv.org/Ticket/Display.html?id=39971 

 Daniel Markstedt wrote:
  Agreed. This was actually discussed last year or early this year, but
  nothing came out of it at the time. Using the nation name would also
  have the benefit of making it easier to figure out what player the
  message is about. As it stands, unless the leader is famous enough or
  unless you're a serious history buff, it can often be hard to
  associate leader name and nation.
 
 I searched for possessive in the subject lines in RT, and the body of the
 past two years of messages, but didn't find anything.  PR#?

 This is probably important since leader names are not translated.


The closest thing I could find was #19049 -- thanks to gmail's inbox search. :)

 Unfortunately, despite my best efforts, player-name is one of the many
 remaining things without an access function, so they'll have to be fixed
 on an /ad hoc/ basis as they are found  I'll add new access functions
 for them (as found).

 This is something I can do for 2.1.2 this week.


In the scope of S2_1?


  I made an extensive overhaul of all nationsets about two years ago and
  standardized on singular-adjective and plural-noun. Something could
  have been overlooked, though, so feel free to verify.
 
 OK.  Since nation_name_translation() and nation_plural_translation() *are*
 only used via access functions (because I made an extensive overhaul 6
 months ago), I'll check all uses for grammar.  Sorry, when I was fixing
 the many misuses of translation or non-translation, I wasn't also checking
 each context for grammar, and was trying very hard not to make changes to
 any translation strings (mostly un-marking strings in freelog() calls).

 This is something I can do for 2.1.2 this evening, so that translators
 can look for any mistakes this week.


Fine, but please communicate with the translators if you end up
fuzzying a bunch of strings. I told them yesterday that they have
about a dozen fuzzies to resolve for 2.1.2.


  It is documented in fact, in doc/README.nations under 'Nation naming'.
  I guess it would be worth mentioning it in the wiki too, though.
 
 I meant in the code, too  To be honest, I didn't even think to look in
 doc/README.nations or the wiki for code writing, and it's changed since
 last time I'd added a nation.  The code actually says single and plural.
 I'll change it to specify adjective.

 Anyway, good work!



Sounds like a good idea to clarify this in code.

In any case, this is an area where a major overhaul is needed. Looking
at my native Swedish I have noted several shortcomings with the
current system, for example in the areas of capitalization and gender.
The former Swedish translator proposed the following solution over
seven years ago:
http://lists.complete.org/freeciv-dev%40freeciv.org/2000/08/msg00493.html.gz

 ~Daniel



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev