Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
It looks like the translation folder is not cleaned up. The l10n_update_file table has the latest versions, but there are numerous versions of translation files on disk. These should be removed if no longer used to free up the disk.
Proposed resolution
We can use hook_cron and compare the list with the disk.
Remaining tasks
Decide if this should be conditional or not.
User interface changes
to be determined.
API changes
probably none
Data model changes
none
Comments
Comment #2
Sutharsan CreditAttribution: Sutharsan as a volunteer commentedChanging to feature request.
Comment #3
Sutharsan CreditAttribution: Sutharsan as a volunteer commentedSharing my thought: Some system place the translation files directory under revision control. In those cases new files are added to the repository and the site imports local files only. These system will not write and should not remove too.
Comment #4
Sutharsan CreditAttribution: Sutharsan as a volunteer commentedWhen a new translation gets downloaded, the translation files of the same module and language can be removed. Oder translations can be found using some regex on the file name. Something along the line of:
{project name}-.*\.{language code}{optional number suffix}\.po