Package: weblate-fedora-messaging
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.InstallationInstall from PyPI:pipinstallweblate-fedora-messagingSources are available at <https://github.com/WeblateOrg/fedora_messaging>.Configure Weblate integration:# Add to installed appsINSTALLED_APPS.append("weblate_fedora_messaging")# Path to configuration fileFEDORA_MESSAGING_CONF="/etc/fedora-messaging/config.toml"# fedora_messaging_task retry settings (optional, the following are the default values)FEDORA_MESSAGING_TASK_RETRY_BACKOFF=600FEDORA_MESSAGING_TASK_RETRY_BACKOFF_MAX=3600FEDORA_MESSAGING_TASK_RETRY_JITTER=TrueFEDORA_MESSAGING_TASK_MAX_RETRIES=3# Route messaging to notify queueCELERY_TASK_ROUTES["weblate_fedora_messaging.tasks.*"]={"queue":"notify"}Messages contentTopicAll messages have topicweblate.<action>.<project>.<component>.<translation>. The action is
lowercase textual representation of action with underscores instead of space,
for exampleresource_update, all other parts are optional and represent
slug of the object or a language code.BodyThe body consists of following fields (given that they are available for the event):idNumerical ID of changeactionVerbose name of the change, seeChange actions source codefor possible valuestimestampISO formatted timestamptargetNew value of the change (eg. new translation of the string)oldOld value of the change (eg. previous translation of the string)sourceSource string.urlAbsolute URL to view the related object.authorAuthor username (this can be different from user for example when accepting suggestions)userActing usernameprojectProject slugcomponentComponent slugtranslationTranslation language codeHeadersThere are additional headers which you might utilize for routing as well:actionVerbose name of the change, seeChange actions source codefor possible valuesprojectProject slugcomponentComponent slugExample messagesRepository 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"]}ContributingContributions are welcome! Seedocumentationfor more information.