Project

General

Profile

« Previous | Next » 

Revision 3476720f

Added by Serghei Mihai almost 9 years ago

i18n-zed texts fix

View differences:

uauth/organization/views.py
69 69
            for index in xrange(accounts_number_start, accounts_number + accounts_number_start):
70 70
                data['username'] = '%s-%s' % (username, index)
71 71
                if not create_user(data):
72
                    messages.error(self, request, _('Error while creating user %s' % data['username']))
72
                    messages.error(self, request, _('Error while creating user %s') % data['username'])
73 73
                    break
74
            messages.info(self.request, _('%s users added successfully' % accounts_number))
74
            messages.info(self.request, _('%s users added successfully') % accounts_number)
75 75
        else:
76 76
            if create_user(data):
77
                messages.info(self.request, _('User "%s" successfully created' % data['username']))
77
                messages.info(self.request, _('User "%s" successfully created') % data['username'])
78 78
            else:
79
                messages.error(self.request, _('Error occured while creating user "%s"' % data['username']))
79
                messages.error(self.request, _('Error occured while creating user "%s"') % data['username'])
80 80
        return super(UsersCreateView, self).form_valid(form)
81 81

  
82 82
create_users = UsersCreateView.as_view()
......
98 98
        username = self.object.username
99 99
        if 'delete' in self.request.POST:
100 100
            self.object.delete()
101
            messages.info(self.request, _('Account "%s" successfully deleted' % username))
101
            messages.info(self.request, _('Account "%s" successfully deleted') % username)
102 102
            return redirect(self.get_success_url())
103 103
        else:
104
            messages.info(self.request, _('Account "%s" successfully updated' % username))
104
            messages.info(self.request, _('Account "%s" successfully updated') % username)
105 105
            return super(UserEditView, self).form_valid(form)
106 106

  
107 107
edit_user = UserEditView.as_view()
......
145 145
                users.append(user)
146 146
            created, updated = create_or_update_users(users)
147 147
            if created:
148
                messages.info(request, _('%s accounts added' % created))
148
                messages.info(request, _('%s accounts added') % created)
149 149
            if updated:
150
                messages.info(request, _('%s accounts updated' % updated))
150
                messages.info(request, _('%s accounts updated') % updated)
151 151
            return redirect(self.get_success_url())
152 152
        else:
153 153
            return self.render_to_response(context)

Also available in: Unified diff