Add a setting to prevent locale_deploy from removing translations

Created on 10 July 2024, 3 months ago

Problem/Motivation

The module is not multi-site aware which means that if sites have different modules enabled then the translations are not correctly maintained if they are use the same translations folder. If they don't, it works but it means you will have duplicates of the translations in your git. Which is ugly.

Also do we need to scan more locations for custom code? I would argue we should not support custom code in sites/SITE/modules folder.

Steps to reproduce

Set up a multi-site with different contrib modules but the same translations directory.

Proposed resolution

Allow the users to disable the automatic removal of translation files and make it their responsibility.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @alexpott
  • πŸ‡©πŸ‡ͺGermany chr.fritsch πŸ‡©πŸ‡ͺπŸ‡ͺπŸ‡ΊπŸŒ

    Instead of composer.json you need to use composer.lock. That contains all installed modules. The json could only contain thunder/thunder-distribution.

  • πŸ‡©πŸ‡ͺGermany daniel.bosen

    I would assume, that composer.json would not be good enough to find all modules dependencies. We would propably need to look into the composer.lock file instead. But this seems to be to complicated.

    In our use-case the option to disable the removal of translation files would be sufficient.

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    \Composer\InstalledVersions is actually what should be used :D

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Thought about this some more. The composer inspection options will not work easily at all because module not always equal to project (think sub modules). Therefore this issue is going to add a setting to prevent deletes and put the management of removing translations in the user's hands.

  • Merge request !10Resolve #3460429 "Add a setting" β†’ (Open) created by alexpott
  • Status changed to Needs review 3 months ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ
Production build 0.71.5 2024