Skip to content

Commit

Permalink
feat: update client_properties to properly report Weblate client
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jan 21, 2025
1 parent b6d3203 commit c7cd9c3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions weblate_fedora_messaging/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand Down

0 comments on commit c7cd9c3

Please sign in to comment.