[nautilus-actions] Have translatable strings with less or without markups



commit 4badc75ec9d6f6404f156c3e61afffe998d56a00
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Aug 9 19:28:43 2009 +0200

    Have translatable strings with less or without markups

 src/nact/nact-assistant-export.c |   26 +++++++++++++++++++-------
 src/nact/nact-assistant-import.c |   21 ++++++++++++++++-----
 2 files changed, 35 insertions(+), 12 deletions(-)
---
diff --git a/src/nact/nact-assistant-export.c b/src/nact/nact-assistant-export.c
index baff280..49303a2 100644
--- a/src/nact/nact-assistant-export.c
+++ b/src/nact/nact-assistant-export.c
@@ -721,21 +721,33 @@ assist_prepare_exportdone( NactAssistantExport *window, GtkAssistant *assistant,
 	dump( window );
 #endif
 
-	gchar *text, *tmp;
+	gchar *text, *tmp, *text2;
 
 	if( window->private->errors ){
-		text = g_strdup_printf(
-				_( "<b>One or more errors have been detected when exporting actions.</b>\n\n%s" ),
-				window->private->reason );
+		/* i18n: error message displayed in the result page of the export assistant */
+		text = g_strdup( _( "One or more errors have been detected when exporting actions." ));
+		tmp = g_strdup_printf( _( "<b>%s</b>\n\n%s" ), text, window->private->reason );
+		g_free( text );
+		text = tmp;
 
 	} else {
-		text = g_strdup( _( "<b>Selected actions have been successfully exported...</b>\n\n" ));
+		/* i18n: result of the export assistant */
+		text = g_strdup( _( "Selected actions have been successfully exported..." ));
+		tmp = g_strdup_printf( "<b>%s</b>\n\n", text );
+		g_free( text );
+		text = tmp;
 
-		tmp = g_strdup_printf( _( "%s<b>... in folder :</b>\n\n\t%s/\n\n" ), text, window->private->uri );
+		/* i18n: the target folder is displayed in its own line */
+		text2 = g_strdup( _( "... in folder:" ));
+		tmp = g_strdup_printf( _( "%s<b>%s</b>\n\n\t%s/\n\n" ), text, text2, window->private->uri );
+		g_free( text2 );
 		g_free( text );
 		text = tmp;
 
-		tmp = g_strdup_printf( _( "%s<b>... as files :</b>\n\n" ), text );
+		/* i18n: the export file for each actions is displayed in its own line */
+		text2 = g_strdup( _( "... as files:" ));
+		tmp = g_strdup_printf( _( "%s<b>%s</b>\n\n" ), text, text2 );
+		g_free( text2 );
 		g_free( text );
 		text = tmp;
 
diff --git a/src/nact/nact-assistant-import.c b/src/nact/nact-assistant-import.c
index 427a90f..6e84585 100644
--- a/src/nact/nact-assistant-import.c
+++ b/src/nact/nact-assistant-import.c
@@ -437,10 +437,15 @@ prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWid
 
 	do_import( window, assistant );
 
-	gchar *text, *tmp;
+	gchar *text, *tmp, *text2;
 	GSList *is;
 
-	text = g_strdup( _( "<b>Selected files have been imported :</b>\n\n" ));
+	/* i18n: result of the import assistant */
+	text = g_strdup( _( "Selected files have been imported:" ));
+
+	tmp = g_strdup_printf( "<b>%s</b>\n\n", text );
+	g_free( text );
+	text = tmp;
 
 	for( is = window->private->results ; is ; is = is->next ){
 
@@ -449,7 +454,7 @@ prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWid
 		GFile *file = g_file_new_for_uri( str->uri );
 		gchar *bname = g_file_get_basename( file );
 		g_object_unref( file );
-		tmp = g_strdup_printf( _( "%s\t%s\n\n" ), text, bname );
+		tmp = g_strdup_printf( "%s\t%s\n\n", text, bname );
 		g_free( text );
 		text = tmp;
 		g_free( bname );
@@ -457,14 +462,20 @@ prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWid
 		if( str->action ){
 			gchar *uuid = na_action_get_uuid( str->action );
 			gchar *label = na_action_get_label( str->action );
-			tmp = g_strdup_printf( _( "%s\t\tUUID: %s\t%s\n\n" ), text, uuid, label );
+			/* i18n: this is the globally unique identifier of the newly imported action */
+			text2 = g_strdup( _( "UUID:" ));
+			tmp = g_strdup_printf( "%s\t\t%s %s\t%s\n\n", text, text2, uuid, label );
+			g_free( text2 );
 			g_free( label );
 			g_free( uuid );
 
 			window->private->actions = g_slist_prepend( window->private->actions, str->action );
 
 		} else {
-			tmp = g_strdup_printf( "%s\t\t NOT OK\n\n", text );
+			/* i18n: just indicate that the import of this file was unsuccessfull */
+			text2 = g_strdup( _( "NOT OK" ));
+			tmp = g_strdup_printf( "%s\t\t %s\n\n", text, text2 );
+			g_free( text2 );
 		}
 
 		g_free( text );



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