gnumeric r16568 - in trunk: . src src/dialogs



Author: mortenw
Date: Sat May 17 01:07:33 2008
New Revision: 16568
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16568&view=rev

Log:
2008-05-16  Morten Welinder  <terra gnome org>

	* src/func.c (tokenized_help_new): Translate old-style help texts.
	fixes part of #533193.

2008-05-16  Morten Welinder  <terra gnome org>

	* dialog-function-select.c (describe_new_style): Do help text
	translation in the right domain.  Fixes part of #533193.



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/src/dialogs/ChangeLog
   trunk/src/dialogs/dialog-function-select.c
   trunk/src/func.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Sat May 17 01:07:33 2008
@@ -8,6 +8,7 @@
 	* Internal cleanup for analysis tools.  [#532210]
 	* Fix hang.  [#533288]
 	* Fix AREAS crash.  [#533370]
+	* Fix translation of function description.  [#533193]
 
 --------------------------------------------------------------------------
 Gnumeric 1.9.0

Modified: trunk/src/dialogs/dialog-function-select.c
==============================================================================
--- trunk/src/dialogs/dialog-function-select.c	(original)
+++ trunk/src/dialogs/dialog-function-select.c	Sat May 17 01:07:33 2008
@@ -47,6 +47,9 @@
 #include <gtk/gtkliststore.h>
 #include <string.h>
 
+#undef F_
+#define F_(s) dgettext ("gnumeric-functions", (s))
+
 #define FUNCTION_SELECT_KEY "function-selector-dialog"
 #define FUNCTION_SELECT_DIALOG_KEY "function-selector-dialog"
 
@@ -356,7 +359,7 @@
 	for (help = func->help; 1; help++) {
 		switch (help->type) {
 		case GNM_FUNC_HELP_NAME: {
-			const char *text = _(help->text);
+			const char *text = F_(help->text);
 			const char *colon = strchr (text, ':');
 			if (!colon)
 				break;
@@ -367,7 +370,7 @@
 			break;
 		}
 		case GNM_FUNC_HELP_ARG: {
-			const char *text = _(help->text);
+			const char *text = F_(help->text);
 			const char *colon = strchr (text, ':');
 			if (!colon)
 				break;
@@ -385,7 +388,7 @@
 			break;
 		}
 		case GNM_FUNC_HELP_DESCRIPTION: {
-			const char *text = _(help->text);
+			const char *text = F_(help->text);
 			ADD_TEXT ("\n");
 			ADD_TEXT (text);
 			ADD_TEXT ("\n");

Modified: trunk/src/func.c
==============================================================================
--- trunk/src/func.c	(original)
+++ trunk/src/func.c	Sat May 17 01:07:33 2008
@@ -1535,14 +1535,14 @@
 	tok->help_copy = NULL;
 	tok->sections = NULL;
 
-	if (func->help != NULL && func->help [0].type == GNM_FUNC_HELP_OLD) {
+	if (func->help != NULL && func->help[0].type == GNM_FUNC_HELP_OLD) {
 		char *ptr, *start;
 		gboolean seek_at = TRUE;
 		gboolean last_newline = TRUE;
 
 #warning "fixme, use the rest of the pieces and get rid of this routine."
-		tok->help_is_localized = FALSE;
-		tok->help_copy = g_strdup (func->help [0].text);
+		tok->help_is_localized = TRUE;
+		tok->help_copy = g_strdup (dgettext ("gnumeric-functions", func->help[0].text));
 		tok->sections = g_ptr_array_new ();
 
 		for (start = ptr = tok->help_copy; *ptr ; ptr++) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]