From c7cd9c364510b00d400618a0451256ee44e93224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 21 Jan 2025 15:05:36 +0100 Subject: [PATCH] feat: update client_properties to properly report Weblate client --- weblate_fedora_messaging/apps.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/weblate_fedora_messaging/apps.py b/weblate_fedora_messaging/apps.py index bc74bf8..d03c746 100644 --- a/weblate_fedora_messaging/apps.py +++ b/weblate_fedora_messaging/apps.py @@ -23,6 +23,8 @@ from django.apps import AppConfig from django.conf import settings +from weblate.utils.version import VERSION + def configure_fedora_messaging(): if settings.FEDORA_MESSAGING_CONF: @@ -36,6 +38,14 @@ def configure_fedora_messaging(): ) ) fedora_messaging.config.conf.setup_logging() + messaging_version = fedora_messaging.config.conf["client_properties"]["version"] + version = f"Weblate-{VERSION} {messaging_version}" + fedora_messaging.config.conf["client_properties"] = { + "app": "Weblate", + "product": "Weblate Fedora Messaging", + "information": "https://github.com/WeblateOrg/fedora_messaging", + "version": version, + } class FedoraConfig(AppConfig):