Pinakin Nayi (OpenERP) has proposed merging 
lp:~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-google-caldav-warning-msg-pna
 into lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr.

Requested reviews:
  Kuldeep Joshi(OpenERP) (kjo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-google-caldav-warning-msg-pna/+merge/114801

Hello,

  I improved Exceptions, Constraint errors and Warning message of google and 
caldav modules.

Thanks,
pna
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-google-caldav-warning-msg-pna/+merge/114801
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr.
=== modified file 'caldav/calendar.py'
--- caldav/calendar.py	2012-06-22 06:57:56 +0000
+++ caldav/calendar.py	2012-07-13 08:44:26 +0000
@@ -786,7 +786,7 @@
         res = cr.fetchone()
         if res:
             if res[0] > 0:
-                raise osv.except_osv(_('Warning !'), _('Can not create line "%s" more than once') % (vals.get('name')))
+                raise osv.except_osv(_('Warning !'), _('Cannot create line "%s" more than once.') % (vals.get('name')))
         return super(basic_calendar_line, self).create(cr, uid, vals, context=context)
 
 basic_calendar_line()
@@ -876,7 +876,7 @@
             line = line_obj.browse(cr, uid, l_id, context=context)[0]
             line_rel = line.object_id.model
             if (relation != 'NULL') and (not relation == line_rel):
-                raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines') % (name))
+                raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines.') % (name))
         return True
 
     def create(self, cr, uid, vals, context=None):
@@ -1192,7 +1192,7 @@
                 elif isinstance(child.value, datetime):
                     # TODO
                     # remember, spec says this datetime is in UTC
-                    raise NotImplementedError("we cannot parse absolute triggers")
+                    raise NotImplementedError("We cannot parse absolute triggers.")
                 if not seconds:
                     duration = abs(days)
                     related = days > 0 and 'after' or 'before'

=== modified file 'caldav/i18n/caldav.pot'
--- caldav/i18n/caldav.pot	2012-05-10 12:49:11 +0000
+++ caldav/i18n/caldav.pot	2012-07-13 08:44:26 +0000
@@ -365,7 +365,7 @@
 #. module: caldav
 #: code:addons/caldav/wizard/calendar_event_import.py:63
 #, python-format
-msgid "Invalid format of the ics, file can not be imported"
+msgid "Invalid format of the ics, file cannot be imported."
 msgstr ""
 
 #. module: caldav

=== modified file 'caldav/wizard/caldav_browse.py'
--- caldav/wizard/caldav_browse.py	2011-12-19 16:54:40 +0000
+++ caldav/wizard/caldav_browse.py	2012-07-13 08:44:26 +0000
@@ -178,7 +178,7 @@
         res = {}
         host = context.get('host')
         if not config.get_misc('webdav','enable',True):
-            raise Exception("WebDAV is disabled, cannot continue")
+            raise Exception("WebDAV is disabled, cannot continue.")
         user_pool = self.pool.get('res.users')
         current_user = user_pool.browse(cr, uid, uid, context=context)
         #TODO write documentation

=== modified file 'caldav/wizard/calendar_event_import.py'
--- caldav/wizard/calendar_event_import.py	2012-05-10 12:49:11 +0000
+++ caldav/wizard/calendar_event_import.py	2012-07-13 08:44:26 +0000
@@ -60,7 +60,7 @@
             try:
                 vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
             except:
-                raise osv.except_osv(_('Warning !'),_('Invalid format of the ics, file can not be imported'))
+                raise osv.except_osv(_('Warning !'),_('Invalid format of the ics, file cannot be imported.'))
             global cnt
             if vals:
                 cnt = len(vals)

=== modified file 'google_docs/google_docs.py'
--- google_docs/google_docs.py	2012-05-23 11:02:15 +0000
+++ google_docs/google_docs.py	2012-07-13 08:44:26 +0000
@@ -27,7 +27,7 @@
     from gdata.docs.service import DOCUMENT_LABEL
     import gdata.auth
 except ImportError:
-    raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list'))
+    raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list.'))
 
 class google_docs_ir_attachment(osv.osv):
     _inherit = 'ir.attachment'
@@ -46,7 +46,7 @@
         #login gmail account
         client = google_pool.google_login( user_config['user'], user_config['password'], type='docs_client', context=context)
         if not client:
-            raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in users/synchronization"))
+            raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in Users/Users/Synchronization tab."))
         return client
 
     def create_empty_google_doc(self, cr, uid, res_model, res_id, context=None):
@@ -88,7 +88,7 @@
             #copy the document you choose in the configuration
             copy_resource = client.copy_resource(original_resource, 'copy_%s' % original_resource.title.text)
         except:
-            raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL"))
+            raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL."))
         # create an ir.attachment
         self.create(cr, uid, {
             'res_model': res_model,

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to