0

I have been trying unsuccessfully to alter the text of the message in the bulk submit. The code, place inside _views_bulk_operations_direct_process ,producing the message is:

$context['results']['log'][] = t('Performed %operation on @items.', array(
  '%operation' => $operation->label(),
  '@items' => format_plural(count($entities), '1 item', '@count items'),
));

How can I modify this? The message is displayed on any change made on the bulk view by the edit form(hook_form_views_form_og_members_admin_default_alter).

1 Answer 1

1

Use the string overrides module - anything passed through t() will be caught by this and it provides an admin interface similar to the localization functionality to make it easy to look up these strings and translate or change them as you like. It also recognizes variables so you can still use the context of the function. From the module:

  • Easily replace anything that's passed through t()
  • Locale support, allowing you to override strings in any language ...
  • Note that this is not a replacement to Locale as having thousands of overrides can cause more pain then benefit. Use this only if you need a few easy text changes.

You can also do this in your settings.php file with a simple array, ex:

$conf['locale_custom_strings_en'][''] = array(
   'Performed %operation on @items.'      => 'Your Changes',
);

This handbook page covers both of these methods in much more detail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.