Hello.

Currently i18n_taxonomy relies on the translate interface permission in order to grant permission for translating tags.
This is conceptually and practically wrong. First, tags are not interface. Second, it's to be expected (as it is the requirement where I work) that I'd like a group of people to be able to translate tags but not the UI strings.

This requires a new ad hoc permission.

Comments

vincenzo’s picture

StatusFileSize
new2.69 KB

A possible viable patch attached.

vincenzo’s picture

StatusFileSize
new2.76 KB

I had forgotten the comment for the hook_permissions in the previous one.

vincenzo’s picture

Status: Active » Needs review
dublin drupaller’s picture

#2 looks good Vincenzo. recommend we get this in asap.

pbz1912’s picture

Status: Needs review » Reviewed & tested by the community

All good for me and a really needed idea.

anou’s picture

Patch is "wrong" :

/**
 * Implements hook_permissions().
 */
function i18n_taxonomy_permissions() {

should be :

/**
 * Implements hook_permission().
 */
function i18n_taxonomy_permission() {

And it doesn't works with "Localize" terms... Sorry I didn't test it with "Translate" terms

anou’s picture

Status: Reviewed & tested by the community » Needs work
dublin drupaller’s picture

Status: Needs work » Needs review
StatusFileSize
new2.75 KB

amended patch attached.

Status: Needs review » Needs work

The last submitted patch, i18n-taxonomy-perms-1990330.patch, failed testing.

Encarte’s picture

StatusFileSize
new2.69 KB
Encarte’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, i18n-taxonomy-perms-1990330_2.patch, failed testing.

Encarte’s picture

Seems there were some changes on dev, but this patch is working against the 7.x-1.8 release (tested the "Translate" option).

vincenzo’s picture

I'll try and fix/update this patch ASAP. I will do it against -dev.

vincenzo’s picture

StatusFileSize
new2.69 KB

I've just been working on this, and I have the feeling the patch was failing the test just because the latest files were corrupted.
At least, that's what I got. I took the latest patch from Encarte and couldn't apply, git-apply was coming back with this error

fatal: corrupt patch at line 59

Therefore I recreated it, and after that the patch applied cleanly against -dev.
Let's hope I am right.
Here we go.

vincenzo’s picture

Status: Needs work » Reviewed & tested by the community
jose reyero’s picture

Title: Translating taxonomy and taxonomy terms should have their own permission » Translating taxonomy and taxonomy terms and others... should have their own permission
Category: bug » feature
Status: Reviewed & tested by the community » Needs work

This may make some sense but not only for taxonomies but for any other object (menu items, blocks...) so at this point it will create more inconsistencies than we have actually.
On the other side, existing permissions are more consistent with the 'interface translation' pages, where you can translate all kind of strings.

So existing permissions may be conceptually wrong but this won't get them any better, and unless we really fix all these permissions I don't think adding a new one will actually improve anything. It will just break permissions for existing working sites.

robloach’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new5.09 KB

Might actually be better to take them on one at a time. Then the patch and diff won't be huge and unmaintainable.

In other news, I found a few additional changes to help make this work. Note that tests fails with or without the patch, and taxonomy translation is inherited from string translation.

Status: Needs review » Needs work

The last submitted patch, 18: i18n_taxonomy-1990330.patch, failed testing.

jose reyero’s picture

Priority: Major » Normal