Weblate is libre software web-based continuous localization system, used by over 2500 libre projects and companies in more than 165 countries.
Fedora messaging integration and AMQP publisher for Weblate.
Installation
Install from PyPI:
pip install weblate-fedora-messaging
Sources are available at <https://github.com/WeblateOrg/fedora_messaging>.
Configure Weblate integration:
# Add to installed apps
INSTALLED_APPS.append("weblate_fedora_messaging")
# Path to configuration file
FEDORA_MESSAGING_CONF = "/etc/fedora-messaging/config.toml"
# fedora_messaging_task retry settings (optional, the following are the default values)
FEDORA_MESSAGING_TASK_RETRY_BACKOFF = 600
FEDORA_MESSAGING_TASK_RETRY_BACKOFF_MAX = 3600
FEDORA_MESSAGING_TASK_RETRY_JITTER = True
FEDORA_MESSAGING_TASK_MAX_RETRIES = 3
# Route messaging to notify queue
CELERY_TASK_ROUTES["weblate_fedora_messaging.tasks.*"] = {"queue": "notify"}
Messages content
Topic
All messages have topic weblate.<action>.<project>.<component>.<translation>. The action is lowercase textual representation of action with underscores instead of space, for example resource_update, all other parts are optional and represent slug of the object or a language code.
Body
The body consists of following fields (given that they are available for the event):
- id
Numerical ID of change
- action
Verbose name of the change, see Change actions source code for possible values
- timestamp
ISO formatted timestamp
- target
New value of the change (eg. new translation of the string)
- old
Old value of the change (eg. previous translation of the string)
- source
Source string.
- url
Absolute URL to view the related object.
- author
Author username (this can be different from user for example when accepting suggestions)
- user
Acting username
- project
Project slug
- component
Component slug
- translation
Translation language code
Headers
There are additional headers which you might utilize for routing as well:
- action
Verbose name of the change, see Change actions source code for possible values
- project
Project slug
- component
Component slug
Example messages
Repository merge event:
{
"id": 1,
"action": "Merged repository",
"timestamp": "2017-06-15T11:30:47.325000+00:00",
"url": "http://example.com/projects/test/test/",
"component": "test"
}
New source string event:
{
"id": 2,
"action": "New source string",
"timestamp": "2017-06-15T11:30:47.372000+00:00",
"url": "http://example.com/translate/test/test/cs/?checksum=6412684aaf018e8e",
"component": "test",
"translation": "cs",
"source": ["Hello, world!\n"]
}
Resource update event:
{
"id": 6,
"action": "Resource update",
"timestamp": "2017-06-15T11:30:47.410000+00:00",
"url": "http://example.com/projects/test/test/cs/",
"project": "test",
"component": "test",
"translation": "cs"
}
{
"id": 7,
"action": "Resource update",
"timestamp": "2017-06-15T11:30:47.510000+00:00",
"url": "http://example.com/projects/test/test/de/",
"project": "test",
"component": "test",
"translation": "de"
}
{
"id": 8,
"action": "Resource update",
"timestamp": "2017-06-15T11:30:47.595000+00:00",
"url": "http://example.com/projects/test/test/it/",
"project": "test",
"component": "test",
"translation": "it"
}
Project removal event:
{
"id": 9,
"action": "Removed project",
"timestamp": "2019-10-17T15:57:08.559420+00:00",
"target": "test",
"user": "testuser"
}
New contributor event:
{
"id": 11,
"action": "New contributor",
"timestamp": "2019-10-17T15:57:08.759960+00:00",
"url": "http://example.com/translate/test/test/cs/?checksum=6412684aaf018e8e",
"author": "testuser",
"user": "testuser",
"project": "test",
"component": "test",
"translation": "cs",
"source": ["Hello, world!\n"]
}
New translation event:
{
"id": 12,
"action": "New translation",
"timestamp": "2019-10-17T15:57:08.772591+00:00",
"url": "http://example.com/translate/test/test/cs/?checksum=6412684aaf018e8e",
"target": ["Ahoj svete!\n"],
"author": "testuser",
"user": "testuser",
"project": "test",
"component": "test",
"translation": "cs",
"source": ["Hello, world!\n"]
}
Contributing
Contributions are welcome! See documentation for more information.
Metadata
Release files for weblate_fedora_messaging 0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| weblate_fedora_messaging-0.12.tar.gz | 21.8 kB | Without provenance | Details for weblate_fedora_messaging-0.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| weblate_fedora_messaging-0.12-py3-none-any.whl | Python 3 | none | any | Details for weblate_fedora_messaging-0.12-py3-none-any.whl |
Total release size: 43.0 kB
Release files / weblate_fedora_messaging-0.12.tar.gz
| Download URL | weblate_fedora_messaging-0.12.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7894c6de5be142beca4979696d6c7bd19dcd98ec804efa3d3f95012d21ce3f7
|
|
BLAKE2b-256 checksum How to use checksums |
1c04f01ef409e2ff8ba3821623a191c67d225ede287e9b2dd2bb72f5fcef2c4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.11
|
Release files / weblate_fedora_messaging-0.12-py3-none-any.whl
| Download URL | weblate_fedora_messaging-0.12-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9f3f8e1c7eb7b12e2adfb817c0845d83a0cb6a7dab946142b71272f7e567929
|
|
BLAKE2b-256 checksum How to use checksums |
3715c9152531c59ed6bf3d5572d9816d8c5b66057624545eccfaa1f64e3532c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.11
|
Security for weblate_fedora_messaging 0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.