diff options
author | Neha Yadav <inehayadav28@gmail.com> | 2016-10-12 23:18:26 +0530 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-11-10 13:11:57 +0100 |
commit | 735bdb195306db1936e52e9ec4150ef624b70bed (patch) | |
tree | df4b704e7453cba7e5c2dd10141a33285defc4dc | |
parent | a8dbefc0bfef7f09bc2a651d64f264ebe93cafba (diff) | |
download | nautilus-735bdb195306db1936e52e9ec4150ef624b70bed.tar.gz |
batch-rename : Reword "Rename %d files/folders" as "Rename %d files"
The problem is that when we select both folder and file then string
"Rename %d files" appears which may not be the right term when
the selected items contains both files and folders.
To solve this issue we rename the string and now in place of string
"Rename %d files" we use "Rename %d Files and Folders" for both file
and folder.
https://bugzilla.gnome.org/show_bug.cgi?id=771586
-rw-r--r-- | src/nautilus-batch-rename-dialog.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c index 20f99def5..4e922e7a0 100644 --- a/src/nautilus-batch-rename-dialog.c +++ b/src/nautilus-batch-rename-dialog.c @@ -2100,6 +2100,7 @@ nautilus_batch_rename_dialog_new (GList *selection, GString *dialog_title; GList *l; gboolean all_targets_are_folders; + gboolean all_targets_are_regular_files; dialog = g_object_new (NAUTILUS_TYPE_BATCH_RENAME_DIALOG, "use-header-bar", TRUE, NULL); @@ -2120,19 +2121,38 @@ nautilus_batch_rename_dialog_new (GList *selection, } } - dialog_title = g_string_new (""); + all_targets_are_regular_files = TRUE; + for (l = selection; l != NULL; l = l->next) + { + if (!nautilus_file_is_regular_file (NAUTILUS_FILE (l->data))) + { + all_targets_are_regular_files = FALSE; + break; + } + } + + dialog_title = g_string_new (""); if (all_targets_are_folders) { g_string_append_printf (dialog_title, ngettext ("Rename %d Folder", "Rename %d Folders", g_list_length (selection)), g_list_length (selection)); } - else + else if (all_targets_are_regular_files) { g_string_append_printf (dialog_title, ngettext ("Rename %d File", "Rename %d Files", g_list_length (selection)), g_list_length (selection)); } + else + { + /* To translators: %d is the total number of files and folders. + * Singular case of the string is never used */ + g_string_append_printf (dialog_title, + ("Rename %d Files and Folders"), + g_list_length (selection)); + } + gtk_window_set_title (GTK_WINDOW (dialog), dialog_title->str); add_tag (dialog, metadata_tags_constants[ORIGINAL_FILE_NAME]); |