Closed (fixed)
Project:
Views Bulk Operations (VBO)
Version:
6.x-1.7
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 May 2009 at 09:56 UTC
Updated:
31 Aug 2009 at 09:55 UTC
When translating the action name in Bulk Operations to another language the drop down list or the buttons controls are malfunction. To overcome this problem i edited again the view and in the bulk operation settings i reselected the translated actions and it worked again.
I think the actions should not be reselected after translation.
Regards,
Comments
Comment #1
infojunkieHow did you translate the action names? Please explain the process in detail.
Comment #2
ali.khairat commentedThe Translation was done by enabling Locale module and Localization client module, then i searched for the text i want to translate and translate it.
Comment #3
infojunkieThanks, I'll try it this way.
Comment #4
a.medhat commentednice observation ali it happens to me too
Comment #5
infojunkieComment #6
infojunkieI wasn't able to reproduce this behavior on my side. Here's what I did:
* Enabled Localization Client and Locale modules
* admin/settings/language/add: added Arabic language
* admin/settings/language/overview: selected Arabic to be default language
=> The screen went RTL
* admin/content/node2: clicked "TRANSLATE TEXT"
* Selected "Change node author" in PAGE TEXT list
* Translated it to "مؤلف جديد" and pressed "Save translation"
* Pressed CTRL+F5 to refresh the page
=> The action "مؤلف جديد" was listed in the available actions
Did you do something different or am I overlooking something?
Note that VBO changed its method of storing actions between 6.x-1.4 and 6.x-1.5. In the new storage system, modifying the action's label (as we did here) should not affect the storage.
Comment #7
ali.khairat commentedYes actually i forgot to say that it happens for the actions that i write in the code.
here is a sample of the action looks something like this:
function hook_action_info() {
return array(
'action' => array(
'description' => t('Modify User'),
'type' => 'user',
'configurable' => FALSE,
'hooks' => array(
'user' => array('load'),
),
),
);
}
When i try to translate the word "Modify User" to "تغير عضو" the drop down list gives a lot of ones and strange things.
Comment #8
infojunkieCan you please try the steps I sent above on the default VBO and let me know if you see the same behaviour?
The "ones" that you report after translation are typical of the old version of VBO... maybe you have two overlapping versions of the module in 2 different folders?
Comment #9
ali.khairat commentedDid you read my last reply #7 i told you that it works fine for the default actions however for actions that i implemented in my module it does not work.
Comment #10
infojunkieIf you want to say that it happens only for your own actions, you have to write the word "only". Otherwise I cannot know whether your tested it with default actions or not.
Since it happens only for your own actions, please post the code here, maybe we'll find something missing.
Comment #11
ali.khairat commentedOK sorry for the misunderstanding i thought you got my point from the beginning.
Action Info
Action
Comment #12
infojunkieI tried your hook_action_info() above in a new test module. The label was translated fine.
We'll need to debug the module. In file views_bulk_operations_plugin_style.inc, function
get_selected_operations(), VBO constructs the list of actions that it will display in the view. Make sure you have devel.module enabled, then insert the linebefore the function's
returnstatement.If you find your action's label is wrong, try to remove the
t()function in the lineWhat do you get?
Comment #13
owahab commentedHello Karim.
Thank you for the immense effort you're putting in this amazing module.
I am not sure this could be a solution for the issue but isn't it a good idea to remove the t() in the line:
Thank you.
Comment #14
infojunkieHey Omar! Nice to find you in my issue queues :-)
Yes I think it would make sense in general, since the label is already translated in the hook_action_info().
Comment #15
infojunkieClosed unless I hear back from the original poster.
Comment #16
Marko B commentedI have the same problem. Added another languge and went to translate dropdows from Bulk Op. With normal translation at admin/build/translate/search
I have 3 ops. promote/demote to f.page and delete node. When i translate even one. next time i see view i have this for drop down besides execute button
and many more rows.
Also solving it now with selecting actions again and makeing it work, but 10 minutes ago i had crash of localhost and couldnt get it running and then watchdog table had gone bad and had to restore my DB from backup, just while trying to fix this problem with bulk OP so, it could be dang. stuff. Only using local module when translating.
Comment #17
miglius commentedI can confirm that upgrading to the dev version solved very same issue on my setup. However, running the update.php script resulted in loss of the selected operations in my views. I had manually alter the views and reselect the operations.