﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	focuses
39677	Introduce capabilities for managing translations	flixos90	flixos90	"We currently have capabilities for managing core updates, plugin installation/updates and theme installation/updates. However we lack capabilities for managing translation installation/updates, so let's add them. This is especially critical as it's currently not possible to allow a user to only install/update translations while not allowing them to install/update anything else.

I suggest introducing `install_translations` and `update_translations`. I think they should be added as primitive caps to the `administrator` role (would need to happen in WP version update function), just how the other above caps work. We would then also need to add them to `map_meta_cap()`, where it could currently go into the same group as the other caps I mentioned above. However, let's also have an eye on #38673, as the changes on that ticket might require us to handle the `map_meta_cap()` stuff differently.

About usage of these capabilities, there are several areas in core where they could be used:

* `wp-admin/options.php` line 185
* `wp-admin/options-general.php` line 147
* `wp-admin/network/settings.php` line 66 and 345
* `wp-admin/network/site-new.php` line 68 and 236
* `wp-admin/update-core.php` line 617 and 732

Regarding `wp_can_install_language_pack()`, I think the `current_user_can( 'install_translations' )` check should not go into that function as that function is also used during setup where it should be accessible to anyone."	enhancement	closed	normal	4.9	Role/Capability		normal	fixed	has-unit-tests, has-patch, granular-capabilities, commit		
