Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#12627) empty string marked for translation
Home

[Freeciv-Dev] (PR#12627) empty string marked for translation

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mstefek@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#12627) empty string marked for translation
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 25 Mar 2005 09:12:59 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12627 >

> [mstefek - Fri Mar 25 09:41:26 2005]:
> 
> There is an empty string marked for translation at
> client/messagewin_common.c:113.
> It's content was probably removed automaticaly with 'game:' prefixes.
> Anyway what does the add_notify_window() function is supposed to do now?

In 2.0 add_notify_window would skip past any "Game" or _("Game") prefix
for the message.  This is no longer needed (I think?).  Here's a patch.

-jason

Index: client/messagewin_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/messagewin_common.c,v
retrieving revision 1.19
diff -u -r1.19 messagewin_common.c
--- client/messagewin_common.c  15 Feb 2005 16:40:40 -0000      1.19
+++ client/messagewin_common.c  25 Mar 2005 17:11:09 -0000
@@ -109,10 +109,6 @@
                       enum event_type event)
 {
   const size_t min_msg_len = 50;
-  const char *game_prefix1 = "";
-  const char *game_prefix2 = _("");
-  size_t gp_len1 = strlen(game_prefix1);
-  size_t gp_len2 = strlen(game_prefix2);
   size_t msg_len = strlen(message);
   char *s = fc_malloc(MAX(msg_len, min_msg_len) + 1);
   int i, nspc;
@@ -124,13 +120,7 @@
     messages = fc_realloc(messages, messages_alloc * sizeof(*messages));
   }
 
-  if (strncmp(message, game_prefix1, gp_len1) == 0) {
-    strcpy(s, message + gp_len1);
-  } else if (strncmp(message, game_prefix2, gp_len2) == 0) {
-    strcpy(s, message + gp_len2);
-  } else {
-    strcpy(s, message);
-  }
+  strcpy(s, message);
 
   nspc = min_msg_len - strlen(s);
   if (nspc > 0) {

[Prev in Thread] Current Thread [Next in Thread]