4teamwork / ftw.zipexport

Zip Export for Plone
2 stars 6 forks source link

Better error message on empty containers. #22

Closed maethu closed 10 years ago

maethu commented 10 years ago

Currently it just displays a message, that the zip export ist not possible.

shylux commented 10 years ago

@maethu it was just this message right? i think the german and french translations fit.

maethu commented 10 years ago

@shylux Well, I guess event in german it translated with Der ausgewählte Inhalt unterstützt keinen Zip Export. But that's wrong the content supports zip export but I has No content with a zip representation.

I assume something like: Es konnte keine Zip-Datei erstellt werden, da kein Inhalt gefunden wurde, welcher als Zip-Datei exportiert werden kann.

shylux commented 10 years ago

https://github.com/4teamwork/ftw.zipexport/issues/14

Should i add this? It only happens when someone runs an older python version and tries to export over 4GB. I mentioned that also in the readme.

deiferni commented 10 years ago

@shylux i would include #14, a typical user will not read the README

deiferni commented 10 years ago

@shylux if i understand correctly ZipSelectedExportView is responsible for the folder_contents export (the user has to select what to export) whereas ZipExportView is responsible for the action_menu export (all exportable content is exported).

If this is correct, i think you could further improve usability by showing different error messages on ZipSelectedExportView and ZipExportView:

shylux commented 10 years ago

@deiferni @maethu updated

deiferni commented 10 years ago

@shylux you don't need to add a constructor if they only call the super implementation. Furthermore, if you accept any arguments you break the interface of BrowserView, e.g. as soon as somebody would use keyword arguments or more than two positional arguments you get TypeError: ... got an unexpected keyword argument https://github.com/4teamwork/ftw.zipexport/blob/lk_correct_error_message/ftw/zipexport/browser/zipexportview.py#L21 https://github.com/4teamwork/ftw.zipexport/blob/lk_correct_error_message/ftw/zipexport/browser/zipexportview.py#L86

shylux commented 10 years ago

@deiferni Removed the constructors.

deiferni commented 10 years ago

:sparkles: :+1: