Project

General

Profile

Bug #17348

enable weblate.addons.git.GitSquashAddon

Added by hefee 4 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Feature Branch:
https://salsa.debian.org/hefee/puppet-tails:hefee/17348-weblate.addons.git.GitSquashAddon
Type of work:
Sysadmin
Blueprint:
Starter:
Affected tool:
Translation Platform

Description

It may be a smart idea to enable `weblate.addons.git.GitSquashAddon` to have less Weblate commits.

Let's read documentation first and decide.

History

#1 Updated by hefee 3 months ago

  • Assignee set to drebs

I checked the documentation and it seems, like, we want to to enable this addon:
https://docs.weblate.org/en/weblate-3.9.1/admin/addons.html#squash-git-commits

My feeling is that by author is the best squashing algorithm for us, as this allows us to keep authorship.

#2 Updated by drebs 3 months ago

  • Assignee changed from drebs to hefee

The doc of the version we're running does not list the possibility of configuring by author. It is possible that it's just lacking in the config, and also it looks like it's something that is not configurable through settings.py, but probably by web interfaces.

Do we want to enable this anyway now?

#3 Updated by hefee 3 months ago

  • Assignee changed from hefee to drebs

drebs wrote:

The doc of the version we're running does not list the possibility of configuring by author. It is possible that it's just lacking in the config, and also it looks like it's something that is not configurable through settings.py, but probably by web interfaces.

It seems like 3.5.1 can be configured like the 3.9:
https://github.com/WeblateOrg/weblate/blob/weblate-3.5.1/weblate/addons/forms.py#L103

I think you can only configure this via the Webinterface anyways and the 3.5.1 is only missing the documentation.

Do we want to enable this anyway now?

Yes.

#4 Updated by CyrilBrulebois 3 months ago

  • Target version changed from Tails_4.2 to Tails_4.3

#5 Updated by anonym about 2 months ago

  • Target version changed from Tails_4.3 to Tails_4.4

#6 Updated by hefee about 1 month ago

  • Status changed from Confirmed to Needs Validation
  • Assignee changed from drebs to zen
  • Feature Branch set to https://salsa.debian.org/hefee/puppet-tails:hefee/17348-weblate.addons.git.GitSquashAddon

#7 Updated by zen about 1 month ago

  • Status changed from Needs Validation to In Progress
  • Assignee changed from zen to hefee

I have merged this, but I found 2 difficulties:

  1. The doc says (and it's true) that "the addon management can be found under Manage menu of a translation component". This suggests to me that addon configuration is made per-component. If that is true, we'll have to have a programatic way to configure GitSquashAddon for all components, as that is unfeasible by hand.
  2. After merging the change to settings.py and going to a component addon management page (for example https://translate.tails.boum.org/addons/tails/anonymous_internet/), I don't see any enabled addon, and I also don't see the GitSquashAddon listed. There are actually very few addons listed (only 4), while I'd expect everything under /usr/local/share/weblate/weblate/addons/ to be listed (22 in total), and exactly 10 of them enabled as per our current configuration in settings.py.

I guess we have to further investigate what might be wrong here. Either my own understanding of how addon works, or something else in the system that is preventing addons from working correctly.

@hefee are you available and willing to investigate this further?

#8 Updated by hefee about 1 month ago

  • Status changed from In Progress to Resolved
  • Assignee deleted (hefee)

@zen: This addon is only available for the first one, that is holding the repository. Every other component just reuses these settings:

https://translate.tails.boum.org/addons/tails/index/

I checked the source and it seems like the addons are not shown, because we don't for fill their requirements. There are the can_install methods for all the addon classes.

Also available in: Atom PDF