weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Fedora messages when a new source string is added does not contain the source string

Open superDross opened this issue 2 years ago • 3 comments

Describe the problem

The message created as part of https://github.com/WeblateOrg/weblate/issues/7880 did not add the source string to the actual message. It would be preferable to have the source string available in the message so we can be notified of exactly which source string has been created anytime a Change.ACTION_NEW_STRING is saved.

Describe the solution you'd like

The feature should emit a message with the source string that has been created as part of an Change.ACTION_NEW_STRING change.

The body of the message should look something like this:

Body: {
    "action": "New string to translate",
    "author": "david.ross",
    "component": "new_component",
    "context": "context",
    "count": 1,
    "id": 1,
    "project": "new_project",
    "source": [
        "Hello"
    ],
    "timestamp": "2022-09-15T11:59:43.979900+00:00",
    "translation": "en",
    "url": "https://my-weblate.com/translate/new_project/new_component/en/?checksum=xxxxx",
    "user": "david.ross"
}

I wonder if this could be achieved by adding an optional unit argument that defaults to None to the Translation.notify_new method signature. The unit can then be parsed to the Change create call within said method.

I suppose the unit could be parsed to Translation.notify_new near the end of the existing call in the Translation.add_unit method.

Describe alternatives you've considered

No response

Screenshots

No response

Additional context

No response

superDross avatar Sep 15 '22 13:09 superDross

The new string event is triggered once per update and might refer to multiple added strings (see count attribute).

nijel avatar Sep 16 '22 10:09 nijel

Thanks for clarifying.

In that case https://github.com/WeblateOrg/weblate/issues/7880 persists. We were not receiving and are still not receiving fedora messages when new source strings are created. To be specific I mean the Change.ACTION_NEW_SOURCE action is not emitting the message as it was prior to Weblate version 4.13.0.

Shall I reopen the aforementioned issue or close this one and create a new ticket describing the bug in more detail?

superDross avatar Sep 16 '22 11:09 superDross

There is no filtering in the emitting of the fedora messaging events. If the change is visible in Weblate history, the event will be emitted. Still, it does not refer to individual strings - this was always meant as a translation level event indicating that there are some new strings to translate, and the e-mail notifications are bound to this.

nijel avatar Sep 21 '22 12:09 nijel

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

github-actions[bot] avatar Oct 02 '22 02:10 github-actions[bot]

This issue has been added to the backlog. It is not scheduled on the Weblate roadmap, but it eventually might be implemented.

In case you need this feature soon, please consider helping or push it by funding the development.

github-actions[bot] avatar Oct 05 '22 14:10 github-actions[bot]

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

github-actions[bot] avatar Oct 12 '22 14:10 github-actions[bot]