From ce7de306e3d56298247c5ff2ed1a5efb1b99ccd4 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Wed, 18 Dec 2019 10:56:48 +0100 Subject: [PATCH] Translate menu items. --- musician/mixins.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/musician/mixins.py b/musician/mixins.py index 5c65f47..3cc463a 100644 --- a/musician/mixins.py +++ b/musician/mixins.py @@ -1,4 +1,5 @@ from django.contrib.auth.mixins import UserPassesTestMixin +from django.utils.translation import gettext_lazy as _ from django.views.generic.base import ContextMixin from . import api, get_version @@ -10,11 +11,11 @@ class CustomContextMixin(ContextMixin): context = super().get_context_data(**kwargs) # generate services menu items services_menu = [ - {'icon': 'globe-europe', 'pattern_name': 'musician:dashboard', 'title': 'Domains & websites'}, - {'icon': 'envelope', 'pattern_name': 'musician:mails', 'title': 'Mails'}, - {'icon': 'mail-bulk', 'pattern_name': 'musician:mailing-lists', 'title': 'Mailing lists'}, - {'icon': 'database', 'pattern_name': 'musician:databases', 'title': 'Databases'}, - {'icon': 'fire', 'pattern_name': 'musician:saas', 'title': 'SaaS'}, + {'icon': 'globe-europe', 'pattern_name': 'musician:dashboard', 'title': _('Domains & websites')}, + {'icon': 'envelope', 'pattern_name': 'musician:mails', 'title': _('Mails')}, + {'icon': 'mail-bulk', 'pattern_name': 'musician:mailing-lists', 'title': _('Mailing lists')}, + {'icon': 'database', 'pattern_name': 'musician:databases', 'title': _('Databases')}, + {'icon': 'fire', 'pattern_name': 'musician:saas', 'title': _('SaaS')}, ] context.update({ 'services_menu': services_menu,