After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772435 - batch rename: on empty names show why rename is not allowed
batch rename: on empty names show why rename is not allowed
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.21.x
Other Linux
: Normal normal
: future
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-05 01:48 UTC by Mohammed Sadiq
Modified: 2017-05-13 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
batch-rename: show error on empty name (2.55 KB, patch)
2017-04-22 11:17 UTC, Diana Grecu
none Details | Review
batch-rename: show error on empty name (2.55 KB, patch)
2017-05-04 18:13 UTC, Diana Grecu
none Details | Review
batch-rename: show error on empty name (2.54 KB, patch)
2017-05-13 10:07 UTC, Diana Grecu
committed Details | Review

Description Mohammed Sadiq 2016-10-05 01:48:25 UTC
When the destination name is empty, batch rename doesn't allow to rename by making the Rename button insensitive. But the reason why it isn't allowed is not shown (as it is, in name conflicts).

How to reproduce:
1. Create some files
   touch {00..99}
2. Select all -> Rename -> Find and replace text
3. Set Existing text as '9'.

Result:
The 'Rename' button goes insensitive without explaining the user why it happened.

Ideally it should show that destination name is empty, or something like that the same way as it's done with name conflicts
Comment 1 Diana Grecu 2017-04-22 11:17:49 UTC
Created attachment 350230 [details] [review]
batch-rename: show error on empty name

When the destination name is empty, the "Rename" button goes
insensitive without explaining the user why it happened.

To explain what happened show a descriptive message to inform
the user.
Comment 2 Carlos Soriano 2017-05-02 18:21:24 UTC
Review of attachment 350230 [details] [review]:

LGTM, thanks!
Comment 3 Carlos Soriano 2017-05-02 18:35:55 UTC
Review of attachment 350230 [details] [review]:

whops

::: src/nautilus-batch-rename-dialog.c
@@ +1424,3 @@
+    {
+        gtk_label_set_label (GTK_LABEL (dialog->conflict_label),
+                             "File can't have an empty name");

translatioon!
Comment 4 Diana Grecu 2017-05-04 18:13:39 UTC
Created attachment 351072 [details] [review]
batch-rename: show error on empty name

When the destination name is empty, the "Rename" button goes
insensitive without explaining the user why it happened.

To explain what happened show a descriptive message to inform
the user.
Comment 5 Ernestas Kulik 2017-05-09 08:48:29 UTC
Review of attachment 351072 [details] [review]:

::: src/nautilus-batch-rename-dialog.c
@@ +1424,3 @@
+    {
+        gtk_label_set_label (GTK_LABEL (dialog->conflict_label),
+                             _("File can't have an empty name"));

I don’t see any translatable string using the contraction. Also, you are not using the preferred character for apostrophes (https://developer.gnome.org/hig/stable/typography.html.en).

Looking at other sources, I see a pattern in such strings. To be consistent, I’d say “A file cannot have no name” would fit better, as it also sounds more natural (at least to me). But then again, we’re entering the territory of double negatives. “A file must have a name”, perhaps? Not sure.
Comment 6 Piotr Drąg 2017-05-09 09:55:59 UTC
(In reply to Ernestas Kulik from comment #5)
> Looking at other sources, I see a pattern in such strings. To be consistent,
> I’d say “A file cannot have no name” would fit better, as it also sounds
> more natural (at least to me). But then again, we’re entering the territory
> of double negatives. “A file must have a name”, perhaps? Not sure.

I like the second version better, FWIW.
Comment 7 Diana Grecu 2017-05-13 10:07:37 UTC
Created attachment 351771 [details] [review]
batch-rename: show error on empty name

When the destination name is empty, the "Rename" button goes
insensitive without explaining the user why it happened.

To explain what happened show a descriptive message to inform
the user.
Comment 8 Ernestas Kulik 2017-05-13 10:27:01 UTC
Review of attachment 351771 [details] [review]:

Looks good, thanks!
Comment 9 Ernestas Kulik 2017-05-13 16:24:10 UTC
Attachment 351771 [details] pushed as 0e21d18 - batch-rename: show error on empty name