Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] (PR#4612) i18n improvement in connecthand.c
Home

[Freeciv-Dev] (PR#4612) i18n improvement in connecthand.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#4612) i18n improvement in connecthand.c
From: "mateusz stefek" <matusik_s@xxxxx>
Date: Fri, 18 Jul 2003 12:22:25 -0700
Reply-to: rt@xxxxxxxxxxxxxx

on Sun Jul 13 there was some new code added into server/connecthand.c:

   /* remind the connection who he is */
   if (!pconn->player) {
     my_snprintf(buf, sizeof(buf), _("no player"));
   } else if (strcmp(pconn->player->name, ANON_PLAYER_NAME) == 0) {
     my_snprintf(buf, sizeof(buf), _("an anonymous player"));
   } else {
     my_snprintf(buf, sizeof(buf), "'%s'", pconn->player->name);
   }
   notify_conn(dest, _("You are logged in as '%s' connected to %s."),
               pconn->username, buf);

IMO It's just another example of bad i18n. When you speak polish you 
don't say something like 'there is is _NO_ player' but you have to use
different construction, and it cannot be put into printf format so easy

I think we should use attached patch

--
mateusz
--- freeorig/server/connecthand.c       2003-07-14 16:19:22.000000000 +0200
+++ freeciv/server/connecthand.c        2003-07-18 12:43:56.000000000 +0200
@@ -80,7 +80,6 @@
   struct player *pplayer;
   struct packet_login_reply packet;
   char hostname[512];
-  char buf[512];
 
   /* zero out the password */
   memset(pconn->password, 0, MAX_LEN_NAME);
@@ -147,14 +146,16 @@
 
   /* remind the connection who he is */
   if (!pconn->player) {
-    my_snprintf(buf, sizeof(buf), _("no player"));
+    notify_conn(dest, _("You are logged in as '%s' connected to no player."),
+                pconn->username);
   } else if (strcmp(pconn->player->name, ANON_PLAYER_NAME) == 0) {
-    my_snprintf(buf, sizeof(buf), _("an anonymous player"));
+    notify_conn(dest, _("You are logged in as '%s' connected to an "
+                        "anonymous player."),
+               pconn->username);
   } else {
-    my_snprintf(buf, sizeof(buf), "'%s'", pconn->player->name);
+    notify_conn(dest, _("You are logged in as '%s' connected to %s."),
+                pconn->username, pconn->player->name);
   }
-  notify_conn(dest, _("You are logged in as '%s' connected to %s."),
-              pconn->username, buf);
 
   /* if need be, tell who we're waiting on to end the game turn */
   if (game.turnblock) {

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#4612) i18n improvement in connecthand.c, mateusz stefek <=