Translate label of JSONExporter

This commit is contained in:
Raphael Michel
2023-01-11 15:10:14 +01:00
parent f33aa3fdba
commit c018921a18

View File

@@ -38,7 +38,8 @@ from decimal import Decimal
from django.core.serializers.json import DjangoJSONEncoder from django.core.serializers.json import DjangoJSONEncoder
from django.db.models import Prefetch from django.db.models import Prefetch
from django.dispatch import receiver from django.dispatch import receiver
from django.utils.translation import gettext_lazy, pgettext_lazy from django.utils.functional import lazy
from django.utils.translation import gettext, gettext_lazy, pgettext_lazy
from ..exporter import BaseExporter from ..exporter import BaseExporter
from ..models import ItemMetaValue, ItemVariation, ItemVariationMetaValue from ..models import ItemMetaValue, ItemVariation, ItemVariationMetaValue
@@ -47,7 +48,7 @@ from ..signals import register_data_exporters
class JSONExporter(BaseExporter): class JSONExporter(BaseExporter):
identifier = 'json' identifier = 'json'
verbose_name = 'Order data (JSON)' verbose_name = lazy(lambda *args: gettext('Order data') + ' (JSON)', str)()
category = pgettext_lazy('export_category', 'Order data') category = pgettext_lazy('export_category', 'Order data')
description = gettext_lazy('Download a structured JSON representation of all orders. This might be useful for the ' description = gettext_lazy('Download a structured JSON representation of all orders. This might be useful for the '
'import in third-party systems.') 'import in third-party systems.')