weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Categorize shared components

Open orangesunny opened this issue 6 months ago • 2 comments

Describe the problem

Components shared from different projects are not possible to put into categories in the end project.

Solution brainstorm

Enable categorization of the shared components.

The Organize or remove menu will need to be reworked to let users set the categories in the end projects comfortably.

Describe alternatives you have considered

No response

Screenshots

No response

Additional context

No response

orangesunny avatar Jun 25 '25 11:06 orangesunny

On the model side, this will need to change Component.links to use an intermediate model (through) to store Category (the migration is described at https://docs.djangoproject.com/en/5.2/howto/writing-migrations/#changing-a-manytomanyfield-to-use-a-through-model). The listing of components in categories then needs to be modified similarly that is currently used for a project.

On the UI side, this probably should move out of component settings to the Organize tab, where an option to select category in each linked project would be available. Ask @KarenKonou if you need help with the frontend.

nijel avatar Jul 03 '25 07:07 nijel

This also needs to properly handle statistics updates on the target categories. I've just fixed this for the target projects in https://github.com/WeblateOrg/weblate/pull/16028.

nijel avatar Sep 03 '25 08:09 nijel