Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] Re: (PR#10099) extra_help i18n
Home

[Freeciv-Dev] Re: (PR#10099) extra_help i18n

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mstefek@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10099) extra_help i18n
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Sep 2004 10:47:39 -0700
Reply-to: rt@xxxxxxxxxxx

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

Mateusz Stefek wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10099 >
> 
> currently option's extra_help can not be i18n-ed on the client side,
> because it's modified before sending it.
> IMO it's unnecessary.
> This patch fixes it.

It's easy enough for the client to build this string when it brings up 
the tooltip.  This patch does that so the current bahavior is preserved. 
  Although I'm not sure showing the "name" is really a good thing...

jason

? settler_recursion_crash
Index: client/gui-gtk-2.0/repodlgs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/repodlgs.c,v
retrieving revision 1.55
diff -u -r1.55 repodlgs.c
--- client/gui-gtk-2.0/repodlgs.c       28 Aug 2004 07:21:02 -0000      1.55
+++ client/gui-gtk-2.0/repodlgs.c       14 Sep 2004 17:46:27 -0000
@@ -1483,7 +1483,12 @@
 
     /* if we have extra help, use that as a tooltip */
     if (settable_options[i].extra_help[0] != '\0') {
-      gtk_tooltips_set_tip(tips, ebox, _(settable_options[i].extra_help), 
NULL);
+      char buf[4096];
+
+      my_snprintf(buf, sizeof(buf), "%s\n\n%s",
+                 _(settable_options[i].name),
+                 _(settable_options[i].extra_help));
+      gtk_tooltips_set_tip(tips, ebox, buf, NULL);
     }
 
     /* create the proper entry method depending on the type */
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.347
diff -u -r1.347 stdinhand.c
--- server/stdinhand.c  10 Sep 2004 21:20:53 -0000      1.347
+++ server/stdinhand.c  14 Sep 2004 17:46:28 -0000
@@ -1614,13 +1614,7 @@
     packet.id = s++;
     sz_strlcpy(packet.name, settings[i].name);
     sz_strlcpy(packet.short_help, settings[i].short_help);
-
-    /* append extra help */
-    sz_strlcpy(packet.extra_help, settings[i].name);
-    if (settings[i].extra_help[0] != '\0') {
-      sz_strlcat(packet.extra_help, "\n\n");
-      sz_strlcat(packet.extra_help, settings[i].extra_help);
-    }
+    sz_strlcpy(packet.extra_help, settings[i].extra_help);
 
     packet.category = settings[i].category;
     packet.type = settings[i].type;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#10099) extra_help i18n, Jason Short <=