weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Post announcement on project/language

Open nijel opened this issue 1 year ago • 7 comments

Describe the problem

Announcements can already be posted on several scopes, but project/language one is missing.

Describe the solution you would like

Fill the gap and add the UI to post it and change the context_filter method to display it in correct scopes.

Describe alternatives you have considered

No response

Screenshots

No response

Additional context

No response

nijel avatar Feb 14 '24 15:02 nijel

This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our contributors documentation.

github-actions[bot] avatar Feb 14 '24 17:02 github-actions[bot]

Hi! I'm a newbie contributor and I'd like to take up this issue.

ivanacha avatar Feb 17 '24 20:02 ivanacha

@ivanacha You're welcome.

The Announcements model already has all the fiels to store this relation, so the missing parts are:

  • Add announcement form to the project/language view to support adding it there.

  • Adjust context_filter to include project/language assigned announcements in the matching scopes:

    https://github.com/WeblateOrg/weblate/blob/287feb9a1bbe9cb26fa184d5fc649d9df23053d7/weblate/trans/models/announcement.py#L17-L44

nijel avatar Feb 19 '24 10:02 nijel

Alright, I'll start working on it.

ivanacha avatar Feb 19 '24 19:02 ivanacha

@nijel I am unable to find the project/language view in the views folder to add the announcement form.

ivanacha avatar Feb 20 '24 01:02 ivanacha

It is here: https://github.com/WeblateOrg/weblate/blob/a697f36e902e03c1f28f5427d0d6cb4e8429e8ee/weblate/trans/views/basic.py#L225-L283

nijel avatar Feb 20 '24 12:02 nijel

Hi guys, check my PR #11561 for this issue.

harriebird avatar May 04 '24 06:05 harriebird

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 May 10 '24 09:05 github-actions[bot]