gnumeric r16569 - in branches/gnumeric-1-8: . src src/dialogs



Author: mortenw
Date: Sat May 17 01:08:31 2008
New Revision: 16569
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16569&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:
   branches/gnumeric-1-8/ChangeLog
   branches/gnumeric-1-8/NEWS
   branches/gnumeric-1-8/src/dialogs/ChangeLog
   branches/gnumeric-1-8/src/dialogs/dialog-function-select.c
   branches/gnumeric-1-8/src/func.c

Modified: branches/gnumeric-1-8/NEWS
==============================================================================
--- branches/gnumeric-1-8/NEWS	(original)
+++ branches/gnumeric-1-8/NEWS	Sat May 17 01:08:31 2008
@@ -28,6 +28,7 @@
 	* Fix problem with sheet changes during range selection.  [#529309]
 	* Fix hang.  [#533288]
 	* Fix AREAS crash.  [#533370]
+	* Fix translation of function description.  [#533193]
 
 --------------------------------------------------------------------------
 Gnumeric 1.8.2

Modified: branches/gnumeric-1-8/src/dialogs/dialog-function-select.c
==============================================================================
--- branches/gnumeric-1-8/src/dialogs/dialog-function-select.c	(original)
+++ branches/gnumeric-1-8/src/dialogs/dialog-function-select.c	Sat May 17 01:08:31 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: branches/gnumeric-1-8/src/func.c
==============================================================================
--- branches/gnumeric-1-8/src/func.c	(original)
+++ branches/gnumeric-1-8/src/func.c	Sat May 17 01:08:31 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]