Projet

Général

Profil

Révision 01f36513

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/i18n/i18n_string/i18n_string.module
118 118
    'file' => 'i18n_string.admin.inc',
119 119
    'access arguments' => array('translate interface'),
120 120
  );
121

  
121 122
  $items['admin/config/regional/i18n/strings'] = array(
122 123
    'title' => 'Strings',
123 124
    'description' => 'Options for user defined strings.',
124 125
    'weight' => 20,
125 126
    'type' => MENU_LOCAL_TASK,
126 127
    'page callback' => 'drupal_get_form',
127
    'page arguments' => array('variable_edit_form', array('i18n_string_allowed_formats', 'i18n_string_source_language')),
128
    'page arguments' => array('variable_edit_form', array('i18n_string_allowed_formats', 'i18n_string_source_language', 'i18n_string_textgroup_class_[textgroup]')),
128 129
    'access arguments' => array('administer site configuration'),
129 130
  );
130 131
  // AJAX callback path for strings.
......
519 520
  }
520 521
}
521 522

  
523
/**
524
 * Implements hook_i18n_string_info_alter().
525
 *
526
 * Set determined classes to use for the text group.
527
 */
528
function i18n_string_i18n_string_info_alter(&$info) {
529
  foreach (array_keys($info) as $name) {
530
    // If class is not defined. Classes from other modules, fixed classes and etc.
531
    if (!isset($info[$name]['class'])) {
532
      $info[$name]['class'] = variable_get('i18n_string_textgroup_class_' . $name, 'i18n_string_textgroup_default');
533
    }
534
  }
535
}
522 536

  
523 537
/**
524 538
 * Translate / update multiple strings

Formats disponibles : Unified diff