GNOME Bugzilla – Bug 618469
Inconsistent naming of new untitled files and folders
Last modified: 2011-01-10 16:43:04 UTC
The default name given to new files is 'new file'. For new folders it is 'untitled document'. Clearly, this is inconsistent. The words 'file' and 'document' are not needed in the string, since the icon provides this information. The best solution would therefore be to name both files and folders 'untitled'.
What do you call a a file after an "untitled" folder has been created, "untitled #2" with the types being different?
(In reply to comment #1) > What do you call a a file after an "untitled" folder has been created, > "untitled #2" with the types being different? yes. it doesn't matter what is it.
Also see bug 559213 which seems to be a duplicate of this.
*** Bug 559213 has been marked as a duplicate of this bug. ***
Created attachment 165265 [details] [review] [PATCH] Make Create Document and Create Folder use 'untitled %d' filename format Also adds a new L10N string "untitled". Any review or suggestions are very welcome.
why not just have "untitled" instead of "untitled %d"? you can see from the icon what it is :)
Sorry if I wasn't clear. The %d represents a number. Completely ignoring whether it's a file or a directory, it begins with "untitled", then progresses to "untitled 2", "untitled 3", etc. Something in me didn't want to put # characters in filenames if it could be helped, but if that would be better it's trivial to add.
(In reply to comment #7) > Sorry if I wasn't clear. The %d represents a number. Completely ignoring > whether it's a file or a directory, it begins with "untitled", then progresses > to "untitled 2", "untitled 3", etc. > > Something in me didn't want to put # characters in filenames if it could be > helped, but if that would be better it's trivial to add. ah ok, sorry, I scanned a bit too quickly :) Perhaps we can but brackets around the number like "untitled (3)"?
> filename2 = g_strdup_printf ("%s %d", filename, ++count); Not sure but maybe "%s %d" should be translatable to be have each locale could change this themselves then "untitled (3)", "untitled - 3", "untitled #3" would all be possible.
Created attachment 165458 [details] [review] [PATCH] Make Create Document and Create Folder use 'untitled (%d)' filename format An alternative patch which uses parentheses instead
(In reply to comment #9) > > filename2 = g_strdup_printf ("%s %d", filename, ++count); > > Not sure but maybe "%s %d" should be translatable to be have each locale could > change this themselves then "untitled (3)", "untitled - 3", "untitled #3" would > all be possible. It's an interesting idea and I've pondered on it a bit. My conclusion is that the point of this bug is to improve consistency and merely having different punctuation for different locales doesn't really achieve that. If we want to localise I say we go all the way and use the same code that's used when you copy a file and paste it multiple times and get (copy), (another copy), (3rd copy), (4th copy), etc. Personally, though, I find these anglicisms annoying mixed in with what is a fairly mechanical operation (making several files). Does anyone have any strong feelings on the issue?
(In reply to comment #11) > Personally, though, I find these anglicisms annoying mixed in with what is a > fairly mechanical operation (making several files). Does anyone have any strong > feelings on the issue? 'Untitled 2' 'Untitled 3' seems best to me - it is clean and straightforward. It's unclear to me whether varying the string is useful from an i10n point of view. 'Untitled (2)' is pretty similar to 'Untitled - 2' as far as I'm concerned, but then I'm not a translator.
(In reply to comment #12) > (In reply to comment #11) > > > Personally, though, I find these anglicisms annoying mixed in with what is a > > fairly mechanical operation (making several files). Does anyone have any strong > > feelings on the issue? > > 'Untitled 2' 'Untitled 3' seems best to me - it is clean and straightforward. > > It's unclear to me whether varying the string is useful from an i10n point of > view. 'Untitled (2)' is pretty similar to 'Untitled - 2' as far as I'm > concerned, but then I'm not a translator. Exactly. We don't know that. It's very well possibly that some locale wants to do it differently. :)
(In reply to comment #13) > Exactly. We don't know that. It's very well possibly that some locale wants to > do it differently. :) Sure. 'Untitled 2' as default with the option to change it to suit locales seems fine to me.
Created attachment 167949 [details] [review] New folders and empty files are named "Untitled", "Untitled 2", "Untitled 3", ... Based on the above discussion this seems to be the most best solution. It tidies up the naming and adds two new l10n strings "Untitled" and "Untitled %d" which gives pretty good flexibility for translators. Perhaps some languages read better with ordinal numbers in front? I'm not sure, but the possibility is now there. I've tested against the latest tree, and any further feedback would be much appreciated.
Created attachment 177774 [details] [review] Make Create Document and Create Folder use "Untitled %d" filename format This patch is based on Thomas Karpiniec's patch in comment #15 and compiles cleanly with JHBuild on top of current master. It has one or two small enhancements.
Created attachment 177776 [details] [review] Make Create Document/Folder use "Untitled File/Folder %d" filename format Based on the discussion above and impressions won on other Desktop Environments (KDE 4, Mac OS 10.x) I came to the conclusion that it would be better to be able to distinguish between files and folders by their filename, while they are untitled. Just think about physically challenged people that cannot "see from the icon what it is" (comment #6) if they have focus on a file or a folder because they have to use screen readers. Even for people that can see icons (like me) this could become a bit confusing or even unpredictable. Some examples: - Dolphin * choose "Create New" -> "Folder" in context menu => "New Folder" * chooes "Create New" -> "Text File" in context menu => "Text File" - Finder * choose "New Folder" from the File menu => "Untitled Folder" * choose "New File" -> "New Text File" from the File menu => "Untitled" - Nautilus (with this patch) * choose "Create Folder" from context menu => "Untitled Folder" * choose "Create Document" -> "Empty File" from context menu => "Untitled File" An alternative could be "New Folder" respectively "New File".
(In reply to comment #17) > Just think about physically challenged people that cannot "see from the icon > what it is" (comment #6) if they have focus on a file or a folder because they > have to use screen readers. Even for people that can see icons (like me) this > could become a bit confusing or even unpredictable. That's a good point. We have to make sure we use actions as menu items as well (Finder clearly this wrong), and use "File" and "Document" consistently. I would suggest: - Create New Folder => Untitled Folder - Create Document => [submenu] => Spreadsheet => Untitled Spreadsheet So basically like your patch, but only using the term "Document" and using the type of document as well (if that's possible to do).
> - Create Document => [submenu] => Spreadsheet => Untitled Spreadsheet Oops, that should be "Create New Document" for consistency.
Created attachment 177833 [details] [review] Make Create Document/Folder use "Untitled Document/Template/Folder %d" filename format
Created attachment 177834 [details] [review] Clean context menu and "File Menu", also use "Create New Folder/Document"
Created attachment 177839 [details] Screenshot showing the enhancements made by the latest two patches The patch attached to comment #20 is an enhancement of the one attached to comment #17 which is now obsolete. Instead of "Untitled File %d" it uses "Untitled Document %d". If a new document is created from a template called "Spreadsheet" a file initially called "Untitled Spreadsheet" is created. Due to the patch in comment #21 parts of the context menu and also parts of the "File" menu, and also the context menu in the sidebar's tree view (they are partly the same) are changed corresponding to Hylke Bons' suggestions. They now use "Create New Folder", "Create New Document", "Empty Document" instead of "Create Folder", "Create Document", "Empty File". One last enhancement one could think of is the numbering of template files. If you put a file called Spreadsheet.ods into your ~/Templates folder you get a menu item "Create New Document" -> "Spreadsheet". The first document created will be "Untitled Spreadsheet.ods", the second one "Untitled Spreadsheet.ods 2". It would be better to have "Untitled Spreadsheet 2.ods" instead. A copy of this document would then be called "Untitled Spreadsheet 2 (copy).ods".
(In reply to comment #22) > One last enhancement one could think of is the numbering of template files. If > you put a file called Spreadsheet.ods into your ~/Templates folder you get a > menu item "Create New Document" -> "Spreadsheet". The first document created > will be "Untitled Spreadsheet.ods", the second one "Untitled Spreadsheet.ods > 2". It would be better to have "Untitled Spreadsheet 2.ods" instead. A copy of > this document would then be called "Untitled Spreadsheet 2 (copy).ods". Yes. Thanks for sorting this out :)
Created attachment 177846 [details] [review] Make Create Document/Folder use "Untitled Document/Template/Folder %d" filename format This is a new version of the patch seen in comment #20. Some changes make sure that a template filename is numbered properly. Some examples: * "Untitled Spreadsheet.ods" * "Untitled Spreadsheet 2.ods" * "Untitled Spreadsheet 2 (copy).ods" To also clean the context menu and "File" menu the patch attached to comment #21 is needed.
Created attachment 177848 [details] Screenshot showing the enhancements made by patches above Here is a new screenshot. ;-)
Review of attachment 177846 [details] [review]: Thanks for the patch; looks mostly good, with some comments below. ::: libnautilus-private/nautilus-file-operations.c @@ +5839,3 @@ + } + templates_directory = nautilus_get_templates_directory (); + if (g_strcmp0 ((const char *)parent_path, (const char *)templates_directory) == 0) { Why is this a special case? job->src should always be a file in a template directory, as it is only set in file_operations_new_file_from_template(), so parent_path == template directory should always be true, or am I missing something? Also, these casts to (const char *) should not be necessary here. @@ +5938,3 @@ new_filename = g_strdup (filename); + } else { + parse_template_filename (filename, &filename_base, &suffix); You could probably use eel_filename_strip_extension() and friends instead of rewriting your implementation for this.
Review of attachment 177834 [details] [review]: Looks good, thanks.
Created attachment 177934 [details] [review] Make Create Document/Folder use "Untitled Document/Template/Folder %d" filename format Here is a new version which uses eel_filename_strip_extension() and doesn't unnecessarily check for the parent of template files. It is rebased on origin/master. Thanks for your hints.
Comment on attachment 177834 [details] [review] Clean context menu and "File Menu", also use "Create New Folder/Document" Pushed to master.
Comment on attachment 177934 [details] [review] Make Create Document/Folder use "Untitled Document/Template/Folder %d" filename format Pushed to master with a little tweak.
Marcus, thanks for your work. I pushed your patches to master, with some little tweaks to the filename suffix computation in the second one, see [1] for details. Closing as FIXED. [1] http://git.gnome.org/browse/nautilus/commit/?id=ac168820fbb4db7fbdf243a0d6b118ce445cdf37