In a project of mine I needed to have the capability for logged in registered users to be able to translate their own content. Because the default Drupal 6 Translation module did not have this capability, I searched for solution and found that some fixes were made in Drupal 5 already. This turned out to be a small 3-4 lines fix for Drupal 6, too.

Comments

ju.ri’s picture

This is great and very much needed for drupal 6. I tried your patch on the current 6.13 release and it fails. After adding the changes manually, it seems to work well, but when someone without "translate all" permission actually tries to add a new translation to a node I get a white screen. Could someone check if this still works? I know there is work done on the drupal7 branch but not for D6.

ju.ri’s picture

ok I did the manual patching again this time everything seems fine. Thanks! Still I think this should be in the 6.x code. Its a much requested feature if you do a search on drupal.org.

anne-pierre’s picture

Hello,

I am might need this patch and have no clue how to apply it. Could you please send me a hint? Thank you in advance.
I use D6 + Internationalization + locale and all I can do is give permission to users to translate the site's entire content. Not good for me.
Cheers,

A-P

lucuhb’s picture

Version: 6.8 » 6.16

I searched to have a 'translate content' permission only for a person with update permission on the node, so other people with only 'view' permission on the node will not be able to translate the node,
To do that, I only change the word 'view' to 'update' in _translation_tab_access funtion of translation.module; line 79 (in drupal 6.16 version) :
this

 function _translation_tab_access($node) {
  return !empty($node->language) && translation_supported_type($node->type) && node_access('view', $node) && user_access('translate content');
}

replace with :

 function _translation_tab_access($node) {
  return !empty($node->language) && translation_supported_type($node->type) && node_access('update', $node) && user_access('translate content');
}

hope this will help !

Status: Needs review » Needs work

The last submitted patch, translate-own-nodes.patch, failed testing.

anne-pierre’s picture

thank you lucuhb, this seems to work well for me. Cheers.

Jānis Bebrītis’s picture

Category: feature » support

#4 works.

Do we really have to break core for this bug to be fixed? :(

Jānis Bebrītis’s picture

Priority: Normal » Major

how do we promote #4 to core?

StevenWill’s picture

StatusFileSize
new583 bytes

Try this patch.

StevenWill’s picture

Status: Needs work » Needs review

Updating status.

Status: Needs review » Needs work

The last submitted patch, translation_node_access.patch, failed testing.

thelionkingraja’s picture

Status: Needs work » Needs review

translate-own-nodes.patch queued for re-testing.

AndyThornton’s picture

translate-own-nodes.patch queued for re-testing.

plach’s picture

Status: Needs work » Needs review

I ain't sure this is a bug or a feature request. In any case this must be addressed in D8 now.

plach’s picture

Version: 6.16 » 8.x-dev
Category: support » feature
Status: Needs review » Needs work
laraz’s picture

Version: 8.x-dev » 6.22
Status: Needs review » Fixed

#4 it works for me, thanks.

plach’s picture

Version: 6.22 » 8.x-dev
Status: Fixed » Needs work

@laraz:

Although hacking core may work for you, please leave this open so we can come up with a proper solution at least for D8.

laraz’s picture

@plach ok! sorry.

penyaskito’s picture