Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#7234) Veteran patch introduced some i18n mistakes
Home

[Freeciv-Dev] (PR#7234) Veteran patch introduced some i18n mistakes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7234) Veteran patch introduced some i18n mistakes
From: "mateusz stefek" <matusik_s@xxxxx>
Date: Mon, 12 Jan 2004 01:29:49 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7234 >

1) You shouldn't concatenate strings if it isn't necessary.
2) Japanese don't use normal ASCII 46 dot to end sentences.

Patch attached
--
mateusz

--- freeorig/server/diplomats.c 2004-01-12 10:01:06.000000000 +0100
+++ freeciv/server/diplomats.c  2004-01-12 10:19:01.000000000 +0100
@@ -458,11 +458,17 @@
   vet = maybe_make_veteran(pdiplomat);
   
   /* Notify everybody involved. */
-  notify_player_ex(pplayer, pvictim->x, pvictim->y, E_MY_DIPLOMAT_BRIBE,
-                  _("Game: Your %s succeeded in bribing %s's %s%s"),
-                  unit_name(pdiplomat->type),
-                  unit_owner(pvictim)->name, unit_name(pvictim->type),
-                  vet ? " and became more experienced." : ".");
+  if (vet) {
+    notify_player_ex(pplayer, pvictim->x, pvictim->y, E_MY_DIPLOMAT_BRIBE,
+                    _("Game: Your %s succeeded in bribing %s's %s"
+                       " and became more experienced."),
+                    unit_name(pdiplomat->type),
+                    unit_owner(pvictim)->name, unit_name(pvictim->type));
+  } else {
+    notify_player_ex(pplayer, pvictim->x, pvictim->y, E_MY_DIPLOMAT_BRIBE,
+                    _("Game: Your %s succeeded in bribing %s's %s."),          
     unit_name(pdiplomat->type),
+                    unit_owner(pvictim)->name, unit_name(pvictim->type));
+  }
   notify_player_ex(uplayer, pvictim->x, pvictim->y, E_ENEMY_DIPLOMAT_BRIBE,
                   _("Game: Your %s was bribed by %s."),
                   unit_name(pvictim->type), pplayer->name);
@@ -1182,14 +1188,22 @@
                         _("Game: Your %s was eliminated"
                           " by a defending %s."),
                         unit_name(pdiplomat->type), unit_name(punit->type));
-       notify_player_ex(cplayer, x, y,
-                        E_ENEMY_DIPLOMAT_FAILED,
-                        _("Game: Eliminated %s %s while infiltrating %s%s"),
-                        get_nation_name(pplayer->nation),
-                        unit_name(pdiplomat->type),
-                        (pcity ? pcity->name : _("our troops")),
-                        vet ? ". The defender became more experienced" : ".");
-
+       if (vet) {
+         notify_player_ex(cplayer, x, y,
+                          E_ENEMY_DIPLOMAT_FAILED,
+                          _("Game: Eliminated %s %s while infiltrating %s. "
+                            "The defender became more experienced"),
+                          get_nation_name(pplayer->nation),
+                          unit_name(pdiplomat->type),
+                          (pcity ? pcity->name : _("our troops")));
+        } else {
+         notify_player_ex(cplayer, x, y,
+                          E_ENEMY_DIPLOMAT_FAILED,
+                          _("Game: Eliminated %s %s while infiltrating %s."),
+                          get_nation_name(pplayer->nation),
+                          unit_name(pdiplomat->type),
+                          (pcity ? pcity->name : _("our troops")));
+       }
        wipe_unit(pdiplomat);
        return FALSE;
       }
@@ -1235,12 +1249,18 @@
 
     /* may become a veteran */
     vet = maybe_make_veteran(pdiplomat);
