def watch_locale(request): """Start watching a locale for revisions ready for review.""" ReviewableRevisionInLocaleEvent.notify(request.user, locale=request.LANGUAGE_CODE) statsd.incr('wiki.watches.locale') # A 200 so jQuery interprets it as success return HttpResponse()
def watch_locale(request, product=None): """Start watching a locale for revisions ready for review.""" kwargs = {'locale': request.LANGUAGE_CODE} if product is not None: kwargs['product'] = product ReviewableRevisionInLocaleEvent.notify(request.user, **kwargs) statsd.incr('wiki.watches.locale') return HttpResponse()