Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi. If you choose the checkboxes option for auto assign role, the interface is not translatable (only for checkboxes, the other options works well)
This is because fault of t() function in the variables. To patch it you must edit autoassignrole.module and change this:
/**
* Implementation of hook_user().
*/
function autoassignrole_user($op, &$edit, &$account, $category = NULL) {
in line 201, for the title block:
$form['autoassignrole_user'] = array(
'#type' => 'fieldset',
'#title' => _autoassignrole_get_settings('user_fieldset_title'),
'#collapsible' => FALSE,
'#collapsed' => FALSE,
);
to:
$form['autoassignrole_user'] = array(
'#type' => 'fieldset',
'#title' => t(_autoassignrole_get_settings('user_fieldset_title')),
'#collapsible' => FALSE,
'#collapsed' => FALSE,
);
in line 246:
'#title' => t(_autoassignrole_get_settings('user_title')),
'#default_value' => $edit['user_roles'],
'#options' => $roles,
'#description' => _autoassignrole_get_settings('user_description'),
to:
'#title' => t(_autoassignrole_get_settings('user_title')),
'#default_value' => $edit['user_roles'],
'#options' => $roles,
'#description' => t(_autoassignrole_get_settings('user_description')),
Comments
Comment #1
grasmash CreditAttribution: grasmash commentedcan you post a real patch for this?
Git patch instructions:
http://drupal.org/node/707484
Comment #2
pokepasa CreditAttribution: pokepasa commentedI will try to do it.
Learning now how to use git (I never used it before)
Comment #3
pokepasa CreditAttribution: pokepasa commentedMan, I lost one hour trying to understand how GIT works and I still dont know how to download the code from autoassignrole and make a patch.
I followed this pages, and still unable to see any code to patch:
http://drupal.org/node/1054616
http://drupal.org/node/367392
http://drupal.org/node/1015228
I've installed GIT and I make a local directory to work with autoassignrole, but I apply the commands from the tutorial and nothing happens:
But my working directory is still empty. Also:
Launch error: git branch 1-checkboxes_not_translatable
Some tips are welcomed.
Comment #4
grasmash CreditAttribution: grasmash commentedThe issue is that you're specifying an invalid branch.
Drupal's naming conventions dictate that you name branches in the pattern "6.x-1.x", leaving the last digit off in favor of the 'x'. The last digit is used to designating an actual release, which is done with tags. So, '6.x-1.x' would be the branch where on going development takes place, '6.x-1.2' would be a release tag designating a specific snapshot of the '6.x-1.x' branch.
In any case, you can always just copy and paste the required git clone command from a project's version control tab. Visit:
http://drupal.org/project/autoassignrole/git-instructions
It gives you the option of choosing from the 6.x-2.x or 6.x-1.x branches, and will generated the necessary git command based on your selection. For 6.x-1.x, the command would be:
Hope that helps!
Comment #5
pokepasa CreditAttribution: pokepasa commentedHi Mad.
After 2 hours of trying, finally I understood how I was failing with the f*&$ing GIT, that no one explain: in Windows, when you install GIT (with GUI and Bash), the GUI console open an empty repository and this drives me crazy, until I was able to understand that the command
git clone --branch 6.x-1.x
creates another repository:
I was looking for files in an empty repository with GUI interface, while I must choose to open an existing repository in the path git/autoassigrole, that was the repository that the "git clone" command create.
Well, I used the master branch for commiting changes, but I dont know if changes are uploaded automatically or not (I only make a "stage" and a commit in the GUI interface)
I can see my changes in the master branch, that are this I put here. I don't know if this is what you want or I need to do extra steps.
Comment #5.0
pokepasa CreditAttribution: pokepasa commentedTo add translation for block title