-    
-    notify_player_ex(pplayer, x, y, E_MY_DIPLOMAT_ESCAPE,
+    if (vet) {
+      notify_player_ex(pplayer, x, y, E_MY_DIPLOMAT_ESCAPE,
                       _("Game: Your %s has successfully completed"
-                        " her mission and returned unharmed to %s%s"),
-                      unit_name(pdiplomat->type), spyhome->name,
-                      vet ? " and has become more experienced." : ".");
+                        " her mission and returned unharmed to %s "
+                        " and has become more experienced."),
+                      unit_name(pdiplomat->type), spyhome->name);
+    } else {
+      notify_player_ex(pplayer, x, y, E_MY_DIPLOMAT_ESCAPE,
+                      _("Game: Your %s has successfully completed"
+                        " her mission and returned unharmed to %s."),
+                      unit_name(pdiplomat->type), spyhome->name);
+    }
 
     /* being teleported costs all movement */
     if (!teleport_unit_to_city (pdiplomat, spyhome, -1, FALSE)) {
--- freeorig/server/unithand.c  2004-01-12 10:01:15.000000000 +0100
+++ freeciv/server/unithand.c   2004-01-12 10:24:31.000000000 +0100
@@ -759,15 +759,25 @@
            pplayer->name, unit_type(punit)->name,
            unit_owner(pdefender)->name, unit_type(pdefender)->name);
 
-    notify_player_ex(unit_owner(pwinner),
-                    pwinner->x, pwinner->y, E_UNIT_WIN,
-                    _("Game: Your %s%s survived the pathetic attack"
-                      " from %s's %s%s"),
-                    unit_name(pwinner->type),
-                    get_location_str_in(unit_owner(pwinner),
-                                        pwinner->x, pwinner->y),
-                    unit_owner(plooser)->name, unit_name(plooser->type),
-                    vet ? " and became more experienced!" : ".");
+    if (vet) {
+      notify_player_ex(unit_owner(pwinner),
+                      pwinner->x, pwinner->y, E_UNIT_WIN,
+                      _("Game: Your %s%s survived the pathetic attack"
+                        " from %s's %s and became more experienced!"),
+                      unit_name(pwinner->type),
+                      get_location_str_in(unit_owner(pwinner),
+                                          pwinner->x, pwinner->y),
+                      unit_owner(plooser)->name, unit_name(plooser->type));
+    } else {
+      notify_player_ex(unit_owner(pwinner),
+                      pwinner->x, pwinner->y, E_UNIT_WIN,
+                      _("Game: Your %s%s survived the pathetic attack"
+                        " from %s's %s."),
+                      unit_name(pwinner->type),
+                      get_location_str_in(unit_owner(pwinner),
+                                          pwinner->x, pwinner->y),
+                      unit_owner(plooser)->name, unit_name(plooser->type));
+    }
     
     notify_player_ex(unit_owner(plooser),
                     def_x, def_y, E_UNIT_LOST_ATT,
@@ -785,15 +795,25 @@
            unit_owner(pdefender)->name, unit_type(pdefender)->name);
 
     punit->moved = TRUE;       /* We moved */
-
-    notify_player_ex(unit_owner(pwinner), punit->x, punit->y,
-                    E_UNIT_WIN_ATT,
-                    _("Game: Your attacking %s succeeded"
-                      " against %s's %s%s%s"), unit_name(pwinner->type),
-                    unit_owner(plooser)->name, unit_name(plooser->type),
-                    get_location_str_at(unit_owner(pwinner),
-                    plooser->x, plooser->y),
-                    vet ? " and became more experienced!" : "!");
+    if (vet) {
+      notify_player_ex(unit_owner(pwinner), punit->x, punit->y,
+                      E_UNIT_WIN_ATT,
+                      _("Game: Your attacking %s succeeded"
+                        " against %s's %s%s and became more experienced!"),
+                      unit_name(pwinner->type),
+                      unit_owner(plooser)->name, unit_name(plooser->type),
+                      get_location_str_at(unit_owner(pwinner),
+                      plooser->x, plooser->y));
+    } else {
+      notify_player_ex(unit_owner(pwinner), punit->x, punit->y,
+                      E_UNIT_WIN_ATT,
+                      _("Game: Your attacking %s succeeded"
+                        " against %s's %s%s!"),
+                      unit_name(pwinner->type),
+                      unit_owner(plooser)->name, unit_name(plooser->type),
+                      get_location_str_at(unit_owner(pwinner),
+                      plooser->x, plooser->y));
+    }
     kill_unit(pwinner, plooser);
                /* no longer pplayer - want better msgs -- Syela */
   }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7234) Veteran patch introduced some i18n mistakes, mateusz stefek <=