def localization(request): """Render aggregate data about articles in a non-default locale.""" if request.LANGUAGE_CODE == settings.WIKI_DEFAULT_LANGUAGE: return HttpResponseRedirect(reverse("dashboards.contributors")) locales = Locale.objects.filter(locale=request.LANGUAGE_CODE) if locales: permission = user_can_announce(request.user, locales[0]) else: permission = False product = _get_product(request) data = {"overview_rows": overview_rows(request.LANGUAGE_CODE, product=product), "user_can_announce": permission} return render_readouts(request, L10N_READOUTS, "localization.html", extra_data=data, product=product)
def localization(request): """Render aggregate data about articles in a non-default locale.""" if request.LANGUAGE_CODE == settings.WIKI_DEFAULT_LANGUAGE: return HttpResponseRedirect(reverse("dashboards.contributors")) locales = Locale.objects.filter(locale=request.LANGUAGE_CODE) if locales: permission = user_can_announce(request.user, locales[0]) else: permission = False product = _get_product(request) data = { "overview_rows": l10n_overview_rows(request.LANGUAGE_CODE, product=product), "user_can_announce": permission, } return render_readouts( request, L10N_READOUTS, "localization.html", extra_data=data, product=product )