D15980: Warn user before renaming the file/folder to start with a ' . '

Pino Toscano noreply at phabricator.kde.org
Sat Oct 6 15:28:18 BST 2018


pino requested changes to this revision.
pino added a comment.
This revision now requires changes to proceed.


  In addition to the link at Elvis already provided, please check https://hig.kde.org/style/writing/index.html for the guidelines on the style.
  
  Also, the message itself seems poor: the dialog is basically a question (and the buttons are "replies" to the question), so its text ought to be a question, not a statement.

INLINE COMMENTS

> dolphinview.cpp:1583
> +                KGuiItem continueGuiItem(KStandardGuiItem::cont());
> +                continueGuiItem.setText(i18nc("@action:button", "Rename and hide"));
> +

"Rename and Hide"

> dolphinview.cpp:1585
> +
> +                const int code = KMessageBox::warningContinueCancel(nullptr,
> +                                                                    i18n("The %1 name starts with a dot, therefore it will be hidden by default.", item),

a warning seems a bit too strong (there is no dangerous situation), most probably a simpler yes/no question is better

> dolphinview.cpp:1586
> +                const int code = KMessageBox::warningContinueCancel(nullptr,
> +                                                                    i18n("The %1 name starts with a dot, therefore it will be hidden by default.", item),
> +                                                                    item == QLatin1String("file") ? i18n("Hide this file?") : i18n("Hide this directory?"),

"item" here is still a string puzzle.

> dolphinview.cpp:1587
> +                                                                    i18n("The %1 name starts with a dot, therefore it will be hidden by default.", item),
> +                                                                    item == QLatin1String("file") ? i18n("Hide this file?") : i18n("Hide this directory?"),
> +                                                                    continueGuiItem,

why do you check what "item" contains? there's already `oldFile.isFile()` that provides this information

> dolphinview.cpp:1590
> +                                                                    KStandardGuiItem::cancel(),
> +                                                                    i18n(":Do not ask again"),
> +                                                                    KMessageBox::Notify

why the colon at the beginning of the string?

> dolphinview.cpp:1596
> +                   return;
> +                   }
> +            }

wrong indentation

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D15980

To: shubham, elvisangelaccio, broulik, ngraham, pino
Cc: pino, totto, kfm-devel, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20181006/58d21e0d/attachment.htm>


More information about the kfm-devel mailing list