[wp-trac] [WordPress Trac] #49132: Remove translation files when a plugin no longer exists (was: Remove translation files when a plugin or a theme no longer exists)

WordPress Trac noreply at wordpress.org
Sun Jan 5 11:05:09 UTC 2020


#49132: Remove translation files when a plugin no longer exists
------------------------------------+------------------------------
 Reporter:  audrasjb                |       Owner:  (none)
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  I18N                    |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Old description:

> That would be nice to remove existing translation files when a plugin or
> a theme is manually deleted (by FTP or whatever).
>
> Themes/plugins translation files are already removed when the
> theme/plugin is deleted with WordPress Admin, but still exist when the
> theme/plugin are manually deleted by FTP or so.
>
> To reproduce the issue:
>
> 1. Activate a plugin which is translated into your website language
> (other than en_US)
> 2. Delete the plugin folder (by FTP or whatever)
> 3. Problem: the translation files still exists in `wp-
> content/languages/plugins` folder
>
> If you delete the plugin with WP Admin Plugins screen, the translation
> files are actually deleted.
>
> ''Thanks @wpchannel who indirectly raised the issue in WP French Slack
> team and @sebastienserre for his ideas.''

New description:

 That would be nice to remove existing translation files when a plugin is
 manually deleted (by FTP or whatever).

 Plugins translation files are already removed when the plugin is deleted
 with WordPress Admin, but still exist when the plugin is manually deleted
 by FTP or so.

 To reproduce the issue:

 1. Activate a plugin which is translated into your website language (other
 than en_US)
 2. Delete the plugin folder (by FTP or whatever)
 3. Problem: the translation files still exists in `wp-
 content/languages/plugins` folder

 If you delete the plugin with WP Admin Plugins screen, the translation
 files are actually deleted.

 ''Thanks @wpchannel who indirectly raised the issue in WP French Slack
 team and @sebastienserre for his contribution.''

--

Comment (by audrasjb):

 Removing references to Themes in this ticket as there is nothing similar
 to `validate_active_plugins` to perform the theme translation files
 removal.

 Theme translation files removal should be handled in another dedicated
 ticket as it would include further investigation on themes
 deactivation/removal actions.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49132#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list