2004-01-13  Danilo Šegan  <dsegan@gmx.net>
 
	* src/nautilus-location-bar.c (drag_data_received_callback): 

	* src/file-manager/fm-search-list-view.c
	(compute_reveal_item_name_and_sensitivity): 

	* src/file-manager/fm-properties-window.c
	(directory_contents_value_field_update): 

	* src/file-manager/fm-directory-view.c
	(fm_directory_view_confirm_multiple_windows): 
	(confirm_delete_directly)
	(fm_directory_view_display_selection_info)
	(confirm_delete_from_trash, copy_or_cut_files)
	(real_update_menus): 

	* libnautilus-private/nautilus-file.c
	(format_item_count_for_display): 

	* components/image_properties/nautilus-image-properties-view.c
	(load_finished): 

	Use ngettext (bug #106702).


diff -ur nautilus/components/image_properties/nautilus-image-properties-view.c nautilus.ngettext/components/image_properties/nautilus-image-properties-view.c
--- nautilus/components/image_properties/nautilus-image-properties-view.c	Mon Jan  5 22:22:19 2004
+++ nautilus.ngettext/components/image_properties/nautilus-image-properties-view.c	Tue Jan 13 00:35:31 2004
@@ -219,7 +219,9 @@
 	
 		name = gdk_pixbuf_format_get_name (format);
 		desc = gdk_pixbuf_format_get_description (format);
-		g_string_append_printf (str, _("<b>Image Type:</b> %s (%s)\n<b>Resolution:</b> %dx%d pixels\n"),
+		g_string_append_printf (str, ngettext ("<b>Image Type:</b> %s (%s)\n<b>Resolution:</b> %dx%d pixels\n",
+						       "<b>Image Type:</b> %s (%s)\n<b>Resolution:</b> %dx%d pixels\n",
+						       view->details->height),
 					name, desc, view->details->width, view->details->height);
 		g_free (name);
 		g_free (desc);
diff -ur nautilus/libnautilus-private/nautilus-file.c nautilus.ngettext/libnautilus-private/nautilus-file.c
--- nautilus/libnautilus-private/nautilus-file.c	Mon Jan 12 02:43:20 2004
+++ nautilus.ngettext/libnautilus-private/nautilus-file.c	Tue Jan 13 00:42:40 2004
@@ -4234,19 +4234,11 @@
 {
 	g_return_val_if_fail (includes_directories || includes_files, NULL);
 
-	if (item_count == 0) {
-		return g_strdup (includes_directories
-			? (includes_files ? _("0 items") : _("0 folders"))
-			: _("0 files"));
-	}
-	if (item_count == 1) {
-		return g_strdup (includes_directories
-			? (includes_files ? _("1 item") : _("1 folder"))
-			: _("1 file"));
-	}
-	return g_strdup_printf (includes_directories
-		? (includes_files ? _("%u items") : _("%u folders"))
-		: _("%u files"), item_count);
+	return g_strdup (includes_directories
+			? (includes_files 
+			   ? ngettext ("%u item", "%u items", item_count) 
+			   : ngettext ("%u folder", "%u folders", item_count))
+			: ngettext ("%u file", "%u files", item_count));
 }
 
 /**
diff -ur nautilus/src/file-manager/fm-directory-view.c nautilus.ngettext/src/file-manager/fm-directory-view.c
--- nautilus/src/file-manager/fm-directory-view.c	Mon Jan 12 02:43:27 2004
+++ nautilus.ngettext/src/file-manager/fm-directory-view.c	Tue Jan 13 01:17:44 2004
@@ -539,9 +539,10 @@
 		return TRUE;
 	}
 
-	title = g_strdup_printf (_("Open %d Windows?"), count);
+	title = g_strdup_printf (ngettext("Open %d Window?", "Open %d Windows?", count), count);
 	prompt = _("Are you sure you want to open all files?");
-	detail = g_strdup_printf (_("This will open %d separate windows."), count);
+	detail = g_strdup_printf (ngettext("This will open %d separate window.",
+					   "This will open %d separate windows.", count), count);
 	dialog = eel_show_yes_no_dialog (prompt, detail, title, 
 					 GTK_STOCK_OK, GTK_STOCK_CANCEL,
 					 fm_directory_view_get_containing_window (view));
@@ -900,8 +901,10 @@
 					  file_name);
 		g_free (file_name);
 	} else {
-		prompt = g_strdup_printf (_("Are you sure you want to permanently delete "
-		  			    "the %d selected items?"), uri_count);
+		prompt = g_strdup_printf (ngettext("Are you sure you want to permanently delete "
+						   "the %d selected item?",
+						   "Are you sure you want to permanently delete "
+						   "the %d selected items?", uri_count), uri_count);
 	}
 
 	dialog = eel_show_yes_no_dialog
@@ -1743,36 +1746,34 @@
 	 */
 
 	if (folder_count != 0) {
-		if (folder_count == 1) {
-			if (non_folder_count == 0) {
-				folder_count_str = g_strdup_printf (_("\"%s\" selected"), first_item_name);
-			} else {
-				folder_count_str = g_strdup (_("1 folder selected"));
-			}
+		if (folder_count == 1 && non_folder_count == 0) {
+			folder_count_str = g_strdup_printf (_("\"%s\" selected"), first_item_name);
 		} else {
-			folder_count_str = g_strdup_printf (_("%d folders selected"), folder_count);
+			folder_count_str = g_strdup_printf (ngettext("%d folder selected", 
+								     "%d folders selected", 
+								     folder_count), 
+							    folder_count);
 		}
 
 		if (folder_count == 1) {
 			if (!folder_item_count_known) {
 				folder_item_count_str = g_strdup ("");
-			} else if (folder_item_count == 0) {
-				folder_item_count_str = g_strdup (_(" (containing 0 items)"));
-			} else if (folder_item_count == 1) {
-				folder_item_count_str = g_strdup (_(" (containing 1 item)"));
 			} else {
-				folder_item_count_str = g_strdup_printf (_(" (containing %d items)"), folder_item_count);
+				folder_item_count_str = g_strdup_printf (ngettext(" (containing %d item)",
+										  " (containing %d items)",
+										  folder_item_count), 
+									 folder_item_count);
 			}
 		}
 		else {
 			if (!folder_item_count_known) {
 				folder_item_count_str = g_strdup ("");
-			} else if (folder_item_count == 0) {
-				folder_item_count_str = g_strdup (_(" (containing a total of 0 items)"));
-			} else if (folder_item_count == 1) {
-				folder_item_count_str = g_strdup (_(" (containing a total of 1 item)"));
 			} else {
-				folder_item_count_str = g_strdup_printf (_(" (containing a total of %d items)"), folder_item_count);
+				/* translators: this is preceded with a string of form 'N folders' (N more than 1) */
+				folder_item_count_str = g_strdup_printf (ngettext(" (containing a total of %d item)",
+										  " (containing a total of %d items)",
+										  folder_item_count), 
+									 folder_item_count);
 			}
 			
 		}
@@ -1789,20 +1790,19 @@
 								  first_item_name,
 								  size_string);
 			} else {
-				non_folder_str = g_strdup_printf (_("%d items selected (%s)"), 
+				non_folder_str = g_strdup_printf (ngettext("%d item selected (%s)",
+									   "%d items selected (%s)",
+									   non_folder_count), 
 								  non_folder_count, 
 								  size_string);
 			}
 		} else {
 			/* Folders selected also, use "other" terminology */
-			if (non_folder_count == 1) {
-				non_folder_str = g_strdup_printf (_("1 other item selected (%s)"), 
-								  size_string);
-			} else {
-				non_folder_str = g_strdup_printf (_("%d other items selected (%s)"), 
-								  non_folder_count, 
-								  size_string);
-			}
+			non_folder_str = g_strdup_printf (ngettext("%d other item selected (%s)",
+								   "%d other items selected (%s)",
+								   non_folder_count), 
+							  non_folder_count, 
+							  size_string);
 		}
 
 		g_free (size_string);
@@ -3295,8 +3295,12 @@
 					    "from the trash?"), file_name);
 		g_free (file_name);
 	} else {
-		prompt = g_strdup_printf (_("Are you sure you want to permanently delete "
-		  			    "the %d selected items from the trash?"), uri_count);
+		prompt = g_strdup_printf (ngettext("Are you sure you want to permanently delete "
+						   "the %d selected item from the trash?",
+						   "Are you sure you want to permanently delete "
+						   "the %d selected items from the trash?",
+						   uri_count), 
+					  uri_count);
 	}
 
 	dialog = eel_show_yes_no_dialog (
@@ -4741,12 +4745,18 @@
 		g_free (name);
 	} else {
 		if (cut) {
-			status_string = g_strdup_printf (_("The %d selected items will be moved "
-							   "if you select the Paste Files command"),
+			status_string = g_strdup_printf (ngettext("The %d selected item will be moved "
+								  "if you select the Paste Files command",
+								  "The %d selected items will be moved "
+								  "if you select the Paste Files command",
+								  count),
 							 count);
 		} else {
-			status_string = g_strdup_printf (_("The %d selected items will be copied "
-							   "if you select the Paste Files command"),
+			status_string = g_strdup_printf (ngettext("The %d selected item will be copied "
+								  "if you select the Paste Files command",
+								  "The %d selected items will be copied "
+								  "if you select the Paste Files command",
+								  count),
 							 count);
 		}
 	}
@@ -5295,11 +5305,10 @@
 	
 	if (nautilus_view_get_window_type (view->details->nautilus_view) == Nautilus_WINDOW_NAVIGATION) {
 		show_open_alternate = TRUE;
-		if (selection_count <= 1) {
-			label_with_underscore = g_strdup (_("Open in New Window"));
-		} else {
-			label_with_underscore = g_strdup_printf (_("Open in %d New Windows"), selection_count);
-		}
+		label_with_underscore = g_strdup_printf (ngettext("Open in New Window",
+								  "Open in %d New Windows",
+								  selection_count), 
+							 selection_count);
 	} else {
 		show_open_alternate = file_list_all_can_use_components (selection);
 		if (selection_count <= 1) {
diff -ur nautilus/src/file-manager/fm-properties-window.c nautilus.ngettext/src/file-manager/fm-properties-window.c
--- nautilus/src/file-manager/fm-properties-window.c	Mon Jan 12 02:43:39 2004
+++ nautilus.ngettext/src/file-manager/fm-properties-window.c	Tue Jan 13 01:20:18 2004
@@ -1756,13 +1756,10 @@
 	} else {
 		char *size_str;
 		size_str = gnome_vfs_format_file_size_for_display (total_size);
-		if (total_count == 1) {
-			text = g_strdup_printf (_("1 item, with size %s"),
-						size_str);
-		} else {
-			text = g_strdup_printf (_("%d items, totalling %s"),
-						total_count, size_str);
-		}
+		text = g_strdup_printf (ngettext("%d item, with size %s",
+						 "%d items, totalling %s",
+						 total_count),
+					total_count, size_str);
 		g_free (size_str);
 
 		if (unreadable_directory_count != 0) {
diff -ur nautilus/src/file-manager/fm-search-list-view.c nautilus.ngettext/src/file-manager/fm-search-list-view.c
--- nautilus/src/file-manager/fm-search-list-view.c	Thu Dec 11 18:34:54 2003
+++ nautilus.ngettext/src/file-manager/fm-search-list-view.c	Tue Jan 13 01:23:49 2004
@@ -558,22 +558,16 @@
 	g_assert (return_sensitivity != NULL);
 
 	count = g_list_length (selected_files);
-	if (count <= 1) {
-		/* "Reveal in New Window" means open the parent folder for the
-		 * selected item in a new window, select the item in that window,
-		 * and scroll as necessary to make that item visible (this comment
-		 * is to inform translators of this tricky concept).
-		 */
-		name_with_underscore = g_strdup (_("_Reveal in New Window"));
-	} else {
-		/* "Reveal in n New Windows" means open the parent folder for each
-		 * selected item in a separate new window, select each selected
-		 * item in its new window, and scroll as necessary to make those 
-		 * items visible (this comment is to inform translators of this 
-		 * tricky concept).
-		 */
-		name_with_underscore = g_strdup_printf (_("Reveal in %d _New Windows"), count);
-	}
+	/* "Reveal in n New Windows" means open the parent folder for each
+	 * selected item in a separate new window, select each selected
+	 * item in its new window, and scroll as necessary to make those 
+	 * items visible (this comment is to inform translators of this 
+	 * tricky concept).
+	 */
+	name_with_underscore = g_strdup_printf (ngettext("_Reveal in New Window",
+							 "Reveal in %d _New Windows",
+							 count),
+						count);
 
 	*return_sensitivity = selected_files != NULL;
 	
diff -ur nautilus/src/nautilus-location-bar.c nautilus.ngettext/src/nautilus-location-bar.c
--- nautilus/src/nautilus-location-bar.c	Mon Jan  5 22:28:27 2004
+++ nautilus.ngettext/src/nautilus-location-bar.c	Tue Jan 13 01:26:29 2004
@@ -151,10 +151,14 @@
 	 */
 	name_count = g_list_length (names);
 	if (name_count > 1) {
-		prompt = g_strdup_printf (_("Do you want to view %d locations?"), 
-					          name_count);	  
-		detail = g_strdup_printf (_("This will open %d separate windows."),
-		                                    name_count);			  
+		prompt = g_strdup_printf (ngettext("Do you want to view %d location?",
+						   "Do you want to view %d locations?",
+						   name_count), 
+					  name_count);
+		detail = g_strdup_printf (ngettext("This will open %d separate window.",
+						   "This will open %d separate windows.",
+						   name_count),
+					  name_count);			  
 		/* eel_run_simple_dialog should really take in pairs
 		 * like gtk_dialog_new_with_buttons() does. */
 		new_windows_for_extras = eel_run_simple_dialog 
