D8863: Give warnings when the file is modified externally

Henrik Fehlauer noreply at phabricator.kde.org
Sat Nov 18 23:48:45 UTC 2017


rkflx added a comment.


  Thanks for working on my "complaint" ;)
  
  In https://phabricator.kde.org/D8642#166462 I claimed that Save As worked correctly. After testing more, this turns out to be an edge case, i.e. it works (as in: annotation and document are saved) when overwriting with the original file. Obviously that's not applicable in general.
  
  What is really irritating and frustrating here is that the user can still see the file (at least the cached pages, with the rest turning blank) and move around, "it's just there" but cannot be saved. This is in stark contrast to Kate and LibreOffice, where you are allowed to save back to disk:
  
  F5497164: kate.png <https://phabricator.kde.org/F5497164>
  F5497166: libreoffice.png <https://phabricator.kde.org/F5497166>
  
  I wonder how they are doing this? Are they reading the whole file to memory (apparently we do not for good reasons <https://bugs.freedesktop.org/show_bug.cgi?id=103793>)? Could we just do a `cp --reflink=auto`? Maybe this is something to come back to in case we get a lot of angry users, but I think the warning dialogs are fine for now…
  
  ---
  
  Code looks and works good.
  
  ---
  
  As for the wording of the dialogs, in general it is recommended to:
  
  - Use "Title Case" for window title as well as for buttons with multiple words (as used in screenshots above).
  - Avoid the use of "we" and only use objective facts, i.e. no "unfortunately" (ditto).
  - Have it checked by a native speaker.
  
  With this, Albert's comments, Nate's suggestions and the screenshots from above in mind, here is how I would word the dialogs (@ngraham please check :)
  
  - "There are unsaved changes, and the file '<filename>' has been modified by another program. Your changes will be lost, because the file can no longer be saved.<br>Do you want to continue {closing | reloading} the file?"
  - The file '<filename>' has been modified by another program, which means it can no longer be saved.

INLINE COMMENTS

> part.cpp:1721
> +                                             i18n( "You have unsaved modifications and the file has been modified externally since it was opened.<br>Unfortunately that means that we can no longer save it and your changes will be lost.<br>Do you want to continue the reload?" ),
> +                                             i18n( "File changed" ),
> +                                             KGuiItem( i18n( "Continue reload" ) ), // <- KMessageBox::Yes

Use title case.

> part.cpp:1722
> +                                             i18n( "File changed" ),
> +                                             KGuiItem( i18n( "Continue reload" ) ), // <- KMessageBox::Yes
> +                                             KGuiItem( i18n( "Abort reload" ) ));

For consistency with the `Closing` buttons:
`reload` → `Reloading` (2×)

> part.cpp:1730
> +                                        i18n( "File changed" ),
> +                                        KGuiItem( i18n( "Continue closing" ) ), // <- KMessageBox::Yes
> +                                        KGuiItem( i18n( "Abort closing" ) ));

Use title case (3×).

> part.cpp:2488
> +        QMessageBox::warning( widget(),
> +                              i18n( "File changed" ),
> +                              i18n( "The file has been modified externally since it was opened, unfortunately that means that we can no longer save it." ) );

Use title case.

REPOSITORY
  R223 Okular

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

To: aacid
Cc: ngraham, rkflx, ltoscano, #okular, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20171118/08d42a64/attachment-0001.html>


More information about the Okular-devel mailing list