From c0c169700367d2e117c919f05d1c140328408747 Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Mon, 26 Jan 2026 17:06:52 +0300 Subject: [PATCH] refactor(locale): update Russian locale translations for accuracy Updated translations to fix pluralization mistakes in administrative actions. Improved clarity and correctness in user-facing messages. --- engine/blog/graphene/object_types.py | 2 +- engine/blog/serializers.py | 2 +- engine/core/admin.py | 6 +++++- .../core/locale/ru_RU/LC_MESSAGES/django.mo | Bin 124741 -> 124741 bytes .../core/locale/ru_RU/LC_MESSAGES/django.po | 4 ++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/engine/blog/graphene/object_types.py b/engine/blog/graphene/object_types.py index 1039e38c..54d71afc 100644 --- a/engine/blog/graphene/object_types.py +++ b/engine/blog/graphene/object_types.py @@ -15,7 +15,7 @@ class PostType(DjangoObjectType): interfaces = (relay.Node,) def resolve_content(self: Post, _info: HttpRequest) -> str: - return self.content.html.replace("\n", "
") + return self.content or "" class PostTagType(DjangoObjectType): diff --git a/engine/blog/serializers.py b/engine/blog/serializers.py index 57279ac1..9415d0ea 100644 --- a/engine/blog/serializers.py +++ b/engine/blog/serializers.py @@ -19,4 +19,4 @@ class PostSerializer(ModelSerializer): fields = "__all__" def get_content(self, obj: Post) -> str: - return obj.content.html.replace("\n", "
") + return obj.content or "" diff --git a/engine/core/admin.py b/engine/core/admin.py index 9422a73d..94df948e 100644 --- a/engine/core/admin.py +++ b/engine/core/admin.py @@ -454,6 +454,10 @@ class ProductAdmin( ): # noinspection PyClassVar model = Product + actions = ActivationActionsMixin.actions + [ + "export_to_marketplaces", + "ban_from_marketplaces", + ] list_display = ( "sku", "name", @@ -463,7 +467,6 @@ class ProductAdmin( "category", "brand", "price", - "rating", "modified", ) list_filter = ( @@ -511,6 +514,7 @@ class ProductAdmin( "name", "partnumber", "is_digital", + "export_to_marketplaces", ] relation_fields = [ "category", diff --git a/engine/core/locale/ru_RU/LC_MESSAGES/django.mo b/engine/core/locale/ru_RU/LC_MESSAGES/django.mo index 9e0e93ea4f7cec2dfacdce3397e8e6457fb3d46f..38d361d95067f883d7ce0bf161fde4ba0e7e201c 100644 GIT binary patch delta 33 mcmX?lj{WF4_6;Y`OxHWiD7pF38F>~kt6A#ecBzYu+F}40pbnG( delta 35 ncmX?lj{WF4_6;Y`Fz%dOU@N)#@fkT52(wxG;&$naj9Ov