Projet

Général

Profil

Révision e0d35157

Ajouté par Assos Assos il y a plus de 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/i18n/i18n_block/i18n_block.module
37 37
  return $items;
38 38
}
39 39

  
40
/**
41
 * Implements hook_permission().
42
 */
43
function i18n_block_permission() {
44
  return array(
45
    'translate blocks' => array(
46
      'title' => t('Translate Blocks'),
47
    ),
48
  );
49
}
50

  
40 51
/**
41 52
 * Implement hook_menu_alter().
42 53
 *
......
59 70
 */
60 71
function i18n_block_translate_tab_access($module, $delta) {
61 72
  $block = block_load($module, $delta);
62
  return user_access('translate interface') && $block && isset($block->i18n_mode) && ($block->i18n_mode == I18N_MODE_LOCALIZE);
73
  return (user_access('translate interface') || user_access('translate blocks')) && $block && isset($block->i18n_mode) && ($block->i18n_mode == I18N_MODE_LOCALIZE);
63 74
}
64 75

  
65 76
/**
......
226 237
    '#options' => i18n_language_list(),
227 238
    '#description' => t('If no language is selected, block will show regardless of language.'),
228 239
  );
229
  if (user_access('translate interface')) {
240
  if (user_access('translate interface') || user_access('translate blocks')) {
230 241
    $form['actions']['translate'] = array(
231 242
      '#type' => 'submit',
232 243
      '#name'   => 'save_translate',

Formats disponibles : Unified diff