From cd2af0dcf724096bb0c3200de3ae5ef264a22447 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 18 Jun 2024 18:47:06 +0800 Subject: [PATCH] perf: english traslation --- apps/common/serializers/fields.py | 2 +- apps/i18n/lina/en.json | 2 +- apps/ops/serializers/job.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/common/serializers/fields.py b/apps/common/serializers/fields.py index 4be566ab1..71a4672e2 100644 --- a/apps/common/serializers/fields.py +++ b/apps/common/serializers/fields.py @@ -122,7 +122,7 @@ class LabelRelatedField(serializers.RelatedField): from labels.models import LabeledResource, Label if data is None: return data - if isinstance(data, dict) and data.get("id"): + if isinstance(data, dict) and data.get("id") or data.get("pk"): pk = data.get("id") or data.get("pk") label = Label.objects.get(pk=pk) else: diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json index a7c12d999..9658dd541 100644 --- a/apps/i18n/lina/en.json +++ b/apps/i18n/lina/en.json @@ -150,7 +150,7 @@ "AssetTree": "Asset tree", "Assets": "Assets", "AssetsAmount": "Assets", - "AssetsOfNumber": "Number of asset", + "AssetsOfNumber": "Assets", "AssetsTotal": "Total assets", "AssignedInfo": "Approval information", "Assignee": "Handler", diff --git a/apps/ops/serializers/job.py b/apps/ops/serializers/job.py index daeaf35a3..b66ab4202 100644 --- a/apps/ops/serializers/job.py +++ b/apps/ops/serializers/job.py @@ -49,7 +49,7 @@ class JobSerializer(BulkOrgResourceModelSerializer, PeriodTaskSerializerMixin): "run_after_save" ] extra_kwargs = { - 'average_time_cost': {'label': _('Average time taken')}, + 'average_time_cost': {'label': _('Duration')}, }