This thread is resolved. Here is a description of the problem and solution.
Problem:
We are trying to set up a user role for translators on our site that gives them the permissions to edit and translate the content, but not to access plugins and theme options.
Solution:
Just add this code to the functions.php file:
add_filter('wpml_user_can_translate', function ($user_can_translate, $user){
if (in_array('editor', (array) $user->roles, true) && current_user_can('translate')) {
return true;
}
return $user_can_translate;
}, 10, 2);
67% of people find this useful.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
We are trying to set up a user role for translators on our site that gives them the permissions to edit and translate the content, but not to access plugins and theme options etc.
We are using the plugin "Members" to create the user role and permissions. I have attached a screenshot of the permissions I have set for the role (which we have called "Editor").
I had a question:
As an administrator on the site, I am able to easily edit translations that have already been completed.
When our translators (Editors) go to edit a completed translation, they are not able to edit it and are instead taken to the translation queue.
Is there a permission that we can set to have a lesser user role than admin be capable of easily editing completed translations?
Let me know if this makes sense or requires further explanation.
Basically, any user that has the wpml_manage_translation_management should be able to edit the translations. I had a look at the screenshot that you attached but I'm not sure if that list of taken from the admin or from the editor account role.
Also, you can go to the WPML → Translation Management → Translators tab and add the account that you'd like to edit the complete translation as a translation manager (the right side).
The list that I sent you on the screenshot was the permissions granted to the "Editor" role. Which I believe covered all of the capabilities listed in the link you sent through. Even when we list the "Editors" as Translation Managers they are still not able to edit completed translations easily, like an admin can.
If you have any more advice on this that would be brilliant.
then edited the editor role and selected all the options from the screenshot I attached. Also, please make sure that the editor account is set as presented in the screenshot in WPML → Translation Management → Translators.
Once I did that and used that account to access the dashboard area, I was able to press the pencil icon for a page, for example, and see the translation.
Can you give this a try and tell me how things work for you, please?
I removed the credentials you attached to your previous message because they were publicly visible and we don't want that.
Can you attach again the credentials to the dashboard area, this time to the special fields available, please?
The next reply is set to be private so you can safely send me the credentials.
Can you give me admin access to the account that you created for me, please? Right now I can't access a few areas to check things out about the editor role.
Thank you for giving me admin access too. I had another look at the editor account and I understand now what you're asking for. There are actually a lot more translations on the website (now that I have admin access), apart from the ones created by the editor account that you previously sent to me.
I couldn't find any other change for this so I asked my colleague to have a look at this and see if there's anything else I can do in order to achieve what you're looking for. I'll give you a message back once I get an update from one of my colleagues (which shouldn't take long).
I checked this one more time and now I can see that you're using a plugin called Members in order to control the user account roles.
I'm not sure how this Members plugin works but I did test the editor account on my testing website, without using the Members plugin (so the editor account is created through the WordPress option) and I can edit the translations that are created by other users on the website.
In this case, can you deactivate the Members plugin, then create a new editor account on your website, set it as a translations manager in WPML → Translation Management → Translation Roles area, and try again to edit a translation that's done using another account, please? This is the setup I'm using on my test and I'm not redirected to the translation queue.
When I click to edit an existing translation it is still redirecting me to the translations editor page. Can you check this out to see if you are experiencing the same thing on your end?
I can send you the login to this new editor account if you can make the next message private.
I used the previous editor account to check things out (jonathanbaldwin8@gmail.com). I can see that you still cannot access the translations created by others.