Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 6 years ago

#29860 closed defect (bug) (fixed)

Remove theme/plugin translations when deleting a theme/plugin

Reported by: ocean90's profile ocean90 Owned by:
Milestone: 4.1 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

When deleting a theme or a plugin the translation files remain in WP_LANG_DIR, when they were installed via the new Translation API (language packs). We should remove them too.

Too keep it simple I attached a patch which doesn't introduce any new API.

I changed wp_get_installed_translations() to return only translations which also have a .mo file since just a .po file isn't enough.

Attachments (2)

29860.patch (7.8 KB) - added by ocean90 10 years ago.
29860.2.patch (13.3 KB) - added by ocean90 10 years ago.

Download all attachments as: .zip

Change History (5)

@ocean90
10 years ago

This ticket was mentioned in IRC in #wordpress-dev by ocean90. View the logs.


10 years ago

@ocean90
10 years ago

#2 @ocean90
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In 29856:

Language packs: Remove translations when deleting a theme or a plugin.

This is for translation files in WP_LANG_DIR which are installed through a language pack.
Change wp_get_installed_translations() to only return a translation if the .mo file also exists.

fixes #29860.

#3 @ocean90
6 years ago

In 44675:

I18N: Remove JSON translations when deleting a theme or a plugin.

See #29860.
Fixes #45467.

Note: See TracTickets for help on using tickets.